[ACCEPTED]-is there a way to collapse/unfold by levels in Visual Studio?-editor

Accepted answer
Score: 11

I have created an extension to provide "level 2 folding" functionality for Visual Studio.
Please 1 note, that it is still quite raw.

enter image description here


Score: 11

It's useful to note that, if you first do 6 Collapse All Outlining (Ctrl+M, A), then you can 5 expand/collapse regions one level at a time, for example by 4 using the mouse or the Toggle Outlining 3 Expansion shortcut (Ctrl+M, M). Not as good as 2 expanding/collapsing by n levels, but better 1 than nothing.

Score: 1

For VS2010 used with cpp : [Tools > Options 4 ... > Text Editor > C/C++ > Formatting > Outline 3 Statement Blocks] set at True.

It seems to 2 do what you expect and certainly what i 1 was looking for when i met your post.

Score: 1

VS code can control fold level by default 2 nowadays.

fold by : command + 1 to 7

unfold all by 1 : commandk commandj

Check more in 'Keyboard shortcuts setting' (commandk commands)

Keyboard shortcuts setting

More Related questions