Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 C++ outlining / collapsing if/else/while code regions

Tags:

Apparently in VS13 they removed the outlining section in Option -> Text Editor -> C++ -> Formatting.

Is there a way of collapsing if/while/etc statements in VS2013 C++? I know about the C# plugin and already got that, but I'm searching for a solution for a C++ enviroment.

Cheers!

like image 840
AndrewVS2013 Avatar asked Dec 28 '13 23:12

AndrewVS2013


People also ask

How do I collapse an if statement in Visual Studio 2013?

Now for collapse all use the shortcut ctrl + M , ctrl + O .

How do you collapse an if statement in Visual Studio?

(Ctrl+M, Ctrl+H) - Collapses a selected block of code that would not normally be available for outlining, for example an if block. To remove the custom region, use Stop Hiding Current (or Ctrl+M, Ctrl+U). Not available in Visual Basic.

How do I enable expand collapse code in Visual Studio?

Fold (Ctrl+Shift+[) folds the innermost uncollapsed region at the cursor. Unfold (Ctrl+Shift+]) unfolds the collapsed region at the cursor. Toggle Fold (Ctrl+K Ctrl+L) folds or unfolds the region at the cursor.


2 Answers

Answered by Hans Passant: "It is still there, Text Editor -> C++ -> View, Outline Statement Blocks"

like image 74
AndrewVS2013 Avatar answered Sep 20 '22 07:09

AndrewVS2013


For Visual Studio 2013,


Tools -> Options -> Text Editor -> C++ -> Formatting -> Outline Statement Blocks -> Enabled.

like image 22
Mohit Thakur Avatar answered Sep 22 '22 07:09

Mohit Thakur