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: 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!
JetBrains Team

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

13 Responses to PyCharm your Vim

  1. DaRage says:

    Vim and IDE is an Oxymoron.

  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:

    Fletcher,
    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 “vim.help%2Etxt” 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..
    Thanks..

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>