Next page: Page Down
Up one page: Page up
To the beginning of the line: Home
To end of line: End
Move to the end of the file: G
Move to file header: GG
The cursor moves down n rows: N <enter>
Insert a new line below: O
Insert a new line above: O
Search down Word string:/word
Press N again: Search down
Then press N: Search up
Search for word1 between N1 and N2 lines and replace with Word2:: n1,n2s/word1/word2/g
Search for word1 between the first line and the last row, and replace it with Word2:1, $s/word1/word2/g
Delete one character after: X
Delete Previous character: X
Delete one line: DD
Copy one line: yy
Paste to Next line: P
Paste to Previous line: P
U or u: Restore
Save new file:: w [filename]
Set line number: Set Nu
Cancel line number: Set Nonu
Visual Block Block selection
V: Character selection
V: Line Selection
Ctrl + V: Block selection
Y: Copy the anti-white place
P: Paste the anti-white place
D: Remove the anti-white place
The VIM editor for Linux Learning