Because I didn't create textmate link when installing, so it can not find 'mate' command. who can help me to deal with this? thanks
5 Answers
Textmate 2:
From the menu:
Textmate -> Preferences -> Terminal: click install
For more information read the "Terminal Preferences" from Help

- 2,021
- 1
- 18
- 32
-
3Thanks, it worked! Then to write commands, preface them in command line with `mate`. – Azurespot Jun 11 '16 at 04:40
Even though is question is more suited for Super User, I'll bite:
Creating 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
This assumes that you have ~/bin created and in your path and that TextMate is installed in /Applications.
Therefore, I'd recommend looking inside of the Textmate.app
bundle :)
(Source)

- 354,903
- 100
- 647
- 710
-
1Mavericks was acting strange with a bunch of the other solutions, but Help → Terminal Usage couldn't have been simpler. Cheers! – gbdev Jun 24 '14 at 20:24
Install TextMate
If you're using bash, open .bashrc or .bash_profile; or if you're using zsh the open .zshrc and add
export EDITOR="/usr/local/bin/mate -w"
Navigate to the Preferences -> Terminal and click install

- 1,900
- 17
- 16
TextMate will create the symbolic link you need. Launch TextMate as you would any other Cocoa app, and under the "Help" menu, select "Terminal Usage..." A simple GUI presents you with some defaults you will almost certainly use but can tweek if necessary. Click "Create Link" and you're set.

- 51
- 1
- 1
Create a symboling link to bin folder
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate
then export all links to path variable
export PATH="$HOME/bin:$PATH"
for more detailed information go to TextMate's official help page.

- 28,690
- 9
- 51
- 58