Making PHPStorm act more like my Vim

Eric Van Johnson
Feb 16, 2016 · 2 min read
Image for post
Image for post

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.

DiegoDev Group

A groups of passionate developers who care about the code…

Eric Van Johnson

Written by

Company: @diegodevgroup | Podcaster: @PHPUgly / @larachatslack / @phparch | UG Org: @SDPHP | Enjoy Scotch and Baseball. Thoughts and tweets are my own. ☮

DiegoDev Group

A groups of passionate developers who care about the code they create, the communities they build, and the solutions they implement.

Eric Van Johnson

Written by

Company: @diegodevgroup | Podcaster: @PHPUgly / @larachatslack / @phparch | UG Org: @SDPHP | Enjoy Scotch and Baseball. Thoughts and tweets are my own. ☮

DiegoDev Group

A groups of passionate developers who care about the code they create, the communities they build, and the solutions they implement.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store