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.
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:
- Download and Extract the plugin.
- File -> Settings -> IDE Settings -> Plugins -> Install plugin from disk…
- Browse to (extracted zip folder) “IdeaVim” -> lib -> IdeaVim.jar.
- Next, browse to “/.PhpStorm/config/keymaps” In my case, this is: C:Userscurreri.WebIde50configkeymaps
- Copy (extracted zip folder) “IdeaVim” -> Vim.xml into C:Userscurreri.WebIde50configkeymaps
Change the Font to Vera Sans Mono.
- File -> Settings -> IDE Settings -> Editor -> Colors & Fonts -> Font
- Save the Default Scheme as something new, say: Default-Modified
- Click the … and find: Bitstream Vera Sans Mono
Update: PHPStorm 6, PHPStorm 7
- 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.
- Vera Sans Mono isn’t available now either, apparently. So do:
- File -> Settings-> Editor -> Appearance -> Colors & Fonts -> Fonts
- Save Default Scheme as Default-Modified
- Select Source Code Pro as the only selected font.
- Tab settings are weird. Go to File -> Settings -> Code Style -> PHP. Check Use Tab character and Smart Tabs. Set all size boxes to 2.
- Click Wrapping and Braces, change the force braces to always, and check if() ‘else’ on new line.
- Uncheck comments at first column.
- On the Other tab, check Align key-value pairs and Align consecutive assignments
- File->Settubgs->IDE Settings->Appearance, change Theme to Alloy. Default Theme.