1

Regardless of which code completion plugin I use (I tried asyncomplete and YouCompleteMe), when there's a completion pop-up, up and down arrow keys select completion options in it instead of moving the cursor. How do I disable this behavior? For me, tab is enough to cycle through completions.

2

Remap <up> key to close popup menu and move cursor up when popup menu is visible:

inoremap <expr> <up> pumvisible() ? '<c-e><up>' : '<up>'

:h :map-expression
:h complete_CTRL-E
:h pumvisible()

| improve this answer | |
  • 1
    Thanks. I replaced <c-e> with <c-y> to insert the selected completion (my question was probably poorly phrased), works like a charm. <c-e> reverts the line to "what you typed" state regardless of whether there was a selected completion. – Grishka Dec 6 '19 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.