Posted over 10 years ago. Visible to the public. Linked content.

Sublime Text 2 on the OS X Command Line

To use Sublime Text 2 as command line editor, you need to create a symlink:

If installed via Homebrew Cask:

Copy
ln -s "/opt/homebrew-cask/Caskroom/sublime-text/2.0.1/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

or, if installed manually:

Copy
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

And if you want to use it as your default editor e.g. for git status messages, set your EDITOR environment variable like this:

Copy
vi .bashrc export EDITOR='subl -w'

Owner of this card:

Avatar
Matthias Marschall
Last edit:
over 7 years ago
by Matthias Marschall
Keywords:
OSX
Posted by Matthias Marschall to Matthias Marschall
This website uses short-lived cookies to improve usability.
Accept or learn more