mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-22 07:15:25 +00:00
Minor vimrc tweaks
This commit is contained in:
parent
c03aef7cb4
commit
966b71923b
1 changed files with 25 additions and 2 deletions
|
@ -54,8 +54,7 @@ let g:indent_guides_enable_on_vim_startup = 1
|
|||
|
||||
" Tab navigation and creation
|
||||
map <C-t> :tabnew<CR>
|
||||
noremap<Tab> :tabn<CR>
|
||||
noremap <s-Tab> :tabp<CR>
|
||||
noremap <Tab><Tab> :tabn<CR>
|
||||
|
||||
" Insert mode navigation Alt+hjkl
|
||||
imap <C-s-h> <Left>
|
||||
|
@ -343,3 +342,27 @@ set foldmethod=marker
|
|||
" Don't use swapfile
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue