You need to install the shell support in textmate preferences. Follow these steps.
- Open textmate
- Open Preferences via your top menu TextMate > Preferences or pressing Command + ,
- Click on Terminal tab
- Click the install button
note: This will install the command line support to your bash file by default. If you are not using bash, you'll need to add the following line to your shell or select the correct path from the dropdown menu. Once you reload your terminal, this will load the path to the EDITOR variable.
export EDITOR="/usr/local/bin/mate -w"
make sure you reload your shell config by using source like this
source ~/.bashrc
check that your EDITOR variable has been loaded with this command
echo $EDITOR
Don't know what shell you are using? You can use the echo command to show the result of your $SHELL variable like this
echo $SHELL