Video TECO is a full screen CRT text editor for VT100, VT52 and ADM-3A terminals. The editor is programmed as a TECO macro for RSX-11M V34 TECO. No knowledge of TECO is required to use VTECO. All of the usual TECO functions are available in addition to screen- oriented editing functions. The VTECO editor maintains an image of a portion of the file being edited on the CRT screen. After each editing function the screen is updated to reflect the changes made. Characters and lines can be inserted, deleted, and copied in any palce on the screen. Characters typed are inserted on the screen (and in the file) at the point preceeding the cursor. Editing functions are performed by pressing the control key and striking one of the other keys. Functions implemented include: character insert/delete, line insert/delete/pick/put, search, cursor motion up/down/left/right and move to page top/bottom. As in standard TECO, VTECO works on the file in segments called pages. If the file contains form-feeds, then the pages are delineated by form-feeds. If not, then the pages are fixed length chunks (about 12000 characters). Pages are processed sequentially. Additional information: ---------------------- ADM3A COMMANDS VT100 COMMANDS OPERATING-PROCEDURE 2 ADM3A 3 COMMANDS command name description ------- ---- ----------- ctrl(n) help display keyboard commands. ctrl(z) exit terminate editing session. ctrl(m) insnxt (carriage return) - insert text after current line. ctrl(_) rewr rewrite screen. ctrl(\) +pag next page. ctrl(g) put insert previously picked lines. ctrl(b) mode toggle TTY shift lock. ctrl([) ESC has same function as escape key. ctrl(^) cshf control shift the next character typed. The following commands accept a repeat count which is entered by: ESC When the ESC key is pressed, the string "[Count]:" appears at the top fo the screen to prompt for the repeat count. This string is not entered in the file. Note that entering the command by itself is the same as specifying a repeat count of 1. If no repeat count is specified it is assumed to be zero. To leave arg mode without performing an editing function, type ESC again, to correct a mistake, type . command name description ------- ---- ----------- ctrl(h) curL move cursor left. (0 = beginning of line) ctrl(j) curD (line feed) move cursor down. (0 = end of page) ctrl(k) curU move cursor up. (0 = top of page) ctrl(l) curR move cursor right. (0 = end of line) ctrl(u) +mov move forward 20 lines. ctrl(i) tab insert tab(s) ctrl(w) inss insert space(s) ctrl(d) open open a group of lines. ctrl(a) clos close up lines. (0 = delete to end, - = delete to begin.) ctrl(f) pick pick up a group of lines. ctrl(e) rmch remove character at current cursor position. ctrl(]) teco execute user TECO string. (0 = enter new string) ctrl(p) top top of file (0 = bottom of file) The following commands accept a string argument. Commands are issued in the following form: ESC ESC ESC command name description ------- ---- ----------- ctrl(r) srch search for character string. ctrl(t) grsc global search for character string. As with the commands accepting repeat counts above, a prompt for a repeat count "[Count]:" will first appear at the top of the screen. After the command is entered, it will be replaced with the prompt for the search string "[Search]:". At this time the search string should be entered. A search string will remain defined until it is redefined via the command sequence above. However there are a couple of other useful forms of the search commands: find next occurrance of search string. ESC ESC ESC find the nth occurrance of the search string. The last command is used to terminate editing on the current file and to start editing on either another existing file or a new file. This command has the following format: ESC ctrl(v) ESC ESC where is the name of the file you wish to edit and = 0 if you wish to create a new file or .NE. 0 if you wish to edit an existing file. As with other commands which accept a repeat count above, a prompt for a count "[Count]:" will appear at the top of the screen. After entering the number and the command, one of the following prompts will appear at the top fo the screen depending on the value of the number entered (see above): "[Old file]:" if number .NE. 0 or "[New file]:" if number = 0. As with commands which accept a repeat count, several forms of this command are available which take advantage of the default repeat count rules: ESC ctrl(v) ESC ESC -- create new file ctrl(v) -- edit existing file Miscellaneous Editing Features ------------------------------ To insert text within a line, position the cursor to the character which will follow the inserted text and then type in the desired text. Note that will delete the current character. 2 VT100 3 COMMANDS EDITOR COMMANDS: Characters The simplest editor function is character insertion. Every non-control character typed is inserted just before the current cursor position. As in RSX11M MCR mode for CRT's, typing the RUB key deletes the character preceding the cursor. To remove characters at the current cursor position, type the command. EDITOR COMMANDS: Lines Lines or groups of lines can be deleted (the command), inserted (the command), copied into the buffer (the command), and copied back into the file (the command). Any text deleted by the command is also saved in the buffer. All of these commands take a count argument which is entered by typing the ESC command key, then the numbers in the count, and finally the affected command key. For the , , and commands, the count indicates the number of lines affected. For the command, the count indicates the number of times the contents of the buffer is to be copied into the file. A zero or negative count to the command indicates that the contents of the buffer are to be copied into the file. NOTE: Because the and buffers are maintained in CPU memory, both buffers are limited in size and large or commands (more than about a thousand characters) may lead to a VTECO "?memory overflow" error message and an exit from the VTECO macro to TECO. However, there is no cause for panic, because none of the file will be lost. Typing the four keys M#I#ESC#ESC will restart VTECO. EDITOR COMMANDS: Pages and Files VTECO works on the file in chunks called pages (which have nothing to do with terminal screen pages or file system pages). These pages are processed sequentially, so that the page stored in CPU memory is the only portion of the file which can be modified. To move to the next page in the file, type the command; to move to the first page of the file, type the command; to move to the last page of the file, type the command. Sometimes the page break may fall in an inconvenient location (like the middle of a paragraph). To force page breaks in particular locations, type the character ctrl/L to insert form feeds at those locations. Because the active TECO page is stored in CPU memory and NOT on the disk, it can be lost if the system crashes and it should be protected by typing the command occasionally. Note that the sequence is a save command, and returns the editor to the same position in the file. Several different files can be accessed in one VTECO session by using the command to move from one file to another. If the indicated file does not exist, then VTECO will ask the user if he wishes to create a new file with that name. To examine a file without changing it, append the switch "/ro" to the file name and the file will be processed in READ-ONLY mode. Both the and text buffers are preserved when VTECO moves from file to file so that a user can move or copy chunks of one file to other files. However, because these text buffers are stored in CPU memory, the number of characters involved in and commands is limited. Large and commands must be split into sequences of smaller ones. To leave VTECO, type the ctrl(Z) command. The current file will be written out, the name of the current file saved in the file "DEFFIL.TEC;1", and the current terminal type will be saved in the file "TTYPE.TEC;1". To execute a one-line MCR command after leaving VTECO, type the key. Then, after writing the current file out to disk, VTECO will display the prompt "MCR:" and the MCR command can be entered. This MCR command is saved in the file "MCRFIL.CMD;1". In subsequent VTECO sessions, if the command is terminated with no text (i.e. a second is entered immediately following the first) then this MCR command will be executed after VTECO exits. MCR command files are particularly useful for compiling and executing programs. ARGUMENTS TO EDITOR COMMANDS Some editing commands can take numeric arguments (usually a count of the number of times the function is to be performed). Non-control keys also can take a numeric argument (the character is inserted that many times). The numeric argument is entered before the function to be performed by typing the ESC command. To leave argument entry mode without performing an editing command, type the ESC key again. If the key is pressed and no numbers are typed, then the numeric argument is taken to be#0. In most cases this represents a special function. For example, with the cursor commands , , , and a 0 argument means: move to beginning-of-line, end-of-page, beginning-of-page, and end-of-line. Four commands (, , , and ) also take string arguments. After the prompt (e.g., "File: ") appears at the top of the screen, the desired string can be entered (terminated by , which is not considered part of the string). To leave string entry mode, type the ESC key twice. Any command which accepts a string argument, if given a numeric argument of 0, will force entry of a new string. For example, if a previous string search for the string "xyz" has been performed, the keystroke will cause a search for the same string. However, the sequence will cause a prompt for a new string. Editor Commands (commands marked by * take numeric arguments) Command Description Execute a user TECO string. (0 = enter new string) Enter a numeric argument to the following function key. * Remove characters at the current cursor position (0 = remove argument of last search) * Search forward in the current page for a character string. * Search forward in file for a character string. * Enter the next character into the text without interpretation. Move to beginning of file (0 = save). Move to end of file (0 = find mark). * Delete lines. (0 = delete to end). Also copies the lines into the text buffer. * Insert lines. * Copy lines into the buffer. Copy text from the buffer into the file. (0 = copy text from the buffer) * Write out current page and get next page. * Rewrite terminal screen with cursor on indicated line. Write out the file and exit to MCR (0 = leave mark and exit). Perform a mcr command and exit if successful. Exit to TECO. Return to VTECO with M I ESC ESC. Edit another file (/ro = read-only). If the file does not exist, VTECO will create it on request. Print out the edit comands and summary on the screen. 2 OPERATING-PROCEDURES Video TECO is invoked by the MCR commands: > OLD filename ! to edit an existing file. > OLD * ! to resume editing a file. > NEW filename ! to create a new file. VTECO recognizes two swithes, "/DT" and "/RO". If you specify "/DT", VTECO will prompt you for your terminal type before the editing session begins. Note that VTECO expects only one character answers to these prompts so answer only "Y" or "N". If you follow your response with a carriage return, the carriage return will be interpreted as either a VTECO command if your answer was "Y" or a negative answer to the following prompt if your answer was "N". Other forms of the "/DT" qualifier include: /DT:A3A - terminal is an ADM3A /DT:V52 - terminal is a VT52 /DT:V1H - terminal is a VT100 If you do not specify the "/DT" qualifier, VTECO will prompt your for your terminal type the first time it is used to edit a file in a directory (VTECO remembers your terminal type by creating a file in your directory called TTYPE.TEC). It will therefore assume the same terminal type during subsequent editing sessions in that directory unless otherwise specified by the "/DT" qualifier. Specifying the "/RO" switch causes the file to be opened as read-only. VTECO will perform all commands specified during the editing session, but upon terminating the session the original file will remain intact. This feature is useful for examining files. Once the termial type has been determined, the first page of the file is then read into VTEC's buffer and the first screenful of the file is written onto the CRT screen. At this time, editing begins. See the section on VTEC commands for more information on editing. VTECO maintains all changes made to a file in a new version of the file. This means that after each editing session, you will have at least one new version of the file in your directory. This also means that while the editor is running, all work since entry to the editor or since the last "top" command can be lost in a system or editor crash. To minimize possible losses, do a "top" command about once every fifteen minutes. However, issuing a top command too often will use up a lot of disk space since each "top" produces a new version of the file. If the system should crash while you are editing, the latest version of the file will be empty. To confirm this type: > "PIP filename;*/LI". If the highest numbered version has a size of 0 blocks, delete it by typing: > "PIP filename;0/DE". The previous version will be valid. If the VTECO macro crashes (usually an error message and the TECO prompt "*" will be typed out), then the editing session can be continued by typing: MI ESC ESC. If this does not work, the session can still be saved by typing: EX ESC ESC. If all else fails, kill TECO by typing: (the current version of the file will be lost). Please report any VTECO macro crashes. Finally, after exiting the editor, PLEASE purge your files.