Add (Copying Lines within a File)

Add lines by copying duplicates of existing lines.

ADD linenum = rangelist

(Q=no display)

(Defaults: none)

The linenum parameter tells Qedit where to insert the copied lines. The number of decimal places in linenum tells Qedit how finely to number the new lines:

  /add 50 = 1/9           {new lines will be 50.1, 50.2, 50.3...}  /add 50.10=1/9          {new lines will be 50.10, 50.11, 50.12...}  

The rangelist parameter tells Qedit which lines to copy:

  /add 50.1 = 1/9 10/15 {'1/9 10/15' is the rangelist}  

Examples

  /list 4/8               {how lines look before the copy command}      4     aaaaaaaa      5     bbbbbbbb      6     cccccccc      7     dddddddd      8     eeeeeeee  /add 5 = 7/8            {copy lines 7 and 8 after line 5}      5.1   dddddddd      5.2   eeeeeeee  2 lines COPIED  /list 4/8               {how lines look after the copy command}      4     aaaaaaaa      5     bbbbbbbb      5.1   dddddddd      5.2   eeeeeeee      6     cccccccc      7     dddddddd      8     eeeeeeee  /aq 5 = 5               {duplicate line 5 after itself}  

Notes

Add prints each new line, unless you use AQ. When you copy lines, the rangelist must not include the linenum (e.g., /Add 5 = 4/6 is rejected because it would be an infinite loop). Qedit prints “Error: Already”. The lines copied are not deleted from the original location. You now have two copies of the lines (and a copy in the Hold0 file, see Add-Move). Add-Copy is like the Copy command of EDIT/3000.

If you have Set Left/Right margins, Qedit prints only the portion of each line within the margins. However, it will actually copy the entire line, including the portion outside of the current margins.

Add (Copying Lines within a File)