rhtml, vim and rails

Grab and install eruby.vim into ~/.vim/syntax. Then following this tip add:


au BufNewFile,BufRead *.rhtml set syn=eruby

to ~/.vimrc.

While you are at that, make sure you check out HowtoUseVimWithRails.

5 comments

#1 The RummandDan show » Blog Archive » VIM, Rails and rhtml files on 06.21.05 at 8:45 pm

[...] « Beauty of Ruby or Rails? VIM, Rails and rhtml files This fixes my irritating issues with the rhtml file syntax highlighting… I even th [...]

#2 Jonathan Simms on 06.26.05 at 7:07 pm

afaict, that “au BufNewFile” line usually goes in filetype.vim.

thanks for the link!
:)

#3 Nicholas Lee on 06.27.05 at 11:24 am

True, maybe I should file a wishlist against vim-common:
nic@rails:~$ dpkg -S /usr/share/vim/vim63/filetype.vim
vim-common: /usr/share/vim/vim63/filetype.vim

Update: Report filed.

#4 Noah on 11.09.05 at 2:46 am

awesome, thanks for the tip!

#5 Frost on 08.04.06 at 3:13 am

Thanks for this one!

Leave a Comment