mirror of https://git.decapod.one/brethil/dotfiles
Compare commits
7 Commits
0c95eef23a
...
26e313e21e
Author | SHA1 | Date |
---|---|---|
bretello | 26e313e21e | |
bretello | 75a00b2380 | |
bretello | 76feeb3af0 | |
bretello | 9667cf96c2 | |
bretello | 486ee8afbf | |
bretello | 5393f33795 | |
bretello | f88413ddf8 |
|
@ -1,3 +1,8 @@
|
||||||
|
/.drone.yml
|
||||||
|
/.gitignore
|
||||||
|
/.dotfiles-update
|
||||||
|
.mypy_cache
|
||||||
|
.venv
|
||||||
.git
|
.git
|
||||||
.zcompdump*
|
.zcompdump*
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# vim:ft=zsh
|
# vim:ft=zsh
|
||||||
Aloxaf/fzf-tab
|
|
||||||
djui/alias-tips
|
djui/alias-tips
|
||||||
MichaelAquilina/zsh-autoswitch-virtualenv
|
|
||||||
robbyrussell/oh-my-zsh
|
robbyrussell/oh-my-zsh
|
||||||
robbyrussell/oh-my-zsh path:plugins/ansible
|
robbyrussell/oh-my-zsh path:plugins/ansible
|
||||||
robbyrussell/oh-my-zsh path:plugins/grc
|
robbyrussell/oh-my-zsh path:plugins/grc
|
||||||
|
|
|
@ -53,7 +53,7 @@ function ppath
|
||||||
## Color string with given color. Usage: `color $NAME "string"`, available colors in `colors.sh`
|
## Color string with given color. Usage: `color $NAME "string"`, available colors in `colors.sh`
|
||||||
function color
|
function color
|
||||||
{
|
{
|
||||||
color=$1
|
local color=$1
|
||||||
shift 1
|
shift 1
|
||||||
echo -e "${color}$@${CLEAR}"
|
echo -e "${color}$@${CLEAR}"
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ function genpwd
|
||||||
## List defined functions in $DOTFILES/functions.sh
|
## List defined functions in $DOTFILES/functions.sh
|
||||||
function list_functions
|
function list_functions
|
||||||
{
|
{
|
||||||
grep --color=no -A 1 '^##' $DOTFILES/functions.zsh | sed -E 's/function (.*)/\1/g'
|
grep --color=no -A 1 '^##' $DOTFILES/functions/*.zsh| sed -E 's/function (.*)/\1/g'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,33 +191,6 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pipupdate(){
|
|
||||||
set -x
|
|
||||||
if [[ "$1" == "user" ]]; then
|
|
||||||
user_flags='--user'
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
if [[ -n "$@" ]]; then
|
|
||||||
pip="$1"
|
|
||||||
shift
|
|
||||||
flags="$*"
|
|
||||||
echo "pip command is: '$pip $flags'"
|
|
||||||
if ! command -v "$pip" ; then
|
|
||||||
echo "Given command ($1) does not exist." 1>&2
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
pip='python'
|
|
||||||
flags='-m pip'
|
|
||||||
echo "Using default pip: $pip $flags"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for package in $($pip $flags freeze $user_flags --local | grep -v '^\-e' | cut -d = -f 1) ; do
|
|
||||||
$pip $flags install "$user_flags" -U "$package"
|
|
||||||
done
|
|
||||||
set +x
|
|
||||||
}
|
|
||||||
|
|
||||||
# unzip file to directory with the same name of the zip file (without extension)
|
# unzip file to directory with the same name of the zip file (without extension)
|
||||||
function unzipd {
|
function unzipd {
|
||||||
|
@ -244,7 +217,6 @@ function retry() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__completion_wrapper(){
|
__completion_wrapper(){
|
||||||
# Wrapper for completion functions.
|
# Wrapper for completion functions.
|
||||||
# These can be used to force loading of all completions
|
# These can be used to force loading of all completions
|
||||||
|
|
|
@ -149,3 +149,11 @@ function! Cmd(cmd)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -nargs=1 -complete=shellcmd Cmd silent call Cmd(<q-args>)
|
command! -nargs=1 -complete=shellcmd Cmd silent call Cmd(<q-args>)
|
||||||
|
|
||||||
|
" Call actionlint (github actions linter) on current file
|
||||||
|
function ActionLint()
|
||||||
|
call setqflist([])
|
||||||
|
cexpr system('actionlint --oneline ' . expand('%'))
|
||||||
|
copen
|
||||||
|
endfunction
|
||||||
|
command! ActionLint call ActionLint()
|
||||||
|
|
|
@ -211,3 +211,7 @@ let g:fzf_colors =
|
||||||
autocmd! FileType fzf
|
autocmd! FileType fzf
|
||||||
autocmd FileType fzf set laststatus=0 noshowmode noruler
|
autocmd FileType fzf set laststatus=0 noshowmode noruler
|
||||||
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
|
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
|
||||||
|
|
||||||
|
|
||||||
|
let g:goyo_width="85%"
|
||||||
|
let g:goyo_linenr=1
|
||||||
|
|
|
@ -83,7 +83,7 @@ nmap <leader>sv :ALEGoToDefinition -vsplit<CR>
|
||||||
nmap <leader>sh :ALEGoToDefinition -split<CR>
|
nmap <leader>sh :ALEGoToDefinition -split<CR>
|
||||||
nmap <leader>st :ALEGoToDefinition -tab<CR>
|
nmap <leader>st :ALEGoToDefinition -tab<CR>
|
||||||
nmap <leader>A :ALEGoToDefinition<CR>
|
nmap <leader>A :ALEGoToDefinition<CR>
|
||||||
nmap <leader>n :ALEFindReferences -relative<CR>
|
nmap <leader>n :ALEFindReferences -quickfix <bar> copen<CR>
|
||||||
nmap <leader>h :ALEHover<CR>
|
nmap <leader>h :ALEHover<CR>
|
||||||
nmap <leader>r :ALERename<CR>
|
nmap <leader>r :ALERename<CR>
|
||||||
nmap <leader>` :ALELint<CR>
|
nmap <leader>` :ALELint<CR>
|
||||||
|
@ -112,7 +112,6 @@ map <leader>I :IndentGuidesToggle<CR>
|
||||||
map <leader>i :set cursorcolumn!<CR>
|
map <leader>i :set cursorcolumn!<CR>
|
||||||
|
|
||||||
"" Goyo
|
"" Goyo
|
||||||
nmap <leader>za :Goyo 80%x85%<CR>
|
|
||||||
nmap <leader>zz :Goyo<CR>
|
nmap <leader>zz :Goyo<CR>
|
||||||
|
|
||||||
""Misc stuff
|
""Misc stuff
|
||||||
|
@ -155,7 +154,11 @@ vnoremap <silent> <leader>gs :call GitShowVisual()<CR>
|
||||||
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
||||||
|
|
||||||
nnoremap K :exe "Rg " . expand("<cword>")<cr>
|
nnoremap K :exe "Rg " . expand("<cword>")<cr>
|
||||||
|
nnoremap GL :exe "Git log -L:" . expand("<cword>") . ":" . expand("%")<cr>
|
||||||
autocmd FileType python nnoremap T :Pytest function --pdb<CR>
|
autocmd FileType python nnoremap T :Pytest function --pdb<CR>
|
||||||
|
|
||||||
" Ultisnips
|
" Ultisnips
|
||||||
map <Leader>ue :UltiSnipsEdit<cr>
|
map <Leader>ue :UltiSnipsEdit<cr>
|
||||||
|
|
||||||
|
" Github actions linter
|
||||||
|
map <Leader>H :ActionLint<CR>
|
||||||
|
|
Loading…
Reference in New Issue