Two observations after PyCon US:
1. Quite a surprise for us to find that so many Python developers use Vi/Vim for coding.
2. A big surprise for all Vim users to find that PyCharm provides an outstanding Vim emulation!
Of course we believe that PyCharm is the best but we highly respect people’s favors with regard to the tools they love. From the first versions PyCharm has been offering a number of keyboard layouts out of the box: for NetBeans, Visual Studio, TextMate users, etc. And of course Vim is not an exception!
PyCharm as well as other IntelliJ platform based IDEs has an IdeaVim plugin. You can install it using the built-in plugin manager (under IDE Settings | Plugins), then restart PyCharm and voila — you have an environment your fingers are familiar with. Actually, since PyCharm has a graphical UI the plugin emulates ‘gvim’ rather than ‘vim’.
On the first launch of PyCharm with IdeaVim we strongly recommend you to execute :help as your very first command. Help contains dedicated topics with detailed description of the supported stuff. But let’s briefly overview it here. So, IdeaVim plugin provides:
- Motion keys
- Insert mode commands
- VIM undo/redo
- Visual mode commands
- Some Ex commands
- Some :set options
- Full VIM regular expressions for search and search/replace
- VIM help
- Instantly turn the plugin OFF/ON using Tools | VIM Emulator from the main menu. Quite useful when pairing with someone.
Note that IdeaVim plugin requires a special Vim keymap, which is auto-installed. However you can still tweak it (in IDE Settings | Keymaps) to use your favorite hotkeys instead of the default ones.
If you ever want to report a problem or a suggestion about IdeaVim, welcome to the plugin’s official issue tracker.
Or, even better, you can always download the source code, build it and play with it on your own. IdeaVim is opensource and available at: github.com/olegs/ideavim. If you want to be on the bleeding edge, but don’t want to build it, we have nightly builds set up for you on our TeamCity CI server.
PS. Yeah, its 1st of April… but we are dead serious!
- Develop with pleasure!