Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto collapse to definitions visual studio 2012

I have been looking high and low for a way to auto collapse to definitions in visual studio 2012 when you open a file.

I found a solution for VS2010 here Any way to auto collapse to definitions whenever you close a document? but that requires a Macros which has been taken out in VS2012.

Any Solution would be much appreciated!

like image 741
Austin Avatar asked May 14 '13 10:05

Austin


People also ask

How do I collapse all functions in Visual Studio?

CTRL + M + O will collapse all. CTRL + M + P will expand all and disable outlining. CTRL + M + M will collapse/expand the current section.

How I can make Ctrl Click to go to definition in Visual Studio code?

Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

How do I Collapse all regions in Visual Studio?

Collapse All Regions command for #region blocks in C#, VB, C/C++, XAML (and possibly F#) source code files. The default key binding for this command is [Ctrl+M, Ctrl+R] Note: It may also work with F# files, when a #region block handler extension is installed.

How do I enable definition in Visual Studio?

If you are a keyboard user, place your text cursor somewhere inside the symbol name and press F12. If you are a mouse user, either select Go To Definition from the right-click menu or use the Ctrl-click functionality described in the following section.


1 Answers

Yes, macros are definitely gone from Visual Studio 2012.

Not exactly what you requested, but the Ctrl-M, Ctrl-O keyboard shortcut is fast.

Third party tools like CodeRush! or Resharper may help here. I know that CodeRush is very customizable.

You can also create your own Visual Studio Extension. Extensions are more powerful than macros, but have a bit of a learning curve.

like image 91
Walt Ritscher Avatar answered Oct 10 '22 21:10

Walt Ritscher