This assumes that you have ~/bin created and in your path and that TextMate is installed in /Applications.Īfter having created this link, you may want to setup a few shell variables to make other applications use TextMate as an external editor. The mate command is located inside the TextMate application bundle and it is recommended that you create a symbolic link which points to the command (rather than “install” it), so that if the command is updated in the future, you will not need to reinstall the updated command.Ĭreating a symbolic link can either be done by selecting Help → Terminal Usage… from the menu, or from the shell by running something like the following: ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate For usage instructions you can run mate -h (from Terminal). when using an editor to write something like a subversion commit message.įor this reason TextMate comes with its own mate shell command, which supersedes the open command. This standard command has a few shortcomings: it can only open one file at a time, it cannot open a document at a specific line and it cannot “stall” the shell until the file has been closed, which is useful e.g. will open the current folder in TextMate (as a scratch project). It can also perform an Open With… operation by use of the -a argument, e.g.: open -a TextMate. Mac OS X comes with an open shell command which can be used to simulate a double click from within Terminal. Calling TextMate from Other Applications Shell / Terminal