Vi Quicker Reference Card

Getting In:				Getting Out:

% vi filename	  (from the shell)	ZZ		normal exit
(vi "filename")	  (from Scheme)		:q!		abandon now! (no save)
                        		:w		save world and continue
                                        [remember to hit ESC to get out of 
                                         insert-mode first!!]

Inserting text:					Scrolling:

a text.... ESC	append text after cursor	^U		scroll up
i text.... ESC  insert text before cursor	^D		scroll down

Cursor Motions:

May be preceded by count.  Use ESC to get out of insert-mode first.
Precede by "d" to specify deletion, or by other operators (see below)

Backward	Forward		Description ([..] gives meaning in nolisp)

h		l		1 character  (arrow keys also work)
				    dl deletes char under cursor
				    dh deletes char before cursor
Fc		fc		find character c
b		w		word
B		W		word including punctuation
0 (zero)	$ (dollar)	beginning/end of line
(		)		list or atom [sentence]
{		}		list  [paragraph]
[[		]]		( at beginning of line 
				     [section or C function def]
? pat CR	/ pat CR	match pattern
				    ^pat, pat$ match beginning, end of line
N		n		re-use last pattern
^D				backspace over autoindent

Operators:

Double to affect lines
Follow by cursor motion to affect region

d	delete	eg dd to delete current line, 3dd to delete 3 lines
c	change
=	indent for lisp
y	yank into save-buffer 
p	put object back    (y , then p, to move text block)

Undo and Repeat:

u 	undo last change
U	restore current line
.	repeat last change
"np	retrieve n-th last delete, 1<=n<=9