Skip to content

Instantly share code, notes, and snippets.

@renatocarvalho
Forked from barnes7td/sublime_setup.md
Last active December 31, 2017 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatocarvalho/789348df3dfb4d9804540d6387ceb248 to your computer and use it in GitHub Desktop.
Save renatocarvalho/789348df3dfb4d9804540d6387ceb248 to your computer and use it in GitHub Desktop.
Sublime Terminal Setup on Mac

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy Sublime executable to your ~/bin directory:

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

BASH (Mac OS default)

3a. If using bash (Mac OS default) add line to ~/.bash_profile file:

echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile

4a. Set Sublime Text as your default editor

echo "export EDITOR='subl' -w">> ~/.bash_profile

or

ZSH

3b. Add line to ~/.zshrc file:

echo 'export PATH=$PATH:$HOME/bin' >> ~/.zshrc

4. Restart terminal and type:

subl .

Sublime should open up in the current directory.

5. Check unix commands:

ls

You should get a directory listing.


Sublime Text Documentation: https://www.sublimetext.com/docs/3/osx_command_line.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment