Mobile
KJHL move cursor up or down
GD find the current location defined by Word, n jumps to the next place
NG jumps to nth row
% in range characters (bracket pairs, HTML tags, etc.)
{} Move up/down between empty rows
() Move between paragraphs, including blank lines
Ctrl+o in turn follow the jump record to jump backward
Ctrl+i jumps along the jump record in turn
Ctrl+e single-row upward tumbling
Ctrl+u Half screen upward tumbling
B, B move forward one word or word
"edit"
x Delete the current cursor text
rx Replace the current cursor character with x
J next line to the end of the current line
. repeat the previous Operation Command, DD ... Will delete 4 lines of text, J .... You can connect 4 lines of text
d can be used to combine any move command
dw Delete the current cursor to the beginning of the next word
d% Delete the contents of the range between the
D) Delete to the end of the next sentence
D} Delete the remainder of the current paragraph
du undelete preparation
DD cut the current line
yy complex The word
yw where the current line
DW clipping cursor is located:
P Paste at the location where the cursor is copied,
I insert at the current line,
A inserts at the end of the current line;
O Creates a new blank line below the current line for inserting
O Creates a blank line above the current row;
CC replaces the current line contents with a blank line
c$ Delete the current position to the end of the current line  
c0 deletes the current position to the current line start content
== automatically indents the current line
GG jumps to the first line
G jumps to the last line
gg=g automatically indents the full text
<< (>>) indents the entire line
"Find/Replace"
/regexp Find REGXP content, n jumps to the next place
: s/regexp/replacement/g Replace when moving forward
:%s/regrep/replacement/g Full text replacement, if one row has multiple matches only replace the first one
:%S/REGEXP/REPLACEMENT/GC full-text replacement and prompts before each replacement
:%s/str/\r/g Replace and wrap
"File Operations"
W Save
Q exit
QW exit after saving
Q! Force exit
W! Force write
: Help opens the Gvim helper file
PS: Enter Vimtutor in the Linux terminal to open the starter tutorial with vim
Vi/vim/gvim Editor Common commands