Please enable Javascript to correctly display the contents on Dot Net Tricks!

Top 10 Visual Studio Keyboard Shorcuts

  Author : Shailendra Chauhan
Posted On : 28 Nov 2012
Total Views : 21,853   
Updated On : 24 Sep 2016

Playing with keyboard shortcuts is very interesting and reduce the head-ache of using mouse again and again while programming with visual studio IDE. Actually, keyboard shortcuts also enhance your productivity and make your programming life easy and convenient. So, I decided to share a list of top 10 visual studio keyboard shortcuts that's are amazing and very helpful. For more shortcuts refer the article Visual Studio 2008, 2010, 2011, 2012 Keyboard Shortcuts Keys.

  1. F5 & Ctrl-F5

    F5 is used to start your project in debug mode and Ctrl-F5 is used to start your project without debug mode.

  2. F7 & Shift-F7

    F7 is used to show code view of your webpage.

    Shift-F7 is used to show design view of your webpage.

  3. F6 / Shift-F6 / Ctrl-Shift-B

    All of the above shortcuts are used to build the project or solutions.

  4. Ctrl-Shift-A & Alt-Shift-A

    Ctrl-Shift-A is used to add new item to your project.

    Alt-Shift-A is used to add existing item to your project.

  5. Ctrl-K + Ctrl-C & Ctrl-K + Ctrl-U

    Ctrl-K + Ctrl-C is used to do comment a selected block of code.

    Ctrl-K + Ctrl-U is used to do uncomment a selected block of code.

  6. Ctrl-M + Ctrl-O & Ctrl-M + Ctrl-P

    Ctrl-M + Ctrl-O is used to collapse all code to definitions.

    Ctrl-M + Ctrl-P is used to expand all code.

  7. Ctrl-K + Ctrl-S & Alt-Shift-Arrow(Right,Left,Bottom,Top)

    Ctrl-K + Ctrl-S is used to surrounded a block of code to an specific block or control.

    Alt-Shift-Arrow(Right,Left,Bottom,Top) are used to copy, paste, write vertically as shown in fig.

  8. Ctrl-(+) + Ctrl-. & F12

    Ctrl-(+) + Ctrl-. is used to display smarttag under the red line that provides the options for fixing the code problem.

    F12 is used to navigate to the definition of an instance, variable, class etc.

  9. Ctrl-Shift-F, Ctrl-F & Ctrl-H

    Ctrl-Shift-F is used to find all the ocuurance of a string with in entire solution and display find result window as shown below.

    Ctrl-F is used to find a string in the current document, project and all open documents one by one. Ctrl-H is used to replace a string by a new string in current document, project and entire solution as you want to replace.

  10. F4 & Ctrl-Alt-L

    F4 is used to show property window.

    Ctrl-Alt-L is used to show solution explorer.

What do you think?

I hope you will enjoy these tricks while programming with Visual Studio IDE. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

Free Interview Books
16 JAN
Developing Microsoft Azure Solutions (Online)
07:00 AM-09:00 AM IST/ 07:30 PM -09:30 PM CST
16 JAN
React with Redux (Online)
07:00 AM-08:30 AM IST
15 JAN
Big Data Hadoop Developer (Online)
05:00 PM to 06:30Pm IST / 06:30AM to 08:00AM CST
ASP.NET Core with Angular4 (Online)
09:00 Pm to 11:00 Pm IST (+5:30Gmt)
Big Data Hadoop Developer (Online)
07:00 AM - 08:30 AM IST(+5:30 GMT)
16 DEC
ASP.NET MVC with Angular4 (Classroom)
10:00 AM - 01::00 PM IST(+5:30 GMT)
12 DEC
ASP.NET MVC with Angular4 (Online)
09:00 PM - 11:00 PM IST(+5:30 GMT)
Developing Microsoft Azure Solutions (Online)
07:00 AM-09:00 AM IST / 08:30 PM Central Time
Angular2+4 with Firebase (Online)
10:30 AM-12:30 PM IST(+5.30 GMT)
27 NOV
ASP.NET Core (Online)
07:00 AM to 09:00 AM IST (+5:30 GMT)
11 NOV
ASP.NET MVC (Online)
08:00 AM-10:00 AM IST / 09:30 PM To 11:30 PM(CST)
16 OCT
ASP.NET Core (Online)
09:00 PM - 11:00 PM IST(+5:30 GMT)