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?
You can change (or apply) syntax highlighting for the active file by using the View as language drop down in the Formatting group of the Coding tab, or the syntax highlighting selector in the Status bar.
Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With