Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close an opened folder in Visual Studio Code?

People also ask

How do I close an open folder?

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.

How do I close open code in Visual Studio?

The command to close the currently opened folder can be found from File -> Close Folder .

How do I close all open files in Visual Studio code?

#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:

  1. open New Window (Ctrl+Shift+N) - this will open new VS Code with no project folders opened,
  2. close the old window (with opened project folder),
  3. 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.