[TxMt] boundle help
Allan Odgaard
throw-away-1 at macromates.com
Thu Jan 26 23:41:46 UTC 2006
On 26/1/2006, at 18:45, Will Arp wrote:
> also for color syntax, I'd like "value?" to be recognized
> but this doesn't work:
> { name = 'rebol.words';
> match = '\b(value\?)\b';
> },
\b is a word-boundary. Since ? is not a word character, there is no
word-boundary after the question mark.
So either make it: match = '\b(value\?)'; (the parenthesis is
redundant btw) or if you want to ensure that no word-character follow
“value?” then: match = '\b(value\?)(?!\w)'; The latter here is a
negative look-ahead assertion on a word character (meaning it ensures
that the next character is not a word character).
Btw: your naming of the elements is wrong, it should be the most
general clasification first, then specializing it, and lastly the
name of the language. For more info see [1]
[1] http://macromates.com/textmate/manual/
language_grammars#naming_conventions
More information about the textmate
mailing list