vi print
| Start editing | Esc i |
| |
|
| Insert a line (after this line) | Esc o |
| Insert a line (before this line) | Esc O (capital O not number 0) |
| |
|
| Delete character to the right | Esc x |
| Delete a character to the left | Esc X |
| Delete this line | Esc d d |
| |
|
| Go to the start of the line | Esc 0 (number 0 not capital O) |
| Go to the end of the line | Esc $ |
| |
|
| Save the file and exit | Esc :wq |
| Exit WITHOUT SAVING | Esc :q! |