Reference links---------------------http://www.linuxidc.com/Linux/2015-12/126458.htm
Only normal mode can be toggled with edit mode, command line mode, edit mode and command line mode.
One: General mode
Move cursor
Left h←
Right l→
On k↑
Lower j↓30j: Move down 30 rows
0 or home move to the beginning of the line
$ or end moves to a row bit
N "Enter" cursor moves down n rows
Ctrl+f Move Down one page
Ctrl+b Move up one page
G move to last line of file
GG moves to the first line of the file
Find
/word looking down
? Word looks up
N (repeats the previous find operation) next
N Previous
Replace
: N1,n2s/word1/word2/g looks for word1 string between N1 line and N2 row and replaces it with WORD2
Delete
X backward Remove NX Backward continuously delete n
X forward Delete
DD Delete the line where the cursor is located
NDD Delete the down n rows where the cursor is located
Copy
YY the line where the cursor is copied
Nyy the next n rows where the cursor is copied
Paste
P The copied content is pasted on the next line of the cursor
P paste on one line of the cursor
Restoration
U Restore previous action
Ctrl+r Redo Previous Action
Two: Edit mode
Enter insert mode
I insert the first non-empty Gerian inserted at the cursor at the same line
A cursor at the next character at the last character of the line where the cursor is located
o The line next to the cursor is inserted into the new row
O Insert a new row on the previous line
Enter replacement mode
R replaces the character of the cursor once
R until ESC is pressed
Exit edit mode
[ESC]
Three: command-line mode
Save and leave
: W Write Data: w! Force write
: Q Leave VI
: q! Leave not save
: Wq left after saving
Changes to the VIM environment
: Set NU Displays line number
: Set Nonu Cancel line number
Vim Common commands