Controlled by foldexpr in Neo/Vim IIRC, and I think VS proper has a shortcut Ctrl+M,Ctrl+O from memory. To round it out, VS Code has Ctrl+K+,Ctrl+2 where 2 is your level of folding of choice. Despite using these 3 editors every day and knowing the folding shortcut, I still don't collapse bodies as a matter of routine and I think I'd find it annoying if I had to toggle each open just to find relevant code.
There's also something to be said for the idea that code has a 2D shape to it and recognising parts visually can make navigating it a little easier if you're bouncing between a couple of areas for a particular change. I wouldn't want to obscure that, not by default anyway. But to each their own!
There's also something to be said for the idea that code has a 2D shape to it and recognising parts visually can make navigating it a little easier if you're bouncing between a couple of areas for a particular change. I wouldn't want to obscure that, not by default anyway. But to each their own!