mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
28 lines
791 B
VimL
28 lines
791 B
VimL
nnoremap <C-t> :NERDTreeToggle<CR>
|
|
|
|
" Completion {{{
|
|
function! s:check_back_space() abort
|
|
let col = col('.') - 1
|
|
return !col || getline('.')[col - 1] =~ '\s'
|
|
endfunction
|
|
|
|
nmap <silent> <F3> <Plug>(coc-codeaction-line)
|
|
xmap <silent> <F3> <Plug>(coc-codeaction-selected)
|
|
|
|
inoremap <expr> <C-CR> coc#pum#visible() ? coc#pum#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
|
|
vnoremap <C-y> "+y
|
|
nnoremap <C-p> "+gP
|
|
vnoremap <C-p> "+gP
|
|
" }}}
|