vscode-better-folding
vscode-better-folding copied to clipboard
Add "Collapse to Definitions" feature from Visual Studio
In Visual Studio, the following shortcut exist for outlining:

Collapse to Definitions In my opinion, the "Collapse to Definitions" shortcut is the most important outlining feature of any IDE, as it collapses everything down to a basic outline, which (1) allows you to quickly navigate to anything you're looking for, and (2) allows you to easily view what functionality exists in any file that is new to you.
When invoked, this feature does the following:
- Keeps all namespaces, classes, and enumerations expanded.
- Collapses all top-level/class functions, but keeps their innards (if/for/while/inline lambdas) expanded.
- Collapses all multi-line comments found anywhere in the file.
- Collapses all regions found anywhere in the file (
#region/#endregion).
Given what this extension is already able to do, it seems like implementing this feature would not be that difficult. Can it be added?