3

I have the following snippet in my config for autocomplete navigation:

function! CheckBackspace() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

inoremap <silent><expr> <Tab>
      \ coc#pum#visible() ? coc#pum#next(1) :
      \ CheckBackspace() ? "\<Tab>" :
      \ coc#refresh()

Now, when the popup menu opens I can press <CR> to complete the first entry or <Tab> to walk through all other entries. How can I make <Tab> start at the first entry (as in accept completion, not close the window and on more presses walk through the list)?

Richard Vock
  • 1,286
  • 10
  • 23

1 Answers1

0

I set "suggest.noselect" in "true" and it helped me

in vim type: :CocConfig and add

"suggest.noselect": true