06 July 2008

TextMate

I have started using a nice Mac OS X text editor called TextMate, and so far am liking it very well. I'm working with the 30 day trial before deciding whether or not I want to buy it. It comes with support for many languages. I like that you can execute shell commands from within TextMate itself, saving time from flipping back and forth between applications. I also like the collapsible code blocks. This was a feature I loved about QAPartner/SilkTest, and it is nice to see that here.

One thing that did take me a while to figure out was how to get TextMate to recognize environment variables. It turned out that I had no .bash_profile configured in my home directory, and TextMate sources this before it runs a script. So, in my case, I needed for TextMate to find Subversion. I created the following .bash_profile in my home directory:



[ -f /etc/profile ] && . /etc/profile
[ -f ~/.bashrc ] && . ~/.bashrc

export PATH="/opt/subversion/bin:$HOME/bin:/opt/local/bin:$PATH"


After restarting TextMate, I was able to call svn from within my Ruby scripts inside of TextMate.

No comments: