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.
Comments
-
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 updatedsyntax/ruby.vim
highlighting file that will highlightkey:
just like it highlights:key
in{:key => value}
? -
Peter about 14 yearsperfect, thanks. not quite sure why I hadn't tried this - but I have now!
-
Nathan Wallace over 10 yearsfor 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 over 10 yearsExecute
wget https://raw.github.com/vim-ruby/vim-ruby/master/syntax/ruby.vim
while in~/.vim/syntax
to download only this file from repo