Summary of Visual Studio shortcut keys

Source: Internet
Author: User
Tags visual studio 2010

Common Methods:

  1. Forced smart sensing: Ctrl + J. SMART awareness is one of the biggest highlights of Visual Studio. I am afraid this is not the reason for choosing Visual Studio.

     
  2. Undo: Ctrl + Z. Unless you are a genius, this shortcut is also the most commonly used.
  3. Force display parameter information: Ctrl-shift-space. This is definitely a good thing.
  4. Rename: F2. If you are not good at naming, this shortcut will make your code look more beautiful.
  5. Insert the code segment: Ctrl + k, X. If you want to quickly enter the code, remember this. Using F2 together will become a powerful tool. Of course, with "Ctrl + k, s", you can quickly enter code segments like try and # region.
  6. One-by-one and process-by-process debugging: F11 and F10. This is definitely more frequently used than F5.
  7. Save: Ctrl + S. It is a good habit to store data frequently. If you want to save them all, clicking the mouse seems faster.
  8. Note all: Ctrl + E, C. In some cases, this is definitely an effort-saving thing. Uncomment all corresponding to it: "Ctrl + e, U ".
  9.  

    Search and replace: Ctrl + F. When you find a long piece of code, CTRL + C, CTRL + V came over and found: Nima! Only one row !!! At this time, CTRL + F will be useful. Well, if we reformat it with "Ctrl + E, D", you will find that "the world is still so bad.

     

    From: http://jingyan.baidu.com/article/ab0b5630be76e3c15afa7d08.html

 

Shortcut Keys for vs2010

