Vim mode switching
When you turn on VIM as the default command mode, do the following to edit:
Input I
After editing, press the ESC key, enter:, enter the last line mode, enter Wq, save to exit, q! Force exit.
Common commands: command-line mode operation commands:
Direction key:J down K up H left L right
Enter the following cursor to move the seats differently:
Delete Row, cut: number +dd (the number of rows down the current cursor line, including the row in which it is located)
Delete character:
X Backward Delete
X forward Delete
Step-by-step undo:U
anti-revocation:ctr+r
Text line movement:>> and <<
copy: digital +yy (copy a few lines)
paste:p
check:V (Move cursor, select the line to be selected)
Replacement Character:R
%s/main/main/g (main for the entire content)
5,15%s/main/main/g (5 lines and 15 lines of main in exchange for main)
Find:/
/main (n for offline search)
Indent:
:17,78>>>> (17 to 78 rows overall indent four tab keys)
Vim Learning Notes