Wednesday, November 6, 2013

Visual Studio Keyboard Shortcuts


I'm a big fan of keyboard shortcuts. When I first started working with AutoCAD, I learned to rely less on toolbars and buttons and more on entering short aliases in the command line to get things done. The result was that I spent less time going back and forth from the keyboard to the mouse. Later, when I started using Photoshop, I was amazed at how much time you could save using keyboard shortcuts like CTRL+T (free-transform layer) and CTRL+J (new layer via copy).

The most important keyboard shortcut I ever learned, however, was CTRL+S. It only took one time losing hours of work in a CAD drawing to start using it religiously.

Now I look for shortcuts for any program I spend a lot of time working in. And since I've been spending more time with Visual Studio than with my friends and family the last 5-1/2 weeks, I've gotten pretty friendly with these little time-savers. Here are some of my favorite...

ShortcutOperationNotes
CTRL+K, CComment a line of codeYou can place cursor in line without selecting anything
CTRL+K, UUncomment a line of codeSame as above
CTRL+SHIFT+ENTERBlank line after cursor lineCursor can be anywhere in the line, and you don't have to use END, ENTER
ALT+UP or DOWNMove line up or downCursor can be anywhere in the line, without selecting
CTRL+DELETEDelete word to right
CTRL+BACKSPACEDelete word to left
CTRL+. (period)Open Smart TagWhen you get the red squiggle, sometimes it's hard to get to this with the mouse
CTRL+ALT+LOpen Solution Explorer
CTRL+; (semicolon)Focus on Search Solution EplorerSame as above, except puts your cursor in the search box
CRTL+, (comma)Focus on Navigate ToThis searches for words in entire solution and takes you to it when you hit ENTER
CTRL+FOpen Quick Find
CTRL+HOpen Quick Replace
CTRL+QOpen Quick LaunchAllows you to search everything in VS, including tools & options
CTRL+ALT+SOpen Server Explorer
CTRL+W, EOpen Error List
F1Navigate to Help FilePlace cursor in any keyword in text editor, opens MSDN help file for item
F12Navigate to DefinitionPlace cursor in code to find definition
CTRL+SHIFT+BBuild Solution
F5Start Debugging
CTRL+F5Start w/o Debugging
CTRL+F6Next Tab
CTRL+SHIFT+F6Previous Tab

Oh, I almost forgot CTRL+K, D... Automatically formats tabs and white-space to make your code look snazzy!

No comments:

Post a Comment