From b99e0b1cffc8e97ea9e8074163b9cbff5a6f9c50 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Mon, 1 Nov 2021 09:42:10 +0200 Subject: [PATCH] Minor vimrc tweaks --- playbooks/files/dotfiles/vimrc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/playbooks/files/dotfiles/vimrc b/playbooks/files/dotfiles/vimrc index 075f12f..64d5739 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,22 @@ set foldmethod=marker " Don't use swapfile set noswapfile + + +"============================================================================== +" Coc Key mapping +"============================================================================== + +" 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