MarthinusSwart.com

vi shortcut keys

Sometimes it is useful to edit a text file with vi and these keys are the minimum knowledge you require to edit and save a text file.

X
Deletes the character at the cursor.
Insert
Press Insert once to start editing the text file.
:W
Save the changes to disk.
:Q or :Q!
Quite without saving, the exclamation is needed when changes were made and you want to loose all the changes that was made.
:WQ
Saves the changes and quite.

Now vi has a lot of shortcut keys available to make text editing easy and fast but these are the minimum you need to know to quickly edit a text file with vi.