intellij-idea

IdeaVim

Remarks#

IdeaVim is a plugin for IDEA products that aims in providing Vim functionality in editor views

Showing line numbers

As of IntelliJ IDEA version 2016.2, and IdeaVim version 0.46, IntelliJ’s native option for showing line numbers is ineffective. When clicking Show line numbers, the line numbers immediately show and disappear.

This problem is caused by a bug in the IdeaVim plugin, which can be resolved by using the Vim command for showing line numbers:

:set number

and

:set nonumber

to hide.

These commands can also be used as the shorthand :set nu and :set nonu.

If you wish to activate the feature which shows relative line numbers instead you can use

:set relativenumber

or a shorthand :set rnu. Remember that you can mix set relativenumber with set number.

Allocating conflicting keystrokes to IdeaVim

By default, some keystrokes that are useful in Vim contradict with the keystrokes of IntelliJ.

For example, ^R in Vim is ‘redo’, but in IntelliJ it’s the shortcut for Run

To decide which program interprets the keystroke, go to Preferences -> Other Settings -> Vim Emulation and choose which keystrokes to use with IdeaVim and which to use with IntelliJ:

enter image description here


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow