Open files Projects/folders in Sublime Text 3 in a new super tab in the same window on Mac OS Mojave
Open new files and folders in the same window in Sublime Text, Multiple Projects in One Window
First of all, you may need to learn how to open Sublime Text by command line from terminal. Read this article.
You may want to open multiple directory in the same focused Sublime Text window.
Open one of the projects in Sublime Text just like you always do and then you only need to do the following command for the other directory you are in:
subl . -a
-a flag means to add to the last focused window instead of opening in a new window).
Other flags are found here.
The result is:
Although you can drag the root directory of the second project from the file explorer (finder on mac OS) to the sidebar of the first project Sublime Text window or open the first project and then (in the menu ) go to
Add folder to project
And get the similar result and all projects are in one environment and one sidebar as the above picture.
Moreover, You can drag your directories to the Sublime Text icon in Dock. The result will be the same.
I want to open folders in a way they have their individual environment, I mean each folder/project has it’s own sidebar and navigate between the sidebar with the super tabs at the very top above the regular tabs. For having super and sub tabs in sublime text 3 for each project you need to change two configs.
1- The first and most recommended config in the sublime text 3 settings is putting this:
in the user setting part (which is by default true).
cmd+,or Preferences->setting will show the setting as bellow:
2- The second config on mac OS is to click on the system Preferences.
The find the Dock and click on it.
Then for the option “Prefer tabs when opening documents” choose Always.
Then in Terminal open three projects one after the other without any flag like -a:
You will see each project has its own environment! I could not reach such config in Linux/Ubuntu if you find it please let me know how to do that.
You can run also:
Also you can make a new blank tab with Ctrl+shift+n