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}?
2 Answers
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.
3 Comments
Peter
perfect, thanks. not quite sure why I hadn't tried this - but I have now!
Nathan Wallace
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
Execute
wget https://raw.github.com/vim-ruby/vim-ruby/master/syntax/ruby.vim while in ~/.vim/syntax to download only this file from repoThoughtbot's dot files might be another good place to start: https://github.com/thoughtbot/dotfiles