A block is one or more consecutive lines of text or records. These operations let a user mark a block, and then delete it, copy it, or move it from one place to another, either within or between corefiles.
Only complete lines can be marked. (In contrast, some editors allow users to start and end blocks in mid-line.)
The "copy-and-paste" facility of the operating system can also be used for copying but only if the block contains no accented characters. More information on this appears elsewhere.
Operation: Flag line
Purpose: Flag/unflag the cursor line
Default Key: <CTRL E>
Operation Number: 25
The operation marks, or "flags", the cursor line for subsequent deletion, transfer or copy, indicating this by placing a * symbol in its flag area. If a second line is flagged in the same corefile, the block between (and including) the two flagged lines is considered to be marked.
Attempting to flag a third line in a corefile causes the older of the existing flags to be removed.
If a star already appears on the cursor line, the Flag operation unflags it.
In record/template view, the flag appears on the top line of the text zone.
A common fingering problem (user accident) arises when the user wants to mark a single line, forgetting that two flags already appear within the corefile. The new flag replaces one of the old ones, but leaves a whole block unexpectedly marked for possible deletion. A useful precaution when marking a single line is to move the cursor off the line, and flag this new line twice. (The first operation removes the other old flag if there is one; the second removes the spurious new flag.) There is also an operation which clears all flags.
If you should inadvertently delete a large block, <CTRL T> gets it back.
Operation: Delete block
Purpose: Remove the marked block from the current corefile
Default Key: <CTRL D>
Operation Number: 27
The block is deleted from the current corefile and inserted to follow the cursor line in corefile 0, where it becomes the marked block. This allows it to be recovered by a subsequent Recover block operation.
In corefile 0, of course, the effect of the operation is a little different. The block is removed from its present position and reinserted following the cursor line. In other words, the operation acts as a block transfer.
Operation: Recover block
Purpose: Recover the flagged block from corefile 0, inserting it after the cursor line in the current corefile.
Default Key: <CTRL T>
Operation Number: 26
This is the inverse of the Delete block operation, bringing material back from corefile 0. The two operations, Delete block and Recover block, allow material to be transferred from one corefile to another, and from one place to another in the same corefile. The recovered block is flagged in the current corefile.
Realize, of course, that only one block in corefile 0 can be marked an one time. Deleting a new block removes the flags from an earlier one. Earlier blocks can still be recovered, however, by going to corefile 0 and flagging them.
In corefile 0, the effect is exactly the same as for Delete block.
Operation: Copy block
Purpose: Copy the marked block and insert it following the cursor line in corefile 0
Default Key: <CTRL B>
Operation Number: 35
This is similar to Delete block, but doesn't remove the marked block from the current corefile (though it does unflag it). The copied block becomes the marked block in corefile 0. The two operations, Copy block and Recover block, allow material to be copied from one corefile to another, and from one place to another in the same corefile.
In corefile 0, the effect of the operation is simply to copy the marked block to follow the cursor line. It is fine for the cursor line to be within the marked block, and the copy behaves as you would expect.
Rectangle operations are the vertical counterpart of block operations, and are useful for working with tabulated text, columns of numbers, and so on. They allow columns of material to be deleted, moved and copied.
Since tables usually form only parts of a larger text and since these operations are very damaging if applied inadvertently to non-tabular material, it is a precautionary requirement that a user must flag lines as well as columns to execute these operations. In other words, the operations affect a flagged rectangle. The user is, of course, free to mark the entire corefile.
Many of these operations refer to a rectangular buffer, the rectangle counterpart of corefile 0. There is only one such buffer at any time. Moving new material to it eliminates the old. The buffer is always as large as it needs to be. We denote it here by R.
There are rather more rectangle operations than block ones.
Operation: Flag column
Purpose: Flag/unflag the cursor column
Default Key: <ESC> <ESC> <CTRL E>
Operation Number: 83
This is analogous to Flag line. It flags the cursor column, indicating this with a * symbol in the second line of the display. If a second column is flagged in the same corefile, the columns between (and including) them are considered marked. Together with one or two line flags, this defines the marked rectangle.
Attempting to flag a third column in a corefile causes the older of the existing column flags to be removed.
If a star already appears on the cursor column, the Flag column operation unflags it.
Operation: Delete rectangle
Purpose: Delete the marked rectangle, storing a copy in R
Default Key: <ESC> <ESC> <CTRL D>
Operation Number: 84
The rectangle is deleted and the lines closed up. The deleted material is held in R, from which it can be recovered by other rectangle operations. The flags remain intact.
See also Clear rectangle
Operation: Recover-insert rectangle
Purpose: Insert a copy of R at the position of the cursor
Default Key: <ESC> <ESC> <CTRL T>
Operation Number: 85
A copy of R is inserted with its top left corner in the position of the cursor. The text starting at the cursor column on each of the affected lines is shifted right to accommodate the rectangle. R remains intact, and can be used again.
See also Recover-overwrite rectangle
Operation: Copy rectangle
Purpose: Copy starred rectangle to R
Default Key: <ESC> <ESC> <CTRL B>
Operation Number: 86
The marked rectangle is copied to R. It remains intact in the text.
Operation: Recover-overwrite rectangle
Purpose: Overwrite the text at the cursor with a copy of R
Default Key: <ESC> <ESC> <CTRL O>
Operation Number: 88
A copy of R is overwritten on the text, with its top left corner in the position of the cursor. Existing material in this region will be lost. R remains intact, and can be used again.
See also Recover-insert rectangle
Operation: Clear rectangle
Purpose: Clear the marked rectangle storing a copy in R
Default Key: <ESC> <ESC> <CTRL C>
Operation Number: 89
Similar to Delete rectangle, but the text is cleared (i.e. overwritten with spaces), not closed up.
Operation: Move rectangle
Purpose: Move the marked rectangle to the position of the cursor
Default Key: <ESC> <ESC> <CTRL M>
Operation Number: 90
The marked rectangle is cleared (overwritten with spaces) and a copy is overwritten at the cursor position. A copy is also put in R. This is a combination of Clear rectangle and Recover-overwrite rectangle.
Operation: Insert several columns
Purpose: Insert blank columns starting in the cursor column
Default Key: <ESC> <ESC> <CTRL M> <number> <RETURN>
Operation Number: 87
This is analogous to Insert several lines. It too requires a parameter. <number> is an integer, which is terminated by the <RETURN>. This many blank columns are inserted starting in the cursor column on each line of the flagged block. The text on each line is shifted right to accommodate the blank spaces.
Operation: Clear all stars
Purpose: Clear all stars in the current corefile and restore TYPING submode
Default Key: <ESC> <ESC> <CTRL S>
Operation Number: 91
This operation, in effect a "reset", is really intended for the situation where IVI is being controlled by a lengthy procedure or driver program (see IVI Functions, etc.) In these circumstances, it may be difficult for the procedure to keep track of the current state of the flags and submode. This allows the procedure to start from scratch.