diff --git a/playbooks/files/dotfiles/vimrc b/playbooks/files/dotfiles/vimrc index 075f12f..4a71458 100644 --- a/playbooks/files/dotfiles/vimrc +++ b/playbooks/files/dotfiles/vimrc @@ -54,8 +54,7 @@ let g:indent_guides_enable_on_vim_startup = 1 " Tab navigation and creation map :tabnew -noremap :tabn -noremap :tabp +noremap :tabn " Insert mode navigation Alt+hjkl imap @@ -343,3 +342,27 @@ set foldmethod=marker " Don't use swapfile set noswapfile + + +"============================================================================== +" Coc Key mapping +"============================================================================== +"" Use to trigger completion. +if has('nvim') + inoremap coc#refresh() +else + inoremap coc#refresh() +endif +" Symbol renaming. +nmap (coc-rename) +" Hit tab go see documentation +nmap :silent call show_documentation() +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + elseif (coc#rpc#ready()) + call CocActionAsync('doHover') + else + execute '!' . &keywordprg . " " . expand('') + endif +endfunction