VI Editor Commands: Quick Links..
VI Editor Commands: Quick Links..
VI Editor Commands: Quick Links..
htm l
vi Editor Commands
Quick links...
General Startup
Counts
Cursor Movement
Screen Movement
Inserting
Deleting
Copying Code
Put Command
Find Commands
Miscellaneous Commands
Line Editor Mode
ex Commands
Substitutions
Reading Files
Write File
Moving
Shell Escape
General Startup
To use vi: vi filename
To exit vi and save changes: ZZ or :wq
To exit vi without saving changes: :q!
To enter vi command mode: [esc]
Counts
A number preceding any vi command tells vi to repeat
that command that many times.
Cursor Movement
j move down
k move up
Screen Movement
xG move to line x
^R redraw screen
( does not work with VT100 type terminals )
^L redraw screen
( does not work with Televideo terminals )
Inserting
Deleting
Copying Code
Put Command
brings back previous deletion or yank of lines,
words, or characters
Find Commands
; repeat last f, F, t, T
Miscellaneous Commands
ex Commands
For a complete list consult the
UNIX Programmer's Manual
READING FILES
copies (reads) filename after cursor in file
currently editing
:r filename
WRITE FILE
MOVING
:# move to line #
SHELL ESCAPE
executes 'cmd' as a shell command.
:!'cmd'