How to open/maximize a function or class in Visual Studio using keyboard
We generally minimize or shrink a function or class by clicking
-
symbol on left corner of every function in Visual Studio. I want do 开发者_StackOverflowwith keyboard instead of mouse. How can that be done.
CTRL-M CTRL-M
Alternatively, you can open up Tools -> Options -> Environment -> Keyboard and assign "Edit.ToggleOutliningExpansion" to any keyboard combo you like.
You just hit Ctrl-M, Ctrl-M to toggle outlining.
I think you want ctrl-M, O and ctrl-M, L. These keys will close and open all regions in VS.
Ctrl M + Ctrl M does the trick
It should also be mentioned that you don't have to click on the - itself...anywhere in the vertical bar below will do it. That makes it easy to quickly shrink successive methods since the next method's vertical bar tends to come up under your mouse pointer after you shrink the one above it.
精彩评论