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.

Tip 1:

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:

-a flag means to add to the last focused window instead of opening in a new window).

Other flags are found here.

Example:

Image for post
Image for post

The result is:

Image for post
Image for post

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

Project -> 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.

Tip 2:

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:

Image for post
Image for post

2- The second config on mac OS is to click on the system Preferences.

Image for post
Image for post

The find the Dock and click on it.

Image for post
Image for post

Then for the option “Prefer tabs when opening documents” choose Always.

Image for post
Image for post

Then in Terminal open three projects one after the other without any flag like -a:

Image for post
Image for post

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.

Image for post
Image for post

You can run also:

Also you can make a new blank tab with Ctrl+shift+n

Written by

Web geek, Self-taught full-stack web developer, Learning Python, Laravel, Vuejs, UX/UI design, Nuclear Physicist PhD

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store