Keyboard Shortcut Description
F12 Go to definition
Ctrl+Shift+8 Go back to place you invoked “Got to definition (F12)”
Shift+F12 Go to references, if you used F12 you could use Shift+F12 to go back to the place you invoked the “Go to definition”, but you will have to no the location, to choose from.
Ctrl+M+O Collapse all sections of code in a file
Ctrl+M+P Expand all sections of code in a file

The standard windows keyboard shortcuts for expanding and collapsing treeviews are:
Numeric Keypad *: Expands everything under the current selection
Numeric Keypad +: Expands the current selection
Numeric Keypad -: Collapses the current selection.
RIGHT ARROW: Expands the current selection if it is not expanded, otherwise goes to the first child
LEFT ARROW: Collapses the current selection if it is expanded, otherwise goes to the parent
All keyboard shortcuts work in the Microsoft Visual Studio 2008 explorer except for the collapse on the solution.

If you want all files in a solution to be collapsed use the tool: PowerCommands for Microsoft Visual Studio 2008: http://code.msdn.microsoft.com/PowerCommands
It adds a command: Collapse Projects:
This command collapses a project or projects in the Solution Explorer starting from the root selected node. Collapsing a project can increase the readability of the solution. This command can be executed from three different places: solution, solution folders and project nodes respectively.

Most keyboard shortcuts for Microsoft Visual Studio 2008 can be found at:
http://blogs.msdn.com/karenliu/archive/2006/11/21/more-and-more-keybindings.aspx
http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx
http://stackoverflow.com/questions/98606/favorite-visual-studio-keyboard-shortcuts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.