Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collapse Select Cases without Region?

Is it possible in Visual Studio 2017 to collapse the code in a Case of a vb.net Select without adding Regions to each Case?

I am working on adding to some legacy code that has a Select that runs to about 1,500 lines... Not really interested in going through and adding Regions to every Case especially as it's pretty evident that others working on this code have no idea what they are

I see that by default there are no collapse markers but I'm hoping that there may be some setting where what can be collapsed can be adjusted maybe?

EDIT: Found I can select the Case body then Ctrl+M, H... Any better way than this that I can specifically set collapsability for Cases?

EDIT: I also found this tool but it dates from VS2010 so I'm thinking it likely won't work with VS2017. There are instructions on making onse own outliner here and here but that's more work than I have time for ATM.

like image 555
Toby Avatar asked Dec 18 '25 21:12

Toby


1 Answers

According to this article you can.

Select a code block and do Ctrl+M+H to mark as a foldable section. With Ctrl+M+U you can remove the marker.

It works in VS2015.

like image 53
Tonko Boekhoud Avatar answered Dec 20 '25 17:12

Tonko Boekhoud