LandonSchropp
LandonSchropp

Reputation: 10264

Tabbing in Deoplete is Backward

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.

Upvotes: 5

Views: 2510

Answers (2)

oschoudhury
oschoudhury

Reputation: 1166

In case anybody is using Supertab in addition with deoplete, the following solution is equivalent

let g:SuperTabDefaultCompletionType = "<c-n>"

see for more details the last bullet point at https://github.com/ervandew/supertab#frequently-asked-questions.

Upvotes: 8

LandonSchropp
LandonSchropp

Reputation: 10264

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.

Upvotes: 10

Related Questions