basic vi commands

Command mode:
dd – cut/delete a line
yy – copy a line
p – paste text
o – create a new line below the cursor
O – create a new line above the cursor

Line mode:
w – save the file
wq – save the file and quit
x – save the and quit
q – quit the file
q! – quit the file disregarding any changes

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s