how to just input new line in insert mode with omnicompletion?

91 Views Asked by At

using omnicompletion(?), how can I just input new line in insert mode, not visiting next suggestions?

enter image description here

1

There are 1 best solutions below

1
Ingo Karkat On

This is documented at :help popupmenu-keys:

CTRL-E          End completion, go back to what was there before selecting a
                match (what was typed or longest common string).

Depending on your 'completeopt' option, there may be alternatives, e.g. pressing <C-N> / <C-P> until nothing is selected.

You can also map another key for this, e.g. <Esc>:

imap <expr> <Esc> pumvisible() ? '<C-e>' : '<Esc>'