Check your $PATH
if you have /usr/local/bin
and if not add the following
line to the very beginning of your ~/.bash_profile
file (it is a hidden file).
export PATH="/usr/local/bin:$PATH"
# or if you want to be explicit where your SHELL will look for binaries:
# export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
If you want to edit the above hidden file in Sublime (and you are running OS X 10.9 and up):
- Start Sublime and hit Cmd + O (or choose File > Open)
- Navigate to your home directory - Cmd + Shift + H
- Toggle the hidden files - Cmd + Shift + .
- Find
.bash_profile
and hit Return (or the Open button)
Then create a link to the subl
helper tool:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin
# NOTE: change /Applications to where it resides if you did put it in a different spot
To set up Sublime as the default editor in your ~/.bash_profile
add this at the end of the file:
export EDITOR='subl -w'