O, OK—Overlay Lines
When data is to be copied or moved by the C (copy) or M (move) line commands and overlaid on one or more existing lines of data, the O (overlay) line command specifies the destination for the data.
The data that is copied or moved overlays blanks in the destination lines of data. This allows you to rearrange a single-column list of items into multiple column, or tabular, format.
- Where the destination is a single line:
- The O (overlay) line command specifies the destination for the
data.
You can type a number after the O line command to specify the number of times that the M or C line command is to be performed. For example, typing the command
O3
against a line causes the data to be moved or copied and then overlaid on that line and also the next two lines.
- The O (overlay) line command specifies the destination for the
data.
- Where the destination is a block of lines:
- The OO (overlay, multiple-line target) line command specifies the first and last line of the destination for the data.
- Where each destination is a single line:
- The OK (overlay, intermediate target) line command specifies each
intermediate destination (but not the final destination) for the data.
You can type a number after the OK line command to specify the number of times that the M or C line command is to be performed. For example, typing the command
OK3
against a line causes the data to be moved or copied and then overlaid on that line and also the next two lines. - The O (overlay) line command specifies the final destination for
the data.
You can type a number after the O line command as previously described.
- The OK (overlay, intermediate target) line command specifies each
intermediate destination (but not the final destination) for the data.
- Where each destination is a block of lines:
- The OOK (overlay, intermediate multiple-line target) line command specifies the first and last line of each intermediate destination (but not the final destination) for the data.
- The OO (overlay, multiple-line target) line command specifies the first and last line of the final destination for the data.
Syntax
- n
- The number of lines to be overlaid. If you do not type a number, or if the number you type is 1, only one line is overlaid.
Description
To overlay one or more single lines:
- Type either
M
orC
in the line command field of the line that is to be moved or copied. - To specify a single destination for the data that is to
be moved or copied, type
O
in the line command field of the line that the moved or copied line is to overlay.To specify multiple destinations for the data that is to be moved or copied:
- Type
OK
in the line command field of each intermediate destination line (but not the final destination line) that the moved or copied data is to overlay.To overlay data in the lines following an intermediate destination line, type a number after the OK line command to specify the number of times that the M or C line command is to be performed.
- Type
O
in the line command field of the final destination line that the moved or copied data is to overlay. The final destination line must come after all the intermediate destination lines.To overlay data in the lines following the final destination line, type a number after the O line command to specify the number of times that the M or C line command is to be performed.
- Type
- Press Enter. The data being moved or copied overlays the specified line or lines.
To overlay one or more blocks of lines:
- Type either
MM
orCC
in the line command field of the first and last lines of a block of lines that is to be moved or copied. You can scroll (or use FIND or LOCATE) between typing the first command and the second command, if necessary. - To specify a single destination for the data that is to
be moved or copied, type
OO
in the line command field of the first and last lines that the block of lines being moved or copied is to overlay. Again, you can scroll (or use FIND or LOCATE) between typing the firstOO
and the secondOO
, if necessary.To specify multiple destinations for the data that is to be moved or copied:
- Type
OOK
in the line command field of the first and last lines of each intermediate destination (but not the final destination) that the block of lines being moved or copied is to overlay. - Type
OO
in the line command field of the first and last lines of the final destination that the moved or copied data is to overlay. The lines of the final destination must come after all those of the intermediate lines.
- Type
- Press Enter. The lines that contain the two CC or MM commands
and all of the lines between them overlay the lines that contain:
- Each pair of OOK commands and all of the lines between them.
- The two OO commands and all of the lines between them.
Only blank characters in the lines specified with O or OO (or OK or OOK) are overlaid with characters in the corresponding columns from the source lines. Characters that are not blank are not overlaid. The overlap affects only those characters within the current column boundaries.
The number of source and receiving lines need not be the same. If there are more receiving lines, the source lines are repeated until the receiving lines are gone. If there are more source lines than receiving lines, the extra source lines are ignored. The overlay operation involves only data lines. Special lines such as MASK, TABS, BNDS, and COLS are ignored as either source or receiving lines.
Examples
Figure 1 illustrates
the O (overlay) line command. Suppose you were editing a list in a
single left-adjusted column and wanted to place portions of the list
side-by-side. First, using the ) (column shift right) command, shift
a portion of the list the appropriate amount to the right to overlay
in a multiple column format. Next, type MM
in the
line command field to mark the beginning and end of the block of lines
you want to move, then type OO
in the line command
field to mark the destination of the lines you want to overlay.
When you press Enter, the editor overlays the lines you marked to move on the destination block. See Figure 2.