VIM Destroys All Other Rails Editors

VIM-BCG-Banner.png 15.2 KB

VIM Destroys All Other Rails Editors
Flame War Disclaimer
What you use to edit code is any other tool and it comes down to personal preference. Personally I LOVE Vim. There are hundred different ways you could set up Vim. This is the setup that's worked best for me. Hope you enjoy it as well.
First things first
Install MacVim or Gvim (For Debian based distros install with apt-get). I do frequently use terminal Vim or Vi but I like having both available. If you're on Windows you probably want to spin up a Linux box or a VM. Ruby on Rails development on Windows is going to painful.
Let's Get Plugged In
Download pathogen.vim it makes managing Vim plugins a lot simpler. Create a ~/.vim/autoload/ directory and copy pathogen.vim into it.
 $ mkdir ~/.vim
 $ mkdir ~/.vim/autoload
 $ cp ~/Downloads/pathogen.vim ~/.vim/autoload/
 Next you need to create and edit your .vimrc file so that pathogen gets loaded in the correct order.
 $ mvim ~/.vimrc
 call pathogen#surround(expand('~/.vimbundles'))
set tabstop=2
 set smarttab
 set shiftwidth=2
 set autoindent
 set expandtab
 Create a .gvimrc to specify colorscheme
 $ mvim ~/.gvimrc
 colorscheme vividchalk
 Create a ~/.vimbundles directory and install plugins. I prefer to clone them from when I can. Some plugins still need to be downloaded from, extracted and copied to your .vimbundles directory. Either way go vote up plugins you find useful on If you don't have git installed check out
 $ mkdir ~/.vimbundles
 $ cd ~/.vimbundles
 Install rails.vim
 $ git clone git://
 Install cucumber.vim
 $ git clone git://
 Install vividchalk.vim
 $ git clone git://
 Install haml.vim (There are two. I use Tim Pope's.)
 $ git clone git://
 Install endwise.vim
 $ git clone git://
 Install surround.vim
 $ git clone git://
 Install unimpaired.vim
 $ git clone git://
 Install abolish.vim
 $ git clone git://
 Install repeat.vim
 $ git clone git://
 Install NERD_tree.vim
 $ git clone git://
 Install NERD_commenter.vim
 $ git clone git://
 Restart Vim and you now have a super powerful Rails editor at your fingertips. Check out each of the plugins for documentation of features.