String interpolation highlighting (was Re: rubyFunction, rubyClass, and rubyModule no longer highlighted)

Tim Pope vim-ruby-devel at tpope.info
Mon Feb 26 10:21:40 EST 2007


On Mon, Feb 26, 2007 at 08:56:47PM +1100, Doug Kearns wrote:
> FWIW, I suspect that some of the highlighting will break when in an
> interpolation region since it makes assumptions about what can appear
> before and after syntax 'elements'.  When I wrote these I didn't do so
> with this new addition in mind.  Have you come across any yet?

No, but it didn't take much searching:

"#{if true then 1 end}"

However, syntax highlighting also fails on

3.times { if true then 1 end }

Of these two, the latter is more serious because it affects future end
highlighting.

Adding { to the monster regexp setting off if/unless does not fix
this.  Apparently Vim doesn't like backtracking through the beginning
of a region definition.  I'll investigate a bit more; let me know if
you have any ideas.

Cheers,
Tim


More information about the vim-ruby-devel mailing list