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 Wesley. I live in Boston and work on Wonderment.

Go back to home