diff --git a/files/.config/nvim/mappings.vim b/files/.config/nvim/mappings.vim index 67e6e79..22319a2 100644 --- a/files/.config/nvim/mappings.vim +++ b/files/.config/nvim/mappings.vim @@ -24,6 +24,8 @@ nnoremap :w " Better tabbing +" When indenting, reselect previous selection +" if in visual mode vnoremap < >gv @@ -57,6 +59,11 @@ autocmd! User GoyoEnter Limelight autocmd! User GoyoLeave Limelight! +" Strip whitespace +" y - Remove all trailing whitespace +nnoremap y :StripWhitespace + + " fzf " p - Search files in current workdir " P - Search files in $HOME @@ -80,9 +87,9 @@ nmap E :CocCommand explorer --reveal expand('') " coc.nvim -" c - Open command list " Ctrl-n - Go to previous diagnostic " Ctrl-p - Go to next diagnostic +" c - Open command list " d - Jump to definition of current symbol " r - Jump to references of current symbol " j - Jump to implementation of current symbol @@ -91,20 +98,13 @@ nmap E :CocCommand explorer --reveal expand('') " k - Symbol renaming nmap (coc-diagnostic-prev) nmap (coc-diagnostic-next) -" broken d nmap d (coc-definition) nmap r (coc-references) -" broken j nmap j (coc-implementation) nmap s :CocList -I -N --top symbols nmap n (coc-rename) nmap c :CocCommand -" vimspector -" D - Start debugger -nmap D :call vimspector#Launch() - - " Search shorcuts " h - Find and replace " / - Clear highlighted search terms while preserving history diff --git a/files/.config/nvim/plugins.vim b/files/.config/nvim/plugins.vim index 0906cba..67ecc84 100644 --- a/files/.config/nvim/plugins.vim +++ b/files/.config/nvim/plugins.vim @@ -85,6 +85,7 @@ Plug 'junegunn/rainbow_parentheses.vim' let g:rainbow_conf = {'guis': ['bold']} " }}} Plug 'unblevable/quick-scope' +Plug 'ntpeters/vim-better-whitespace' " better motion Plug 'tpope/vim-surround'