List of Commands For Vi
List of Commands For Vi
Index
Appending Files into the Current File
Changing Text
Complete Documentation
Cursor Positioning Commands
Cutting and Pasting Text
Exiting from vi
Screen Commands
Starting an Editing Session
Text Deletion Commands
Text Insertion Commands
Undo Command
Complete Documentation
The vi editor is a common editor for unix systems in that it makes use of a regular keyboard
with an escape key. On the DECstation, the escape key is the F11 key. It therefore works on
all unix computers. Complete documentation is available by typing
man vi
vi filename
Undo Command
u
undo the last command.
Screen Commands
CTL/l
Reprints current screen.
CTL/L
Exposes one more line at top of screen.
CTL/E
Exposes one more line at bottom of screen.
CTL/F
Pages forward one screen.
CTL/B
Pages back one screen.
CTL/D
Pages down half screen.
CTL/U
Pages up half screen.
Changing Commands
cw
Changes characters of current word until stopped with escape key.
c$
Changes text up to the end of the line.
C, cc
Changes remaining text on current line until stopped by pressing the escape key.
~
Changes case of current character.
xp
Transposes current and following characters.
J
Joins current line with next line.
s
Deletes the current character and goes into the insertion mode.
rx
Replaces current character with x.
R
Replaces the following characters until terminated with the escape key.
Exiting vi
ZZ
Exits vi and saves changes.
:wq
Writes changes to current file and quits edit session.
:q!
Quits edit session (no changes made).