Trying to set up sublime text 2 to open files in unix terminal but getting error
I am trying to create sublime text 2 to open a file in my cygwin terminal using the 'subl [file]' command. I am running the command below in my terminal as mentioned on several sites.
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
However, I am getting this error:
ln: failed to create symbolic link `/bin/subl': File exists
How do I get around this?
source to share
You're on Windows, right? This directory you are trying to point to is the Mac OS Sublime Text 2 installation directory. You probably need something like this, but copy the path to sublime_text.exe to match yours:
ln -s /cygdrive/c/Program\ Files/Sublime\ Text\ 2/sublime_text.exe /usr/local/bin/subl
Make sure /usr/local/bin
is some directory in your PATH ( echo $PATH
to find out) for your subl command to work from anywhere. Then you can do subl .
from any project directory to open that project in Sublime.
source to share