Finally, a TextMate theme that works for XML
I regularly fiddle with the following: fonts, colours, sizes, tools, utilities; and more, ad infinitum. Sometimes a change is as good as a holiday for me. A new theme, new settings, a new app—whatever—will reinvigorate me with a burst of productive energy. (However mostly I just procrastinate.)
I have a problem with most TextMate themes. And the reason it’s a problem for me is that I spend a lot of my time looking at XML, rather than a programming language. I’d love to spend more time programming, but this is what I’ve got to deal with.
The problem with most TextMate themes is that when it comes to XML, the entire document ends up being rendered in, like, two colours:
I’ve been making do with Mac Classic for some time. It’s balance of colours makes reading XML at least bearable, though it’s still very difficult to scan. The reason? In most themes, all element and attribute names, including namespaces, are coloured the same. So basically you end up with four colours: background, foreground (elements, attributes, etc.), strings and comments. And a given XML file usually has so much of the foreground and string colour that it’s difficult to tell things apart.
Todd Werth created a theme called IR_Black (fittingly, announced in a post entitled The last TextMate theme you’ll ever need). I’ve been using it for a couple of weeks now, and it’s really growing on me. Here’s a few of reasons why:
- XML namespaces, strings, element and attribute names are all highlighted using different colours (!).
- The colour palette is very attractive and easy on the eyes.
- Comes in a white version (IR_White) if you can’t stomach black themes.
On my antiglare MacBook Pro display, to my eyes the black was a just bit too deep and the orange a bit too vibrant, so I’ve made a couple of changes to soften the overall effect. The resulting TextMate 2 bundle, with both the white and black themes, can be downloaded here: IR_Themes. (For TextMate 1.x users, you can install the themes by right-clicking on the .tmbundle, selecting Show Package Contents, and navigating to the Themes directory and double-clicking on the .tmtheme files.)
Thanks Todd for a great theme, which hopefully will be the last I’ll ever need.