Three modes of VIM: Command line mode, edit mode, extended mode
1: Common operations in command line mode
Delete
A): DD deletes the cursor as it moves forward
b): NDD delete n rows after the current line of the cursor
Copy
c): YY copy cursor where you are moving forward
d): Nyy The N rows after the current line where the cursor is copied
Paste
e): P Paste the next line of the cursor
f): NP paste content multiple times
Shear
g): DDP First Delete, then paste
Revocation and anti-revocation
h): U Undo
i): ctrl+r anti-revocation
Move the cursor quickly
J): GG Navigates to the first line of the file
k): NG navigates to a line of the file
k): GG navigates to the last line of the file
L): H navigates to the first line of the screen
m): M positioned in the middle of the screen
N): L Navigate to the last line of the screen
O): 0/home navigates to the beginning of the current line
P): $/end the end of the line to the current line
Extended mode (note in English: number)
Q):: Set nu display line number
R):: Q exit
s):: W Save
Edit mode
T): A enters insert mode and is added after the cursor.
u): I enters insert mode and inserts before the cursor.
V): O enters Insert mode and opens a new line below the current (cursor) row.
Three years of ice-drinking-ai-linux-04 vim editor