Vi for DBAs

esc :q! Just quit – don’t save
esc :e! Revert to saved
esc :wq Save and exit
esc shift zz Save and exit
esc i Enter insert mode (edit mode)
esc a Enter append mode (edit mode)
esc Exit edit mode
esc r Replace a single character
esc x Delete a single character
esc dd Delete a single line
esc yy Copy a single line
esc p Paste a single line
. Repeat the last command
esc / String search
esc $ Jump to end of line
esc ^ Jump to begining of line
shift g Jump to the end of the file
:1 Jump to the begining of the file
:.= Display the current line number

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: