Visual Studio 2013 shortcut key related summary

Source: Internet
Author: User

Because of the cocos2d-x game, so this time has been using VS, although the hint function of VS is very powerful, but also relatively stable, not often die and die. (compared with a previous version of VS), but has been not familiar with its shortcut keys, on the one hand before the Linux C + + code under the time, the vi shortcut keys, there are also use of Android studio when there are many convenient shortcut keys have wood ...


So, think of a good study, so, in this summary.


First, about automatically adding file header comments

This in the use of the VI, the simple configuration, you can create a new file automatically when the file header notes are added, as follows:


This note, after search found that for C sharp files and VB files can be modified in the official installation directory template file to add, but,, helpless did not find the C + + template file.

So, we have to find other ways.

Just when I think I can walk, I suddenly think of the super existence of VA!

As a follow-up, the following custom customizations are made:




So whenever I create a file, in the first line to enter DESC when the prompt will pop up, and then enter the key is OK. It's a little bit harder than VI, but it feels good.

You can customize your VA's shortcut keys according to your own needs.


Sec, about the shortcut keys for VS itself, in the keyboard options for the options below the tool, you'll know how to modify the text interface.


Finally, attach some common shortcut keys:

1. go back to the previous cursor position / advance to the next cursor position

1 ) go back to the previous cursor position: Use the key combination " Ctrl +- ";  

2 ) forward to the next cursor position: " Ctrl + Shift +- ".  

2. copy / cut / Delete entire line of code

1 If you want to copy a whole line of code, just move the cursor to that line, and then use the combo key " Ctrl + C to complete the copy operation without selecting the entire row.  

2 If you want to cut a whole line of code, just move the cursor to that line, and then use the combo key " ctrl+x to complete the cut without selecting the entire row.  

3 If you want to delete a whole line of code, just move the cursor to that line, and then use the combo key " ctrl+l to complete the cut without selecting the entire row.  

3. Revocation / anti-revocation

1 ) Undo: Use the combo key " Ctrl + Z "to cancel the operation;  

2 ) Anti-undo: Use the combo key " Ctrl+y "To perform an anti-undo operation.  

4. forward / backward search

1) Use the key combination " Ctrl+i ";  

2) Type the text you want to search (move the cursor to the search Word input box to start typing);  

3) after you type the search text, you can use the composite key " Ctrl+i "and" Ctrl+shift+i The search results are highlighted before and after the search results are positioned.  

4) to end the search, you can press the ESC "Key or click the Close button on the right side of the Find box.  

5. Box-type selection

Use the key combination " shift+alt+ arrow keys (or mouse) to complete the box selection. Box selection allows you to select both lines of code and columns. This is very handy for deleting some code in bulk.  

6. Insert a row above or below the line where the cursor is located

1 ) key combination " Ctrl+enter ": Insert a blank line above the current line;  

2 ) key combination " Ctrl+shift+enter ": Inserts a blank line below the current line.  

7. Navigate to the beginning and end of the line

1 ) Home key: Navigates to the beginning of the current line;  

2 ) End key: Navigates to the end of the line at the current line.  

8. Select The code between the start of the cursor and the beginning of the Line (tail)

1 Select the code from the cursor to the beginning of the line: Use the key combination " Cshift + Home ";  

2 Select the code from the cursor to the end of the line: Use the key combination " Shift + End ".  

Call smart hints

1 ) Method 1 : Use the combo key " ctrl+j ";  

2 ) Method 2 : Use the combo key " ALT + → " .  

One . invoke parameter information hints

for some functions with large functions, it is difficult to easily confirm the use of parameters within the function. At this point you can put the cursor on the parameter name, and then press the key combination "ctrl+shif+ Space", where the parameters are used will be highlighted.  

Quick Switch window

Use the key combination " Ctrl+tab (You can now open the IDE navigation, get a bird's eye view).  

Hide or show the current code snippet quickly

Use the key combination " ctrl+m,m "(Remember: to press two times M OH).  

Build a solution

Use the key combination " ctrl+shift+b ".  

jump to a specified line

1 ) Method 1 : Key Combination " ctrl+g ";  

2 ) Method 2 : Click the line number in the status bar.  

comments / uncomment

1 ) Note: Key combinations " Ctrl+k+c ";  

2 Uncomment : Combine Keys " Ctrl+k+u ".  

Full Screen display / exit full screen display

Use the key combination " SHIFT + ALT + ENTER ".  

definitions and references

1 ) jump to Definition: F12 ;  

2 ) Find all references: Using the key combination " shift+f12 ".  

Find and replace

1 ) Find: Using the key combination " ctrl+f ";  

2 ) Replace: Use the key combination " ctrl+h ".  

Case conversion

1 ) to lowercase: Use the key combination " Ctrl+u ";  

2 ) to capitalize: Use the combo key " Ctrl + SHIFT + U ".  

Debugging - related

1 ) Debug (boot): F5 ;  

2 ) Debug (restart): Use the combo key " Ctrl+shift+f5 ";  

3 ) Debug (Start Without Debugging): Use the key combination " Ctrl+f5 ";  

4 ) Debug (statement-by-sentence): F11 ;  

5 ) Debugging (step-by-step): F10 ;  

6 ) To set breakpoints: F9 .  


22. Some have to say shortcut keys

Forced IntelliSense: Ctrl+j. IntelliSense is one of the biggest highlights of Visual Studio, and choosing Visual Studio is probably not the reason for that.

Force display of parameter information: ctrl-shift-space. This is definitely a good thing.

Insert Code snippet: Ctrl+k,x. If you want to enter the code quickly, this must be remembered. With F2, it will be a sharp weapon. Of course, with "ctrl+k,s", you can enter code snippets like try and #region more quickly.



Visual Studio 2013 shortcut key related summary

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.