8

I have a big project with several subproject and i would need a window for each sub project.

I do :

bash> sublime_text --project $path_to_project &

bash> sublime_text --project $path_to_project &

First command open a window. so far so good. Second command brings me back to the windows opened.

How force sublime text to open the same project in several windows ?

5 Answers 5

5

Sublime text's command line options includes a new window option -n.

Here's an example using your code above:

bash> sublime_text --project $path_to_project -n

This will open the project with a brand new window, instead of focusing your already opened project. For reference here's the documentation on sublimes command line arguments

1
  • That works, thanks! However ending '&' symbol is not necessary, also instead of typing out 'sublime_text' there's a shorthand 'subl' Commented Jan 28, 2016 at 14:24
4

First save the project by clicking on Project -> Save Project As..

Then save the project. Sublime will create two files [name].sublime-project and [name].sublime-workspace.

Then follow Mike McFarland's response Open command line and run the following command

$ subl --project /path/to/[name].sublime-project -n 
2

If you're talking about opening a new window entirely but keep the project workspace in both windows (ie all the folders in your sidebar):
1. Open and configure your project in one window/instance of Sublime Text 3
2. Go to the top menu and hit Project -> New Workspace For Project

I also like to replace the default new window shorcut to run this command. You can update your user keymap with: { "keys": ["ctrl+shift+n"], "command": "new_window_for_project" }

1
  • Project -> New Workspace For Project is the most convenient way for me :) thank you!
    – AllBlackt
    Commented Aug 12, 2019 at 8:33
1

Go to the menu on top and hit:

File > New View into File

It will open your same file in a new tab. You can do this multiple times.

Another option is:

File > New Window

Ctrl + Shift + N

This will open new Sublime Text window. Then drag your file into it. You can again do this multiple times.

1
  • Does not work. Think there was a misunderstanding, so i edited the question Commented Sep 6, 2013 at 8:03
-1

Even though the OP gives opening from CLI as an example, the headline seems to be worded more general. So here is a GUI only solution: Open a new Window, then in the "Project" Menu, just click "Open Project" instead of "Quick Switch Project" or "Open Recent". This way, you can re-open the same project in different windows as often as you want.

1
  • This open does not give me the project view in the sidebar. I'd like to have the folder configuration I created for a project available on two separate monitors.
    – Killroy
    Commented Dec 15, 2016 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .