Apr
17th

10 Visual Studio Shortcuts You Must Know

Filed under Visual Studio | Posted by Amit

This is a list of 10 great shortcuts me and my co workers use frequently, we thought you all should know too. Here they are:

  1. CTRL + “.”: This is actually a shortcut for a shortcut. it is the same as CTRL + SHIFT + F10 which opens the smart tag window and allows you to add Using statementsAdd Using Statement
    Or implement interfaces Implement Interface
    and much more.

  2. ALT + CTRL + “e”:  This one will open the Exceptions window, which allows you to tell Visual Studio to halt at specific exceptions, halt on all exceptions or selecet some exceptions to ignore.
    Exception Popup Windows 

  3. CTRL + “k” + “f” and CRTL + “k” + “d”: these two will format the code in the window to be nicely indented. using “d” will format all the document while using “f” will format only selected text. The formatting is for all types of documents, HTML, Xaml, XML, C#… This one is my favorite.

  4. SHIFT + Del: This one will cut the entire row from the document and past it to the clipboard. No need to select the row, just put the marker there and click SHIFT + Del and it is gone.

  5. CTRL + “k” + “c” and CTRL + “k” + “u”: These two are for commenting selected text (the “c” options) and uncommenting selected text (the “u” option).

  6. ALT + ENTER: this little shortcut will open up the Properties windowProperties Window

  7. CTRL + “k” + “s”: This one opens up the code snippets dialogue within the code
    Open Snippets Dialogue
    If you want to create code snippets you should read my post about snippy the code snippets editor.

  8. F12: I think you all know this but still F12 is the shortcut for the “Go to definition” command which will take you to the definition of the object your marker is currently on.

  9. F9: Another one i think you all know, clicking on F9 will add a breakpoint to the code line your marker is currently at. Clicking F9 again will remove this breakpoint from that line.

  10. CTRL + ALT + “q”: This one will open the Quick watch window while you debugOpen Quick Watch Window

That’s all I have for now. If you know of more cool shortcuts we missed, please comment.

Amit

Liked this post? Please, press my buttons! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • description
  • description
  • bodytext
  • Live
  • YahooMyWeb
  • Google
  • Sphinn
  • del.icio.us
  • Facebook
  • Slashdot
  • StumbleUpon
  • Technorati
  • BlinkList
  • Netvouz
  • Propeller
  • TwitThis
  • Reddit
Tags: , , , , , , , , , , , , , , , , , ,


23 Responses to “10 Visual Studio Shortcuts You Must Know”

  1. By Vijay Santhanam on Apr 17, 2008 | Reply

    CTRL -
    and
    CTRL SHIFT -

    moves the editing cursor to the last/next position

    this is great if you decide to edit something somewhere else and you wanna go back to that last method you were editing. CTRL - will save you so much time!

  2. By Bryan Migliorisi on Apr 17, 2008 | Reply

    Nice list.

    Alt + Enter is also a general Windows shortcut for accessing properties of files, drives, shortcuts, etc. It is a nice keystroke to keep in mind.

  3. By Pablo Marambio on Apr 17, 2008 | Reply

    Shift + Alt + Enter (FullScreen mode) is a must know! It helps you to get rid of all the properties, toolbar and other [obstrusive] windows that don’t let you see the code. Hit it a second time and the windows are back.

  4. By knave on Apr 17, 2008 | Reply

    CTRL+M+M : Expanding / Collapsing code blocks, e.g. regions/methods.

  5. By Greg Beech on Apr 17, 2008 | Reply

    CTRL + ALT + P (attach to process) is very useful when you’re debugging web sites, windows services, etc.

    CTRL + R + R (rename) is great for refactoring, particularly if you have ReSharper installed

  6. By Diego on Apr 17, 2008 | Reply

    SHIFT + F9 for quick watch :) even better than CTRL + ALT + Q

  7. By Matt Brunell on Apr 17, 2008 | Reply

    Ctrl+Shift+B — Build solution
    Ctrl+J — Intellisense, list members
    Ctrl+Shift+Space — Intellisense, list parameter info

    The list members shortcut is handy. Before I started using this a lot, I would sometimes type ‘this.’ to get a list of members. The parameter info is helpful for seeing information about parameters you already typed in.

  8. By Terry Aney on Apr 17, 2008 | Reply

    Lot of items can be accessed from the ‘Context Menu Key’ (assuming your keyboards have that key…the one that looks like a little menu)…

    CTX+Q - Quick Watch
    CTX+D - Definition
    CTX - same as CTRL+. above

    I generally can get almost anything done with CTX+key or CTX then a quick combo of down and right arrows.

    Anyway, just my preference, by no means the end all.

  9. By Dmitry Moskalyk on Apr 18, 2008 | Reply

    You can also open properties window just by pressing F4. I like it more than Alt+Enter.

    A year ago I was using Ctrl+K,Ctrl+X to insert a snippet, but I have understood that the easiest way to do it is to type snippet name and press “Tab” afterwards.

  10. By Steven on Apr 18, 2008 | Reply

    I suggested Ctrl+A then DEL to my … less than able colleagues … didn’t go down well!

    Anyway, here’s my favourite - even if it’s not really a shortcut …

    Ctrl + space

    while coding lets VS finish for you or open intellisense if what you’re type’d is to ambiguos

    “string rediculouslyLongName;
    ret” then Ctrl + Space gives you

    “string rediculouslyLongName;
    rediculouslyLongName”

  11. By David Hu on Apr 20, 2008 | Reply

    I use F8 and shift+F8 to cycle through search results. It’s a gem for me.

    I think, if anything, the VS team should add an option in Visual Studio to annotate all Menu items with their corresponding shortcuts.

  12. By Sam on Apr 22, 2008 | Reply

    I am bookmarking this right now. I will have more to say in a few days. Thanks!

  13. By Dylan Vester on Apr 22, 2008 | Reply

    You should probably note that some of these are ReSharper only shortcuts. Maybe I missed that somewhere. Just a thought.

  14. By wekempf on May 6, 2008 | Reply

    Dylan Vester,

    Which shortcuts do you think are ReSharper only shortcuts? I don’t own ReSharper. I’ve been using the majority of these shortcuts for years. The few that were new to me worked.

  15. By Amit on May 6, 2008 | Reply

    Non of them are resharper shortcuts. I know that because I dont use resharper as it takes more resources than Windows Vista :). I am more of a Visual Assist kind of guy.

    Amit

  1. 8 Trackback(s)

  2. Apr 18, 2008: Very Useful Visual Studio Shortcut Keys « Rams On It - .NET
  3. Apr 18, 2008: Interesting Finds: 2008.04.18 - gOODiDEA.NET
  4. Apr 18, 2008: links for 2008-04-18 « dstelow notes…
  5. Apr 19, 2008: WPF/Silverlight/XAML Web Links - 2004/04/18 - Rob Relyea - Xamlified
  6. Apr 20, 2008: Dew Drop - April 19, 2008 | Alvin Ashcraft's Morning Dew
  7. Apr 21, 2008: Weekly Links: ASP.NET MVC, Silverlight 2, WPF, WCF… | Code-Inside Blog International
  8. Apr 21, 2008: Wöchentlichen Rundablage: ASP.NET MVC, Silverlight 2, WPF, WCF… | Code-Inside Blog
  9. May 2, 2008: BLOG STATS FOR APRIL 2008 | Dev102.com

Post a Comment