Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto-Collapse Explorer (With Toggle)New to Visual Studio Code? Get it now.
Auto-Collapse Explorer (With Toggle)

Auto-Collapse Explorer (With Toggle)

excursus0

|
275 installs
| (1) | Free
Auto-collapse explorer directories that are not currently in view.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto-Collapse Explorer

Auto-Collapse Explorer attempts to keep the Explorer neat and tidy by only expanding the directory of the file that is currently in focus. All directories are closed.

Features

When focus changes to a new document, that document is revealed in the file tree and all other open folders are collapsed.

Thanks for trying out this extension! Hope you enjoy!

Contributing

Pull requests are always welcome. VS Code is not my everyday editor and maintenance/enhancement of this extension suffers.

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