Texas outline

ConfigParser Sugar (for Espresso)

30 November 2009

I’ve recently fallen in love with MacRabbit’s lovely new text editor for OS X, Espresso. For one, it’s a fantastic editor — not quite as swiss-army-esque as the stalward TextMate, but close. Unlike TextMate, Espresso is downright gorgeous — and gorgeous in a way that doesn’t interfere with actually using the thing. A great tool, beautifully designed, and with a deliciously extensible core to boot.

Naturally, this last bit is what really got me hooked. Espresso plugins are called ‘Sugars’, and can provide truly ludicrous extensions to the editor. Want to add a syntax highlighter for a new language? Specialized code folding for a certain coding idiom? Autocomplete and suggestion tools for a library? You can do it, and (almost) entirely in XML. Beautiful.

The first thing I did after downloading the trial version was hunt around for relevant Sugars, which I found to be somewhat sparse. Espresso is, unfortunately, quite a young editor. For instance, I couldn’t find a Sugar for working with configuration files produced/read by Python’s ConfigParser module — something I desperately need for a super-secret project I’m working on. Several hours of reading, writing, and frantic github searching later, I present:


An Espresso Sugar providing syntax highlighting for configuration files layed out according to RFC 822. Among other things, it understands Windows .ini files and config files produced by Python’s ConfigParser module.


Clone the Github project somewhere, with the following:

git clone git://github.com/doches/ConfigParser.sugar.git ./ConfigParser.sugar

And then link it to your syntaxes directory:

ln -s "$(pwd)/ConfigParser.sugar" "/Users/$(whoami)/Library/Application Support/Espresso/Sugars/"
« Previous: The Flixel Experience