The VIsual Screen Editor
VI has three modes: input mode, cursor movement and command mode. Movement of the cursor around the buffer is done with keys h, j, k and l aka VI Keys. The default mode is command mode. From there you can type i or a to insert or append data in the editing buffer. Press <ESC> to return to cursor movement mode and press : to enter command mode.
Command | Description |
---|---|
r | rread in a file |
q | quit - you can combine commands, like :wq to write and quit |
w | write a file - a :wq! will force a write and quit |
s | search - try s/old/new/g |