VI CHEAT SHEET 1.0

+*START***************

Edit an existing file
--> vi <filename>

Edit a new (blank) file
--> vi

+*MODES***************

input mode (adding text, etc.)
--> i

command mode (editing)
--> Esc

+*BASIC*COMMANDS******

Move cursor left
--> h

Move cursor down
--> j

Move cursor up
--> k

Move cursor right
--> l

Insert after cursor
--> a

Insert before cursor
--> i

Replace character under cursor
--> r

Undo last change
--> u

Delete character
--> x

Delete line
--> dd

+*EXIT****************

Must be in command mode <Esc>

Exit
--> :q <Return>

Exit and save
--> :wq <Return>
--> or zz

Exit without saving
--> :q! <Return>

+*ADVANCED*COMMANDS***

Cut (delete)
--> d

Delete to start of line
--> d^

Delete to end of line
--> d$

Delete to end of word
--> dw

Delete x# (3) of lines
--> 3dd

Paste after cursor
--> p

Paste before cursor
--> P

Show current filename
--> Ctrl-g

Clear and redraw screen
--> Ctrl-l

**************************

A great VI reference can be found at:
http://www.eng.hawaii/Tutor/vi.html

**************************
VI CHEAT SHEET
Ver. 1.0
By Scott Andress
sandress@pilotmail.net
http://www.pilot.org
April 27, 1998

<+>