1. Select chunks, replace or delete
Press v First, enter the visual editing state, select the replacement area, then CTRL + V, and then press C to remove the selected area.
2. Delete by line or by word
d$: Removes all characters from the position of the cursor to the end of the line.
D0: Deletes the position of the cursor to all characters at the beginning of the line.
DD: Deletes the entire row where the cursor is located.
NDD: Deletes the row of rows where the cursor is down n rows.
D1G: Deletes the character of the line to the first line of the cursor.
DG: Removes the character from the line to the last row of the cursor.
3. Mobile
GG: Move to the first line.
G: Move to the last line.
H,j,k,l: Up or down
4. Copying
YY: The line where the cursor is copied.
NYY: Copy cursor line to N-1 line, total n rows.
Y1G: Copies all data from the row to the first row of the cursor.
YG: Copies the data from the row to the last row of the cursor.
Y0: Copies all data from the character of the cursor to the beginning of the line.
y$: Copies all data from the character of the cursor to the end of the line.
5. Recovery and repeat operations:
U: Restores the previous action.
Ctrl+r: Repeat the previous action.
6. Paste
P: Paste to the right or bottom
P (Uppercase): Paste to left or top
Vim Simple Command