VS and VAX shortcut key records

Source: Internet
Author: User

Example 1:

When you copy a large piece of code and want to copy them to a blank line, you accidentally press Ctrl + C to lose all the copied content.

You need to find the location where the previously copied code and copy it again, or find another way to retrieve the lost clipboard content.

Solution:

Tip 1: Avoid copying blank rows
In Tools-Options-Text Editor-All languages-general, there is an option called "when no content is selected, apply the Apply cut or copy command (Apply cut or copy commands to black lines when there is no selection) to the blank line. If you cancel this option and then use the copy or cut command on the blank line, the content in the clipboard will not be lost.
After this option is set, the scenario is not described at all.

Tip 2: Use the clipboard to repeatedly paste different content
Press Ctrl + Shift + V to repeatedly paste the 20 pieces of content copied or cut on the clipboard.
Press Ctrl + Shift + V to retrieve the large code you copied.

Tip 2 is recommended for this scenario. Tip 1 should be used as the default configuration.

Other text editing shortcuts to improve efficiency:

1. Delete related
Ctrl + L cut a row
Ctrl + Shift + L Delete the current row
Shift + Delete: when no selected content is selected, the current row is cut. When there is selected content, the selected content is cut.
Ctrl + Delete a word backward
Ctrl + BackSpace delete a word forward
Ctrl + K, Ctrl + \ Delete horizontal blank. Multiple rows are supported. Select the blank to be deleted.

2. Add a new line
Ctrl + Enter Insert a new row above the current row
Ctrl + Shift + Enter Insert a new row below the current row

3. case-sensitive Conversion
Ctrl + U convert to lowercase
Ctrl + Shift + U convert to uppercase

4. move the cursor
Move the cursor to the beginning of the line: Home
Move the cursor to the End of the row: End

5. Code comments
Ctrl + K, C code comments
Ctrl + K, U uncomment the code

6. Undo
Ctrl + Z undo
Ctrl + Y cancel undo

Example 2:

When you browse the code, you can see a strange function or custom type. You can go to the definition to view the function or type, and then you can no longer find the jump back.

You want to return the jump point.

Solution:

Tip: return the previous jump position
Press Ctrl +-to jump back to the position of the cursor.
Use the shortcut key Ctrl + Shift +-to cancel the jump above.
After you use (Ctrl +-) to jump back, you can use (Ctrl + Shift +-) to cancel the jump.

Other code shortcut keys to improve efficiency:

1. page navigation
PageUp one page on the current page
PageDn: Next page
Ctrl + digit switch code Tab
Ctrl + arrow key scroll Screen
Ctrl + G jump line
F6 to definition
2. move the cursor:
Ctrl +] matching brackets
Move the cursor to the beginning of the line: Home
Move the cursor to the End of the row: End
Ctrl + PageUp move cursor to the top of current page
Ctrl + PageDn move cursor to the bottom of current page
Ctrl + Shifit + PageUp the cursor moves from the current position to the top of the page and the selected content
Ctrl + Shifit + PageDw move the cursor from the current position to the bottom of the page and select the content
3. temporarily adjust the font size
Increase ctrl + scroll on the scroll wheel
Adjust ctrl + scroll down

Visual Assist XThe most useful shortcut

1. Alt + G: jump between definition and declaration.

2. Alt + O: jump between. h and. cpp. (O is the letter O, not the number zero)

3. Alt + Shift + Q: move the mouse to the function name. In the H file, right-click the shortcut key and choose create definition from the shortcut menu; if it is in the cpp file, right-click the shortcut key and choose create declaration from the shortcut menu. After defining the interface, it is very quick to combine Alt + O. Of course, in this case, it will be faster to right-click the mouse and work with Alt + O.

4. Alt + Shift + R: When you want to change the name of a class or other things, you may have referenced this name in many places. Press this shortcut key, you can easily rename it.

5. Alt + Shift + S: helps you find an object or variable.

6. Alt + Shift + O: locate the file. If there are too many project files, this will be very helpful. Of course, it is best to have a good standard for naming your file names.

7. Alt + Shift + F: place the cursor on a string. Press this key to find all the places that reference this string.

Some shortcut keys must be positioned on the function or class, object, and variable name by the cursor.

With the shortcut keys of ViEmu and visual studio itself, this development environment is quite cool.

Shortcut reference: http://www.wholetomato.com/products/features/shortcut.asp

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.