1 TECo TECO invokes the TECO text editor. TECO is an unsupported editor capable of both basic editing and complex programmed string processing. Formats TECO file-spec to edit an existing file TECO out-file-spec=in-file-spec to edit from one file to another MAKE file-spec to create a new file MUNG cmd-file-spec to execute a TECO command file MUNG cmd-file-spec,text-arg as above, but passes a text argument Additional help may be obtained by typing "AID TECO keyword" where "keyword" is one of the following: BEGINNER -- aid for beginners MANUAL -- info on TECO documentation VTEDIT -- screen editor MUNG -- execute canned TECO macros INITIALIZATION MEMORY -- re-editing same file KEYPAD VT52 KEYPAD VT100 -- Keypad drawings QUALIFIERS -- switches to control setup NOTE: If your terminal is a VTXXX or a Soroc, the system TECO.INI is used and VTEDIT is automatically invoked. On a hardcopy terminal, TECO starts normally. 3 CNTL/C's will exit with no changes to your file. To suppress initialization type TEC/NOIni filespec or see a TECO expert for help. 2 BEGINNER This HELP sequence gives help to beginners with TECO. ACCESS To create a new file: means carriage return MAKE filespec To modify a file that already exists: TEC filespec After getting the TECO * prompt, single letter commands can be entered to move the editor's pointer around within the buffer containing the contents of your file. Commands are entered by typing the key, then executed by typing the ESC key twice. Commands can be entered one at a time or in a long string followed by two escapes. In this and other TECO documentation, the ESCape key is indicated by a dollar sign ($). For a beginner's list of TECO commands, type AID TECO BEGINNER COMMANDS. For a short example, type AID TECO BEGINNER EXAMPLE. 3 COMMANDS BEGINNER'S LIST OF TECO COMMANDS COMMAND EXPLANATION EX Terminates TECO session, i.e. closes existing file and exits from TECO. Itext$ Inserts text into buffer at pointer location. FStext1$text2$ Searches through buffer for text1. If found, replaces with text2. If text1 is not found, an error message is given. T Types text from pointer to end of line. nT Types n lines from pointer. HT Types entire contents of buffer from beginning to end. V Types current line (verify). nV Types current line and n-1 lines above and below. J Jumps pointer to beginning of buffer. ZJ Jumps pointer to end of buffer. C Advances pointer one character. nC Advances pointer n characters. -nC Moves pointer backwards n characters. For more beginner's commands, type AID TECO BEGINNER MORE. 3 EXAMPLE SHORT TECO EXAMPLE (Text and commands typed by you are highlighted.) MAKE TRY.TXT *IThis is the first line of the file. The I command allows us to enter as many lines of input as we wish. $$ *EX$$ >TEC TRY.TXT *L$$ *T$$ The I command allows us to enter as many *CCCCCCCCCCCCCCT$$ -or 14CT allows us to enter as many *DDDDDDIPERMITS$V$$ -or 5DIPERMITS The I command PERMITS us to enter as many *HT$$ This is the first line of the file. The I command PERMITS us to enter as many lines of input as we wish. *EX$$ > 3 MORE MORE BEGINNER'S TECO COMMANDS COMMAND EXPLANATION L Advances pointer one line. nL Advances pointer n lines. -nL Reverses pointer n lines. 0L Moves pointer to start of current line (zero L). D Deletes character following the pointer. nD Deletes n characters following the pointer. -nD Deletes n characters preceding the pointer. K Kills (deletes) text from pointer to end of line, including the at end of line. nK Kills n lines of text from pointer. Stext$ From pointer position, searches for specified text in buffer. If text is found pointer is placed after text. If text is not found, an error message is given. ^C^C Emergency exit from TECO; no changes made to file will be saved. (^C means CTRL/C). 2 INITIALIZATION TECO decodes its commands with a built-in command decoder. If TECO finds a file named TECO.INI in your current default directory, its contents are executed as a TECO macro during startup. To disable the lookup of TECO.INI, the qualifier /NOINI can be used. 2 MANUAL There is a one hundred fifty page manual on TECO that explains all you ever want to know about the weird and wonderful world of TECO. TECO has more commands than the colonel has chickens, and probably no one ever learns them all. There is also a supplementary manual on VTEDIT and the various MUNG macros available. If you just want to look something up, Hans Goebel has nicely printed and bound copies of these documents. If you must have your own copy, use the PRINT command to print the following: DR2:[342,34]TECO.DOC DR2:[342,34]VTEDIT.DOC 2 MEMORY TECO automatically remembers the file being edited. The file's name is stored in a file named TECF00.TMP in your current default directory. If you invoke TECO without specifying a file-spec, TECO will read its memory logical and re-edit the last edited file. TECO's memory feature is completely inhibited by the /NOMEMORY qualifier. 2 QUALIFIERS /FIND Initially position to (find) the last marked position in the input file. Position is marked with the VTEDIT ESCape-F commands. /INSPECT Simply read the file-spec, don't create a new edited copy. /NOCREATE Do not automatically create a new file if the file specified by a TECO command doesn't already exist. /NOINI (/NOI) Do not attempt to find or use TECO's private initialization file TECO.INI. /NOMEMORY (/NOM) Do not read, create, or use TECO's memory file TECF00.TMP. /SCROLL Automatically enter split screen scrolling mode. The bottom 1/4 of the screen's lines are scrolled. /SCROLL:n sets the number of lines to scroll to n. /VTEDIT Automatically invoke the TECO keypad editor VTEDIT. /VTEDIT:HOLD Set the VTEDIT keypad editor into hold screen mode. /VTEDIT:SEEALL Set the VTEDIT keypad editor into SEEALL mode. (Shows CR, Tabs, etc) /VTEDIT:HOLD:SEEALL Set the VTEDIT keypad editor into both hold screen and SEEALL modes. 2 VTEDIT VTEDIT is a powerful screen oriented editing macro. While somewhat slow, it provides features that other screen oriented editors cannot match. If your terminal is a VT100 or eqivalent, the macro will be loaded and started automatically. To get on line help on using the keypad and most of the more usefull features, hit the "PF2" key after the macro starts. For more information on the VTEDIT macro, see the VTEDIT documentation. For more help type AID TECO MANUAL 2 MUNG MUNG is the rather cryptic acronym that (recursively) stands for "MUNG UNTILL NO GOOD". To execute a macro named SQU on a file named JUNK.MAC, for example you could use the following command sequence MCR>TECO /NOI/NOM *ERJUNK.MAC$Y$$ (that loads the file JUNK.MAC into memory) *EISQU$$ (that executes the macro) ... (then the macro executes and does its thing) There are several ways such a macro could exit, so I will not try to show them all. The much easier way to execute such a macro is MCR>MUNG SQU JUNK.MAC Note that the macro needn't be in your account before you can MUNG it. MUNG will first look in the account you are in, then in the library. There is a small library of macros in account DP1:[342,34] that are available for public use. If you want to customize any macros, please copy them to your own account first. If you have any questions, please see Hans Goebel. 2 KEYPAD Diagram of the vtedit keypad Options: AID TECO KEYPAD VT52 AID TECO KEYPAD VT100 3 VT52 )0 Keypad layout Other keys lqqqqqqqqqwqqqqqqqqqwqqqqqqqqqwqqqqqqqqqk x "RED" x "BLUE" x "GRAY" x "^" x CTRL/C Exit from macro x Save x Help x Unsave x Up In x CTRL/D Kill rest of line* x text* x x text x Column*x CTRL/K Kill line* tqqqqqqqqqnqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu CTRL/U Kill start of line x "7" x "8" x "9" x "v" x CTRL/W Set cursor line* x Open x Page* x Quote x Down in x CTRL/Y Yank next page* x line* x x next* x Column* x CTRL/Z Exit from macro tqqqqqqqqqnqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu BK SP Go to end of line* x "4" x "5" x "6" x ">" x DELETE Delete previous* x Up x Delete* x Delete x Cursor x 2 ESC's Repeat TECO command x line* xCharacterx last x Right* x CTRL/V Toggle Seeall mode tqqqqqqqqqnqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu Arguments x "1" x "2" x "3" x "<" x x Top x Bottom x Start x Cursor x All starred (*) commands x of page*x of page x of line x Left* x optionally take an argument tqqqqqqqqqvqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu entered as [-] x "0" x "." x Enter x x Down line* x Search* x Search x x x xargument*x mqqqqqqqqqqqqqqqqqqqvqqqqqqqqqvqqqqqqqqqj Type any character to start the macro: 3 VT100 )0 Type any lqqqqqqqwqqqqqqqwqqqqqqqwqqqqqqqk [ESC] ^A Append [no FF] text* key to x "PF1" x "PF2" x "PF3" x "PF4" x [ESC] ^B Delete [next] word* start x Save x Help x Paste x Teco* x ^D Kill rest of line* macro x Text+*x x text xcommandx [ESC] ^Eq Execute [iter] Q-reg q* tqqqqqqqnqqqqqqqnqqqqqqqnqqqqqqqu [ESC] ^F Forward [cont] over word* All (*) x "7" x "8" x "9" x "-" x ^Gq Get text from Q q commands x Open x Page* x Mark/ x File x ^K Kill line+* take opt x line* x x quote*x Searchx ^N File search* arg as: tqqqqqqqnqqqqqqqnqqqqqqqnqqqqqqqu [ESC] ^R Back [cont] over word* ESC [-] x "4" x "5" x "6" x "," x ^T[:]q Cut text to Q q+* x Up x DeletexDelete/x Top x ^U Kill start of line x Line* x char* xrestorexof filex [ESC] ^V Alter screen [hold] mode* tqqqqqqqnqqqqqqqnqqqqqqqnqqqqqqqu ^W Set line*/re-paint All (+) x "1" x "2" x "3" x E x ^x[:]q Save text in Q q+* commands x Top ofxBottom x Start x N x ^Y Yank next page* operate x page+*xof pagexof linex T x ^xx Insert ASCII("x")* from Dot tqqqqqqqvqqqqqqqnqqqqqqqu E x BK SP Go to end of line* to Mark x "0" x "." x R x DELETE Delete previous* if Mark x Down line* xSearch x Searchx ESC ESC Repeat RED-key command* is set x xagain *x arg * x ESC F Find front of file* mqqqqqqqqqqqqqqqvqqqqqqqvqqqqqqqj ESC H Display help frame To Exit: ^C Return to TECO ESC ^M Set left margin* ESC Z (or^Z) Exit from TECO ESC N Get next word* ESC - ^Z Kill output, exit ESC T Select words*