1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-03-06 18:32:51 +01:00
IntelliJ platform plugin for Vim emulation. http://plugins.jetbrains.com/plugin/164
Go to file
2016-01-23 01:46:43 +03:00
.idea Removed old project files 2016-01-23 01:46:43 +03:00
doc Added 'clipboard' to the list of :set commands 2014-10-20 16:01:09 +04:00
gradle/wrapper Use source code for Gradle Wrapper 2016-01-23 00:32:01 +03:00
resources Switched from Ant to Gradle for easier dependency on IntelliJ in automated builds 2016-01-22 22:15:38 +03:00
src/com/maddyhome/idea/vim Send stats reports in internal mode 2016-01-22 21:41:35 +03:00
test/org/jetbrains/plugins/ideavim Fixed AIOOBE in tag selection for files starting with '/' and containing '>' 2016-01-21 18:28:14 +03:00
.gitignore Removed old IntelliJ project files in favor of non-version-controlled Gradle files 2016-01-23 00:31:31 +03:00
AUTHORS.md Added Teruo and Liubov to the list of contributors 2015-12-03 15:39:54 +03:00
build.gradle Configurable option for downloading IntelliJ sources 2016-01-22 23:49:32 +03:00
CHANGES.md Updated changelog 2016-01-21 02:02:08 +03:00
gradle.properties Configurable option for downloading IntelliJ sources 2016-01-22 23:49:32 +03:00
gradlew Added Gradle Wrapper 2016-01-22 22:46:44 +03:00
gradlew.bat Added Gradle Wrapper 2016-01-22 22:46:44 +03:00
index.txt VIM-404 Fixed 'O' at the first line 2013-03-26 15:51:15 +04:00
LICENSE.txt Moved license/COPYING to LICENSE.txt 2012-11-30 17:09:42 +04:00
README.md Use retina-friendly svg status images 2016-01-22 22:44:48 +03:00

IdeaVim

Build
Tests

IdeaVim is a Vim emulation plug-in for IDEs based on the IntelliJ platform. IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm, AppCode, CLion, DataGrip, and Android Studio.

Resources:

Installation

Use the IDE's plugin manager to install the latest version of the plugin. Start the IDE normally and enable the Vim emulation using "Tools | Vim Emulator" menu item. At this point you must use Vim keystrokes in all editors.

If you wish to disable the plugin, select the "Tools | Vim Emulator" menu so it is unchecked. At this point IDE will work with its regular keyboard shortcuts.

Keyboard shortcut conflicts between the Vim emulation and the IDE can be resolved via "File | Settings | Vim Emulation", "File | Settings | Keymap" and key mapping commands in your ~/.ideavimrc file.

Summary of Supported Vim Features

Supported:

  • Motion keys
  • Deletion/changing
  • Insert mode commands
  • Marks
  • Registers
  • Undo/redo
  • Visual mode commands
  • Some Ex commands
  • Some :set options
  • Full Vim regexps for search and search/replace
  • Key mappings
  • Macros
  • Digraphs
  • Command line and search history
  • Window commands
  • Vim web help

Not supported (yet):

  • Jump lists
  • Various less used commands

See also:

Files

  • ~/.ideavimrc
    • Your IdeaVim-specific Vim initialization commands

You can read your ~/.vimrc file from ~/.ideavimrc using this command:

source ~/.vimrc

Note, that IdeaVim currently parses ~/.ideavimrc file via simple pattern matching, see VIM-669 for proper parsing of VimL files.

Also note that if you have overridden the user.home JVM option, this will will affect where IdeaVim looks for your .ideavimrc file. For example, if you have -Duser.home=/my/alternate/home then IdeaVim will source /my/alternate/home/.ideavimrc instead of ~/.ideavimrc.

Changes to the IDE

Undo/Redo

The IdeaVim plugin uses the undo/redo functionality of the IntelliJ platform, so the behaviour of the u and <C-R> commands may differ from the original Vim. Vim compatibility of undo/redo may be improved in the future releases.

See also unresolved undo issues.

Escape

Using <Esc> in dialog windows remains problematic. For most dialog windows the Vim emulator is put into the insert mode without the possibility to switch to the normal mode. In some dialog windows the normal mode is on by default. The usage of the Vim emulator in dialog windows is an area for improvements.

See also unresolved escape issues.

Executing IDE Actions

IdeaVim adds two commands for listing and executing arbitrary IDE actions as Ex commands or via :map command mappings:

  • :actionlist [pattern]
    • Find IDE actions by name pattern
  • :action {name}
    • Execute an action named NAME

For example, here \r is mapped to the Reformat Code action:

:map \r :action ReformatCode<CR>

Contributing

Where to Start

In order to contribute to IdeaVim you should have some understanding of Java.

See also these docs on the IntelliJ API:

You can start by picking relatively simple tasks that are tagged with #patch_welcome in the issue tracker.

Development Environment

  1. Fork IdeaVim on GitHub and clone the repository on your local machine.

  2. Open the project in IntelliJ IDEA 13.1+ (Community or Ultimate) using "File | Open... | /path/to/ideavim".

  3. Set up a JDK if you haven't got it yet. Use "File | Project Structure | SDKs | Add new JDK".

  4. Set up an IntelliJ plugin SDK using "File | Project Structure | SDKs | Add new IntelliJ IDEA Plugin SDK". The correct path to your current installation of IntelliJ will be suggested automatically. You will be prompted to select a JDK for your plugin SDK. Select the JDK from the previous step. You should name your plugin SDK IntelliJ Plugin SDK in order to match the name in the project settings stored in the Git repository.

  5. Select a project SDK for your project using "File | Project Structure | Project | Project SDK". Choose the plugin SDK you have created at the previous step.

  6. Build IdeaVim and run IntelliJ with IdeaVim enabled using the "IdeaVim" run configuration (use "Run | Run... | IdeaVim"). This will launch a spare instance of IntelliJ running the compiled plugin in a sandboxed enviroment.

    To actually deploy the plugin the recommended way is executing gradle buildPlugin from command line. Install the generated "build/distributions/IdeaVim.zip" file from "Settings | Plugins | Install plugin from disk".

  7. In order to be able to run tests in your IntelliJ edition uncomment the appropriate lines in the constructor of the VimTestCase class.

Authors

See AUTHORS.md for a list of authors and contributors.

License

IdeaVim is licensed under the terms of the GNU Public license version 2.