CTRL + E, D ---- format all code Ctrl + e, f ---- format the selected code Ctrl + Shift + B generate solution Ctrl + F7 generate and compile Ctrl + O open file Ctrl + Shift + O open project Ctrl + Shift + C display Class View window f4 Display Properties window SHIFT + F4 display Project Properties window Ctrl + Shift + e display resource view F12 go to definition Ctrl + F12 go to Declaration CTRL + ALT + J object browse CTRL + ALT + f1 help directory Ctrl + F1 dynamic help F1 help F1 SHIFT + F1 current window help CTRL + ALT + F3 help-search SHIFT + ALT + enter full screen display Ctrl +-backward positioning Ctrl + Shift + -Move forward to Ctrl + F4 close document window Ctrl + Page D Own cursor positioned above the window Ctrl + page up cursor positioned below the window Ctrl + F6 Ctrl + TAB next document window Ctrl + Shift + F6 Ctrl + Shift + TAB previous document window Alt + f6 next panel window Ctrl + K, CTRL + l cancel remark Ctrl + k, CTRL + C comment Select Code Ctrl + k, CTRL + u cancel comments on the selected code Ctrl + m, CTRL + O fold Code definition Ctrl + m, CTRL + l expand Code definition Ctrl + delete Delete to end Ctrl + backspace Delete to header SHIFT + TAB cancel tab Ctrl + u convert lowercase Ctrl + Shift + u convert uppercase Ctrl + Shift + end select Ctrl + Shift + home at the end of the document and open it at the end of the document. Shift + end select SHIFT + home select SHIFT + ALT + end vertical select SHIFT + ALT + home vertical select Ctrl + Shift + page up select to the front of this page Ctrl + Shift + Page down select to the end of this page Ctrl + end document locate to the last Ctrl + home document locate to the top Ctrl + A select all Ctrl + W select the current CTRL + G... CTRL + k, CTRL + P the last tag Ctrl + K, CTRL + N next tag Alt + F10 debug-applycodechanges CTRL + ALT + break stop debug Ctrl + Shift + F9 cancel all breakpoints Ctrl + F9 allow interrupt Ctrl + Shift + F5 debug-start again f5 run debugging Ctrl + F5 run not debug F10 execute F11 one step by one execute Ctrl + J list members Ctrl + Page down next view Ctrl + B format-bold Ctrl + Shift + T format-text indent debugging shortcut F6: generate solution Ctrl + F6: generate current project F7: view code SHIFT + F7: View Form Designer F5: start debugging Ctrl + F5: start execution (do not Debug) Shift + F5: stop debugging Ctrl + Shift + F5: restart debugging F9: Switch breakpoint Ctrl + F9: Enable/Stop breakpoint Ctrl + Shift + F9: delete all breakpoints F10: Ctrl + F10: Run To cursor F11: statement-by-statement editing shortcut key shift + ALT + enter: Switch to full screen editing Ctrl + B, T/Ctrl + k, K: Switch to bookmarks Ctrl + B, n/Ctrl + k, n: move to the next bookmarks Ctrl + B, P: Move to the previous bookmarks Ctrl + B, C: Clear all tags Ctrl + I: Progressive search Ctrl + Shift + I: reverse progressive search Ctrl + F: Search Ctrl + Shift + F: Search for F3 in the file: Find the next shift + F3: Find the previous Ctrl + H: replace Ctrl + Shift + H: replace Alt + F12 in the file: Search symbol (list all search results) Ctrl + Shift + V: clipboard cycle Ctrl + left and right arrow keys: One word can be moved at a time C TRL + up and down arrow keys: Scroll the code screen without moving the cursor position. CTRL + Shift + L: Delete the current row Ctrl + M, M: Hide or expand the current nested folding status Ctrl + M, L: set all processes to the same hidden or expanded State Ctrl + M, P: Stop outline display Ctrl + E, S: View blank Ctrl + e, W: automatically wrap Ctrl + G: shift + ALT + Arrow: select the rectangular text Alt + the left mouse button: select the rectangular text Ctrl + Shift + u: Convert all to uppercase Ctrl + u: CTRL + J/Ctrl + K, L: List Members Ctrl + Shift + Space key/Ctrl + K, P: parameter information Ctrl + K, I: quick information: Ctrl + E, C/Ctrl + k, C: Comment the selected content Ctrl + e, U/Ctrl + k, u: cancel the selected comment content Ctrl + K, M: method for generating the stub Ctrl + k, X: insert the code segment Ctrl + k, S: insert the external code F12: Go to the call process or variable definition window shortcut key 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: attribute window Ctrl + W, T: task list Ctrl + W, X: toolbox Ctrl + W, b: The Bookmarks window Ctrl + W, u: document outline Ctrl + D, B: breakpoint window Ctrl + D, I: Real-Time Window Ctrl + tab: activity form switch Ctrl + Shift + N: new project Ctrl + Shift + O: Open project Ctrl + Shift + S: Save all SHIFT + ALT + C: CTRL + Shift + A: The Hidden Shortcut Key of the new vs2005 project. Here, I will share some shortcut keys that are not explicitly specified in vs2005, not all of them, or some common shortcut keys. 1. CTRL + space directly completes the class or function (originally this is not a hidden shortcut key, but because the Chinese Input Method preemptible this shortcut key, so ..., the shortcut keys are Alt + right. 2. Shift + Delete: Delete the entire row, and place the row to the clipboard (a piece of content cannot be selected at this time). 3. Shift + insert and paste. This is a bit incredible, CTRL + V is enough, probably to correspond to Shift + Delete 4, CTRL + up, CTRL + down scroll editor, but try not to move the cursor, ensure that the cursor is within the visible range 5. CTRL + backspace, CTRL + delete Delete the entire word, sometimes useful 6. CTRL + left, CTRL + right move the cursor by the entire word (not to hide, and the previous items add up to the CTRL cursor control suite) 7. Alt + Shift + F10 open and rename the cursor, small Window implementing interfaces and abstract classes (you can also use Ctrl + ., but some Chinese input methods use this) 8. Shift + F9 debugging is to enable qui Ckwatch, content is the content where the current cursor is located 9, F12 jump to definition, very useful Shortcut Keys 10, Shift + F12 find all references --------------------------------------------- vs2008 Shortcut Keys Daquan -------------------------- Ctrl + M + CRTR + O fold all outlines Ctrl + M + CRTR + P: stop outline display Ctrl + K + CRTR + C: Comment selected content Ctrl + K + CRTR + u: Cancel selected comment content Ctrl + J: List Members smart sensing SHIFT + ALT + enter: switch to full screen edit Ctrl + B, T/Ctrl + k, K: switch to the bookmarks switch Ctrl + B, n/Ctrl + k, n: Move to the next bookmarks Ctrl + B, P: move to the previous bookmarks Ctrl + B, C: Clear all labels Ctrl + I: Progressive search Ctrl + Shift + I: reverse progressive search CT RL + F: Find Ctrl + Shift + F: Find F3 in the file: Find the next shift + F3: Find the previous Ctrl + H: replace Ctrl + Shift + H: replace Alt + F12 in the file: Search symbol (list all search results) Ctrl + Shift + V: clipboard cycle Ctrl + left and right arrow keys: one time you can move the word Ctrl + up and down arrow keys: scroll the code screen without moving the cursor position. CTRL + Shift + L: Delete the current row Ctrl + M, M: Hide or expand the current nested folding status Ctrl + M, L: set all processes to the same hidden or expanded State Ctrl + E, S: View blank Ctrl + e, W: automatically wrap Ctrl + G: shift + ALT + Arrow: select the rectangular text Alt + the left mouse button: select the rectangular text Ctrl + Shift + u: Convert all to uppercase Ctrl + u: enter the lower-case code shortcut key Ctrl + Shift + Space key/Ctrl + K, P: parameter information Ctrl + K, I: quick information Ctrl + e, U/Ctrl + k, u: unselect the comment content Ctrl + K, M: generate the method stub Ctrl + k, X: insert the code segment Ctrl + k, S: insert the outer code F12: go to the call process or variable definition window shortcut key 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 TRL + W, P: attribute window Ctrl + W, T: task list Ctrl + W, X: toolbox Ctrl + W, b: The Bookmarks window Ctrl + W, u: document outline Ctrl + D, B: breakpoint window Ctrl + D, I: Real-Time Window Ctrl + tab: activity form switch 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 SHIFT + ALT + enter: Switch to full screen edit Ctrl + B, T/Ctrl + k, K: Switch to bookmarks Ctrl + B, n/Ctrl + k, n: Move to the next bookmarks Ctrl + B, P: Move to the previous bookmarks Ctrl + B, C: Clear all labels Ctrl + I: progressive search Ctrl + Shift + I: reverse progressive search Ctrl + F: Search Ctrl + Shift + F: Search for files

F3: Find the next
Shift + F3: Find the previous one

CTRL + H: replace Ctrl + Shift + H: replace Alt + F12 in the file: Search symbol (list all search results) Ctrl + Shift + V: clipboard cycle Ctrl + left and right arrow keys: you can move the word Ctrl + up/down arrow at a time to scroll the code screen without moving the cursor position. CTRL + Shift + L: Delete the current row Ctrl + M, M: Hide or expand the current nested folding status Ctrl + M, L: set all processes to the same hidden or expanded State Ctrl + M, P: Stop outline display Ctrl + E, S: View blank Ctrl + e, W: automatically wrap Ctrl + G: shift + ALT + Arrow: select the rectangular text Alt + the left mouse button: select the rectangular text Ctrl + Shift + u: Convert all to uppercase Ctrl + u: Convert all to lowercase

Here, I will share all the shortcut keys of Visual Studio 2005 that I have accumulated with you, hoping to help you.

After many tests, the shortcut keys in VS 2005 can also be identified in vs 2008 and 2010, but vs 2008 and 2010 define their new shortcut keys. It is necessary to improve the existing shortcut keys and ensure that those who are used to the VS 2005 shortcut keys will not lose their work efficiency.


Code Writing

Shift + ALT + ente-Full Screen Display

Shift + ALT + F10-has three functions:

1. When implementing the interface, press to enable the options for implementing the interface;

2. Enable the rename option when modifying a variable, method, or class;

3. Open the using option when writing an object without using.

CTRL + R + E-encapsulation field (this shortcut key is not required for vs 2008, because the automatic attribute of C #3.0-auto-implemented properties)

CTRL + J-list members, including only code prompts

CTRL + Shift + space-display parameter information

Tab (press twice)-fill in the code block, for example, after try, for, do

CTRL + K + S-external code, including only code block templates

F6/Ctrl + Shift + B-generate Solution

F7-jump to the post-code of the form, which can be found in winform and webform. You can also jump back to the design view in winform.

Shift + F7-jump back to the design view in the Post-code of webform

F8-switch the wrong position in the current file in sequence

F12-go to definition

CTRL + _-go to definition and return

CTRL + Shift + _-go to definition again

CTRL + TAB-switch the current active window (such as the code and View Design Interface)


Quick Code Template

"CW" + TAB-console. writeline ();

"Mbox" + TAB-MessageBox. Show ();

"Prop" + TAB-attribute blocks containing get and set accessors

"Propg" + TAB-Fast Read-only attribute

"Propfull" + tabl + TAB-fast attribute with complete get and set accessors


Code operation

CTRL + K + C-Comment

CTRL + K + U-uncomment

CTRL +]-search for matching parentheses

CTRL + Shift +]-select matching brackets and their code

