Vim and VI usage are basically the same, Vim is more powerful, and there are color markers. Vim is used, VIM has three modes are general mode, edit mode, command mode.
General mode: Delete, copy, and paste
X: Remove Backward
X: Delete Forward
NX: Remove n characters backwards
DD: Delete When line
D: Delete When line character
NDD: Deletes the current row down n rows
YY: The line where the cursor is copied
P: Pastes the copied data on the next line of the cursor
P: Pastes the copied data on the previous line of the cursor
Edit mode:
I: Inserting a character at the cursor location
I: Insert the input character in the first non-empty position on the line where the cursor is located
A: Current cursor next position input character
A: Enter a character at the last position of the line where the cursor is located
O: Enter characters at the first position of the line where the cursor is located
O: Enter characters at the top of the line where the cursor is located
R: Replace the character where the cursor is located
ESC: Exit Edit mode
Command mode
H: Move the cursor one character to the left
J: Cursor moves down one character
K: Move the cursor up one character
L: Move the cursor right one character
Ctrl+f: Screen down one page
Ctrl+b: Screen up one page
GG: First line of document
G: Last line of document
NG: Cursor moves to n rows
/word: Finding word after the cursor
? Word: Find word before the cursor
S/WORD1/WORD2/G: Current cursor line, word1 Replace with Word2
N1,n2s/word1/word2/g:n1 line to N2 all Word1 replaced with Word2
U: Fallback
Q: Exit
Q! : Forced exit
WQ: Save and exit
Set Nu: Display line number
Vim common usage