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