Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 712
Telmo Dias Avatar asked Oct 02 '15 01:10

Telmo Dias


People also ask

Does Sublime Text have command line?

Sublime Text includes a command line tool, subl , to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.


2 Answers

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
like image 71
Telmo Dias Avatar answered Oct 03 '22 22:10

Telmo Dias


In case of Sublime Text 3:

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
like image 24
Niels Kristian Avatar answered Oct 03 '22 21:10

Niels Kristian