Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...
 


Saturday, February 28

Keyboard Shortcuts

Keyboard shortcuts are cool and really help to boost productivity for power users. For me, using keyboard shortcuts is almost the same like using an external mouse on a laptop. Without an external mouse, I loose too much time with that stupid thing in the middle of my keyboard or with the slow touchpad.

From Wikipedia :
Keyboard shortcuts are typically an alternate means for invoking one or more commands that would otherwise be accessible only through a menu, a pointing device, different levels of a user interface, or via a command console. Keyboard shortcuts generally expedite common operations by reducing input sequences to a few keystrokes, hence the term "shortcut".

Here's my top 5 of most used keyboard shortcuts used on a Windows operating system and in Visual Studio!

Windows shortcuts
  1. Windows key + E to launch Windows Explorer
  2. Windows key + L to lock my computer
  3. Windows key + M to minimize all running applications and to return to my desktop view
  4. Alt + Tab to navigate between running applications (on Vista you can also use Windows key + Tab)
  5. Windows key + R to open the Run Window
Visual Studio shortcuts
  1. Ctrl + Shift + B to Build a solution
  2. Ctrl + J to list members for statement completion when editing code
  3. F4 to display the properties window, which lists the design-time properties and events for the currently selected item
  4. Ctrl + . to open up the SmartTag options for the focused element. I use this all the time to import missing using statements for example or to do some kind of refactoring.
  5. Ctrl + K,C or Ctrl + K,U to comment/uncomment the selected line(s) of code
What I also didn't know from the beginning is that you can use Ctrl + C or Ctrl + X without selecting the line of code in Visual Studio. Visual Studio will copy or cut the current line of code without needing you to select it!

You can also visit the doFactory that gives you a nice overview of all available shortcuts in Visual Studio.

Recently I also discovered (by accident actually) a new shortcut that's only available on Windows Vista. You need to press the Windows key and a number (1, 2, 3, ...) : that key combination will open the Quick Launch shortcut (Quick Launch toolbar) that is in the position that corresponds to the number you've chosen.

To reset your shortcut settings for Visual Studio, you need to go to Tools > Import and Export Settings. To customize key bindings go to Tools > Options > Environment > Keyboard.

Any other important shortcuts you use all the time?

Labels:

3 Comments:

  • At 8:40 AM, Anonymous Anonymous said…

    How could you leave out the R# shortcuts? ;-)
    My R# favourites are:
    Ctrl+R+R => Rename & Ctrl+Shift+R => Refactor
    Ctrl+T => Find Type
    Alt+End => Goto inheritor
    Alt+Insert => Generate code
    Ctrl+E+F => Clean code

     
  • At 5:32 PM, Anonymous Anonymous said…

    I'm also a big keyboard junky. Here's a few links I've created that might be of interest to you and your readers.

    Save Dev time with these VS shortcuts
    http://www.pchenry.com/Home/tabid/36/EntryId/17/Default.aspx

    Save time with MS word shortcuts
    http://www.pchenry.com/Home/tabid/36/EntryId/16/Default.aspx

    MS Keyboard with Zoom complex
    http://www.pchenry.com/Home/tabid/36/EntryId/77/Default.aspx

    What do you do with a new VS install?
    http://www.pchenry.com/Home/tabid/36/EntryId/75/Default.aspx

    Hope you enjoy! :>

     
  • At 12:22 AM, Anonymous Anonymous said…

    Here's a neat secret shortcut I discovered entirely by accident:

    In WordPad you can enable (and disable) smart (curly) quotes by typing Ctrl+Shift+' (quote).

     

Post a Comment

<< Home