Vim---Copy, paste, delete, undo commands __ Delete

Source: Internet
Author: User
Tags first row

Copy:
YY: Copy the line where the cursor is located
Nyy:n is a number, the copy cursor is in the down n line, for example, 20yy is copied 20 rows
Y1G: Copy all data from the row to the first row of the cursor
YG: Copy all data from the row to the last line of the cursor
Y0: Copy the character of the cursor to all data at the line of a row
y$: Copy the character of the cursor to all data at the end of the line
Paste:
P,p:p to paste the copied data on the next line of the cursor, P for the pasted line on the cursor
Delete:
DD: Deletes the line where the cursor is located
Ndd:n is a number, delete the lower n line where the cursor is located, for example, 20DD deletes 20 rows
D1G: Deletes all data from the row to the first row of the cursor
DG: Remove all data from the line to the last line of the cursor
D0: Deletes the character at the cursor to all data at the line line line
d$: Deletes all data at the end of the line at the same character as the cursor
steps:
In normal mode (press ESC), enter the copy command, such as Enter YY, and then move the cursor to the place where you want to paste, press p or p to achieve copy and paste. Similarly, delete commands are also in this mode.
Undo:
U: Undo
Ctrl+r: Revocation of cancellation

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.