[TxMt] Regex Guides (was Different background color for comments)

kumar mcmillan kmcmillan at leapfrogonline.com
Wed Nov 17 20:04:56 UTC 2004


On Nov 17, 2004, at 5:34 AM, Ivar Åsell wrote:

> I've been wanting to customize syntax highlighting aswell... but I 
> don't really understand the syntax.
> (Proberbly regexp huh? Really need to learn more on that quickly!)

For a good, simple, to-the-point regular expressions guide, I like this 
one:
http://www.contactor.se/~dast/mail2sms/regex.shtml

>>    patterns = (
>>      /* comments */
>>      { name = "Comment"; begin = "/\\*"; end = "\\*/"; 
>> foregroundColor = "#FF00FF"; backgroundColor = "#FFFFDC"; },
>
> begin="/\\*"  - What does the first forwardslash do?? The first 
> backslash only escapes the following one?
>
> Regards
> ivar
>
>
> On 2004-11-16, at 17.59, M Spreij wrote:
>
>> Robert Occhialini wrote:
>>> Something I have become accustomed to in my Win32 text editor of 
>>> choice (Homesite+) is customizing the syntax highlighting so that 
>>> comments have a different (yellow) background color.
>>> Is there an easy way to do this?
>>
>> Aye there is, this is near the start of my PHP syntax file (I'd tell 
>> you how and why so but I only ever hacked around in those plist files 
>> so I'm better of copy/pasting ;-)
>>
>>    patterns = (
>>      /* comments */
>>      { name = "Comment"; begin = "/\\*"; end = "\\*/"; 
>> foregroundColor = "#FF00FF"; backgroundColor = "#FFFFDC"; },
>>
>> Regards,
>>
>>     Martin
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/mailman/listinfo/textmate
>>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list