Visual Studio shortcut keys

Source: Internet
Author: User

VS System Universal Shortcut keys:

1, automatic typesetting (similar to VC6 in the Alt+f8)
Edit. Formatting the selection Ctrl + K,ctrl + F correctly indents the selected lines of code based on the surrounding lines of code.

2, comment and remove the annotation function.

Edit. Note Selection Ctrl + K,ctrl + C uses the correct comment syntax for the programming language to mark the current line of code as a comment.

Edit. Uncomment the selection Ctrl + K,ctrl + U Removes the comment syntax from the current line of code.

Moves the insertion point to the next curly brace in the document.
Edit. Go to curly braces Ctrl +] Moves the insertion point to the next curly brace in the document.

Edit. Scroll down one line Ctrl + DOWN ARROW to scroll the text down one line. Available only for text editors.
Edit. Scroll up one line Ctrl + up ARROW to scroll the text up one line. Available only for text editors.

How to find a solution
View. Solution Explorer Ctrl + Alt + L Displays Solution Explorer, which lists the projects and files in the current solution

Display the Toolbox
View. Toolbox Ctrl + Alt + X Displays the toolbox, which contains controls and other items that can be included in code or used with code.

Clear all breakpoints in a project
Debug. Delete all breakpoints Ctrl + Shift + F9 clears all breakpoints in the project.

Debug. Disassembly Ctrl + Alt + D displays the Disassembly window.
Debug. Toggle Breakpoint F9 Sets or removes a breakpoint at the current line.

VS2008 shortcut keys

New Project Ctrl+shift+n
New Site Shift+alt+n
File Ctrl + N
Open Project/Solution Ctrl+shift+o
Open Web site Shift+alt+o
Open File Ctrl+o
Save current file Ctrl+s
Save All Ctrl+shift+s
Add New Item Ctrl+shift+a
Add an existing Item Shift+alt+a
Add Class Shift+alt+c
Undo Ctrl + Z
Repeat Ctrl+y
Go to Ctrl+g
Looping through the copied items in the Clipboard ctrl+shift+v
Formatting a document Ctrl+e,d
Sets the format of the selection ctrl+e,f
Convert to uppercase Ctrl+shift+u
Convert to lowercase ctrl+u
Remove horizontal blank ctrl+e,/
View Blank Ctrl+e,s
Line Wrap Ctrl+e,w
Incremental Search Ctrl+i
Note Selection Ctrl+e,c
Uncomment selection Ctrl+e,u
Quick Find Ctrl+f
Quick Replace Ctrl+h
Find ctrl+shift+f in Files
Find the next F3
Find Previous Shift+f3
Replace Ctrl+shift+h in a file
Find Symbol ALT+F12
Toggle Bookmarks Ctrl+b,t
Enable Bookmarks Ctrl+b,e
Previous Bookmark Ctrl+b,p
Next Bookmark Ctrl+b,n
Clear Bookmark Ctrl+b,c
Add Task List Shortcut ctrl+e,t
Toggle Outline Display Expand Ctrl+m,m
Toggle All Outline Display ctrl+m,l
Stop Outlining Ctrl+m,p
Collapse to Definition Ctrl+m,o
Production method Stub ctrl+k,m
List Members Ctrl+k,l
Parameter Information ctrl+k,p
Quick Info Ctrl+k,i
Complete the word ctrl+k,w
Insert Code Snippet Ctrl+k,x
External code Ctrl+k,s
Code F7
Designer Shift+f7
Server Resource Manager ctrl+w,l
Solution Explorer Ctrl+w,s
Class View Ctrl+w,c
Code Definition Window Ctrl+w,d
Object Browser Ctrl+w,j
Error List Ctrl+w,e
Output Ctrl+w,o
Properties Window Ctrl+w,p
Task List Ctrl+w,t
Toolbox Ctrl+w,x
Full Screen display Shift+alt+enter
Position ctrl+-backwards
Forward positioning ctrl+shift+-
Property Page Shift+f4
Find Symbol Results CTRL+W,Q
Bookmark Window Ctrl+w,b
Command Window Ctrl+w,a
Document Outline Ctrl+w,u
Resource View Ctrl+w,r
Macro Explorer Alt+f8
Web browser ctrl+w,w
Renaming F2
Extraction Method Ctrl+r,m
Encapsulate Field Ctrl+r,e
Extraction Interface Ctrl+r,i
To promote a local variable to a parameter ctrl+r,p
Remove Parameter Ctrl+r,v
Rearrange parameter Ctrl+r,o
Build Solution F6
Build Current Project Shift+f6
Start Debugging F5
Keep F5.
All interrupts Ctrl+alt+break
Stop Debugging Shift+f5
Restart Ctrl+shift+f5
Start execution (without debugging) Ctrl+f5
Exception ctrl+d,e
Statement F11
Jump out of Shift+f11
Process F10
Toggle Breakpoint F9
Delete all Breakpoints Ctrl+shift+f9
Breakpoint Ctrl+d,b
Instant Ctrl+d,i
Fast monitoring Ctrl+d,q
Monitoring 1 Ctrl+d,w
Monitoring 2 ctrl+d+w,2
Monitoring 3 ctrl+d+w,3
Monitoring 4 ctrl+d+w,4
Auto Window Ctrl+d,a
Local variable Ctrl+d,l
Call Stack Ctrl+d,c
Thread Ctrl+d,t
Toggles the current thread flag status Ctrl+8
Only the thread that displays the flag ctrl+9
Module Ctrl+d,m
Process Ctrl+d,p
Anti-compilation Ctrl+alt+d
Register Ctrl+d,r
Memory 1 Ctrl+d,y
Memory 2 ctrl+alt+m,2
Memory 3 ctrl+alt+m,3
Memory 4 ctrl+alt+m,4
Attach to Process Ctrl+alt+p
Code Snippet Manager ctrl+k,ctrl+b
Run the current macro ctrl+shift+p
Record Current Macro Ctrl+shift+r
Macros IDE ALT+F11
Test Ctrl+r,t in the current context
All test ctrl+r,a in the solution
How to implement Ctrl+f1,h
Search Ctrl+f1,s
Catalogue Ctrl+f1,c
Index Ctrl+f1,i
Help Favorites Ctrl+f1,f
Dynamic Help Ctrl+f1,d
Index result Ctrl+f1,t

