Reputation: 463
in previous versions of Visual Studio, you could collapse the html blocks, but that appears to be missing in VS2012. Any ideas on how to enable that feature again?
Upvotes: 46
Views: 12803
Reputation: 1911
right click on html, cshtml or aspx file in solution explorer and select open with option:
in dialog select html editor and click on set as defualt button.
open html or cshtml or aspx file and enjoy html file with outline html tag.
:)
Upvotes: 0
Reputation: 713
I was having this issue too and it was driving me nuts. Turns out that, somehow, I turned off "Automatic outlining" which meant that I did see the plus/minus signs and the shortcut Ctrl + M + M didn't work either.
After I turned on Automatic Outlining in Edit > Outlining > Start Automatic Outlining everything went back to normal.
NOTE: On some ocassions, for this solution to work, you also need to close and reopen the document before clicking on Start Automatic Outlining. In fact, sometimes that option doesn't appear in the menu if you don't do so.
Upvotes: 102
Reputation: 21098
I prefer using Ctrl + M + H
whenever I want to hide unwanted code irrespective of any tree hierarchy. This works great even if I want to hide my commented code.
You just need to select the code that you want to collaspe and hit Ctrl + M + H
and its hidden now :)
Upvotes: 3
Reputation: 2033
Just hover your mouse on code editor and wait a moment, don't move your mouse :)
The outline tree will show out.
before and after
Upvotes: 0
Reputation: 21
When you open the font .cshtml, you will have go to EDIT->Outlining->Start Automatic Outlining
Upvotes: 2
Reputation: 1483
It's still there. The issue is that sometimes it takes a while for the parser to visually enable collapsing.
Try Ctrl + M + M and you'll see the effect
Upvotes: 11