How to add Sublime Text command line support for Mac OS X El Capitan

Telmo Dias picture Telmo Dias · Oct 2, 2015 · Viewed 7.5k times · Source

How can I (re)enable command line support for Sublime Text under Mac OS X El Capitan ?

Answer

Telmo Dias picture Telmo Dias · Oct 4, 2015

To add command line support for Sublime text under Mac OS X El Capitan, open the Terminal.app and run the following command :

sudo mkdir -p "/usr/local/bin/" && ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

Edit:

In case you already have the directory /usr/local/bin/ on your system, just run the second part of the command (after the &&) :

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl