SyntaxFix
Write A Post
Hire A Developer
Questions
Ctrl+K, Ctrl+1 and then Ctrl+K, Ctrl+2 will do close to what you want.
The first command collapses level 1 (usually classes), and the second command collapses level 2 (usually methods).
You might even find it useful to skip the first command.