Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use C-n/C-p in VsVim to select completion candidate in intellisense popup

I would like to use CTRL-P/CTRL-n instead of Up/Down arrows to select the completion candidate. I tried to :imap <C-n> <Down>, but instead of selecting the next completion candidate, the cursor will go down to the next line.

like image 347
ale Avatar asked Jul 31 '13 19:07

ale


1 Answers

Instead of using a vim key mapping, you can handle this with a Visual Studio keyboard shortcut (Tools > Options > Environment > Keyboard):

enter image description here

The Edit.LineUp and Edit.LineDown commands are what you're looking for. You can see in the image above that I am using Alt+J for Edit.LineDown, but you can use Ctrl+N instead. I prefer using the Alt key instead of the Ctrl key because pressing Ctrl dims out the Intellisense list, while Alt does not. Just a matter of preference though.

I formerly had this same question, and I received the answer here.

like image 159
RSW Avatar answered Sep 21 '22 17:09

RSW