Sunday, April 5, 2015

Open Sublime in Terminal for Mac OSX

Even though we install Sublime 2 or 3 using a DMG file in Mac OSX, we cannot open Sublime using the terminal. To fix this, run the following...

For Sublime Text 2

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

For Sublime Text 3

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

To open Sublime in terminal, use the following command.

subl 
To see usages of subl command

subl --help

References

  • https://www.sublimetext.com/docs/3/osx_command_line.html
  • http://stackoverflow.com/questions/11889484/command-subl-from-terminal-dont-work
  • https://bensmann.no/open-folder-in-sublime/

No comments:

Post a Comment