Fold Code in VS Code to Read Big Files Easier
A quick VS Code tip for folding all the code in a file so you can understand its structure, using only the keyboard.
Watch the video
Fold and unfold with the keyboard
I’m a blind developer, so when I open a large file I can’t just scan through it quickly. One thing that helps a lot in VS Code is folding the code so I can understand the file’s structure first.
To collapse everything, press Ctrl+K, then Ctrl+0. That folds all the classes, functions, and methods before I dig into any one part.
To expand it all back out, press Ctrl+K, then Ctrl+J.
No mouse needed.