GitHub - JetBrains/ideavim: Vim emulation plug-in for IDEs based on the IntelliJ...
source link: https://github.com/JetBrains/ideavim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
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!
- Click the IdeaVim icon in the status bar |
EAP
|Get Early Access...
Or subscribe to EAP updates manually:
- Open
Settings | Plugins
- 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:
- @IdeaVim in Twitter
- Bug tracker
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-surround
- vim-multiple-cursors
- vim-commentary
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. [To Be Released]
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
- Setup:
- Install IdeaVim-EasyMotion and AceJump plugins.
set easymotion
- Emulates vim-easymotion
- Commands: All commands with the mappings are supported. See the full list of supported commands.
- Setup:
-
surround
- Setup:
set surround
- Emulates vim-surround
- Commands:
ys
,cs
,ds
,S
- Setup:
-
multiple-cursors
- Setup:
set multiple-cursors
- Emulates vim-multiple-cursors
- Commands:
<A-n>
,<A-x>
,<A-p>
,g<A-n>
- Setup:
-
commentary
- Setup:
set commentary
- Emulates commentary.vim
- Commands:
gcc
,gc + motion
,v_gc
- Setup:
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
)
- Find IDE actions by name or keymap pattern (E.g.
:action {name}
- Execute an action named
NAME
- Execute an action named
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.
Recommend
-
233
IntelliJ IDEA Community Edition These instructions will help you build IntelliJ IDEA Community Edition from source code, which is the basis for IntelliJ Platform development. The following conventions will be used to refer to directories...
-
61
酷工作 - @lenyo - 各位 V 友们好,我是 JetBrains 大中华区负责人,李玥萱 Lenyo Lee。<br/>V 友们应该多少了解过我们的开发工具 IntelliJ IDEA、WebStorm、PyC
-
63
As more enterprises move to Google Cloud, developers and operators need to evolve how they build and manage applications. Moving to the cloud isn’t just about getting rid of data centers—it’s also about going fa...
-
38
Code-centric IDE, focused on your productivity. Full Java EE support, deep code understanding, best debugger, refactorings, everything right out of the box...
-
32
This year Java hit an incredible milestone and reached the grand old age of 25 years. We celebrated its jubilee by running a special online Java day event, where lots of expert speakers shared their e
-
11
IntelliJ IDEA 2020.3.1 Is Out With Apple Silicon Support ...
-
5
V2EX › 程序员 IdeaVim 重写了 vimscript 执行引擎,将 vimscript 当成一个真正的语言去执行而不是之前那种只读取 set、map 之类的配置;另外更换了版...
-
3
V2EX › 程序员 ideavim 如何设置在弹出代码补全时 <ESC> 不退回 Normal yuhangch...
-
10
Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was turned off for the IdeaVim plugin h j k l keys. System-wide key repeat defaults write -g ApplePressAndHoldEnabled -bool false in a t...
-
6
JetBrains Unveils AI Assistant for IntelliJ-Based IDEs and .NET Tools Jul 24, 2023...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK