| Like what you see? Get it in one document for easy printing! |
Click Here!
|
|
|
vi - A Full Screen Text Editor
(Page 2 of 4)
Modes and Commands
vi has two basic modes: the command
mode and the insert mode. vi normally starts in command mode and command
mode can always be reached by pressing the escape key (hereafter shown
as <esc> ). Most experienced vi users will be seen frequently
pressing the escape key (their security blanket to be certain they are
in command mode).
Table 16
summarizes the basic command structures, screen navigation commands,
and editing commands available in vi.
Table 16: Common vi Editor Commands
Command
|
Function
|
ZZ, :wq
|
Save and Exit.
|
:q!
|
Exit without
Save
|
DownArrow
|
Forward one
line (or N lines).
|
UpArrow
|
Backward one
line (or N lines).
|
RightArrow
|
Move right one
character
|
LeftArrow
|
Move left one
character
|
i
|
Start insert
under the cursor
|
a
|
Start insert
immediately after the cursor
|
o
|
Insert empty
line below cursor and start insert at beginning of line
|
O
|
Insert empty
line above cursor and start insert at beginning of line
|
/pattern
|
Search forward
for next word matching pattern.
|
?pattern
|
Search backward
for next word matching pattern.
|
n
|
Repeat previous
search
|
N
|
Repeat previous
search in reverse direction.
|
x
|
Delete character
under cursor
|
dd
|
Delete current
line
|
dw
|
Delete current
word
|
db
|
Delete previous
word
|
d/pattern
|
Delete from
cursor to next word matching pattern
|
Command Structure
Basic command structure:
[rep-count] command [span of
control]
Breaking this down: rep-count gives
the number of times the command is to be repeated and the span of control
modifies the amount of the editor buffer that the command will affect.
For example with the delete command, the span of control can cause
the next word, the next line, or the rest of the file to be deleted.
| If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support! |
|
|
Home -
Table Of Contents - Contact Us
CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005
Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.
|