EDT is the DEC Standard Editor. EDT allows line-oriented editing on all terminals and character-oriented editing on video terminals. EDT can be invoked from MCR with the command EDT. The command line may include the name of an infile or an outfile, or neither, in the following format EDT>[outfile=] [infile] The following commands are available from within EDT CHANGE COPY DELETE EXIT FIND INCLUDE INSERT MOVE PRINT QUIT REPLACE RESEQUENCE RESTORE SAVE SET SHOW SUBSTITUTE TYPE WRITE XEQ For help on these commands, type HELP EDT command. HELP EDT CHANGE displays help on Character Mode. See also HELP EDT EXAMPLES, HELP EDT BUFFERS and HELP EDT RANGE. 2 EXAMPLES Here are some EXAMPLES of EDT commands issued in Command Mode: *DELETE 10:30 Delete lines 10 through 30. *INSERT 300 Open insert just ahead of line 300. *M 20:200 %TO =A 500 Delete lines 20 through 200 from the current buffer and place them in buffer A just ahead of line 500. *QUIT Terminate EDT without creating an outfile. *EX Terminate EDT and create an outfile consisting of the contents of buffer MAIN. *RES Resequence line numbers in increments of 10 starting with line 10. *S/Able/Baker/%WH Substitute 'Baker' for every instance of 'Able' in the current buffer. See HELP EDT CHANGE EXAMPLES for Character Mode subcommand examples. 2 BUFFERS A buffer in EDT is a text storage area. The editing commands you issue affect text in buffers. By default, EDT creates a buffer called MAIN, but you can create other buffers to contain text which, for some reason, you wish to hold apart from the main text. You can move lines and groups of lines from one buffer to another. The EDT EXIT command creates an output file from the contents of the MAIN buffer. EDT creates a text buffer when you give the buffer a 1-to-6 character name preceded by an equals ( = ) or by %BUF. There is no limit to the size of buffers, but EDT assigns no line numbers higher than 65535. The number of buffers you can create is determined by your system manager when EDT is installed, but you should always be able to use at least 2 alternate buffers. 2 RANGE When you issue an EDT command, you often must specify what portion of the text buffer you wish the command to affect. A portion of a buffer is called a RANGE. A range can be as small as a single line or as large as an entire buffer. Here are some examples of range specification: *TYPE 2250 Move line pointer to 2250 and display the line. *2250 Move line pointer to 2250 and display the line. *S/YOU/ME/2250:4000 Replace all instances of 'YOU' with 'ME' from line 2250 through line 4000. *COPY 2250;60 %TO =A Copy 60 lines starting with 2250 into buffer A. Buffer A need not exist when the command is issued. *DELETE Delete the current line. *%WH Display the contents of the current buffer with line numbers. 2 CHANGE C[hange] [range] [/NL] Invokes EDT Character Editing Mode on a video display terminal. 'range' specifies the lines that you will have access to in Character mode. If no range is specified, you can access the current buffer. /NL allows you to delete form feeds, line feeds, and carriage returns. Character Mode subcommands either move the cursor or affect the text. CURSOR subcommands TEXT subcommands BL beginning of line D delete BR beginning of range EX exit to Command Mode BW beginning of word I insert C move so many characters QUIT quit and write no file EL end of line R replace ER end of range S/a/b/ substitute EW end of word CTRL-Z terminate insert L move so many lines See HELP CHANGE CURSOR, HELP CHANGE TEXT and HELP CHANGE EXAMPLES for more details. 3 TEXT Character Mode includes a number of subcommands to affect the TEXT in a buffer. See also HELP CHANGE EXAMPLES. I allows you to insert text just ahead of the cursor position. terminates insertion. EX terminates Character mode. Returns to Command Mode. QUIT terminates EDT session without making a new file. S/m/n substitutes 'n' for next instance of 'm'. The following two commands require a repetition count and a unit type. Acceptable unit types are C for character, W for word, and L for line. Repetition counts can be preceded by a minus ( - ) if you wish to count 'up' in the buffer. The default is to count 'down'. Dnu deletes 'n' characters, words, or lines. Rnu deletes 'n' characters, words, or lines, and allows you to insert text. 3 CURSOR Character Mode includes a number of subcommands that permit you to move the CURSOR. See also HELP CHANGE EXAMPLES. BL moves cursor to the beginning of the current line. BR moves cursor to the beginning of the range specified in CHANGE command. BW moves cursor to the beginning of the current word. EL moves cursor to the end of the current line. ER moves cursor to the end of the range specified. EW moves cursor to the end of the current word. You can also move the cursor by specifying a repetition count and a unit type. Repetition counts can be preceded by a minus ( _ ) if you wish to move the cursor 'up' in the buffer. The default is to move 'down'. The default 'n' is 1. [-][n]C move the cursor the given number of characters. [-][n]L move the cursor the given number of lines. [-][n]W move the cursor the given number of words. 3 EXAMPLES Here are some EXAMPLES of Character Mode subcommand lines. All subcom- mands commence operation at the current location of the cursor. 6W move the cursor to the beginning of the 6th word 'down'. -25C move the cursor 25 characters 'up'. D6C delete the next 6 characters. D-6C delete the preceding 6 characters. 33L move the cursor 'down' 33 lines. If the repetition count is 33 or fewer lines, the text scrolls down. R6L delete the next 6 lines and open for insert. 'string search for next instance of 'string' ' search for next instance of previously searched-for string. Character Mode permits you to add on commands up to 67 characters or the limits of your ingenuity, whichever comes first. Blanks optional. D6C 2W deletes 6 characters and moves the cursor 2 words 'down'. 44L 12W I -22L 22L moves cursor 'down' 44 lines, then 'down' 12 words, opens for insert, when insert closed with scrolls 'up' 22 lines and moves the cursor to the bottom of VT52 screen. 2 COPY CO[py] range-1 %TO range-2 [/keyword] /Q[uery] SEQ[uence]:initial-number:increment UN[sequenced] Copies the lines in range-1 to a position just ahead of the first line in range-2. The /Q keyword permits you to copy at your discretion. For each line in range-1, you can answer 'Y' to copy it, 'N' to skip it, 'Q' to quit, and A to copy the remaining lines without querying. The /SEQ keyword permits you to assign line numbers to the copied lines. The /UN keyword copies lines without assigning line numbers. 2 DELETE D[elete] [range] [/keyword] /Q[uery] Deletes the specified lines from the buffer you are editing. The /Q keyword permits you to delete at your discretion. For each line in the range, you can answer 'Y' to delete it, 'N' to skip it, 'Q' to quit, and 'A' to delete the remaining lines without querying. 2 EXIT EX[it] [/keyword] /RE:filespec Terminates EDT operation and writes the contents of the MAIN text buffer as the outfile. The /RE keyword permits you to name the outfile or override the name given when you invoked EDT. 2 FIND FIND range Moves the line pointer to the beginning of the range specified. Note that this command does not generate any terminal output. See HELP EDT TYPE. 2 INCLUDE INC[lude] [range] [/keyword] /FI:filespec /SEQ[uence]:initial-number:increment Locates a file and copies it into the specified text buffer just ahead of the specified range. The /SEQ keyword permits you to assign line numbers to the lines included. 2 INSERT I[nsert] [range] [/keyword] /SEQ[uence]initial-number:increment /UN[sequenced] Places the text you type at your terminal into a text buffer. Text will be inserted just ahead of the line pointer, or just ahead of the range you specify. The /SEQ keyword permits you to assign line numbers to the newly inserted lines. The /UN keyword inserts lines without numbering them. 2 MOVE M[ove] range-1 %TO range-2 [/keyword] /Q[uery] /SEQ[uence]:initial-number:increment Transfers lines from range-1 to ahead of range-2 and deletes them from the original location. The /Q keyword permits you to move lines at your discretion. For each line in range-1 you can answer 'Y' to move it, 'N' to skip it, 'Q' to quit, and 'A' to move the remaining lines without querying. The /SEQ keyword permits you to assign sequence numbers to the moved lines. 2 PRINT PR[int] [range] /FI:filespec Creates an output file consisting of all lines in the range, with line numbers, and having the name given. To create an output file without line numbers, see HELP EDT WRITE. 2 QUIT QUIT Terminates EDT without saving the contents of any buffer or creating a new file. See HELP EDT EXIT for information on creating output files. 2 REPLACE R[eplace] [range] [/keyword] /SEQ[uence]:initial-number:increment /UN[sequenced] Deletes lines in the range specified and opens insert to permit you to replace the lines. Terminate insert as usual with a . The /SEQ keyword permits you to assign line numbers to the replacing lines. The /UN keyword replaces lines without renumbering them. 2 RESEQUENCE RES[equence] [range] [/keyword] /SEQ[uence]:initial-number:increment /UN[sequenced] Assigns new line numbers to the lines in the range given. The /SEQ keyword permits you to override the default numbering system, which starts at line 10 and numbers in increments of 10. The /UN keyword removes line numbers from the range. 2 RESTORE REST[ore] /FI:filespec Locates the file created by an EDT SAVE command and uses the file to recreate all files and text buffers as they were when the SAVE command was issued in a previous session. This command must be the first command in an editing session, as shown here. EDT> *RESTORE /FI:CHOOCHOO.SAV When the * prompt returns, you are back exactly where you were when you issued the SAVE command. See HELP EDT SAVE. 2 SAVE SA[ve] /FI:filespec Preserves the contents of text buffers and the status of all files used during an EDT editing session in a file you specify. The use of the file type .SAV for this file is recommended but not required. You may want to issue SAVE commands throughout an editing session to assure the preservation of your edits. If you do not need these files, you can delete them at the end of the editing session. See HELP EDT RESTORE. 2 SET EDT allows you to establish criteria used by other EDT commands. For information on flagging upper-case or lower-case characters with an apostrophe, see HELP EDT SET CASE. For information on matching strings exactly (upper-case-to-upper- case and lower-case-to-lower-case) or inexactly (A-to-a and z-to-Z), see HELP EDT SET EXACT. For information on how to establish the correct parameters for your terminal, see HELP EDT SET TERMINAL. See also HELP EDT SHOW. 3 CASE SET CA[se] [/keyword] /UPPER /LOWER /NONE Permits you to flag either upper-case or lower-case characters with apostrophes, or to remove them with the /NONE keyword. The /NONE keyword specifies the default condition, neither upper-case, nor lower-case characters are flagged, as in this example 2950 ROller coasTERS HAVe their ups aNd DOWNS The /UPPER keyword flags upper-case characters, as in this example 2950 'R'Oller coas'T'E'R'S 'H'A'Ve their ups a'Nd 'D'O'W'N'S The /LOWER keyword flags lower-case characters, as in this example 2950 RO'l'l'e'r 'c'o'a'sTERS HAV'e 't'h'e'i'r 'u'p's 'aN'd DOWNS SET CASE affects only Command Mode. 3 EXACT SET EXACT [/keyword] /CASE /NONE Specifies how you wish string matching to be done. The /CASE keyword specifies that you wish to find a string that exactly matches what you have typed in. If you have issued SET EXACT CASE and request a search for the string 'BASIC' the string 'basic' will be ignored but the string 'BASIC' will be found. The /NONE keyword, which is the default, specifies that you wish to find strings with the same characters, but not necessarily the same case. If SET EXACT NONE is set, a request to search for the string 'BASIC' searches for both the string 'basic' and the string 'BASIC'. SET EXACT affects both Command Mode and Character Mode as well as the SUBSTITUTE commands. 3 TERMINAL SET TE[rminal] [/keyword] /HCPY /VT05B /VT50 /VT52 /VT55 /VT61 /LA30 /LA36 Specifies the terminal type that you are using. Correct terminal setting is mandatory for Character Mode. The default is set when EDT is installed. Use the keyword to enter the terminal type you are using. If you are not sure, try HCPY for any hard-copy terminal and VT52 for any video terminal. To find the current or default setting for your terminal, use the EDT SHOW TERMINAL command. See HELP EDT SHOW TERMINAL. 2 SHOW SHOW [/keyword] /BU[ffers] /CA[se] /EXACT /TE[rminal] /VE[rsion] Displays buffer and software version information and options estab- -lished by the SET command. *** The /BU keyword displays all buffers and their line count and identifies the current buffer with an equals ( = ). The /CA keyword displays UPPER, LOWER, or NONE. See HELP EDT SET CASE. The /EXACT keyword displays CASE or NONE. See HELP EDT SET EXACT. The /TE keyword displays the current terminal setting. See HELP EDT SET TERMINAL. The /VE keyword displays the current version number of the EDT software. 2 SUBSTITUTE S[ubstitute]/object-string/replacement-string/[range][/keyword] /BR[ief][:n] /Q[uery] /-T[ype] Searches for the object-string and replaces it with the replacement- string. If you do not specify a range, only the first instance of the object-string is replaced. If either string includes a slash ( / ), *** you can use any other nonalphanumeric character as the string delimiter. The /BR keyword specifies that you do not want the whole line dis- played following a substitution. 'n' is the number of characters you wish displayed. The default 'n' is 10. The /Q keyword permits you to replace strings at your discretion. For *** each possible substitution, you can answer 'Y' to make the substitution, 'N' to skip it, 'Q' to quit, and 'A' to make all other possible substitutions in the range. The /-TYPE keyword specifies that you do not wish the substitutions displayed. The default is to display them. 2 TYPE [T][ype] [range] Displays lines of text at your terminal. You do not need to type in the command, but only the range you wish displayed. If you do not type in a range, the next line is displayed. 2 WRITE WR[ite] [range][/keyword] /FI:filespec Creates an output file consisting of all lines in the range and having the name given. This file does not include line numbers. See HELP EDT PRINT for information on creating a file including line numbers. 2 XEQ XEQ range Executes a sequence of EDT commands previously entered at the given range.