Add (Adding New Lines)
Add some new lines from the terminal keyboard. Insert them at a given line number or after it.
ADD [ linenum ]
(Q=no linenums, J=justified, T=template)
(Default: linenum = *)
The linenum parameter specifies where to add new lines and also determines the increment between new lines. If linenum is 9.1, lines will be incremented by 0.1; if 9.01, then 0.01. If linenum already exists, Qedit increments it and begins adding after the existing line. If linenum is 0, Qedit adds new lines before the first existing line in the file. If you don't say which linenum, Add inserts the lines after the current position (*). (See Miscellaneous Points below.)
Examples
/add 5 {add new lines after line 5}
5.1 line a {Qedit prompts with line number}
5.2 line b {you enter line of text and Return}
5.3 // {you enter // or Control-Y to stop}
/aq {add after * line; no prompt}
This is new text
// {end the Add command}
Temporary Workfile
If you do not have a named workfile Open when you Add, Qedit automatically builds a temporary workfile for you. This file has a random file name and is created in /var/tmp
by default. If you want to have temporary files in a different directory, enter the new path name in the TMPDIR environment variable.
TMPDIR=/home/user1/tmp
export TMPDIR
Keep in mind that Qedit works with absolute filenames and these names can not have more than 240 characters.
If you make any changes to the file (e.g., by adding lines), Qedit will ask if you want to save your changes when you exit.
Using the Tab Key
By default, Qedit defines tabs every 8 columns across the line (every 10 for Qedit/MPE). You can override these default tab stops using Set Tabs Stop n (every 2 to 15 characters) or Set Tabs 5 10 22 28 ... for completely custom tab stops. When you press the tab key as you Add lines, Qedit correctly inserts spaces in your lines and skip to the correct column on your screen (assuming you are using an HP terminal).
Overflowing Lines or Line Numbers
The Add command continues prompting until you press Control-Y, or you type "//" at the end of a line, or you run out of line numbers. When you exhaust the line numbers possible between two lines, Qedit prints "Error: Already". You can continue by doing a range Renumber on the area where you wish to add more lines. Thus, if your last line added was 4.999, use Renum 4/5 to spread out the lines between 4 and 5.
You can configure Qedit to automatically renumber part of the file so that you do not have to renumber it manually. See the Set Visual Renum option.
Line Wraparound
If you enter a line that is too long, Qedit divides it into several lines. Set Wraparound ON divides lines on "word" boundaries only. Any words that will not fit on the current line are moved to the next line. If only a small number of words are moved to the next line, Qedit prompts you to complete the line. To end the Add when this happens, press Return before typing "//". If you are editing FORTRAN source code, Qedit generates a valid continuation line for you.
Automatically Indenting Lines
AJ for justified is a special option to indent new lines. The linenum you specify must be an existing line. You enter new lines beneath it. Qedit will then indent the new lines by exactly the same number of spaces as the existing line. You can shift the indentation left by typing {'s at the start of a line, or shift it right with }'s. To redefine the { and } characters, use Set Zip.
Modifying a Line During Add
When you know you made a typo, and prefer to fix it now instead of going on, the auto-modify character will help you. Enter the command Set Zip []@{}#, or better yet, put it in your Qeditmgr configuration file. The # character (or other special character of your choice) is called the auto-modify character. It allows you to modify the line you are currently entering. Type "#" at the end of the line, and Qedit redisplays the line for you to modify. When you are done with the Modify, you press Return to continue adding new lines.
Miscellaneous Points to Note
If you have Set Left/Right margins, the new lines added will have spaces to the left and right of the margins. That is, the line you enter will be left-justified within the current margins of the workfile.
The maximum default increment between new lines is 1.0 (or 0.1 for standard COBOL files). You can change this default with Set Increment.
You can ask Qedit to remove nonprinting characters from your input lines using Set Editinput Data ON. If you do not wish to allow the extended Roman-8 characters, use Set Editinput Data ON Extend OFF.