Vi Cheatsheet

:x Exit, saving changes.
:w Save file.
:q Exit if no changes have been made.
:q! Exit and undo any changes made.
r Replace one character.
x Delete character to the right of cursor.
i Insert before cursor.
o Open a new line below current line.
dd Delete current line.
With Esc we can swap from command mode to input mode and viceversa.