Vim: ERb syntax file for rails view development

Yesterday I made rhtml (embedded ruby) files kind of working by using the html filetype and I was digging the xml/html tag completion plugin. Today after only one search I ended up on the following useful page:

Apart from other seemingly useful tips I found the link to the eruby syntax script:

I followed the directions and placed the eruby.vim file in my ~/.vim/syntax/ directory and modified the autocmd line from yesterday in my ~/.vimrc to this:

autocmd BufRead *.rhtml set filetype=eruby

Some how the xml/html plugin to complete tags as you type them still work.
I don’t see the tags breaking the html syntax highlighting and they eruby tags are now highlighted (not necessary a preference of mine but I can live with it).

  1. December 6, 2005
  2. December 7, 2005
  3. December 9, 2005
  4. December 9, 2005