Visual Studio Tips

At work, I spend a huge amount of my time working with Microsoft Technologies. As such, I also use Visual Studio. Here are some of the tipps and tricks to efficiently work with it.

Plugins

Keystrokes

Here are my preferred keystrokes. Note, keystrokes separated by a comma mean you have to use them in sequence in order to activate the command.
They refer to VS2012 but some may also work in previous versions.

Generic Ones

Shortcut Description
Ctrl+F5 Launch Application without debugging (usually faster than with debugging enabled)
Shift+F5 Stop a debugging session

Code Editing

Shortcut Description
Ctrl+K, Ctrl+D Autoformat the document, whether it is an HTML page, CS or JavaScript file
Ctrl+K,C Comment the selected part
Ctrl+K,U Un-comment the selected part

Code Navigation

Shortcut Description
F12 Goto Definition
Shift+F12 Goto Definition
Ctrl+Q Place the cursor in the Quick-Launch box for then executing some menu command
Ctrl+, Open the "Navigate to" dialog...probably the most powerful command for mouse-less navigation
Ctrl+- Navigate backwards in the cursor position history
Ctrl+Shift+- Navigate forwards in the cursor position history
Ctrl+M,Ctrl+O Collapse to definitions

Custom mapped

Shortcut Description
Ctrl+W This is the default combination for closing windows on nearly all win apps I know, but strangely not on Visual Studio. Therefore, the first thing I do is to remap it to `File.Close`.
Ctrl+R, Ctrl+S Rebuild solution

Features

Go To Test/Code

Quickly jumping to the according test class. Just right-click and select the corresponding menu item.

Kindle

This article has been re-published by


blog comments powered by Disqus

Your ad here?