********************************************************************

VS2005 Common shortcut keys

debugging shortcut keys

F6: Build Solution
CTRL+F6: Build Current project
F7: View Code
Shift+f7: Viewing the form Designer
F5: Start Debugging
Ctrl+f5: Start execution (without debugging)
SHIFT+F5: Stop Debugging
Ctrl+shift+f5: Restart debugging
F9: Toggle Breakpoint
CTRL+F9: Enable/Stop breakpoints
CTRL+SHIFT+F9: Delete all breakpoints
F10: Process-by-step
CTRL+F10: Run to Cursor
F11: Per-statement

Edit shortcut Keys

Shift+alt+enter: Toggle Full Screen editing
Ctrl+b,t/ctrl+k,k: Toggle Bookmark Switch
Ctrl+b,n/ctrl+k,n: Move to Next Bookmark
Ctrl+b,p: Move to previous bookmark
Ctrl+b,c: Clear All labels

Ctrl+i: Incremental Search
Ctrl+shift+i: Reverse Incremental Search
Ctrl+f: Find
Ctrl+shift+f: Finding in Files
F3: Find the next
SHIFT+F3: Find Previous
Ctrl+h: Replace
Ctrl+shift+h: Replace in file
ALT+F12: Find Symbol (List all find results)
Ctrl+shift+v: Clipboard Looping

CTRL + LEFT and RIGHT arrow keys: One word can be moved at a time
CTRL + UP and DOWN ARROW keys: Scrolls the code screen, but does not move the cursor position.
Ctrl+shift+l: Delete When moving forward
Ctrl+m,m: Hides or expands the currently nested collapsed state
CTRL+M,L: Set all procedures to the same hidden or expanded state
Ctrl+m,p: Stopping outline display
Ctrl+e,s: View Blank
Ctrl+e,w: Wrap Line
Ctrl+g: Go to the specified line
shift+alt+ arrow key: Select Rectangle text
ALT + left mouse button: Select rectangle text
Ctrl+shift+u: All Uppercase
Ctrl+u: All turns lowercase

Code shortcut keys

Ctrl+j/ctrl+k,l: List Members
ctrl+shift+ SPACEBAR/ctrl+k,p: Parameter information
Ctrl+k,i: Quick Info
Ctrl+e,c/ctrl+k,c: Comment Selection
Ctrl+e,u/ctrl+k,u: Deselect Comment content

Ctrl+k,m: Generate Method Stub
Ctrl+k,x: Inserting Code Snippets
Ctrl+k,s: Inserting the outer code

F12: Go to the definition of the called procedure or variable

Window shortcut keys

Ctrl+w,w: Browser window
Ctrl+w,s: Solution Manager
Ctrl+w,c: Class View
Ctrl+w,e: Error List
Ctrl+w,o: Output View
Ctrl+w,p: Properties Window
Ctrl+w,t: Task List
Ctrl+w,x: Toolbox
Ctrl+w,b: Bookmark window
Ctrl+w,u: Document Outline

