tags:

views:

1106

answers:

1

I have recently begun working with Objective-C in Textmate and noticed that the syntax highlighting is rather poor (a comment is the exact same color as a variable declaration). I've never done syntax highlighting changes in Textmate and I'm having trouble figuring out how to correctly modify it. For example the scope of a comment in an Objective-c file is: source.objc.iphone meta.implementation.objc meta.scope.implementation.objc meta.function-with-body.objc

but changing the colors on that changes alot more than just comments.

Does anyone know of a good place to start learning how to do this?

+2  A: 

You can check the scope of your current cursor with ^ + Shift + P or Bundles > Bundle Development > Show Scode. After you know the scope, you can create / change the color of it. If the comment is not detected by the language grammar, you have to extend it. See the documentation for further information: http://manual.macromates.com/en/language%5Fgrammars#language%5Fgrammars

Martin Wittemann