Feature request: explicitly open folder in new window
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Currently, the "Open Folder" menu always opens the folder in the current window. There's a setting (`window.openFoldersInNewWindow`) that allows you to swap this behavior to always open in a new window.
The menu should just give you the option to open in the current window OR a new window. The Remote-SSH extension already sets this precedent by providing separate options for "Connect to Host" and "Connect Current Window to Host":
The inability to do this for the Open Folder menu is especially annoying when using devcontainers, because the normal workaround of just creating a new window manually and then running Open Folder again does not work. You'd first have to attach to the devcontainer itself so that the Open Folder menu shows the container's filesystem, but there's no straightforward way to do this because a devcontainer is not a remote. So you have to instead open a workspace in the container's filesystem. But this also does not work in the case that the current window that you were trying not to replace actually has the workspace in question open (which is usually the case), since in that case VS Code simply redirects you to the open window. So what you actually have to do is a 3 step process:
1. In the CURRENT WINDOW, do the Open Folder and allow it to replace the current window
2. Open a new window
3. Open Recent > open the folder that was just replaced
But by replacing the current window, you lose any context (ie. selections) that you had. So this isn't a good solution.
Contributor guide
Assessment
This issue has not been assessed yet.