Saari Development

This blog is intended to be a log of my (Ali Rizvi's) professional ramblings as a software development engineer. I intend to add logs of my experience with different technologies, software, tech books/articles and related stuff from time to time. My intention is to have an archive for my personal use and public benefit.

Tuesday, December 06, 2005

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:

http://wiki.rubyonrails.com/rails/pages/HowtoUseVimWithRails

Apart from other seemingly useful tips I found the link to the eruby syntax script:
http://www.vim.org/scripts/script.php?script_id=403

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).

0 Comments:

Post a Comment

<< Home