I\'m trying to open a directory in sublime Text 3.
I can launch sublime from the command line using the subl
command.
The help text show the fol
To open sublime in the same folder you can simply type in your commandline:
subl .
In order to work you must configure some stuff:
1) To prevent the opening of previous projects you should set the following properties of your Sublime User Settings:
"hot_exit": false,
"remember_open_files": false
2) In order to use subl.exe from anywhere you should add the Sublime folder in the environment variables. I.e. C:\Program Files\Sublime Text 3
I was having trouble opening sublime text 3 with sublime text 2 currently installed. To fix this issue:
1) open /usr/local/bin from terminal.
2) locate and delete subl within bin folder
3) copy and pasted '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' /usr/local/bin/subl into terminal.
4) locate new subl within bin folder
5) used subl in terminal to verify command opens sublime text 3 properly.
6) used subl -v and got Sublime Text Build 3083
For Linux and MacOs users and Sublime Text 3 Try the command : subl3
I've had this issue before, on both Mac OSX and Windows, and I found some oddities with it;
Mac OSX
You either have to have Sublime Text open already for the subl ./folder_name
command to actually open the folder, or Sublime must have been quit with windows still open - if you close all the windows then quit Sublime, using the subl ./folder_name
command will just open a blank Sublime window.
Windows
You have to have Sublime open for the subl ./folder_name
to work. Without Sublime open, it will just open a blank Sublime window.
I've yet to find a way of the command opening fine, no matter how you quit Sublime / when you have Sublime closed.
Try having Sublime open whilst you run the command, and see if it works then.