I've downloaded and installed Sublime text 2. I am following the directions here: but I am stuck at this part:
The first task is to make a symlink to subl. Assuming you've placed Sublime Text 2 in the Applications folder, and that you have a ~/bin directory in your path, you can run:
ln -s "/Applications/Sublime Text " ~/bin/subl
However, when I do this it tells me /Users/User/bin/subl: No such file or directory.
What should I do?
Thanks!
I'd recommend adding it to your local bin:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Edit: Make sure your local bin directory exists before running this command:
mkdir /usr/local/bin
I add my sym links to /usr/local/bin, for Sublime Text 3 I set mine up like so:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Then you can open up the current directory list using:
subl .
If you find subl abbreviation annoying as some people I know seem to do, then change it to 'sublime'
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
And call it using:
sublime .
Alternatively, you can run this:
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
Note: The above snippet puts the symlink in /bin/subl
rather than ~/bin/subl
.
and that you have a ~/bin directory in your path
First, you need that directory for the ln
command to work, and eventually, it will need to be in your path to do whatever it is you are trying to do.
To make the directory:
mkdir ~/bin
Adding it to your execution path is trickier, but there are plenty of resources available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With