Create TextMate URLs

The TextMate URL Scheme lets you create hyperlinks which open a document in TextMate and move to a specific line and column. Here is the code to create this URL from your current location within a TextMate document. Just place this in a TextMate command:

echo "txmt://open?url=file:///$TM_FILEPATH&line=$TM_LINE_NUMBER&column=$TM_COLUMN_NUMBER" | tr ' ' %

The tr ' ' % replaces spaces with % signs.