If you don't want to use Sublime Text 3 yet, which has a lot of differences from Sublime Text 2, and is still in beta, here's how to fix your problem. Just run each of these commands (in order) from Terminal and you should be all set:
sudo rm -rf /usr/local/bin/subl
This will remove whatever
subl links are in
sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin
This recreates the link to the proper location. Make sure you run the command exactly as I typed it, or it won't work. I'll explain why in a moment. Finally, restart Terminal and enter:
to make sure the process worked.
The reason your
sudo ln -s "/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
command didn't work was because you included the
Applications/... path in quotes
" and also escaped the spaces using a backslash
\. You should do one or the other, but not both. My command above just uses
\ to escape the spaces. When you use quotes, each character in the string is included literally, including the
\ characters. This is why the file was blank when you opened it in
vim - it was pointing to a path that didn't exist.
By the way, while you can open
vim, I wouldn't recommend it because it's a binary executable file, so you'll just get garbage on your screen.