Press i to enter edit mode
wq! force Save and exit
Q! Do not save, force quit
! Have the meaning of compulsion
Directional keying:
K
H J L
Ctrl + F Move down one page
Ctrl + b Move up one page
0 at the beginning of a line
the last side of the $ line
the last line of the G file
the first line of the GG file
DD Delete the line where the cursor is located
YY copy cursor is the same as
P Paste copied content
U Rewind Ctrl + R forward both are a pair of actions
. decimal point ".", repeat an action
[ESC] exit edit mode, Shift +; Enter command line mode
Ctrl + V block selection, the selected area will be anti-white
Y Copy the anti-white content
D Remove the anti-white content
Multi-file editing
The SP can be appended with the file name, need to open to enter the file name, only the SP is the same file between two Windows
Ctrl + W + j/k for moving between Windows
Ctrl + W + q to exit the current window
Vim Setting value is not recommended in the /ETC/VIMRC file. Can modify ~/.VIMRC (default does not exist, manually created when needed)
Vim garbled problem, as long as the coding problem
Echo $LANG View encoding
Lang=zh_cn. UTF-8 Setting the encoding
Iconv instruction enables language-coded conversion
Vim Program Editor Common operations