diff --git a/vim/plugins_config.vim b/vim/plugins_config.vim index d68f482..5091b95 100644 --- a/vim/plugins_config.vim +++ b/vim/plugins_config.vim @@ -37,13 +37,15 @@ let g:ale_linters = { \ 'bash': ['bash-language-server', 'bashlint', "shellcheck"], \ 'dockerfile': ["hadolint"], \ 'zsh': ['bashlint', "shellcheck"], + \ 'c': ['clangd'], \ 'cpp': ['clangd'], - \ 'python': ['pylsp', 'pylint', 'bandit', "mypy"], + \ 'python': ['pylsp', 'pylint', 'bandit', "mypy", "flake8"], \ 'go': ['gopls', 'gobuild'], \ 'rust': ['analyzer'], \ 'yaml': ['yamllint'], \ 'javascript': ["yarn lint", "eslint", "vls"] \} + let g:ale_linter_aliases = {'vue': ['vue', 'javascript']} let g:ale_yaml_yamllint_options = "--config .editorconfig" @@ -180,7 +182,7 @@ let g:gutentags_file_list_command = { \ }, \ } let g:gutentags_generate_on_empty_buffer = 1 -let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md'] +let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md', '.venv', '*rst'] let g:gutentags_ctags_extra_args = ['--tag-relative=always', ] "" nerdtree let NERDTreeIgnore=['__pycache__'] diff --git a/vim/shortcuts.vim b/vim/shortcuts.vim index 1b22389..970450b 100644 --- a/vim/shortcuts.vim +++ b/vim/shortcuts.vim @@ -60,16 +60,18 @@ nnoremap / :Git nnoremap \ :0Git nnoremap d :Gvdiffsplit nnoremap b :Git blame -nnoremap Gp :Git push -nnoremap l :vert Git log % -nnoremap Gc :Git commit -nnoremap Gpf :Git push --force-with-lease +nnoremap gp :Git push +nnoremap gl :vert Git log % +nnoremap gc :Git commit +nnoremap gpf :Git push --force-with-lease "" Gitutter nnoremap u :GitGutterBufferToggle nnoremap L :GitGutterLineHighlightsToggle nnoremap gp :GitGutterPrevHunk nnoremap gn :GitGutterNextHunk +nnoremap gs :GitGutterStageHunk +nnoremap gu :GitGutterUndoHunk "" Coverage Highlight @@ -100,7 +102,7 @@ map J :Files map f :History map T :BTags map t :Tags -" map l :Lines + map l :Lines " FIXME: Not using CtrlP anymore, replace this with fzf ""map c :CtrlPQuickfix map s :Snippets diff --git a/vim/vimrc b/vim/vimrc index 60fcf9c..dc25032 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -79,6 +79,13 @@ au BufRead,BufNewFile */.github/*/*.y{,a}ml \ let b:ale_linters = {'yaml': ['actionlint'] } au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables + +autocmd! bufwritepost ~/.vimrc source ~/.vimrc +autocmd! bufwritepost $DOTFILES/vim/vimrc source ~/.vimrc +autocmd! bufwritepost $DOTFILES/vim/shortcuts.vim source ~/.vimrc +autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugInstall +autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugUpdate + if has('persistent_undo') let undo_dir=$HOME . "/.vim/undo" if !isdirectory(undo_dir)