If I open ~/foo.txt
then open ~/baz/bar.txt
from Terminal, Sublime Text always opens 2 different windows. It's aggravating to have all these different windows open..
I've tried changing a bunch of ST's settings, but nothing seems to fix this.
Is there a way to have ALL files and folders just open up in the same window as if I were manually adding all these folders to the project?
In Sublime Text Menu:
Look for '
open_files_in_new_window
'And change '
true'
with 'false
'Drag files or directories to sublime window will add them to current window instead of opening new one.
Folder can be directly dragged to sidebar, or from menu bar select
Project --> Add Folder to Project.
Rather than editing the SublimeText default settings (as Jahnux73 suggested), you should go to Preferences -> Settings - User, and add the following:
The SublimeText default settings file should not be modified, as it may be overwritten by Sublime updates, and so that you'll always be able to restore the default settings. The way Sublime works is that at runtime, it reads and applies the default settings, and then reads and applies the Settings - User file. In the event of a conflict, the User settings take precedence. That way, you can add your own settings without modifying the default configs.
All the answers above indicate the parameter files only, but this does not work for folders. I found this solution:
HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command
-a
, get:C:\Program Files\Sublime Text\sublime_text.exe "%1" -a
subl . -a