Detailed explanation of the Vim commands in CentOS
This figure draws on the basic movement methods in vim. To facilitate programmer, it lists many buttons that can only be used by programming. In addition to this, there are actually some useful things that I did not expect to draw (such as tags, tabs without standard keys, man ..), if you have idea, you are welcome to provide it.
These icons are divided into the following types based on the unit size of movement, marked with different colors:
(Note: This is not a complete vim quick key list, but a commonly used key .)Character (character)
H
Left
J
Lower
K
Upper
L
RightWord)
W
Next word
W
Next word (skip punctuation)
B
Previous word
E
Jump to the end of the current wordLine)
0
Jump to the beginning of the current row
^
Jump to the first non-blank character in the current line
$
Jump to end of lineSection (paragraph), block (block)
{
Previous section (separated by blank lines)
}
Next section (separated by blank lines)
[{
Jump to the beginning of the current block
]}
Jump to the end of the current block
%
Jump to the brackets corresponding to the current one (Refer applies to various brackets, and even HTML tags can be jumped if set)Screen, absolute position
H
Screen top
M
Screen Center
L
Screen bottom
:X
XG
Jump to row x (x is the row number)Search)/Xxxx
Search xxxx#
Search for the word of the current cursor)*
Search for the word of the current cursor)FX
Search for character x from the current rowGd
Jump to the definition location of the word (word) where the current cursor is located (for programming purposes, jump to the place where the variable/function is defined)Split windows: Split
Split Window (you can add a name to open another file): Diffsplit xxx
Compare windows with file xxx (diff)Ctrl-W p
Jump to the previous split window (switch back in two split Windows)Ctrl-W j
Jump to the split window belowCtrl-W h
Jump to the left split windowCtrl-W k
Jump to the split window aboveCtrl-W l
Jump to the split window on the rightAuto-completion (used in Insert Mode)Ctrl-N
Automatically capture the next word in an archive)Ctrl-P
Automatically capture the previous word in an archive)Ctrl-X Ctrl-F
Automatic File capture