Reputation: 9131
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?
Upvotes: 5
Views: 9920
Reputation: 2116
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_grammars#language_grammars
Upvotes: 8