Skip to content

Instantly share code, notes, and snippets.

@pat
pat / And here's how.textile
Created October 19, 2010 03:12
Access Level Highlighting

Access Level Highlighting

You’ll want to put these files in ~/Library/Application Support/TextMate/Themes – they will override the built-in versions of each. There’s almost no difference – just the access level matcher. From there, restart TextMate, and you should have a new element listing in the Fonts & Colors tab in your TextMate preferences.

Next, you want to add the actual syntax definition – open up the Bundle Editor in TextMate, and then the Ruby Language definition within that. Search for “variable.language.ruby” – and then add the following below that:

{
  name = 'access-level.ruby';
  comment = ' public, private, protected';
  match = '^[ ]*\b(private|protected|public)\b(?![?!])\n';