Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Close All Editors & FoldersNew to Visual Studio Code? Get it now.
Close All Editors & Folders

Close All Editors & Folders

Ayaan Ali

|
2 installs
| (0) | Free
Close all open editors and collapse all Explorer folders.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Close All

Close all open editors and collapse all Explorer folders with one click or command.

Features

  • Close all open editor tabs
  • Collapse all expanded folders in the Explorer
  • Close All button in the editor title bar
  • Command Palette support
  • Custom keyboard shortcuts through VS Code

Usage

Command Palette

Open the Command Palette:

Ctrl + Shift + P

Search for:

Close All

Run the command to close all open editors and collapse all Explorer folders.

Editor Title Bar

A Close All button is available in the editor title bar whenever an editor is open.

Click it to instantly:

  1. Close all open editors
  2. Collapse all expanded Explorer folders

Keyboard Shortcut

No default keyboard shortcut is assigned.

You can assign your own shortcut:

  1. Open Keyboard Shortcuts
  2. Search for Close All
  3. Select the command
  4. Assign your preferred keybinding

Requirements

  • VS Code 1.125.0 or newer

Known Limitations

The Explorer folder collapsing functionality uses VS Code's internal Explorer command and may be affected by future VS Code changes.

License

MIT

Author

Ayaan Ali

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft