How to close an opened folder in Visual Studio Code?
With the 0.3.0 update we added a new command to close a folder. You can find it under the File
menu.
As VS Code remembers the last session when opened, you can:
- open New Window (Ctrl+Shift+N) - this will open new VS Code with no project folders opened,
- close the old window (with opened project folder),
- close the new one.
Next time you run VS Code, it should look like the last window you closed and thus without any folders opened.
Note that this process closes ALL opened folders.
The command to close the currently opened folder can be found from File
-> Close Folder
.
You can also use the shortcut:
Ctrl+K F
(press and hold Ctrl
, then press and release K
, then release Ctrl
, and then press F
)
And on a Mac:
⌘+k f
VSCode doesn't have an explicit close folder gesture yet. You can either select File > Open Folder
in a open windows of VSCode or select File > New Window
and in there File > Open
. Having multiple open folders inside a single window isn't supported.