Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aniketmuruskar/4e473a751fc2bbc0e9e799200ea4eb45 to your computer and use it in GitHub Desktop.
Save aniketmuruskar/4e473a751fc2bbc0e9e799200ea4eb45 to your computer and use it in GitHub Desktop.
Access Sublime 3 from the Mac OSX Terminal
//create symbolic link for sublime
sudo ln -s /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
//check your profile
sudo nano ~/.bash_profile
//your PATH contains all the directories that will be checked for executable binaries when you type a command into your terminal
// make sure /usr/local/bin in PATH, if not simply add to your PATH and save the file using the following command
export PATH=/usr/local/bin:$PATH
// reload your .bash_profile with the newly added directory in your PATH
source ~/.bash_profile
# Test it works!
subl . – opens the current directory in Sublime
subl filename – opens a file where filename is the file to be opened
subl foldername – opens a folder where foldername is the folder to be opened
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment