Minor vimrc tweaks

This commit is contained in:
Sagi Dayan 2021-11-01 09:42:10 +02:00
parent c03aef7cb4
commit 966b71923b
Signed by: sagi
GPG key ID: FAB96BFC63B46458

View file

@ -54,8 +54,7 @@ let g:indent_guides_enable_on_vim_startup = 1
" Tab navigation and creation " Tab navigation and creation
map <C-t> :tabnew<CR> map <C-t> :tabnew<CR>
noremap<Tab> :tabn<CR> noremap <Tab><Tab> :tabn<CR>
noremap <s-Tab> :tabp<CR>
" Insert mode navigation Alt+hjkl " Insert mode navigation Alt+hjkl
imap <C-s-h> <Left> imap <C-s-h> <Left>
@ -343,3 +342,27 @@ set foldmethod=marker
" Don't use swapfile " Don't use swapfile
set noswapfile set noswapfile
"==============================================================================
" Coc Key mapping
"==============================================================================
"" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Symbol renaming.
nmap <F2> <Plug>(coc-rename)
" Hit tab go see documentation
nmap <Tab> :silent call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction