97

I can have only one project / path opened in in the same time, in one Sublime Text 3 window.

Each time I quickly switch project (Ctrl+Alt+P), new project replaces current one. Each time I open new folder (File > Open Folder...) or project (Project > Open Project...), it is opened in a new Sublime Text window.

Can I have more than one project opened in one Sublime Text 3 window? If yes -- how to achieve this?

trejder
  • 17,148
  • 27
  • 124
  • 216
  • 1
    What do you mean in one window? You may have more than one 'root' project directory in your project. Drag any directory to the sidebar, it will show up in the root of the tree. If that's what you want – Sergey Telshevsky Sep 08 '14 at 09:32

6 Answers6

205

If by having multiple projects in one window you mean having multiple directories that are located in different places of your system at once in the sidebar tree, then yes, you can achieve this.

  1. Open one of the projects in Sublime Text just like you always do.

  2. Do one of the following:

    • Drag the root directory of the second project from the file explorer to the sidebar of the first project ST window.

    • In your terminal cd to the second project and enter subl . -a.

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

EDIT

Even easier solution.

Open the first project. Go to (in the menu above)

Project -> Add folder to project

ciscogambo
  • 1,160
  • 11
  • 18
Sergey Telshevsky
  • 12,077
  • 6
  • 55
  • 78
  • Yes, this is, what I want. Two or more directories (root projects' folders) in one window / sidebar. However, we need to clarify your answer, before I can accept it, cause either I'm stupid or I don't get it all! :]. Step, by step: (1) I have "Project A" opened in ST3 (one window). (2) I open "Project B" by `File > Open Directory...` or `Project > Open Project`. (3) It opens in a **new** window. What next? I can only drag a directory in the same sidebar. I can't drag it to another window's sidebar. – trejder Sep 08 '14 at 09:46
  • Please read the steps again. You only open the project A. Next you either drag the project B directory from your file explorer (depends on your OS, e.g. Explorer for Windows), either open the console and do what's said above. Updated the answer do be more precise – Sergey Telshevsky Sep 08 '14 at 09:48
  • Yeap, now it is clear. I missed that part about dragging _from file explorer_! Thanks! :] – trejder Sep 08 '14 at 09:53
  • not really useful as each project has many opened files and putting all opened files across multiple projects into a monster set of tabs is unmanageable --- really need ability to either launch and close multiple windows each one project or somewhat less useful ability to activate/view all open files/tabs for only currently active project while maintaining notion of what projects are to be opened as a set of projects - a project of projects is sorely needed for sublime text 3 – Scott Stensland Mar 02 '15 at 22:15
38

Open sublime Text 3, Inside menu bar

  • Go to "Project"
  • "Add folder to project..."

enter image description here

coder
  • 1,874
  • 2
  • 22
  • 31
6

You can accomplish this by saving your setups as a projects, then under project click switch project and all the tabs you saved in your workspace will appear

frazras
  • 5,928
  • 4
  • 30
  • 40
3

If you're on a Mac just simply drag-&-drop your project folder/alias into Sublime Text Application on your dock.

enter image description here

Then you should see those projected loaded in your Sublime Text ready to go

enter image description here

Happy Coding !

code-8
  • 54,650
  • 106
  • 352
  • 604
3

On MacOS, you can use "Project->Add Folder to Project".

Or more generally, by setting "open_files_in_new_window": false (which is default true), the folder you dragged to sublime text will show in the same window.

Meta Fan
  • 1,545
  • 2
  • 17
  • 28
1

Another thing you can do is create TABS for each project

Window>>New tab

Doing this you will get project tabs above project file tabs...