Sublime Text 3 and Terminal prompt for OS X Mavericks?

Zoop picture Zoop · Oct 23, 2013 · Viewed 51.9k times · Source

I'm trying to set-up Sublime Text 3 on OS X Mavericks and getting levels of frustration.

I've followed all of the usual suspects in regards to installation and setup, i.e. Googling the Sublime Text website, and Stack Overflow. Inevitably it's something minor I'm missing, but it's causing me major heartburn.

What I've done so far:

  1. Downloaded Sublime Text 3, sitting in my /Applications directory
  2. Followed the guide Launch Sublime Text 2 from Mac Terminal

The problems starts here. I know that the symlink presented in this link is using ST2, but I want to use "sublime" instead of the "subl"(personal preference). I searched around and found what I need to paste into Terminal for ST3:

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/usr/local/bin/sublime
  1. Already had a ~/.bash_profile: export PATH=/usr/local/bin:$PATH. However, when I echo $PATH I get:

    /usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
    

    Does this look correct?

  2. Now when I type sublime into the terminal I get command not found

What am I missing. This is driving me crazy as I fell that I have followed all the steps, but ST3 is still not working for me

Answer

Mike picture Mike · Oct 23, 2013

Should be:

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

Notice I removed the tilde (~). Tilde (~) in Unix refers to your user's home directory, so your source was correct, but the second argument was placing the link in /Users/[your username]/usr/local/bin/ which is not included in $PATH.

In your note, you said you tried removing the quotes from the source argument. If you remove the quotes, you need to be sure to escape the space character as follows:

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

That should work as well.