Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collapsible section/region in Javascript (Visual Studio 2010 / 2012)

I came across this link that allows you to define collapsible sections in javascript, without any Visual Studio Extensions or Macros. Although you automatically get outlining while defining functions, but the link discusses a shortcut to make any javascript code, collapsible.

By using Ctrl+M+H, while selecting javascript code, you can get the collapsible section.

The question is, how do you undo that? Ctrl+M+U does not work.

You can remove all the outlining for the entire document using Ctrl+M+P, but how can you undo the outlining for a single section only?

like image 962
Hasan Fahim Avatar asked Aug 29 '26 12:08

Hasan Fahim


1 Answers

In VS2010, the options for this are under Edit >> Outlining

As you know, press Ctrl+M, Ctrl+H to create an outlining section.

With the section highlighted, press Ctrl+M, Ctrl+U to stop the current selection, and Ctrl+M then Ctrl+P to stop highlighting all.

Also you can use the options in the menu, or the shortcut keys.

like image 164
jwatts1980 Avatar answered Sep 01 '26 00:09

jwatts1980