Vim's frequently used shortcut keys
H-Move the cursor left one character J-Move the cursor down one character
K-Move the cursor up one character L-move the cursor right one character down 15 lines-15j
CTRL + F-the screen moves down one page Ctrl + D-moves the half page down
CTRL + B-the screen moves down one page Ctrl + U-Move up half page
N<space>-Move the cursor to the right of n characters
0-Number 0, moving to the beginning of the line
$-Move to end of line
H-The first character of the top row of the screen
M-The first character of the center line of the screen
L-The first character of the last line of the screen
G-Move to the last line of the file
NG-Moves to the nth line of the file, mates: Set Nu
GG-Move to the first line of the file
N[enter]-Move the cursor down n rows
/word-looking down? word-Find up
N-Repeats the previous lookup operation, the next matching string
n-Opposite to n
: n1,n2s/word1/word2/g-Find string word1 between line N1 and N2, and replace with Word2
: 1, $s/word1/word2/g-full text replace
: 1, $s/word1/word2/gc-Ibid. user Confirmation required
X-delete one character x backwards-delete one character forward NX-delete n characters consecutively
DD-delete a whole line ndd-delete the down n rows of the cursor
D1G-delete the line from the cursor to the first line DG-delete the line from the cursor to the last row
d$-delete cursor at end of line D0-delete cursor at beginning of row
YY-the line where the copy cursor is NYY-the next n line where the copy cursor is located
Y1G-Copy the current line to the first line YG-Copy the current line to the last row
Y0-Copy current cursor to beginning y$-copy current cursor to end of line
P-paste on the next line of the cursor P-paste on one line of the cursor
J-Merges the row and the next line
U-undo previous action [Ctrl] + R-Redo Previous action
. -Repeat previous action
I-insertion of cursor I-current beginning
A-Next child Shang insert a-current line end
O-Insert a new row in the next line O-the previous line inserts a new row
R-Replace the character of the cursor once R-Always replace the character of the cursor
: W[filename]-Save as file: R[filename]-Opens a new file at the current cursor
: n1,n2 w [filename]-save data N1 to N2 as a file
: Set Nu:set Nonu-show or cancel line numbers
V-Character Selection v-line Select Y-copy D-delete
: N-Edit Next file: N-Edit Previous file: Files-List all documents
: SP [FileName]-Opens a new window, or opens a new file. Synchronous display
[Ctrl] + W + J-Toggle Window
Vim Shortcuts and keyboard diagrams