Vim syntax highlighting for ruby 1.9

11,694

Try the latest version from github:

http://github.com/vim-ruby/vim-ruby/blob/master/syntax/ruby.vim

It was updated in December of 2009, and seems to do the right thing with the new hash literals.

Share:
11,694
Peter
Author by

Peter

I am not actually called Peter. Sorry about that.

Updated on June 18, 2022

Comments

  • Peter
    Peter almost 2 years

    Ruby 1.9 has a few new syntax elements, such as the {key: value} hash literal syntax. Has anyone written or seen an updated syntax/ruby.vim highlighting file that will highlight key: just like it highlights :key in {:key => value}?

  • Peter
    Peter about 14 years
    perfect, thanks. not quite sure why I hadn't tried this - but I have now!
  • Nathan Wallace
    Nathan Wallace over 10 years
    for the record, you don't have to use the whole vim-ruby plugin -- you can simply save the file linked above to ~/.vim/syntax/ruby.vim (mkdir ~/.vim/syntax if necessary)
  • jmarceli
    jmarceli over 10 years
    Execute wget https://raw.github.com/vim-ruby/vim-ruby/master/syntax/ruby.‌​vim while in ~/.vim/syntax to download only this file from repo