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?
Robert Occhialini
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
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!)
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@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
On 17.11.2004, at 13:34, Ivar Åsell wrote:
patterns = ( /* comments */ { name = "Comment"; begin = "/\*"; end = "\*/"; foregroundColor = "#FF00FF"; backgroundColor = "#FFFFDC"; },
begin="/\*" - What does the first forwardslash do??
It's part of the start "tag", i.e. /* starts a comment and */ ends it. The backslashes are doubled probably because the text goes through two different regexp parsers.
HTH, Jarkko
-- Jarkko Laine http://jlaine.net
On 17-11-2004 12:34, Ivar Åsell wrote:
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?
This matches "/*". For some reason everything in plist files has to be escaped twice, so that's why you need two 's before the *.
Jeroen.
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@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
Thanks!
It was a great regular expressions start.
On 2004-11-17, at 21.04, kumar mcmillan wrote:
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