CTRL + F-Quick Search

CTRL + H-quick replacement

CTRL + Shift + U-convert to uppercase

CTRL + U-convert to lowercase

CTRL + K + D-set the document format

Tab-increase indentation

Shift + TAB-Reduce indentation

CTRL + M-collapse the Code. For example, place the cursor in the position of # region, if, and method header.

CTRL +.-Call out the using menu

CTRL + E + S-view the blank space (convert the space to a green point, which is especially convenient when searching for extra spaces)


Debug and run

F5-start debugging

Shift + F5-Stop debugging

F9-set breakpoints

CTRL + Shift + F9-delete all breakpoints

F10-process-by-process debugging

F11-statement-by-statement debugging


Project operations

Alt + enter-open the Properties dialog box for the selected item

CTRL + Shift + N-create a project

Shift + ALT + N-create a website

CTRL + N-create a file

CTRL + Shift + O-open the project

Shift + ALT + O-open the website

CTRL + O-open the file

CTRL + Shift + A-Add a new item in the project

Shift + ALT + A-add an existing project to the Project

Shift + ALT + C-Add a class in the project


View call

F4-attributes

CTRL + ALT + X-toolbox

CTRL + ALT + L-solution Resource Manager

CTRL + ALT + S-server Resource Manager


Tips

