I am trying to install or update a setting that allows me to minimize and maximize code blocks within VS Code. Similar to below and/or like Visual Studio:
https://www.flickr.com/photos/50988329@N02/25504022561/in/dateposted-public/
Just in case the image link doesn't work, I am speaking about the plus and minus signs/icons that you see next to the line numbers in Visual Studio.
How to Collapse All Source Code in VS Code? To fold all top-level and child elements of your code: Enter the command >fold and hit Enter.
CTRL + M + O will collapse all. CTRL + M + P will expand all and disable outlining. CTRL + M + M will collapse/expand the current section.
Select the section of code. Press Ctrl+M+H – Turn on the collapsible/expandable option. Press Ctrl+M+U – Turn off the the collapsible/expandable option.
You can define a keyboard shortcut for any task. From the Command Palette (Ctrl+Shift+P), select Preferences: Open Keyboard Shortcuts File, bind the desired shortcut to the workbench.
The February Update (0.10.10) for VSCode just added support for code folding.
Try downloading that and giving it a try. You can enable or disable code folding with the editor.folding
setting.
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