Review of Basic vi Commands
Movement | Commands |
---|---|
,,, |
|
To first character of next line | + |
To first character of previous line | - |
To end of word | e or E |
Forward by word | w or W |
Backward by word | b or B |
To end of line | $ |
To beginning of line | 0 |
Operations | Commands |
---|---|
Place text from buffer | P or p |
Start vi, open file if specified | vi file |
Save edits, quit file | ZZ |
No saving of edits, quit file | :q! |
Editing Action | Command |
---|---|
Insert text at current position | i |
Insert text at beginning of line | I |
Append text at current position | a |
Append text at beginning of line | A |
Open new line below cursor for new text | o |
Open new line above cursor for new text | O |
Delete line and substitute text | S |
Overstrike existing characters with new text | R |
Join current and next line | J |
Toggle case | ~ |
Repeat last action | . |
Undo last change | u |
Restore line to original state | U |