Tim Pope has written a nice vim plugin to help you work with rails. It adds additional syntax highlighting for some specific rails methods, helps you move around, and other goodies! The vim doc file explains it all in more detail.

rails.vim on OSX

To get yaml highlighting working on OSX, you need to undertake some extra actions. Start by downloading a yaml.vim syntax file from somewhere (for example from here,) and place it in ~/.vim/syntax/. Next add the following to your .vimrc: autocmd BufRead *.yml set syntax=yaml


Don’t forget to add the following to your .vimrc to fully enjoy Tim’s creation:

let g:rails_statusline=1
let g:rails_syntax=1
map <Leader>ra <Plug>RailsAlternate
autocmd BufRead *.yml set syntax=yaml


Tim added his plugin to vim.org ! Way to go Tim!