Compare commits

...

7 Commits

Author SHA1 Message Date
bretello 26e313e21e
vim: map <leader>H to actionlint on current file 2022-04-08 12:07:48 +02:00
bretello 75a00b2380
vim: fix Goyo config 2022-04-04 15:47:31 +02:00
bretello 76feeb3af0
zsh: remove fzf-tab, autoswitch virtualenv 2022-04-02 20:06:52 +02:00
bretello 9667cf96c2
update dockerignore 2022-04-02 19:58:52 +02:00
bretello 486ee8afbf
zsh: cleanup functions 2022-03-31 19:37:57 +02:00
bretello 5393f33795
vim: add GL shortcut to show git log for function under cursor 2022-03-31 19:30:31 +02:00
bretello f88413ddf8
vim: make <leader>n show references in quickfix 2022-03-31 19:30:11 +02:00
6 changed files with 24 additions and 34 deletions

View File

@ -1,3 +1,8 @@
/.drone.yml
/.gitignore
/.dotfiles-update
.mypy_cache
.venv
.git
.zcompdump*

View File

@ -1,7 +1,5 @@
# vim:ft=zsh
Aloxaf/fzf-tab
djui/alias-tips
MichaelAquilina/zsh-autoswitch-virtualenv
robbyrussell/oh-my-zsh
robbyrussell/oh-my-zsh path:plugins/ansible
robbyrussell/oh-my-zsh path:plugins/grc

View File

@ -53,7 +53,7 @@ function ppath
## Color string with given color. Usage: `color $NAME "string"`, available colors in `colors.sh`
function color
{
color=$1
local color=$1
shift 1
echo -e "${color}$@${CLEAR}"
}
@ -160,7 +160,7 @@ function genpwd
## List defined functions in $DOTFILES/functions.sh
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
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)
function unzipd {
@ -244,7 +217,6 @@ function retry() {
}
__completion_wrapper(){
# Wrapper for completion functions.
# These can be used to force loading of all completions

View File

@ -149,3 +149,11 @@ function! Cmd(cmd)
endfunction
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()

View File

@ -211,3 +211,7 @@ let g:fzf_colors =
autocmd! FileType fzf
autocmd FileType fzf set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
let g:goyo_width="85%"
let g:goyo_linenr=1

View File

@ -83,7 +83,7 @@ nmap <leader>sv :ALEGoToDefinition -vsplit<CR>
nmap <leader>sh :ALEGoToDefinition -split<CR>
nmap <leader>st :ALEGoToDefinition -tab<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>r :ALERename<CR>
nmap <leader>` :ALELint<CR>
@ -112,7 +112,6 @@ map <leader>I :IndentGuidesToggle<CR>
map <leader>i :set cursorcolumn!<CR>
"" Goyo
nmap <leader>za :Goyo 80%x85%<CR>
nmap <leader>zz :Goyo<CR>
""Misc stuff
@ -155,7 +154,11 @@ vnoremap <silent> <leader>gs :call GitShowVisual()<CR>
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<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>
" Ultisnips
map <Leader>ue :UltiSnipsEdit<cr>
" Github actions linter
map <Leader>H :ActionLint<CR>