1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-11-24 05:42:45 +01:00
IntelliJ platform plugin for Vim emulation. http://plugins.jetbrains.com/plugin/164
Go to file
2020-04-09 11:06:21 +03:00
doc Clean up repository for the release 2020-04-09 11:06:21 +03:00
gradle/wrapper Update gradle wrapper properties 2020-03-20 11:42:14 +03:00
resources Clean up repository for the release 2020-04-09 11:06:21 +03:00
src Clean up repository for the release 2020-04-09 11:06:21 +03:00
test Run manual tests 2020-04-09 10:51:32 +03:00
.editorconfig Use 2 spaces for Kotlin files as per the IntelliJ platform coding style 2019-05-14 14:13:11 +03:00
.gitignore Update .gitignore 2019-02-22 14:10:01 +03:00
AUTHORS.md Add kk to the contributions list 2020-03-20 10:38:30 +03:00
build.gradle Update slack notification format 2020-03-20 11:42:40 +03:00
CHANGES.md Clean up repository for the release 2020-04-09 11:06:21 +03:00
CODE_OF_CONDUCT.md Add Code of Conduct to project 2019-04-10 15:59:48 +03:00
CONTRIBUTING.md Add test bages 2020-02-21 12:05:05 +03:00
gradle.properties Update kotlin version 2020-03-06 09:54:57 +03:00
gradlew Update gradle version 2020-02-28 17:35:46 +03:00
gradlew.bat Update gradle version 2020-02-28 17:35:46 +03:00
LICENSE.txt Update license formatting 2019-07-10 12:51:10 +03:00
README.md Clean up repository for the release 2020-04-09 11:06:21 +03:00
settings.gradle Update copyright 2020-01-27 11:35:00 +03:00

icon

IdeaVim

IdeaVim is a Vim emulation plugin for IDEs based on the IntelliJ Platform. IdeaVim can be used with IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm, RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive, 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 your IDE will work with its regular keyboard shortcuts.

Keyboard shortcut conflicts between the Vim emulation and the IDE can be resolved via "File | Settings | Editor | Vim Emulation", "File | Settings | Keymap" on Linux & Windows, and via "Preferences | Editor | Vim Emulation", "Preferences | Keymap" on macOS. They can also be resolved by key-mapping commands in your ~/.ideavimrc file.

Get Early Access

Would you like to try new features and fixes? Join the Early Access Program and receive EAP builds as updates!

  1. Click the IdeaVim icon in the status bar | EAP | Get Early Access...

Or subscribe to EAP updates manually:

  1. Open Settings | Plugins
  2. Click the gear icon ⚙️, select Manage Plugin Repositories, and add the following url: https://plugins.jetbrains.com/plugins/eap/ideavim

See the changelog for the list of hot unreleased features.

It is important to distinguish EAP builds from traditional pre-release software. Please note that the quality of EAP versions may at times be way below even usual beta standards.

You can always leave your feedback with:

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
  • Select mode

Emulated Vim plugins:

  • vim-easymotion
  • vim-surround
  • vim-multiple-cursors
  • vim-commentary
  • argtextobj.vim
  • vim-textobj-entire
  • ReplaceWithRegister

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 with 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 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.

Alternatively, you can set up initialization commands using XDG standard. Put your settings to $XDG_CONFIG_HOME$/ideavim/ideavimrc file.

Emulated Vim Plugins

IdeaVim extensions emulate some plugins of the original Vim. In order to use IdeaVim extensions, you have to enable them via this command in your ~/.ideavimrc:

set <extension-name>

Available extensions:

  • easymotion

  • surround

    • Setup: set surround
    • Emulates vim-surround
    • Commands: ys, cs, ds, S
  • multiple-cursors

  • commentary

    • Setup: set commentary
    • Emulates commentary.vim
    • Commands: gcc, gc + motion, v_gc
  • ReplaceWithRegister

  • argtextobj

    • Setup:
      • set argtextobj
      • By default, only the arguments inside parenthesis are considered. To extend the functionality to other types of brackets, set g:argtextobj_pairs variable to a comma-separated list of colon-separated pairs (same as VIM's matchpairs option), like let g:argtextobj_pairs="(:),{:},<:>". The order of pairs matters when handling symbols that can also be operators: func(x << 5, 20) >> 17. To handle this syntax parenthesis, must come before angle brackets in the list.
    • Emulates argtextobj.vim
    • Additional text objects: aa, ia
  • textobj-entire

Changes to the IDE

Undo/Redo

The IdeaVim plugin uses the undo/redo functionality of the IntelliJ Platform, so the behavior of the u and <C-R> commands may differ from the original Vim. Vim compatibility of undo/redo may be improved in 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 insert mode with <Esc> not working. You should use <C-c> or <C-[> instead. In some dialog windows, the normal mode is switched by default. The usage of the Vim emulator in dialog windows is an area for improvement.

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 or keymap pattern (E.g. :actionlist extract, :actionlist <C-D)
  • :action {name}
    • Execute an action named NAME

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

:map \r :action ReformatCode<CR>

Contributing

See CONTRIBUTING.md

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 or any later version.