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 Said,

    June 21, 2005 @ 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 Said,

    June 26, 2005 @ 7:07 pm

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

    thanks for the link!

    🙂

  3. Nicholas Lee Said,

    June 27, 2005 @ 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 Said,

    November 9, 2005 @ 2:46 am

    awesome, thanks for the tip!

  5. Frost Said,

    August 4, 2006 @ 3:13 am

    Thanks for this one!

RSS feed for comments on this post