Can anyone assist with the TextMate Run command? I am not sure how to set the variable and its value in the TextMate in order to Run command + R and get the result of CoffeScript file. Many thanks.
Asked
Active
Viewed 1,624 times
2 Answers
4
After you install the tmbundle, as described in the first answer, in Preference Panel, select the Advanced tab and under TM_PATH add the path to coffee. To find out the path, type:
which coffee
at the command line.
If you installed using Homebrew, you'll get something like this for your path:
/usr/bin:/bin:/Users/me/local/node/bin:/usr/sbin:/sbin:/usr/local/bin
The /usr/local/bin
part is where coffee is located.

Steve Ross
- 4,134
- 1
- 28
- 40
-
Thanks Steve. Well, after running `which coffee` command, I get the `/usr/local/bin/coffee` output. I then place this output under the advance tab into the textmate, using `TM_PATH` variable. However, I am still having trouble getting the run command working. I am not sure what am I doing wrong? Any thoughts, suggestions, appreciated. Thanks again. – Alexander Jun 20 '11 at 17:40
-
You need to put `/usr/local/bin` in the path instead of `/usr/local/bin/coffee`. All `TM_PATH` needs is a search path, not an actual command. – Steve Ross Jun 21 '11 at 18:59
-
Thanks, that helped a lot! On my version of TextMate (2.0.0), that "advanced" variable was simply called `PATH` (see [official post](http://wiki.macromates.com/Troubleshooting/TextMateAndThePath)) – Romain Feb 25 '13 at 03:39
-
I'm not sure this is correct. If `coffee` is in your `PATH` then everything should work fine. However, if not, I believe you can add it specifically for the shell that runs coffeescript using `TM_COFFEE`. It's up to the individual bundle what to do with the environment variables you leave for it. I could be wrong... – Steve Ross Feb 26 '13 at 20:06
1
Install the CoffeeScript bundle:
https://github.com/jashkenas/coffee-script-tmbundle
This will give you syntax highlighting and a lot more, including compilation.

gram
- 2,772
- 20
- 24