[Mac] How to Configure Sublime Text for Command Line Use

Tadashi Shigeoka ·  Tue, July 16, 2013

Here’s how to configure Sublime Text for command line use on Mac.

First, create a symbolic link for Sublime Text.

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

Let’s verify to be sure.

% ls -l /usr/local/bin/subl                                                                   
lrwxr-xr-x  1 your_username  admin  62  7 16 19:44 /usr/local/bin/subl@ -> /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl

Reload the shell (zsh, bash, etc.)

% source ~/.zshrc

Now you can open text files in Sublime Text using the subl command.

% subl some.txt

That’s all from the Gemba.