The Pug Automatic

TextMate command to prevent em spaces

Written January 28, 2008. Tagged OS X, TextMate.

Pressing ⌥+space instead of just space is an easy mistake to make, especially if you just used for something else.

In Cocoa text fields, ⌥+space inserts a typographical em space, which e.g. Ruby's parser does not treat as a regular space. Painful debugging ensues. Even after being bitten by this several times, it still gets me now and then.

I finally got around to fixing it: the Prevent Em Space TextMate command slips into the Source bundle and simply outputs a regular space if you press ⌥+space.