S5 version Table of Contents (frame/ no frame)
(24) Vi commands Previous Top Next

Vi commands

Positioning in a file

[ctrl] - F
Forward one screen.
[ctrl] - B
Backward one screen.
[ctrl] - D
Scroll down half screen.
[ctrl] - U
Scroll up half screen.
:1
Go to first line in file.
:$
Go to last line in file.

Interrupting, Canceling

[esc]
End an insert or incomplete command.
[ctrl] - C
Interrupt.
[ctrl] - L
Redraw screen.

Deleting and removing.

dd
Delete the current line.
x
Delete current character.
dw
Deletes a word.
de
Deletes a word but leaves punctuation.
3 dd
Deletes 3 lines.

Other commands

:e
Re-reads the last saved version of the file.
:wq
Writes the file and quits.
:q!
Quits and does not write out changes.

Previous Top Next


slide25.src  last modified Jan 31, 2011 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College