Our first group blog post! Here are some of the DPL team’s favorite shortcuts for saving time in Visual Studio 2010. Hopefully you’ll find these as useful as we do. Note that these work when you’re using the standard C#.NET keyboard layout, which is the same as “DEFAULT” in the Keyboard options.

Andy Unterseher – CTRL-SPACE brings up the IntelliSense window and completes current word if only one option exists.

Nate Lowry – CTRL-K, CTRL-D formats the current document. Whitespace may not seem that important, but it makes a huge difference in readability.

Paul Bauer – CTRL-R, T runs current tests in current context.

Hari Wiguna – CTRL-X (without any selection) cuts the current line. This is helpful for deleting unwanted extra blank lines without having to select the whitespaces. You can also copy (CTRL-C) and paste (CTRL-V) entire lines without selecting anything.

Santiago Murtagh – CTRL-U and CTRL-SHIFT-U lowercases/uppercases selected text.

Nick Sherrill – CTRL-PERIOD opens the smart tag dialog much like right-clicking on an item. From there it’s simple to generate a new method or include a referenced assembly. This can be used when you see the small blue smart tag marker.

Generate a new method or include a referenced assembly.

Clicking CTRL-PERIOD will display this:

CTRL-PERIOD opens the smart tag dialog much like right-clicking on an item.

Nick Croll – SHIFT-ALT-ENTER toggles full screen view. It’s a nice way to remove the explorer panes and buttons to focus on the code.

Hari Wiguna – If you have the Productivity Power Tools installed, you can vertically display tabs in Visual Studio. Start by right-clicking the tab well and selecting Customize. In the Options box expand Productivity Power Tools, Document Well Tab, and General. Then select the Show tabs vertically check box. You can also select the Alphabetically check box in the Tab Sorting section. If you have file names that are too long for the tab well, you can adjust the tab well width by clicking the Advanced Options button and adjusting the Max tab size value.

Santiago Murtagh – CTRL-K, CTRL-C and CTRL-K, CTRL-U Will comment/uncomment selected code. This also works on XML, HTML, XAML, etc.

Nick Sherrill – CTRL-R, CTRL-T runs unit tests in debug mode. It runs the individual test that the cursor is in, but if the cursor is outside of any one specific test it runs all in the current document.

Nick Ebert – F7 and SHIFT-F7 will jump between from designer (.xaml) to the associated code behind (.xaml.cs) when working with WPF.

Paul Bauer – F2 renames the current item.

Nate Lowry – ALT-UP ARROW, ALT-DOWN ARROW move the current line or selection up or down a line. Handy when you just need to move something a line or two.

Hari Wiguna – CTRL-M, CTRL-O collapses source to definitions. This is helpful in seeing the big picture of the source. Likewise, CTRL-M, CTRL-L expands everything.

Santiago Murtagh – CTRL-MINUS SIGN and CTRL-PLUS SIGN Navigates back and forth through spots of code you were editing.

Nick Sherrill – CTRL-E, CTRL-C comments/uncomments currently selected lines (has always seemed to be different on my machine than others’).

Andy Unterseher – CTRL-ENTER inserts a new line above your cursor. CTRL-SHIFT-ENTER inserts a new line below your cursor.

Hari Wiguna – CTRL-M, CTRL-M collapses/expands the current section.

Nick Sherrill – F12 navigates to the definition of the currently selected item.

Nate Lowry – CTRL-SHIFT-V will cycle through your previous clipboard content so you don’t have to worry about copying over your clipboard.

Paul Bauer – CTRL-R, M refactors selected code into method. If done properly, you can refactor into a method with a param.

Nick Ebert – CTRL-SHIFT-F brings up the find/replace menu that returns results in the output window.

Hari Wiguna – Entering “propf”, TAB, TAB inserts property snippet that you can fill by tabbing through. Entering “prop” inserts the simpler automatic property.

Paul Bauer – CTRL-COMMA brings up a “Navigate To” search box, which is very useful for jumping between files.

Nate Lowry – If you have the Productivity Power Tools installed, CTRL-3 lets you search for menu items using your keyboard similar to the Windows 7 Start menu.

Looking For Helpful Content?

Sign up to receive useful software development tips and news from the Don't Panic Labs team.

You have successfully subscribed!

Share This