Expand or collapse code elements inVScode
- Fold All:Windows: Ctrl + K Ctrl +
0
Mac: ⌘ + K + 0
- Unfold All:Windows: Ctrl + K Ctrl + J
Mac: ⌘ + K + J
To see all available shortcuts in the editor:
- Windows: Ctrl + K + S
- Mac: ⌘ + K + S
- Ctrl + K + 0: fold all levels (namespace, class, method, and block)
- Ctrl + K + 1: namspace
- Ctrl + K + 2: class
- Ctrl + K + 3: methods
- Ctrl + K + 4: blocks
- Ctrl + K + [ or Ctrl + k + ]: current cursor block
- Ctrl + K + j: UnFold