0
Completed

A way to start Sublime from the command line

Taco Ekkel 6 years ago • updated by Jon Skinner 5 years ago 4
Back when I used textmte, I've gotten addicted to it's "mate" command line thing. Just cd into to a folder, enter "mate ." and it opens the current folder as project root. Simple, yet absolutely brilliant. Can we have this for Sublime Text?

Answer

Answer
Completed
Please check the documentation (under 'OS X Command Line') to see how to do this, at http://www.sublimetext.com/docs/2/
Answer
Completed
Please check the documentation (under 'OS X Command Line') to see how to do this, at http://www.sublimetext.com/docs/2/
My bad, typical case of RTFM. Thanks for humoring me nonetheless!
TextMate creates the symlink automatically on first run -- maybe that is the better option so it can be assumed it's the same on all machines. Also what about "sublime" vs. "subl" -- hate the extra characters but its more descriptive.
+1

Maybe I'm missing something, but on OS X (Mountain Lion) running `cd ~/Projects && subl ./` does not work. I can open individual files fine, but not a whole directory. 


Edit: works on some directories, but not others. Debugging now


Edit 2: appears to be buggy. Works sometimes, not others. Some output to console:


8/21/12 9:20:37.559 AM Sublime Text 2[15197]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid

I'm having the same problem.  It's not that it works only on some directories though - it's that it only works about one in every four times.  I find that if Sublime is already open then it works every time.


Sublime Text 2[75206]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid