Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tabbing in Deoplete is Backward

Tags:

neovim

When I trigger the autocomplete menu in Deoplete, the tab key's behavior is backward. For example, let's say I pop up an autocompletion drop down.\

Deoplete drop down

When I hit the tab key, I would expect Neovim to select the first item in the list. Instead, it selects the last.

Deoplete drop down tab

I'm not sure if this behavior is specific to Deoplete or is a generic issue with Neovim.

like image 666
LandonSchropp Avatar asked May 29 '17 22:05

LandonSchropp


1 Answers

The trick to this one was to remap tab and shift-tab.

inoremap <silent><expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"

There are more instructions on how to improve the popup menu in the Vim wiki.

like image 115
LandonSchropp Avatar answered Sep 30 '22 18:09

LandonSchropp