1. Start Vs and enter "devenv" in the running process ";

2. Double-click the control tool to automatically add controls;

3. Alt + arrow keys-you can use the arrow keys to slightly adjust the widget size;

4. Arrow keys-adjust the widget position;

5. press ALT to select code in a rectangle;

6. Remove undesired namespaces (applicable to Visual Studio 2008 and Visual Studio 2010)

Generally, a class is created. Visual Studio automatically introduces system, system. Collections. generic, and system. text to you. These three namespaces are not necessarily required after they are created. When you create winform and webform, more undesired namespaces will be introduced to keep them too occupied. Visual Studio has long prepared this function for us and right-clicked in the class, select "organization using"> "Remove and sort" to remove unnecessary namespaces and sort them in alphabetical order.


7. Automatic using namespace (shortcut: Ctrl + .):

Generally, when writing code for a long time, you need to use an unusing object later. You need to go back to the Code header to using, and then go back to continue writing: how painful this is!

This painful task vs can be fully handled. First, make sure that the object name must be correct:

At this time, we can see that directory is redlined without using system. Io. You can note that there is a small rectangle at the beginning, move the mouse up, and click it to see the options:

If you select using system. Io, The namespace will be using at the top. If you select system. Io. Directory, system. Io will be added before directory to complete the reference.

There is also a second method: Right-click on the unreferenced object and select resolve (resolution). You can see the same options:


8. Automatically complete attributes

Are you still writing code segments like this?

public string Property { get; set; }

After you enter prop only, press TAB twice to generate automatically:

public int MyProperty { get; set; }

All we need to do is tab and modify.

 

Vs2008 Shortcut Keys Daquan Ctrl + M + CRTR + O fold all outlines
CTRL + M + CRTR + P: Stop outline display
CTRL + K + CRTR + C: Comment the selected content
CTRL + K + CRTR + u: cancel the selected comment content
CTRL + J: List member smart sensing SHIFT + ALT + enter: Switch to full screen editing
CTRL + B, T/Ctrl + k, K: Switch the bookmarks
CTRL + B, n/Ctrl + k, n: Move to the next bookmarks
CTRL + B, P: Move to the previous bookmarks
CTRL + B, C: Clear all labels
CTRL + I: Progressive search
CTRL + Shift + I: reverse progressive search
CTRL + F: Search
CTRL + Shift + F: find in the file
F3: Find the next
Shift + F3: Find the previous one
CTRL + H: replace
CTRL + Shift + H: Replace in the file
Alt + F12: Search symbols (list all search results)
CTRL + Shift + V: clipboard Loop
CTRL + left and right arrow keys: One word can be moved at a time
CTRL + up and down arrow keys: Scroll the code screen without moving the cursor position.
CTRL + Shift + L: Delete the current row
CTRL + M, M: Hide or expand the current nested folding status
CTRL + M, L: Set all processes to the same hidden or expanded State

