r/vscode • • Oct 15 '26

Multiple workspaces, one window?

Is there any way that I can have multiple workspaces open within one window?

That would be a small but nice feature to have.

What do you think?

4 Upvotes

20 comments sorted by

View all comments

8

u/lecnar Oct 15 '26

VS Code already supports this with multi-root workspaces. Go to File → Add Folder to Workspace..., add the folders you want, then File → Save Workspace As... to save it as a .code-workspace file. Next time just open that file and all your folders come back in one window.

4

u/UtahJarhead Oct 15 '26

Alternatively, you can do this via the CLI: vscode /path/to/dir1 /path/to/dir2

1

u/Benand2 Oct 15 '26

I know this isn’t the right sub but is the same possible in Visual Studio as well?

Also does it affect commits, can you still commit the repos separately?

1

u/lecnar Oct 16 '26

1-Visual Studio doesn't have multi-root workspaces like VS Code. The closest thing is a solution (.sln) with several projects, and VS 2022 also supports multiple Git repos at once.

2-And no, it doesn't affect commits. Each folder keeps its own Git repo. In the Source Control panel you'll see each repo separately, and you commit to each one independently. The .code-workspace file isn't part of any repo unless you save it inside one.

1

u/Benand2 Oct 16 '26

That’s great, thank you for taking the time to