To close a specific file or folder, in the Results pane right-click the file or folder name, and then click Close Open File. To disconnect multiple open files or folders, press the CTRL key while clicking the file or folder names, right-click any one of the selected files or folders, and then click Close Open File.
The command to close the currently opened folder can be found from File -> Close Folder .
#3: Right-Click->Close All But This If you want to close all but one open file, simply right-click on the tab and select Close All But This. This will close all open documents (floating included) except the tab you've right-clicked on.
The command to close the currently opened folder can be found from File
-> Close Folder
.
You can also use the shortcut:
Ctrl+K F
And on a Mac:
⌘+k f
With the 0.3.0 update we added a new command to close a folder. You can find it under the File
menu.
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.
As VS Code remembers the last session when opened, you can:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With