[TxMt] Re: Coloring Syntax

Allan Odgaard mailinglist at textmate.org
Sun Oct 16 07:27:55 UTC 2011


On 14 Oct 2011, at 18:51, John Relosa wrote:

> After playing around with it it only works if there is nothing before it. When I start a line with then I have 2 different colors one for % and one for the name of the array.
> But the moment I put even a space before the %array or declare it or it's inside a parenthesis of a function then it does not work it gets a generic color...

>> match = '^(\%)([a-zA-Z0-9_]\w*)';

This pattern specifically anchors at “begin of line” — that’s the ‘^’ character.

Full documentation for the regular expression syntax is at http://manual.macromates.com/en/regular_expressions#syntax_oniguruma — though there are also lots of online guides which should apply to TextMate’s syntax as well.



More information about the textmate mailing list