Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure in IdeaVIM Ctrl + N and Ctrl + P completion from Vim?

In Vim we can use Ctrl + N or Ctrl + P to finish code completion. How to configure it in IdeaVim for IntelliJ?

like image 978
Simon Su Avatar asked May 10 '15 08:05

Simon Su


People also ask

Can you use Vim in IntelliJ?

The IdeaVim plugin emulates Vim in the IntelliJ IDEA editor, including normal, insert, and visual modes, Command-line and Ex modes, Vim regexp and configuration, and other features.


2 Answers

Alt + / and Alt + Shift + / work both in plain IntelliJ and with IdeaVim installed.

Please see documentation on JetBrains page - it's called Hippie Completion (newer versions call this completion Cyclic Expand Word).

And of course you can always use Ctrl + Space, Ctrl + Shift + Space, Ctrl + Alt + Space.

like image 120
Michal Kordas Avatar answered Sep 21 '22 01:09

Michal Kordas


I could not get CTRL-N and CTRL-P to work after mapping them to "Cyclic Expand Word" and "Cyclic Expand Word (Backward)" in IDEA 2016.2.5 (while running IdeaVIM). Both keystrokes just did nothing.

The solution was to additionally select "Settings" from the File Menu, then "Other Settings" -> "Vim Emulation", and set the "Handler" for Ctrl+N and Ctrl+P to "IDE" instead of "Vim".

like image 34
softw Avatar answered Sep 24 '22 01:09

softw