QL Text Editor - Supplementary notes 1. Looks The default start-up window for the EDITOR has been made horrible to encourage you to use Edt_Config.... This program allows you to change many aspects of the EDITOR's operation - file defaults, device defaults, screen size/placement/colour etc etc - so do look at it. 2. Command file processing A demonstration command file is included on the distribution tape. The file is called Demo_CMD. If you want to see the effect of the file, type the following command in Editor (as usual prefixed by the F3 key): rc.flp1_demo_cmd The demonstration will last for a couple of minutes. 3. Files used within Editor Editor is set up as a multi-tasking program - ie; it does not have to be the only thing going on in the machine. It is therefore important to know what files the Editor has open at any time, to allow you to change disks, microdrive tapes etc. The answer is that Editor almost always has no files open. The particular exceptions are as follows: - when reading in a file (during the r, ru and af commands) - when writing a file (during the w, wr and bw commands) - when providing on-screen help (during F1, F1/SHIFT sequence) - when processing a command file (during the rc command) If you give Editor the command to write a file called "fred", and then detach from Editor (using CTRL/C) into SuperBASIC and say something like: copy mdv2_fred, ser1hz as an attempt to send the file to the printer (or whatever is attached to serial port 1), then the operating system may well respond with an "in use" message, indicating that Editor has not yet finished writing the file. You should wait until the Editor indicates that the command has been completed, and then retry the SuperBASIC command. 4. New commands Several new commands have been added which are not documented in the manual. The commands include a scan for lines in excess of a given length, recall last deleted line, cursor to start of paragraph, set indent for first line of paragraph, and a new family of commands to support "asymmetric tabs". The relevant information follows. 4.1 New commands - NL Cursor to Next Longer line NS Cursor to Next Shorter line Command: NL Example: (1) NL (2) NL 120 Qualif: Optional numeric Effect: The number is treated as the minimum (NL) or maximum (NS) line length of a line to be located. If the number is not specified, Editor assumes the maximum (NL) or 0 (NS) line length. The number specified may not exceed the maximum line length. The default form of the NL command may be used to locate 'incomplete' lines in a file which, on reading, resulted in the message "Lines truncated". The command will cause Editor to scan (forward) for the next line whose line length is equal to or greater than/less than (NL/NS) the specified or default number. If such a line is located, the cursor is moved to the logical end of the line. Data: Not affected Error: Number too big; Search failed 4.2 New command - UD Undo Deleted line Command: UD Example: UD Qualif: None Effect: The text of the last deleted line (if any) is inserted as a new line prior to the line currently containing the cursor. Data: Affected Error: Out of memory 4.3 New command - CP Cursor to start of next Paragraph - CPB Cursor to start of next Paragraph Backwards. Command: CP Example: (1) CP (2) CPB Qualif: None Effect: The cursor is moved to column 1 of the line which commences the next paragraph (i.e. a non blank line following a blank line) or to the last column of the last line of the file. If using the CPB variant the cursor is moved to the first column of the first line of the current paragraph if the cursor is within a paragraph: If the cursor is on the first line of a paragraph or between paragraphs it is moved to the first column of the first line of the previous paragraph; clearly this could be the start of the file. Data: Not affected Error: End of file; Tope of file This extended command corresponds to the new immediate command 'cursor to start of paragraph' - obtained using CTRL/ALT/DOWN arrow. The prior paragraph may be obtained using the complementary CTRL/ALT/UP. 4.4 New command - SI Set Indent margin Command: SI Example: SI 12 Qualif: Mandatory numeric Effect: The number is treated as the column number of the indent margin - where the first non-space character will appear on the first line of a paragraph. It may not exceed the maximum length of the line as defined in the Configurator (see section 8). Unpredictable results will later occur if indent margin stays greater than right margin. Data: Not affected Errors: Number expected; Number too big In addition, the reference to 'negative paragraph indents' in the third paragraph of section 6.9.7 should be ignored. 4.5 New command - TA Tabs Asymmetric set Command: TA Example: TA 5,12,21 Qualif: Mandatory numeric, up to 15 - comma delimited Effect: Each number is treated as the column number of the tab point required. Any tab points previously defined are ignored. No tab point may exceed the maximum length of the line as defined in the Configurator (see section 8). Data: Not affected Errors: Number expected; Number too big 4.6 New command - TR Tab points Remove Command: TR Example: TR Qualif: None Effect: Any tab points previously defined are removed. Data: Not affected Errors: None 4.7 New command - TI Tab point Insert Command: TI Example: TI 17 Qualif: Mandatory numeric Effect: The number is treated as the column number of the tab point required. No problem if the column is already defined as a tab. No tab point may exceed the maximum length of the line as defined in the Configurator (see section 8). Data: Not affected Errors: Number expected; Number too big 4.8 New command - TD Tab point Delete Command: TD Example: TD Qualif: Mandatory numeric Effect: The number is treated as the column number of the tab point to be deleted. No problem if the column is not marked as a tab. The number may not exceed the maximum length of the line as defined in the Configurator (see section 8). Data: Not affected Errors: Number expected; Number too big 4.9 New command - TC Tabs Compression Command: TC Example: TC Qualif: None Effect: The current line is "compressed". This means that the ASCII tab character (value 9 - usually displayed as capital I with a bar) - is inserted at suitable places in the line to replace a string of successive spaces. This process is controlled by the current tab settings - see commands TA and TI. The cursor is positioned at column 1 of the line. Data: Affected Errors: None 4.10 New command - TE Tabs Expansion Command: TE Example: TE Qualif: None Effect: Tabs on the current line are "expanded". This means that an occurrence of the ASCII tab character (value 9 - usually displayed as capital I with a bar) - is replaced by a string of one or more spaces such that the succeeding character is positioned at the next higher tab point - if any. This process is controlled by the current tab settings - see commands TA and TI. Any tab characters that can not be matched to tab points are left unadjusted. The cursor is positioned at column 1 of the line. Data: Affected Errors: Out of memory 4.11 New command - Z Zap the current (memory) file Command: Z Example: Z Qualif: None Effect: The whole of the file in memory is deleted. If any changes have been made to the file since the last save, Editor requests confirmation of this command. Data: Affected Errors: None 5.1 Amended command - RP Indefinite repeat The termination action of the RP command has been extended. When the RP command is given 'directly' - i.e. not in a command file - it always terminates with an exception message - something like "Search failed" or "End of file" etc. This message now includes a number reporting the number of times that the repeated group of commands has been successfully executed - e.g. "Search failed 13". Previously, a command such as "rp f/fred/" while syntactically correct did not do much other than place the cursor on the last occurrence in the file of the string "fred". Now there is more point to such a command, since as well as the (same) cursor effect, it now reports how many occurrences of the string "fred" have been detected. Similarly, the command "t; rp cw" will report the number of 'words' in the file. 5.2 Amended commands - F and E Find and Exchange An additional feature has been added to the operation of string searching. If the search string delimiter is one of the two special characters "<" or ">", then the string match will only be true if the string is located at the beginning ('<') or end ('>') of a line. This new feature may be used in any combination with the existing features of these commands. Examples: fc>.> will find (look for) a line ending in full stop e<END IF>) will find a line containing 'IF' and with the line ending in 'END IF' 6. Page breaks ASCII 12 is the form-feed (FF) character - so insert CTRL/L (=chr$(12)) wherever you want a forced page-break. Alternatively, if you want an auto page-break at a defined line interval, a line in your command file will do the trick. For example, to get a page length of 57 lines you would use: rp 57n;i/*/ where * represents the CTRL/L keys together or rp 57n;ce;e//*/ Can you see what is the difference between the two? 7. Printer drivers Do NOT write to us about printer drivers - instead refer to section 10.6 in the manual. A command file containing global replace statements IS a printer driver! EDITOR gives you the power to design your own drivers: you are not restricted (as in Quill) to plugging values into a prewritten one. Your driver can be written to cope with underline, superscript, subscript, enlarged, condensed, NLQ, emphasised, double-strike, italics, backspaces, deletes, varying line spacings, different fonts, different character sets, even varying form lengths... Just sit down with your printer manual & read the section summarising the control codes. EDITOR is far more flexible than Quill - the only limitation is your printer itself! 8. Object files In the current release, executable program files (object files) which are edited within EDITOR are now written back in object file format, so the comments re SEXEC in section 6.10.2 of the manual may be ignored. 9. Fast searches For various reasons, the fastest way of string searching (the 'F' and 'E' commands) is to use a "case sensitive" search. This requires that the 'C' qualifier is applied to the search. Equally, searching forward is marginally faster than searching backward. 10. Configurator The Configurator program has been slightly extended. Two more features are now configurable. The first is the default 'data entry mode', which can be either Insert or Overstrike on start-up. The second is the default "data device" - which may be set to any valid device name. This means that file names used in the EDITOR command line need not specify a device name. For example, with a default device of "flp2_", the command "rc.convert_cmd." will be interpreted as "rc.flp2_convert_cmd". PLEASE NOTE THAT Configurator v1.04 IS COMPATIBLE WITH Editor v1.10 AND LATER - IT MUST NOT BE USED ON EARLIER VERSIONS OF Editor. CONVERSELY, Configurator v1.03 MUST NOT BE USED WITH Editor v1.10.