added 'enter' to autofill first selection

This commit is contained in:
Nickiel12 2022-12-09 23:36:33 -08:00
parent 2d5e87a097
commit 6b2a728d97

View file

@ -27,7 +27,10 @@ filetype plugin indent on
\ pumvisible() ? "\<C-n>" : \ pumvisible() ? "\<C-n>" :
\ CheckBackspace() ? "\<TAB>" : \ CheckBackspace() ? "\<TAB>" :
\ coc#refresh() \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort function! CheckBackspace() abort
let col = col('.') - 1 let col = col('.') - 1