Ctrl+M+O works really great to collapse all methods in a class however I have a hard time finding a way to collapse all classes outlining in the whole file.
One may ask - why do you have many classes in one file ? It's because I'm using MSpec and classes are my tests so I have files with tens of classes. In order to wrap my head around what is going on I often have to collapse classes one by one but that is not really efficient.
How to Collapse All Regions in VS Code? To fold all the regions in your code: Enter command >fold and hit enter.
Ha -- well, apparently I just needed to offer a bounty before I would discover an answer minutes later.
CtrlM, CtrlL will toggle all outlining. If anything in the file is collapsed, the first time you invoke this will expand everything and then invoking it again will collapse everything. This also collapses the namespace, which is a small inconvenience, but I'll call it progress.
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