[]RSS

About Archives Artwork Comic Contact Philosophy Projects Tags

Textmate command #0

[Comment]

August 31st, 2007 in Micro Blog

Here’s my first pass at a Textmate command (for the E text editor). It copies the text selection to a multi-line C constant, useful for pasting SQL statements into C code:

perl -p -e 's/^(\s+|)(.*)( |)(\s+|)$/$1\"$2$3\"$4/' | pbcopy
echo "Copied C-SQL to Clipboard"

The regex preserves whitespace after each line of statement within the quotes, and preserves the indent so you can still read the SQL in your C code.

Textmate clone for Windows

[Comment]

August 8th, 2007 in Links

The E text editor is a “Textmate” for Windows. Finally, a great editor for Windows (and a Linux version is in the works).

Textmate creator interviewed

[Comment]

January 26th, 2007 in Links

An interview with Allan Odgaard, creator of Textmate for Mac.