How to collapse code sections in VS Code

Jul 13, 2020

šŸ¤” Problem

How do you fold code sections in Visual Studio Code?

āœ… Solution

⌘ + k + 0 : Fold all levels

⌘ + k + 1 : Level 1 (Namespace)

⌘ + k + 2 : Level 2 (Class)

⌘ + k + 3 : Level 3 (Methods)

⌘ + k + 4 : Level 4 (Blocks)

⌘ + k + 4 : Level 4 (Blocks)

⌘ + k + [ or ] : Current cursor block

⌘ + k + j : Unfold

A handsome man.

I'm Wes. I live in Boston and work on Wonderment.