I'm using iTerm as my default bash shell with Mountain Lion

One of the features is when you click on a file name in the shell, it opens it in a TextEditor.

At the moment though, each time I click a filename it's opened in XCode :(

How can I set this to open in TextMate instead?

I've tried setting my EDITOR shell variable to mate -w but no luck :/


1 Answer 1


Guessing this is based on the default file type and if that is the case just type open ., click on the file and hit cmd-i, scroll to the bottom and select "always open this type of file with".

Or with textmate you can simply type mate filename or mate . to open the directory as a project. This does require that you open up TextMate's preferences and enable the command line option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.