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.
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s