Ctrl+d,b: Breakpoint Window
Ctrl+d,i: Immediate Window
Ctrl+tab: Active form Toggle
Ctrl+shift+n: New Project
Ctrl+shift+o: Open Project
Ctrl+shift+s: Save All
Shift+alt+c: New Class
Ctrl+shift+a: New Item

Shortcut prompt settings:

1. Customize with tools:

2. Select the check box in front of the shortcut key shown in the ScreenTip, which is unchecked by default:

3. Effects
Before it is set:

After setting up:


ok! small set of benefits:)

9. How do I use bookmarks to quickly find my files?

If you are developing a medium and large project, if your solution contains a lot of projects, if you have a lot of pages, then to quickly find a page you want is not very troublesome, layer directory to find? Too slow, let alone want you to find a piece of code in a page?!

The bookmark feature in VS is a good way to solve this problem. First, place the cursor at the code where you want to mark the bookmark, and then click the Insert Bookmark button in vs to complete the bookmark operation. You can also use the shortcut key to set bookmarks: ctrl+b,ctrl+t to complete the bookmark settings or cancel.

See figure:

Once the bookmark is set up, simply double-click the bookmark you set in the bookmark list to jump directly to the desired code snippet. To remind you, you can rename the bookmark yourself, it is very convenient.

10. How do I use the Immediate window to debug a program?

The use of this instant window is needless to say, as you may know, but many people are not able to find it when they accidentally turn off the window and then try to use it.

Think about it, since the Immediate window is definitely in the debugging time to be useful, then how to open it? Debug--Window--Immediate window, or shortcut: Ctrl+d,i

11. How can I quickly find the files in my project on my hard drive?

If you are using VS and want to copy a file in the project, do not go to a directory in the hard disk, a directory in depth, open the file in VS, and then right-click the option-Open the folder, see figure:

12. How can I quickly adjust the format of a document or a piece of code?

Now everyone write code like copy code, but the code is sometimes not like writing the format is very correct, the platoon is very neat, how to do? Manually line-by-line adjustment? No!

Give vs to do this boring job: choose Edit-Advanced-format the document or edit-advanced-Set the formatting of the selected code. With it no longer afraid of the code layout is not beautiful.

13. How to quickly add files to the project?

Open vs and paste the file directly into the folder you want to place.

14. How do I force calls to smart hints?

If there is no more than a reminder of VS, it is estimated that many people will not be writing code. But the smart reminder is not able to let us use the way we want, after that time you mouse how to move it will not come out, do we sometimes have to write the original code to delete a part of the "." To invoke smart reminders.

In fact, there is a shortcut key in VS, can really let us achieve the arbitrary, when we want to see the smart reminder when to see.

Put the cursor where you want to call the smart reminder, then enter Ctrl+j, and see, the familiar smart reminder comes out again. See figure:

15. How do I force parameter information to be invoked?

The parameter information of a method is also very important, but it sometimes makes oh we exist and 14 of the same confusion. How do you make us "want to see"?

Remember this shortcut: ctrl+shif+ space, so you want to see it. Place the cursor over the parameter name and enter ctrl+shif+ space to see what comes out:

16. How do I jump to a specified line?

Two ways to quickly navigate to a line in a document: 1. Ctrl+g 2. Click the line number in the status bar, such as:

17. How do I use forward positioning and backward positioning of shortcut keys?

I believe that the "go To Definition" in VS is used by everyone, but how can it be transferred back quickly after the definition? The following shortcut will save you the "Turn Back" time:

Ctrl+_. If you want to go back to the definition, just type: ctrl+shif+_. Switch back and forth and look at what you want to see.

If you say it's too tired to look at it, then tell you a more concise way: Open: View-The Code Definition window, and then you point the mouse to a method in the page and see what the Code Definition window shows:

18. How to quickly switch the unused pages?

Shortcut keys for switching between windows in window you know: ALT + TAB, and then vs also: Ctrl+tab, look at the effect:


19. How do I quickly hide or show the current code snippet?

Ctrl+m,m
20. How can I modify the properties of multiple controls at the same time?

Select multiple controls, and then right-click Properties, at which point the properties common to these controls will appear, and all controls will change after the modification.
21. How do I record and play a temporary macro?

If you need to keep repeating a series of keyboard actions in VS, you might want to consider making vs yourself write the code. Use the macros feature in VS to record your series of keyboard actions that need to be repeated, and then execute the macro directly to get vs to write the code.

Recording: Tools-macros-record temporary macros, ctrl+shif+r
Play: Tools-Macros-run temporary macro, ctrl+shif+p
Save: Tools-Macros-save temporary macros., you can rename a macro

Visual Studio shortcut keys

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.