MPE/iX Shell and Utilities Reference Manual, Vol 2
vi(1) MPE/iX Shell and Utilities vi(1)
Objects that are deleted or otherwise manipulated have their original values placed in a buffer,
an area of computer memory that can hold text. There are several ways this can be done:
(a) You can use a named buffer. Buffers are named with single lowercase letters. To
place an object in a buffer, type a double quote " followed by the buffer name, fol-
lowed by the object manipulator command, as in
"adL
This deletes text from the current line to the bottom line on the screen and puts the
deleted text in buffer a. Normally, this sort of operation overwrites the current con-
tents of the buffer; however, if you use the same form but specify the buffer name in
uppercase, the object is appended to the current contents of the buffer. For example,
"AdL
deletes from the current line to the bottom line on the screen, and adds the deleted
text to buffer a.
(b) If you are deleting material and delete at least one full line, vi uses buffers num-
bered 1 through 9. The first time a full line or more is deleted, the text is placed in
buffer 1. The next time, the old contents of 1 are copied to 2, and the newly deleted
text is put into 1. In the same way, deleted text continues to be rippled through the
nine numbered buffers. When text is rippled out of buffer 9, it is gone for good.
(c) In all other cases, the object manipulated goes to the unnamed buffer. For example,
the unnamed buffer is used if you delete less than a line of text. The unnamed buffer
is like the other buffers, but doesn’t have a name.
The following examples show illustrate the use of buffers.
dL deletes text from current cursor position through to the bottom of the screen and
places it into buffer 1; it also ripples numbered buffers.
"ad/fred/+0
deletes the current line through the line containing the string fred into buffer a.
dw deletes the current word and places it in an unnamed buffer.
The object manipulator commands are:
c deletes the object and enters insert mode for text insertion after the current cursor po-
sition. If less than one line is changed, a dollar sign ($) is placed on the final charac-
ter of the object and typing goes directly over top of the current object until the dol-
lar sign ($) is reached. Additional text is inserted, and the existing text shifts to
make room for the new text.
1-654 Commands and Utilities