More syntax highlighting fun

Tim Pope vim-ruby-devel at tpope.info
Thu Feb 22 12:32:36 EST 2007


Okay, I've followed up on several changes I mentioned earlier.  Most
obvious is the change of rubyConstant to Type and rubySymbol to
Constant.  I think the first looks great and I strongly advocate
keeping it.  The second is more debatable but after trying it for a
few hours, I like it enough to tenatively add it.  I'm not trying to
force anything here but since nobody raised any objections, I figured
I'd be bold.

More important than a few cosmetic changes is the overhaul I gave to
method, module, and class definitions.  Try all of the following with
the new syntax file: 

def bar

def
  bar

def foo.bar

def @foo.bar

def Foo.bar

def Foo::bar

def self.bar

I think this will be win-win for everyone.  We can also turn off the
rubyFunction highlghting by default.  I'm not sure whether that's a
better choice so I left it on for now to demonstrate what's possible.

I also did a lot of clean-up, so let me know if you find anything that
breaks.  Things like if/unless are in the Conditional group and
while/until in the Loop group.  Oh, and I had to resolve a conflict
between Doug Kearns' and my ways of highlighting interpolated
variables.

Is there any reason for keeping around config options like
ruby_no_identifiers?  I don't see what

let ruby_no_identifiers = 1

offers over

hi link rubyIdentifer NONE

Both work fine in a vimrc.  Maybe this is a holdover from the 5.x
days?

Cheers,

Tim Pope


More information about the vim-ruby-devel mailing list