The usual copy and paste commands for VIM are organized as follows:
1. Select the text. Using V to enter the visual mode, move the cursor key selection.
2. The command to copy is: Y, the commonly used commands are as follows:
Y Copies the selected block to the buffer when a piece is selected using the V mode;
yy copy entire row (Nyy or yny, copy n rows, n is number);
y^ Copy the contents of the current to the wardrobe;
y$ Copy the contents of the current to the end of the line;
YW copy a word (NYW or ynw, copy n word,n to numbers);
YG Copy to end of file (NYG or yng, copy to Nth line, e.g. 1yG or y1g, copy to end of file)
3. The Cut command is: D, the commonly used commands are as follows:
D Cut the selected block into the buffer;
DD Cut Whole row
d^ cut to the beginning of the line
d$ cut to end of line
DW cuts a word
DG cut to the end of the gear
4. The command to paste is: p, the commonly used commands are as follows:
P lowercase p represents the post to the cursor (bottom), because the cursor is at the position of the specific character, so it is actually behind the character
P Capital P represents the front of the cursor (top)
5. The command to undo the operation is:
U: Undo operation,
U: Undo all Recent changes to a row
Ctrl+r: Redo Undo Operation
Vim common copy and Paste commands