IntelliJ IDEA is an outstanding IDE for editing Java source code and other
related files. However, it lacks one
important feature - vi
style commands for editing. I've been using vi
and
VIM
for about 20 years. I'm used to it. I know the command keyboard shortcuts are cryptic and strange but I've been using
it so long I just know how to use them and I find I am very efficient with them.
IDEA makes my Java editing even more efficient. Now, if I could only combine the features of IDEA with the quick and easy editing of VIM, life would be grand. A quick search revealed that there wasn't a feature filled VIM plugin so I took it upon myself to write one. This project is the result of my desire to keep using my old keyboard habits.
The goal of this plugin is to support as much VIM functionality as makes sense within the scope of IDEA. The plugin was actually written in IDEA using the VIM plugin once there was enough basic editing support. For the curious, the plugin is being written without any reference to the VIM source code (except for the regular expression handling). I'm basically using the excellent VIM documentation and VIM itself as a reference to verify correct behavior.
This plugin is meant for developers that already know, and probably love, vi/VIM. I make no attempt to teach users how to use the VIM commands but you will find the standard VIM help text withing the help system of Idea. Within the pages of this website will find a reference of all working commands.
IdeaVIM.jar
to the plugins directory. This is at <IDEA_HOME>/plugins
where
IDEA_HOME
is IDEA installation directory. Newer versions of the Aurora builds should use the
plugin manager to download the latest version of the plugin.Vim.xml
to <HOME>/.IntelliJIdea/config/keymaps
where HOME
is your home directory on Unix or C:\Documents and Settings\<user>
on Windows.
Create the keymaps
directory if it does not exist.Options|Keymaps
menu. Select the Vim
keymap and make
it the active keymap by pressing the Set Active
button.<IDEA_HOME>/plugins/IdeaVIM/Vim.xml
or
<PLUGIN_HOME>/IdeaVIM/Vim.xml
to
<CONFIG_HOME>/keymaps
HOME
is your home directory, PLUGIN_HOME
is where plugins are stored, and
CONFIG_HOME
is where IntelliJ stores its configuration. The table below
describes these values for various platforms.
Variable | Windows | Linux | Mac |
---|---|---|---|
PLUGIN_HOME | %HOME%\.IntelliJIdea[5678]0\config/plugins | $HOME/.IntelliJIdea[5678]0/config/plugins | $HOME/Library/Application Support/IntelliJIDEA[5678]0 |
CONFIG_HOME | %HOME%\.IntelliJIdea[5678]0\config | $HOME/.IntelliJIdea[5678]0/config | $HOME/Preferences/IntelliJIDEA[5678]0 |
keymaps
directory if it does not exist.
Options|Keymaps
menu. Select the Vim
keymap and make
it the active keymap by pressing the Set Active
button.Tools
named VIM Emulator
. It should be checked by default. If this menu is not present
the plugin was not properly installed.