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}?

Conner
  • 30,144
  • 8
  • 52
  • 73
Peter
  • 127,331
  • 53
  • 180
  • 211

2 Answers2

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.

Bill Odom
  • 4,143
  • 24
  • 20
  • perfect, thanks. not quite sure why I hadn't tried this - but I have now! – Peter Apr 04 '10 at 16:50
  • 1
    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) – Nathan Wallace Oct 23 '13 at 17:47
  • 1
    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 – jmarceli Dec 29 '13 at 12:08
0

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

Sam Backus
  • 1,693
  • 14
  • 19