Vi quick reference for DBAs

Here are a few useful commands for those who are new to vi.

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

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s