Rungta’s Webmarks

( I’ve got friends! )

Wednesday, 7 November 2007

TextMate’s ‘Create HTML From Document’

Scott Stevenson talks about how he used TextMate’s HTML export function to post syntax coloured code on his blog. Let me share my experience with syntax colouring code while we’re at it.

From the TextMate manual:

To the amusement of some and the frustration of others, TextMate currently features only limited printing capabilities.

While I discovered this to my frustration, search for an alternative solution led me to the ‘Create HTML from Document’ set of commands in the TextMate bundle. It does add an extra step if all you want to do is take nice print outs of your code, but I’ve found it to be really useful whenever I need to present code in any medium (by making use of Safari’s ability to preserve formatting of copied text).

Check out the article’s comments for some other suggestions for serving up syntax coloured code online.

Older Newer — ∞ —