10
2
I'm using Syntastic in Vim, and it highlights newer Ruby syntax as errors. For example, if I use required keyword arguments (introduced in Ruby 2.1), like this:
def distance(from:, to:)
# whatever
end
... it highlights the definition line and says "unexpected ','".
How can I get it to recognize this as valid Ruby syntax? I've already updated ~/.vim/syntax/ruby.vim
.
Note:
– Nathan Long – 2015-02-16T14:13:11.040~/.vim/syntax/ruby.vim
has nothing to do with checking syntax in files; it's for syntax highlighting. See http://robots.thoughtbot.com/writing-vim-syntax-plugins