[TxMt] how to change font for a "logger*" line??? (e.g. to de-emphasis logging lines in Ruby code)

Allan Odgaard throw-away-1 at macromates.com
Sun Mar 18 16:47:00 UTC 2007

On 18. Mar 2007, at 12:24, Greg Hauptmann wrote:

> Any tips on how to change the format of a line of Ruby based on  
> it's content?
> In particular I was wanting to try deemphasize logging lines (i.e.  
> starting with "logger.*") by setting the text font to a gray.     
> Any ideas/tips would be great.  Couldn't seem to see when it would  
> be possible to do this in the bundle manager.

You would need to add a rule to your language grammar that matches  
these lines, then you can style them accordingly.

See http://macromates.com/textmate/manual/language_grammars

In your case, it might be best to start a new grammar, add a rule for  
the logger lines, then include the regular Ruby grammar. That way, if  
the regular grammar is updated, you will see these changes in your  

More information about the textmate mailing list