VI Editor
Page 44
7950 SR OS Basic System Configuration Guide
Using the vi Commands
Use the following commands to start and end
vi
edit sessions, move around in a file, enter new
text, modify, move, and delete old text, as well as read from and write to files other files. Although
there are numerous
vi
commands, only a few are usually sufficient to
vi
users. The following
tables list
vi
commands.
•
Cutting and Pasting/Deleting Text in vi on page 44
•
•
Moving the Cursor Around the Screen on page 45
•
Table 11: Cutting and Pasting/Deleting Text in vi
vi Command
Description
"
Specify a buffer to be used any of the commands using buffers. Follow the
"
character with a letter or a number, which corresponds to a buffer.
d
Deletes text. “
dd
” deletes the current line. A count deletes that many lines.
Whatever is deleted is placed into the buffer specified with the
"
command. If
no buffer is specified, then the general buffer is used.
D
Delete to the end of the line from the current cursor position.
p
Paste the specified buffer after the current cursor position or line. If no buffer
is specified (with the
"
command.) then 'p' uses the general buffer.
P
Paste the specified buffer before the current cursor position or line. If no buffer
is specified (with the
"
command.) then
P
uses the general buffer.
x
Delete character under the cursor. A count tells how many characters to delete.
The characters will be deleted after the cursor.
X
Delete the character before the cursor.
y
Yank text, putting the result into a buffer.
yy
yanks the current line. Entering a
number yanks that many lines. The buffer can be specified with the
"
command. If no buffer is specified, then the general buffer is used.
Y
Yank the current line into the specified buffer. If no buffer is specified, then
the general buffer is used.
Table 12: Inserting New Text
vi Command
Description
A
Append at the end of the current line.
I
Insert from the beginning of a line.
Summary of Contents for 7950 XRS Series
Page 8: ...Page 8 7950 SR OS Basic System Configuration Guide List of Tables...
Page 10: ...Page 10 7950 SR OS Basic System Configuration Guide List of Figures...
Page 14: ...Preface Page 14 7950 SR OS Basic System Configuration Guide...
Page 46: ...VI Editor Page 46 7950 SR OS Basic System Configuration Guide...
Page 76: ...File Management Tasks Page 76 7950 SR OS Basic System Configuration Guide...
Page 78: ...File Command Reference Page 78 7950 SR OS Basic System Configuration Guide...
Page 172: ...Basic CLI Commands Page 172 7950 SR OS Basic System Configuration Guide...
Page 184: ...Configuration Notes Page 184 7950 SR OS Basic System Configuration Guide...
Page 214: ...DNS Configuration Commands Page 214 7950 SR OS Basic System Configuration Guide...
Page 220: ...Show Commands Page 220 7950 SR OS Basic System Configuration Guide...
Page 494: ...System Commands Page 494 7950 SR OS Basic System Configuration Guide...
Page 500: ...Standards and Protocols Page 500 Standards and Protocols...