I |
Insert before the cursor |
A |
Insert after cursor |
O |
Insert a new line down |
I |
Insert at beginning of line |
A |
Inserting at the end of a row |
O |
Insert a new row up |
R |
character to replace the cursor position with the input character |
R |
Enter the input substitution mode |
|
|
: Q |
Exit |
: q! |
Force exit (do not save) |
: Wq |
Save and exit |
: X
|
Save and exit |
: w filename |
Save As FileName |
N1,N2 w filename |
N1 row to N2 row data saved as filename |
|
|
H J k L |
Lower left top right |
$ |
Cursor to end of line |
0 |
Cursor to beginning of line |
Gg |
Cursor to first line of document |
G |
Cursor to end of document line |
NG |
Cursor to document N line |
: N |
Cursor to document N line |
N<enter> |
Move n rows down |
N<space> |
Move n characters to the right |
|
|
CTRL B |
Previous page |
Ctrl F |
Next page |
Ctrl U |
Upper Half Page |
Ctrl d |
Next Half page |
Ctrl E |
Scroll down one line |
Ctrl y |
Roll up a line |
|
|
Zz |
The current row is placed in the center of the screen |
Zt |
The current row is placed at the top of the screen |
Zb |
The current row is set to the bottom of the screen |
|
|
V |
The character passed by the cursor is selected |
V |
The line passed by the cursor is selected |
Y |
Copy |
Yy |
Copy when moving forward |
Nyy |
Copy 5 rows |
P |
Paste down to one line |
P |
Paste to Previous line |
|
|
D |
Delete selected data |
Dd |
Delete When moving forward |
Ndd |
Delete N rows |
Dg |
Delete, current line to last row |
Dw |
Delete, current cursor to end of word |
d1g |
Delete, first line to current line |
DnG |
Delete, nth line to current line |
D |
Current start Delete to end of line |
X |
Remove 1 characters backwards |
Nx |
Remove n characters backwards |
X |
Delete 1 characters in a forward direction |
Nx |
Remove N characters forward |
|
|
/str |
Search down str from cursor position |
? str |
Search up str from cursor position |
N |
Find the next |
N |
Find the previous |
:%s/liao/liao/g |
Liaohuqiang all replaced with Liaohuiqiang |
:%S/LIAO/LIAO/GC |
Ditto, but each one needs confirmation. |
|
|
U |
Revoke |
CTRL R |
Repeat a previous action |
: e! |
Revert to document original state |
|
|
Set U |
Show line Numbers |
Set Nonu |
Cancel line number |