You can use short cut to Collapse/Expand Blocks of Code in Visual Studio Code as mentioned below.
Using Shortcuts
- If you’re using a Mac:
- Fold: Command + Option + [
- Unfold: Command + Option + ]
- If you’re on a Windows computer:
- Fold: Ctrl + Shift + [
- Unfold: Ctrl + Shift + ]