PyCharm your Vim

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
  • Deletion/Changing
  • Insert mode commands
  • Marks
  • Registers
  • VIM undo/redo
  • Visual mode commands
  • Some Ex commands
  • Some :set options
  • Full VIM regular expressions for search and search/replace
  • Macros
  • Diagraphs
  • 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: 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!
JetBrains Team

This entry was posted in Cool Feature and tagged , , . Bookmark the permalink.

21 Responses to PyCharm your Vim

  1. DaRage says:

    Vim and IDE is an Oxymoron.

    • onento says:

      “You” and “Smart” is on Oxymoron.

    • Arctelix says:

      @onento I simply could not agree more with your flawless rebuttal. Integrating the power of Vim with an full fledged IDE as powerful as PyCharm could be the greatest thing to happen… Ever!

  2. Kelly says:

    If :help is the first thing you do in Vim, you probably don’t want to use that plugin :-)

  3. Fatrix says:

    Now PyCharm definitely is the best IDE! Just installed the plugin and enjoying editing like in VI!
    Thank you very much!

  4. Adam Jorgensen says:

    IdeaVIM is the best vim plugin I’ve found for any IDE. Only jVi for NetBeans even comes close and it lacks a lot of nice features that IdeaVIM has.

    For me, an IDE without a Vim plugin is not worth using…

    • pete says:

      Actually ViEmu (paid) for Visual Studio is better (IMO) – it seems to support more features. I’m a Vim noob that is familiar with just basics but I already found a few things that are missing in IdeaVIM like di’ or di”.
      Though IdeaVIM still makes PyCharm so much better for Vim’ers.

  5. Fletcher says:

    Emacs bindings me hopes? :)

  6. yole says:

    Emacs bindings are bundled in PyCharm (Settings | Keymap). We plan a number of further improvements to them in the upcoming 1.5 release.

  7. John Florian says:

    IdeaVIM is a life saver for those who can’t enter text any other way. I’d dearly love to see the few remaining bugs dealt with though. Undo has gotten better, but still mangles code sometimes where the real IDEA undo has to be used. Also broken is ctrl-w when in insert-mode, which rather than removing the last enter word, removes the entire entry since starting insert-mode.

  8. baha says:

    @DaRage, it’s not Vim, only key bindings. 😉

  9. holms says:

    what? Am I misunderstood something? I don’t need “as-vim” I need actual vim plugin, im coding only in shell.. fuck GUI s’rsly =)

    • Trevor Joynson (trevorj) says:

      Seriously. All of this “Emulation” of vim in IDEs nowadays is nothing short of crap compared to the beauty that is vim. Try out eclim, it’s really quite awesome (uses real vim and let’s you use Eclipse code-sense and such FROM VIM!)

  10. pete says:

    Hmm… never used help so I wanted to give it a try and this is what I get when I do :help “Help topic “” not found”

  11. kp says:

    Before even downloading and installing pycharm, I searched for if it had vim support by any chance..
    Just can’t get rid of the “escape” mode..

  12. Mark says:

    Vim is great for the 0.1% of programmers who are elite enough to figure out how to configure it as a modern IDE. I spent a solid week trying to devise how to concoct a great set up that had: django support, django code completion, refactoring support.

    I started with janus
    I tried pony.vim (the only thing worse than poor documentation is absolutely zero documentation, thereby rendering this useless)
    I tried rope, ropevim (wow, what a PITA to install, and despite copious documentation it manages to tell you nothing)
    I also wanted to be cool and run vim from the terminal, only to find out it was a real pain to get a colorscheme to apply.

    I’ve resolved that while I love vim, I simply do not have the ability nor patience to tinker with obscure settings to install plugins that really have no acceptable documentation.

    So instead of making vim into an IDE, let’s go the other way….let’s bring vim to an IDE, and this is what pycharm does. Maybe eclim too but I really don’t trust eclipse nor do I like it. At the end of the day, what I love most about vim are the key bindings and the massive efficiency it brings. But for anyone to suggest that the code completion and other nice modern touches that a real IDE brings are weak sauce, is wrong for 99.9% of people out there. There are 0.1% of people who may be able to beat a pycharm pro merely using vim, but those ‘just use a text editor’ without any help, I tip my hat to them but they are rare birds with a rare gift and not what people who aren’t as gifted should aspire to be. I can not imagine trying to code java without a modern IDE. Python is a much simpler language inherently, but there are enough bells and whistles these days that your productivity will be improved by a modern ide. At the end of the day, I decided that I want to make great software, and every second that I spend on chasing the legend of bigfoot, I mean, the perfect VIM setup, is a second that I can’t spend on making a good application. Bending VIM to my will I realized is just fulfilling some masochistic self-flagellating need in me to prove that I can play with the big boys and girls, the real nerds. We’ve all got 30,000 days at most, and I just decided that I don’t want to allot them on this minutiae. I want to live and operate a level above this minutiae.

  13. This plugin has some major issues.

    Splits are not inside of tabs in IntelliJ. Tabs are inside of splits. Splits in IntelliJ are inside of other splits, instead of being a flat entity – which means that two splits close if I close a split that contains another split. Highly frustrating. There are huge organizational mistakes that most editors (including JetBrains IDEs) still have. They reflect one of the primitive choices that sets Vim ahead of other editors.

    IdeaVim also is a poor keybinding. For example, Cw l does not move to the split to the right of the cursor. The only way to jump around between splits without the mouse is with the ctrl+tab interface, but that’s actually not even view jumping – it’s jumping between buffers. It comes with other annoyances like potentially replacing the current window’s contents with a different file if the user happens to not count the proper number of ctrl+tab strokes. This is similar to Vim’s jumplist, but once again less powerful because it keeps track of buffers instead of movements.

    IdeaVim is nothing close to Vim, and it isn’t developed actively enough to constitute changing editors unless you’re fairly new to Vim and don’t understand it anyway.

  14. Mark V says:

    > an outstanding Vim emulation

    Despite the self-congratulatory language in this post, the Vim emulation provided by the plugin is god-awful. Even the most basic motions (such as $, “go to end of line”) are wrong, let alone any advanced stuff, which is missing altogether.

    And that’s a pity, I actually want to like the WebStorm / PyCharm IDEs; they indeed have some utility when refactoring. But the lack of attention to details, such as the aforementioned broken Vim-like key bindings, is a major showstopper.

    On a side note, this post makes me wonder how many of your other advertising claims are false.

  15. Arctelix says:

    Just an observation..

    There seem so be allot of people lerking around the jet brains forums bashing the concept of an IDE over the purity of VIM.. If the concept of a modern IDE is so repulsive, why are they here (possibly an inferiority complex)? Why do they spend so much time configuring and writing plugins to make VIM more like an IDE? It’s true that VIM, is in fact a powerful tool for text/code editing. The methodolgy is particularly appealing to Pythonists who appreciate the clean, mean, beautiful, approach to code; after years of scoffing at the archaic VIM interface i finally took the time to learn. I have to say that it’s elegantly structured commands and the home row anchor as a boost to productivity are truly addictive once you get the hang of it. None the less, PyCharm is a powerhouse! All the nano seconds i loose reaching for the mouse are made up for ten fold by the features in PyCharm. Now, adding VIM keys bindings with motions, macros, etc.. into the mix. Just makes the PyCharm environment unstopable!

Leave a Reply

Your email address will not be published. Required fields are marked *