[nvim] Add new required coc keybinds

This commit is contained in:
Alyxia Sother 2022-08-08 22:24:29 +02:00
parent 3730b40d25
commit b27bb07d9d
No known key found for this signature in database
GPG key ID: 355968D14144B739

View file

@ -1,5 +1,20 @@
nnoremap <C-t> :NERDTreeToggle<CR>
" Completion {{{
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1):
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
" }}}
" Copy to clipboard register and paste from clipboard register {{{
" Taken from https://unix.stackexchange.com/a/23437
nnoremap <C-y> "+y