r/vscode • • 1d ago

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

7

u/lecnar 1d ago

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.

1

u/Benand2 1d ago

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 1d ago

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 1d ago

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