Section Reference http://www.cnblogs.com/yangjig/p/6014198.html
H Cursor moves left
J Cursor moves down one line
K Move the cursor up one line
L MOVE the cursor right
$ cursor to end of line
^ cursor to the beginning of the first non-empty letter
DW Delete the first word after the cursor
DB Delete First word before cursor
DD Delete Current Line
Y Copy the selected content
% lookup "(", ")", "{", "}" for the pairing character
: Reg View the contents of the current copy (register contents)
"Ay copy content to a-letter register
"AP Paste the contents of the A-letter register
* One word after the cursor is queried forward
# A word behind the query cursor
O (letter) inserted at the beginning of the next line
O (letter) Inserts a line in front of the current line and moves the current line down one line
A will be able to insert text after the cursor
A The current row is finally inserted
-Cursor to the beginning of the previous line
+ cursor to the beginning of the next line
G last line
NG Nth Row
. Go back to the last place
U undo
Ctrl-r Redo
CTRL-WW Switch window
M moves to the middle of the window.
H moves to the first line of the window
L move to the last line of the window
Ctrl-u Display text window scroll up half screen
ctrl-d command to move the window down half screen
CTRL-E scroll up
CTRL-Y Scroll down
ZZ resets the current line to the center of the screen
ZT puts the current line at the top of the screen
ZB puts the current line at the bottom of the screen
Ctrl-f Next Page
Ctrl-b on page One
Ctrl-n the next line of the cursor
Ctrl-p a line on the cursor
V Select from the cursor position
V Select from the cursor line
b move to the first letter of the last word
W moves to the first letter of the next word
E moves to the last letter of the next word
F{char} move to the location where the first {char} appears
; Continue to match backwards
, Matching forward
Ctrl-g View the current number of rows, as a percentage of the total number of documents
/Search Down
? Look up
N Next Match
N Previous Match
Ctrl-o cursor back to previous position
Ctrl-i cursor back to next position
: S/thee/the only changes the first match of the line where the cursor is located
: S/thee/theg is a matching string that replaces the full line
: #, #s/old/new/g where #,# represents the line number of the two lines in several rows of the replace operation.
:%s/old/new/g is the replacement of each matching string in the entire file.
:%S/OLD/NEW/GC will find each matching string in the entire file, and the prompt for each matching string is replaced.
:! The external command can then be executed immediately after entering an external command such as:!ls
: R FILENAME Inserts the contents of a different file into the current file
Vim Command Learning Summary