Vim User Guide in Ubuntu
ESC: This is one of the omnipotent function keys in Vim. Basically, pressing this key at any time can return the normal state of vim.
I: In normal state, you can press I to enter the "insert" Edit state. At this time, press the direction key to move the cursor, enter the character where you want to enter, delete the character with the Del key, and then exit the normal state with ESC.
YY (yny): In normal state, move the cursor to the text of a line to be copied with the direction key, and press y twice to copy the line. If you want to copy n rows in this row, yny is used. For example, if you copy five rows, Y5Y is used.
P: After copying, move the cursor to the place to be pasted and press p.
D: In contrast to the above, pressing D is to delete the current row.
X: In normal mode, pressing X is the character that deletes the current position of the cursor, and the Chinese character is the entire Chinese character.
: WQ! : In normal mode, enter ":" to enter the command State. In this state, Q indicates to exit, and W indicates to save ,! Indicates force. For example, if you discard the modification, it is: Q !, Force save and exit: WQ !.