I’ve been using Vim for years, and I have built up a lot of muscle memory. I also have a few Vim plugins I feel like I can not live without, which also have their key bindings. From time to time, I will play with another editor but only if it offers Vim bindings in some form or fashion, typically it comes in the way of a plugin. Usually, these are lacking a great deal, and it’s not long before I am back in native Vim.
One exception to this rule has been PHPStorm. The Ideavim plugin was very complete. That, coupled with a ton of built-in features and a few other plugins like Relative Line Numbers and AceJump I found myself able to get the PHPStorm IDE very close to my native Vim.
This is mainly due to Ideavim’s approach which mimics the .vimrc file. Ideavim has the .ideavimrc file which allows you to map custom mappings just like .vimrc but does have some limitations.
In my .ideavimrc file, you will notice several mappings that take advantage of an :action command. The ‘action’ is a command gives you access to any command within PHPStorm, including commands added by other plugins. With this, I can mimic several commands from my regular .vimrc file that use plugins such as the mappings I have for Fugitive.
It’s not a seamless replacement for native Vim, there are a few things that annoy me, and I will switch back to native Vim for development from time to time, but Ideavim gets PHPStorm closer than any other tool and makes working in PHPStorm relatively easy.
My Current .ideavimrc file can be found in my dot_files repo on Github at https://github.com/ericvanjohnson/dot_files/blob/master/.ideavimrc
Here it is below as well:
Originally published at www.shocm.com on February 16, 2016.