Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Vim: ERb syntax file for rails view development

with 4 comments

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

Advertisements

Written by imsaar

December 6, 2005 at 9:00 am

Posted in general

4 Responses

Subscribe to comments with RSS.

  1. Good Day Ali.I am searching for information on software when I came across your site. Although Vim: ERb syntax file for rails view development was’nt exactly what I was looking for it got my attention and made an interesting read. I was really after information relating to software. However I’m glad I stopped by – thanks for the read.

    Dave

    December 6, 2005 at 1:44 pm

  2. Good Day Ali.I am searching for information on computer software when I came across your site. Although Vim: ERb syntax file for rails view development was’nt exactly what I was looking for it got my attention and made an interesting read. I was really after information relating to computer software. However I’m glad I stopped by – thanks for the read.

    Dave

    December 7, 2005 at 10:28 am

  3. Hi Ali. I was looking for some info on free software and came across your site. Although Vim: ERb syntax file for rails view development was not what I was after exactly, it certainly got my interest. I see now that I found your page when I was looking for free software related information. Even though it was not a perfect match I’m glad I stopped by. Good post – have a good day.

    Dave

    December 9, 2005 at 11:54 am

  4. Hi Ali. I’ve been looking for software development tool information and came across your site. I was really after software development tool related info but I came across your site and found it a good posting even though Vim: ERb syntax file for rails view development was’nt exactly what I was after. Thanks for the read

    Dave

    December 9, 2005 at 8:46 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: