Home | Reference | Download | Bug Reporting | CVS Access | FAQ

VIM Emulator Plugin for IntelliJ IDEA

Introduction

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.

Installation

Idea 3.x

Once you have downloaded the binary release or built it from source, you have three simple steps to perform to begin using IDEA in VIM Emulation mode:
  1. Copy 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.
  2. Copy 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.
  3. Restart IDEA and then select the Options|Keymaps menu. Select the Vim keymap and make it the active keymap by pressing the Set Active button.

Idea Aurora/4.0.x and later

  1. Use the plugin manager built into Idea to download and install the IdeaVIM plugin. This should be found under the Editor section.
  2. If this is the first time you have ever installed this plugin you must install the special VIM key mapping. Copy:

    <IDEA_HOME>/plugins/IdeaVIM/Vim.xml or <PLUGIN_HOME>/IdeaVIM/Vim.xml to <CONFIG_HOME>/keymaps

    where 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

    Create the keymaps directory if it does not exist.
  3. Restart IDEA and then select the Options|Keymaps menu. Select the Vim keymap and make it the active keymap by pressing the Set Active button.
You only need to do these steps the first time you install the plugin. You will find a new menu under Tools named VIM Emulator. It should be checked by default. If this menu is not present the plugin was not properly installed.

Upgrade

Users upgrading from 0.10.1, 0.10.2, or 0.10.3 must reinstall the Vim key mapping.

Download

You may obtain the plugin binary and/or source code by visiting the files page on SourceForge

Versions

Version 0.4.x was used with IDEA 3.x.
Version 0.6.x was used with Aurora.
Version 0.7.x was used with IDEA 4.0.x
Version 0.8.x was used with IDEA 4.0.x and Pallada/IDEA 4.5.x
Version 0.9.x was used with IDEA 5.0.x
Version 0.10.x is used with IDEA 4.x and 5.0.x. Just use the one with the correct version suffix (-4x or -5x).
Version 0.11.x is used with IDEA 5.0.x, 6.x, 7.x, and 8.x. Just use the one with the correct version suffix (-5x, -6x, -7x, or -8x).
SourceForge.net Logo