0

Reason for my question: It's not the first time I have cancelled my arrow keys in vim, and the improvments in my typing is again tremendous. I wish to keep arrow keys non effective inside vim.

HOWEVER: Like the last time, I stumble on the same thing that made me remove the arrow disabling.

I cannot navigate between the proposals of autocompletion. I simply can't if my arrows are "cancelled". Hjkl are taken as letters, not move commands here.

what should be corrected in my .vimrc file ?:

noremap  <Up> ""
noremap! <Up> <Esc>
noremap  <Down> ""
noremap! <Down> <Esc>
noremap  <Left> ""
noremap! <Left> <Esc>
noremap  <Right> ""
noremap! <Right> <Esc>

2 Answers 2

3

You should be able to use ctrlp and ctrln for the previous/next item on the list.

0

I answer my own question after several years as I have been using this key combination for some time

As said in previous answer:

  • Ctrl-N: Move the selection down to the next suggestion
  • Ctrl-P: Move the selection up to the previous suggestion

It can also be practical to use in the same manner:

  • Tab: Cycle through the available completions (forward)
  • Shift-Tab: Cycle through the available completions (backward)

But I would like to add that these other two are just extremely useful, namely the C-Y for validation

  • C-Y: Accept the current selection and insert it into the buffer
  • C-L: Refresh the suggestions (in case they change dynamically)

I used to continue typing after selecting with Ctrl-P Ctrl-N or Tab Shift-Tab, like Enter or anything, which in many case forced me to do a correction: Ctrl-Y just accept the current selection as is

Of course Esc just close the current selection menu without selecting anything

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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