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