Select All Vim copies

Source: Internet
Author: User

I was also looking for a quick way to select all, but many of them are repeated and incorrect on the Internet, such:
1, $ y, what is this? To write, you must also write: 1, $ y, but I tell you, write: 1, $ Y is all copied, not all selected
DG. This is even more misleading. This is to delete the content from the row where the cursor is located to the last line (including the content of the row where the cursor is located)
Where Has everything been mentioned above. The correct answer is:
Ggvg
Explain the above commands
Gg moves the cursor to the first line, which is valid in vim and invalid in VI.
V is used to enter the visual mode.
G move cursor to the last line
After the selected content is selected, you can perform other operations, such:
D. Delete the selected content.
Y: copy the selected content to register 0.
"+ Y copy the selected content to the + register, that is, the system clipboard, for otherProgramUse

I hope that you will not resend the post very unresponsibly.

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.