Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio plugin for collapsing C++ codes

I want a Visual Studio plugin to collapse C++ code in visual. For example, I want to collapse the statements in a if block (as shown below). I know Visual Studio has the "outline" menu, but it doesn't seem to work well for me because it sometimes collapses macro defines and other things.

Does anyone know of a tool that can help me? collapsing example

like image 967
Zhi Wang Avatar asked Oct 23 '12 06:10

Zhi Wang


People also ask

How do I create a collapsible section in Visual Studio?

Select the section of code. Press Ctrl+M+H – Turn on the collapsible/expandable option. Press Ctrl+M+U – Turn off the the collapsible/expandable option.


1 Answers

You need to enable this feature :

Tools -> Options -> Text Editor -> C/C++ -> Formatting -> check everything in "outlining"

Then, reopen the source file to reload outlining.

(PS. This works at least in Visual Studio 2008.)

like image 65
Eric Z Avatar answered Sep 27 '22 22:09

Eric Z