CTRL + E, S: View Blank
CTRL + e, W: automatic line feed
CTRL + G: Go to the specified row
Shift + ALT + Arrow: Select rectangular text
Alt + mouse left button: Select rectangular text
CTRL + Shift + u: all are capitalized
CTRL + u: shortcut key for lowercase code
CTRL + Shift + Space key/Ctrl + K, P: parameter information
CTRL + K, I: quick information Ctrl + e, U/Ctrl + k, u: cancel the selected comment content
CTRL + K, M: Generate method stubs
CTRL + k, X: insert code segment
CTRL + k, S: insert external code
F12: Go to the call process or variable definition window shortcut key 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
TRL + W, P: attribute window
CTRL + W, T: task list
CTRL + W, X: toolbox
CTRL + W, B: Bookmarks window
CTRL + W, u: document outline
CTRL + D, B: breakpoint window
CTRL + D, I: Real-Time Window
CTRL + tab: active form Switching
CTRL + Shift + N: Create a project
CTRL + Shift + O: Open the project
CTRL + Shift + S: Save all
Shift + ALT + C: Create a class
CTRL + Shift + A: new item
Shift + ALT + enter: Switch to full screen editing
CTRL + B, T/Ctrl + k, K: Switch the bookmarks
CTRL + B, n/Ctrl + k, n: Move to the next bookmarks
CTRL + B, P: Move to the previous bookmarks
CTRL + B, C: Clear all labels
CTRL + I: Progressive search
CTRL + Shift + I: reverse progressive search
CTRL + F: Search
CTRL + Shift + F: find in the file
F3: Find the next
Shift + F3: Find the previous one
CTRL + H: replace
CTRL + Shift + H: Replace in the file
Alt + F12: Search symbols (list all search results)
CTRL + Shift + V: clipboard Loop
CTRL + left and right arrow keys: One word can be moved at a time
CTRL + up and down arrow keys: Scroll the code screen without moving the cursor position.
CTRL + Shift + L: Delete the current row
CTRL + M, M: Hide or expand the current nested folding status
CTRL + M, L: Set all processes to the same hidden or expanded State
CTRL + M, P: Stop outline display
CTRL + E, S: View Blank
CTRL + e, W: automatic line feed
CTRL + G: Go to the specified row
Shift + ALT + Arrow: Select rectangular text
Alt + mouse left button: Select rectangular text
CTRL + Shift + u: all are capitalized
CTRL + u: lowercase for all

Note the following two points:
1: Select Tools-> Custom-> "Display Shortcut Keys in the screen prompt" to make it easier to remember the shortcut keys. This is the default setting.
2: Tools> Import and Export settings. Here is the default settings for the entire vsstudio environment. I designed the shortcut keys under "C # environment, if you find that the shortcut keys you are using are very different from those listed by me, change the correct environment.

The story begins with the following:
When I got up on a Sunday morning, I suddenly found my mouse missing. The cat next door may have caught it. I was in a hurry and couldn't help it. I had to use the keyboard to start vsstudio. Start-> Programs are searched one by one. If there are too many programs, you can find flowers in your eyes. Are you still using this backward method to start ide? Use shortcuts. It is still the default value. You do not need to set it. If you want to set it, it's no hero. How can I start IDE in the fastest way? Start> RUN> enter "devenv ". You can directly call vsstudio. That's good. Let's list some common ones for you.


Command Line Quick Start

"Inetmgr" IIS manager. You don't have to go to management to find it. It will soon show IIS management.
"Sqlwb" Quick Start sql2005 Enterprise Manager
"Isqlw" is provided by SQL2000. This can be used as the SQL2000 query analyzer.
"Devenv" starts the corresponding version of vs Studio


CTRL prompt transparent window

This is an interesting key. In vs2005, When you debug the code, sometimes the prompt information will block the Code. At this time, you can press Ctrl to display the prompt transparently. This transparent effect of vs2008 can be seen in more places. You may wish to see it yourself.


F12, CTRL + minus sign, CTRL + Shift + minus sign (Video View)
These three keys are particularly useful when viewing code. With F12, you can quickly find a function definition. With Ctrl + minus signs, you can quickly return to the function call.
 

CTRL + TAB, CTRL + F6, CTRL + ALT + downward arrow (Video View)
The three active file switching methods are easier than clicking with the mouse.

 

CTRL + K, M generate method stubs (Video View)

This shortcut is very useful when you write Structured code. You can write a batch of code definitions without worrying about specific implementations. At the same time, the compiler can be compiled.

 

Full text from: http://www.cnblogs.com/dragonstreak_1/archive/2011/10/07/2200296.html

 

 

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.