What to Type | Result |
a | append after the cursor |
i | insert before the cursor |
I | Text inserted at beginning of line |
A | Text inserted at end of line |
R | Text overwrites existing text |
What to Type | Result |
x | deletes the character the cursor is under |
dd | deletes the line the cursor is on |
D | Equivalent to d$ (delete to end of line) |
dd | Equivalent to 0d$ (delete entire line) |
C | Equivalent to c$ (delete to end of line, enter input mode) |
cc | Equivalent to 0c$ (delete entire line, enter input mode) |
X | Equivalent to dh (delete character backwards) |
x | Equivalent to dl (delete character forwards) |
What to Type | Result |
j | moves the cursor up one line |
k | moves the cursor down one line |
h | moves the cursor backwards on a line |
l | moves the cursor forward on a line |
What to Type | Result |
:wq | saves the current changes and exits vi |
:w! | saves the current changes but does not exit vi |
:q! | exits vi without saving any change |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7899089/viewspace-735085/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7899089/viewspace-735085/