Following my last post, a few people asked me to create a Pygments TextMate bundle. Ask and ye shall receive (on GitHub).

Prerequisites
Install Pygments following these instructions.
Installation
First method:
sudo mkdir -p /Library/Application\ Support/TextMate/Bundles
cd /Library/Application\ Support/TextMate/Bundles
git clone git://github.com/acangiano/pygments-textmate-bundle.git "Pygments.tmbundle"
If TextMate is running while you perform the update, execute the following:
osascript -e 'tell app "TextMate" to reload bundles'
This is equivalent to selecting Bundles -> Bundle Editor -> Reload Bundles from within TextMate.
Second method: Download this file, unzip it, and double click on Pygments.tmbundle.
By the way, add the following to your stylesheet if you’d like to see a scrollbar when displaying very long lines of code. This adds a nice border as well:
.highlight { border: 1px solid silver; padding-left: 5px; margin-bottom: 0.5em; overflow-x:auto; }
Leave a Reply