How to enter insert mode from command mode:
#A/a/o/o/i/i
I: Lowercase is the first letter in the position where the cursor is inserted
I: Uppercase is inserted at the beginning of the line where the cursor is located
A: Start inserting the next letter at the cursor position
A: Insert at the end of the line where the cursor is located
O: The next line where the cursor is located starts inserting
O: The previous row of the cursor line starts inserting
Whether small o or Big O is the cursor another line
Command mode:
X: Delete a single character
U: Delegate undo Undo
DD: Deletes the line where the cursor is located. ---this deletion is actually cut
3DD/D3D: The next three lines, including the cursor
YY: The copy cursor is in the row
P: You can copy and paste the content and paste it on the next line in the row where the cursor is located
Uppercase P: Paste on the previous line of the row where the cursor is located
Paste three lines 3yy/y3y: Copy three lines including the cursor.
GG: Switch to the beginning of the line immediately
G: Just switch to the end of the line immediately.
3g: Just switch the cursor to the third line immediately
R: means replacing one character
R: denotes infinite substitution character
Last-line mode:
: Set number either marks the line or is abbreviated as set Nu
: Set Nonumber
: W Write
: Q quit
: X
How to find in vim:
Like what:
/good----Find good, n switch to the next n switch to the previous,/search for something that is not clear highlighting
: 1,3s/good/guy/g 1-3 Line replace all found good into guy
: 1, $s/good/guy/g all lines replace good change to guy.
crtl-v/Capital V and lowercase v------visualization attempt, block-style Delete
VIMTUTOR--VIM Tutor Guide
P.S.
How to turn on Vim line number global display:
Vim/root/.vimrc
Set NU-----Turn on global file line number display
Or VIM/ETC/VIMRC, plus the following line.
Set Nu
Usage of Vim