Collapse all folders in Visual Studio for Mac
1 min read

Collapse all folders in Visual Studio for Mac

Collapse all folders in Visual Studio for Mac

When working on your solution within Visual Studio for Mac there's a big chance that you'll end up having to collapse all folder's in your file explorer to make it easier again to navigate through your file structure.

In Visual Studio Code, there is a button for it, but on Visual Studio for Mac there is no button, no setting, and no hint in the documentation on how to collapse all folders at once, which creates the struggle to close all folders manually.

Opened folders & files in Visual Studio for Mac

After many attempts and monkey-testing on my keyboard I've found a shortcut:

  1. Click on the folder that you want to collapse (and all it's containing folders/files) in the solution/file explorer on the left side of the screen.
  2. Press Option + Left Arrow Key
  3. All folders are now collapsed!
Collapsed folders in Visual Studio for Mac