12

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 2

16

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.

Sign up to request clarification or add additional context in comments.

3 Comments

perfect, thanks. not quite sure why I hadn't tried this - but I have now!
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)
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
0

Thoughtbot's dot files might be another good place to start: https://github.com/thoughtbot/dotfiles

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.