Deoplete.nvim: Alternate selection keys (no arrows)

Created on 12 Feb 2017  路  2Comments  路  Source: Shougo/deoplete.nvim

Perhaps i missed a setting in the documentation, but it seems that the only way to select a completion in the popup is with the arrow keys, which isn't a vim-friendly way. Is there a default binding to select a completion or a way to set it with a ?

Thanks

Most helpful comment

The default binding for vim popup selection is <c-n> , <c-p> besides arrow key.

Read some more on :help popupmenu-keys or :help ins-completion

You could map <Tab> as selection key like this:

inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

All 2 comments

The default binding for vim popup selection is <c-n> , <c-p> besides arrow key.

Read some more on :help popupmenu-keys or :help ins-completion

You could map <Tab> as selection key like this:

inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

Thank you very much! I love this plug in. It's really improved my coding
speed.

Was this page helpful?
0 / 5 - 0 ratings