summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc20
1 files changed, 18 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 743e081..a39ae9e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -10,16 +10,32 @@ map <leader>T <Esc>:set expandtab ts=4 sw=4 sts=4<CR>
" Folds:
" map <leader>f <Esc>:set fen fdn=3 fdm=indent fml=1 fdc=3<CR>
-map ; <ESC>:FZF<CR>
+" ; -> FZF (see :help fzf-vim-commands)
+map ; <ESC>:GFiles<CR>
" H-L for next-prev buffer
nnoremap <leader>l :bnext<CR>
nnoremap <leader>k :bprev<CR>
-" S-D for prev/next Coc diagnostic
+" S-D for prev/next Coc error diagnostic
+" X-C for prev/next Coc diagnostic
nnoremap <leader>d <Plug>(coc-diagnostic-next-error)
nnoremap <leader>s <Plug>(coc-diagnostic-prev-error)
+nnoremap <leader>x <Plug>(coc-diagnostic-next)
+nnoremap <leader>c <Plug>(coc-diagnostic-prev)
+
+" F for Coc show documentation
+nnoremap <leader>f :call ShowDocumentation()<CR>
+function! ShowDocumentation()
+ if CocAction('hasProvider', 'hover')
+ call CocActionAsync('doHover')
+ else
+ call feedkeys('K', 'in')
+ endif
+endfunction
+" Symbol renaming
+nmap <leader>rn <Plug>(coc-rename)
" Append modeline after last line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX