[TextMate] Ruby regexp highlighting

Peter McMaster mail at petermcm.dircon.co.uk
Sun Oct 17 22:45:06 UTC 2004


The ruby regexp highlighting works much better now, but still gets 
confused by something like:

   %r{hel{2,10}o}

(The highlighting stops at the first "}").

Adding this:

   { name = "Arbitrary repetition"; match = "({\\d+(,\d+)?})"; 
foregroundColor = "#CCCC33"; }

to the Regular Expression II set in Ruby.plist appears to sort this. 
Doesn't work if you have a regexp like this though:

   %r{foo\{2,10}

Admittedly it's a bit of an extreme edge case, but if someone with 
better regexp skillz feels like figuring it out...

(Note: I don't subscribe to this list, but do check the archives every 
so often.)

  - Peter




More information about the textmate mailing list