from beef-book
This commit is contained in:
parent
f9de94904f
commit
1d20358bb4
3 changed files with 32 additions and 25 deletions
|
@ -150,26 +150,26 @@ nnoremap <A-l> <C-w>l
|
|||
|
||||
" COC
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
"" Use tab for trigger completion with characters ahead and navigate.
|
||||
"inoremap <silent><expr> <TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ <SID>check_back_space() ? "\<TAB>" :
|
||||
" \ coc#refresh()
|
||||
"inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
"
|
||||
"function! s:check_back_space() abort
|
||||
" let col = col('.') - 1
|
||||
" return !col || getline('.')[col - 1] =~# '\s'
|
||||
"endfunction
|
||||
"
|
||||
"" Use <c-space> to trigger completion.
|
||||
"if has('nvim')
|
||||
" inoremap <silent><expr> <c-space> coc#refresh()
|
||||
"else
|
||||
" inoremap <silent><expr> <c-@> coc#refresh()
|
||||
"endif
|
||||
"
|
||||
"" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
"" format on enter, <cr> could be remapped by other vim plugin
|
||||
"inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
" \: (((add a double quote here after uncommenting this)\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue