Delete
X Lowercase x indicates that one character is deleted backwards, that is, the character where the cursor is deleted
NX N represents a number, which means that each character is deleted backwards, for example: 10x means to delete the next 10 characters including the cursor
X-Large x indicates a character before the cursor is deleted, excluding the character of the cursor
NX N represents a number, which means that each character is deleted forward, for example: 10X means 10 characters before the cursor is deleted, excluding the character of the cursor
DD deletes the line where the cursor is located, and is actually cut
NDD N represents a number, removing the downward n-line of the cursor
D1G Delete the row of the cursor to the first row of data
DG Deletes the row of the cursor to the last row of data
D0 the first character of the line to which the cursor is located
d$ Delete the last character of the line where the cursor is located
YY the line where the cursor is copied
Nyy N Represents the number, and the next n line where the cursor is copied
y1g copy cursor line to first row of data
YG copy cursor row to last row of data
y0 copy cursor to the first character of the line
y$ copy cursor to the last character of the line
P Small p indicates that the copied data is pasted on the next line of the cursor
P Large p indicates that the copied data is pasted on the previous line of the cursor
J merges the row of the cursor with the data from the next row into one row
U small u means undo previous action (especially important, similar to crtl+y inside word inside windows)
Ctrl+r, in contrast to u, means redo the previous step (especially important, similar to the crtl+y in Word inside windows )
. Point , which means repeating the previous operation, example: Want to copy, always press this point on the line
Note: Delete, copy, and paste above are all actions in non-edit mode
Use shortcut keys for Linux vim to delete, copy, paste