Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command "subl" from terminal don't work

I am a Mac-newbie (Mountain Lion) and try to set up the "subl"-command for the terminal, like described here:

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 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl

But it doesn't work. I have now a folder /bin/ under my user and this folder including a alias. But when I tip in subl --help inside the terminal, I get the error -bash: subl: command not found

Can someone helps me out?

KR & thx, Fabian

like image 771
Fawyd Avatar asked Aug 09 '12 18:08

Fawyd


People also ask

What does SUBL do in terminal?

Documentation Command Line Interface. Version: Sublime Text includes a command line tool, subl , to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

How do I run Sublime Text from terminal?

To use it, go to Tools -> Build System and select C++ . You can now use Ctrl B to run the build (top command), or Ctrl Shift B to run the Run variant.


2 Answers

Change directories to:

/usr/local/bin 

then run this instead:

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" subl 
like image 186
BiigNiick Avatar answered Oct 22 '22 05:10

BiigNiick


I have found the solution now - there was a problem with RVM. The solution is to enter the command

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/.rvm/bin/subl 

into the terminal.

like image 45
Fawyd Avatar answered Oct 22 '22 07:10

Fawyd