Skip to content

How to add Ant and NAnt support to TextMate

How to add Ant and NAnt support to TextMate

The moment my 30 day evaluation of TextMate expired, I ordered a copy. The last time I got so enthused about an application that I stumped up the cash for it was about 3 years ago, with Delicious Library. Today I used it to edit some NAnt files. Here’s how.

My ancient little Mac Mini already had Subversion. I installed Mono so I could get a working copy of NAnt. You’ll need both.

You need to run this in a Terminal window to enable syntax highlighting for both tools:

export LC_CTYPE=en_US.UTF-8
mkdir -p /Library/Application\ Support/TextMate/Bundles
cd /Library/Application\ Support/TextMate/Bundles
svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/C%23.tmbundle
svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/Ant.tmbundle/
osascript -e ‘tell app “TextMate” to reload bundles’

The TextMate bundles repository has some non-ASCII encodings, so the first line just ensures that you have a UTF-8 encoding selected. The middle 4 lines make a directory, and put the Ant and NAnt bundles in that directory. The last line reloads the bundles for you if TextMate is already running. What a pleasant way to do .NET.

2 Comments

  1. Tim Harding wrote:

    Hrm… I reckon TextMate is a pile of shit compared to most text editors I’ve worked with but I still use it everyday.

    Curse it’s letter at a time undo and it’s SVN integration.

    Why in a free market is this the best that’s available?

    To paraphrase Ivan: I’ll tell you what I want, what I really, really want: the IntelliJ IDEA developers to buy TextMate and make it into a freakin’ awesome Mac native UNIX mashing code editor that is polished to a high gloss.

    Thursday, April 24, 2008 at 8:51 pm | Permalink
  2. Julian wrote:

    Tim,

    I totally love the bundles and think they make it worth buying. The thing I miss is the Eclipse ALT-UP keys for moving lines up and down the file.

    Subversion integration isn’t a big deal for me yet. I don’t write much code at the moment.

    I do have Eclipse on my ancient Mac Mini, but it just feels wrong – and TextMate just feels better. Maybe somebody put something in my drink?

    Anyway, gloss is good.

    Friday, April 25, 2008 at 11:40 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*