Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (80 sloc) 3.4 KB

Vim as a PHP IDE

This Vim configuration is meant to be used to make Vim act more like an IDE. I use it mostly under MacVIM, so some things may be weird in different environments. For now, I'm just planning on using github to make managing my VIM configuraiton more easy, especially with deploying it to different environments. I'm not sure if I will make this a community projects.

I do use this configuration on Linux while running plain vim, and it works fine for the most part.


This configuration is meant to be run with a single MacVIM instance on the screen at once, used for editing multiple files at the same time. On the left side of the screen will be the file browser, and on the right will be the list of tags in the current file. On the bottom you will see a list of the currently opened buffers when switching between them, otherwise it will show status items. You will also see the name of the current Git branch in parenthesis (if you are in one).

When you want to edit a file, you can browse to it on the left side of the screen, or use the ,t keys to open up a quick/fuzzy file browser (Command-T). If you want to edit another file, just browse to it and open it just like before. When you want to move between files, use the buffer movement keys mentioned below. Feel free to open as many buffers as you want!

Buffer Movement

  • Use ,q to close the current buffer (a different buffer will replace it)
  • Use Ctrl h Ctrl l to move between open buffers (or Ctrl Left Ctrl Right)


  • Use ,h ,j ,k ,l to move around between windows
  • Use ,Q to close the current window (which doesn't happen often)
  • Use ,n to show and hide the file browser
  • Use ,y to show and hide the tag browser
  • Use ,t to perform a recursive fuzzy filename search

File Browser (NERDTree)

  • Use standard movement keys to move around
  • Use Ctrl j and Ctrl k to move between siblings
  • Use C to make a node the current working directory
  • Use :Bookmark BookmarkName to bookmark the current selection
  • Use B to toggle the bookmark menu

Tag Browser (Tag List)

  • Use s to reorder the items by alpha or occurance

Code Completion (Zen Coding)

Edit an html document, go into insert mode, and type the following:


Once you've done that, while still in insert mode, type Ctrl + Y then Comma. You'll now see:

    <p id="foo1">
        <a href=""></a>
    <p id="foo2">
        <a href=""></a>
    <p id="foo3">
        <a href=""></a>

For more info, check out this:


Run these commands in your terminal to fully install this vim setup. There is another step to compile command-t (instructions coming soon!).

cd ~
git clone git:// .vim
ln -s ~/.vim/vimrc ~/.vimrc
cd ~/.vim
git submodule init
git submodule update
cd ~/.vim/bundle/command-t/
rake make


  • File Browser on left side of screen
  • Functions, Variables, Classes on right
  • Move between buffers in center screen




Jump to Line
Something went wrong with that request. Please try again.