Configuring PhpStorm to make a Gvim user happy

PhpStorm 5

That gvim user is me! I like to say I’m a vi-guy, but I’ve learned that I have to type ‘vim’ at the console to be consistently happy with the editor I get in Linux. I run Windows on the desktop, and I’ve been using gvim for years, but… after inheriting another coder’s codebase, it’s clearly time for some more sophisticated tools.

Enter PhpStorm!

However, I like my keyboard commands. Luckily, there’s an app for that: IdeaVim. I found it a bit tricky to install, even though it’s dead simple.

Installation Steps for IdeaVim:

  1. Download and Extract the plugin.
  2. File -> Settings -> IDE Settings -> Plugins -> Install plugin from disk…
  3. Browse to (extracted zip folder) “IdeaVim” -> lib -> IdeaVim.jar.
  4. Next, browse to “/.PhpStorm/config/keymaps” In my case, this is: C:Userscurreri.WebIde50configkeymaps
  5. Copy (extracted zip folder) “IdeaVim” -> Vim.xml into C:Userscurreri.WebIde50configkeymaps
  6. Done!

Change the Font to Vera Sans Mono.

  1. File -> Settings -> IDE Settings -> Editor -> Colors & Fonts -> Font
  2. Save the Default Scheme as something new, say: Default-Modified
  3. Click the … and find: Bitstream Vera Sans Mono

Update: PHPStorm 6, PHPStorm 7

  1. After updating I don’t seem to have the IDEVim plugin installed. I haven’t used this software for a long time, I’m going to try going without.
  2. Vera Sans Mono isn’t available now either, apparently. So do:
    1. File -> Settings-> Editor -> Appearance -> Colors & Fonts -> Fonts
    2. Save Default Scheme as Default-Modified
    3. Select Source Code Pro as the only selected font.
  3. Tab settings are weird. Go to File -> Settings -> Code Style -> PHP. Check Use Tab character and Smart Tabs. Set all size boxes to 2.
  4. Click Wrapping and Braces, change the force braces to always, and check if() ‘else’ on new line.
  5. Uncheck comments at first column.
  6. On the Other tab, check Align key-value pairs and Align consecutive assignments
  7. File->Settubgs->IDE Settings->Appearance, change Theme to Alloy. Default Theme.

1 thought on “Configuring PhpStorm to make a Gvim user happy

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.