Vi, commands at a glance – basic

Vi can often be daunting, so here is my Vi commands at a glace list.
Inserting:
r Replace character under cursor with next typed character.
R Replace characters under cursor until esc is pressed.
i Insert before cursor.
a Append after cursor.
A Append at the end of the line.
O Open line above cursor and enter append mode.
Deleting:
x Delete character under cursor.
dd Delete line under cursor.
dw Delete word under cursor.
db Delete word before cursor.
Write File:
:w Saves the current file without quitting.
Exiting vi:
:wq Exit and save changes.
:q! Exit without saving.
You must log in to post a comment.