Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site unmvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!genrad!panda!talcott!harvard!cmcl2!lanl!unm-la!unmvax!wampler From: wampler@unmvax.UUCP Newsgroups: net.sources Subject: TVX: PD Editor (7a of 7, repost) Message-ID: <968@unmvax.UUCP> Date: Thu, 16-Jan-86 12:34:08 EST Article-I.D.: unmvax.968 Posted: Thu Jan 16 12:34:08 1986 Date-Received: Sat, 18-Jan-86 08:59:10 EST Distribution: net Organization: Univ. of New Mexico, Albuquerque Lines: 1144 This was originally one article, 7 of 7, but has been split to keep files < 64k. Use cat to recombine 7a and 7b. #--------CUT---------CUT---------CUT---------CUT--------# ######################################################### # # # This is a shell archive file. To extract files: # # # # 1) Make a directory (like tvx) for the files. # # 2) Write a file, such as "filen.shar", containing # # this archive file into the directory. # # 3) Type "sh file.shar". Do not use csh. # # # ######################################################### # # echo Extracting tvx_refa.doc: sed 's/^X//' >tvx_refa.doc <<\SHAR_EOF X X X X X X TVX Reference Manual X X X X This is the Reference Manual for TVX, a public domain screen Xeditor written in C by Dr. Bruce E. Wampler. (Current address: Dr. XBruce E. Wampler, University of New Mexico, Department of Computer XScience, Farris Engineering Center, Albuquerque, NM 87131). Any Xcomments, bug reports, or suggestions should be sent to that address. XThis manual contains the formal descriptions for each editor command. XAn appendix gives some notes for installing TVX on various systems. XThe name TVX is derived from "TV" editor for any terminal ("X"). X X X X*** GETTING STARTED *** X X To edit a file using TVX, enter the following command line: X X tvx filename -switch1 -switch2 ... X X The file name specified is the file to be edited, and must obey Xthe conventions used by the local operating system (the MS-DOS version Xrequires DOS version 2.0, and supports pathnames). If the file is a Xnew file (does not exist), TVX will ask if you really want to create Xit. Answer y or n. If you gave an incorrect name, you may give the Xcorrect name, but the switches entered on the original start line will Xremain in effect. Control-C can be used at this point to abort. X X TVX has several switches which control certain operating Xcharacteristics. Each switch begins with a minus (-), and is Xseparated from the file name and other switches by a blank in the Xstandard UNIX/C convention. Some switches may be negated by using a X'nox' form. Thus, '-b' will cause a .bak file to be generated, while Xa '-nob' causes the .bak file to be deleted on exit from the editor. XThis capability is indicated by []'s. As many switches as necessary Xor desired can be used at one time in any order. A ':' may be used Xinstead of a '=' for '-c' and '-o'. The various switches supported Xinclude: X X -c=filename -- read a configuration file. If only -c is X specified, TVX will look for A:CONFIG.TVX on CP/M and for X /bin/CONFIG.TVX on MS-DOS. The -c switch is not supported X on all implementations. X -[no]b -- generate a .BAK version of the original (the usual X default). The -nob option means no .BAK file is generated. X This mode of operation follows the normal Unix convention of X not keeping past generations of a file. X -[no]i -- auto indent mode enabled. X -[no]l -- generate BACKUP.LOG file X -o=filename -- send edited output to filename. The output file X can also be changed at any time during the editing session X with the ':o' command. X -r -- read only - file can be read in only X -s -- big save buffer - leaves more buffer for save file X -t -- tty mode - puts TVX into tty mode, not using the screen. X X X -1- X X X X XTVX Reference Manual 11/27/85 X X X See the special appendix on tty mode. X -w -- word processing mode - sets autowrap on, margin to 65. X -z -- -z means use Control-Z to mark end of file, -noz means X don't use. This switch is used only on MS-DOS X implementations. X -# -- entering a number from 3 up to the number of lines on the X screen will create a smaller TVX editing window. This is X most useful for slower baud rates. A -7 makes a nice, small X window showing 7 lines. X X TVX is mostly a programmer's editor, and can can edit any Xstandard text line file. On Unix systems, it is an alternative to Xstandard editors such as ed or vi. On MS-DOS, TVX can also be used to Xedit standard BASIC programs. BASIC programs must be saved using the X",A" switch from Microsoft BASIC. When editing BASIC files, care must Xbe taken to preserve the BASIC statement line numbers. On CP/M, TVX Xcan be used as a totally compatible alternative to ED. Because of Xmemory limitations, the CP/M version contains a subset of the commands Xavailable on the regular version. X X X*** General Comments *** X X TVX functions almost identically for all versions. All commands Xare normally the same, although it is possible to create custom Xversions with a different command set. Control codes on are normally Xentered by pressing the CTRL key and the letter key at the same time. XOn most versions, the character delete key is BACKSPACE. This Xcharacter delete keys is the one normally used by the respective Xoperating systems. It is up to the local implementation to notify the Xuser of any variance from these conventions. X X Once the file has been read in, the screen will be cleared, and Xthe first screenful of the file printed on the screen and the cursor Xpositioned over the first character of the file. If a new file is Xbeing created, the message "buffer empty" will be displayed, and the Xcursor positioned in the upper left corner. TVX is then ready to Xaccept commands from the keyboard. TVX works on the principle that Xwhat you see is what you get. Most commands also take an optional Xnumeric count. The default count is always one. Commands that allow Xa count value are preceded by the letter 'n' in the following Xdescriptions. Whenever a command produces output or an error message, Xit appears on the bottom line of the screen. X X The BACKSPACE key (Control-H on some terminals) is used to edit Xinput text. When TVX is accepting commands, BACKSPACE will cause the Xcharacter immediately before the cursor to be deleted. X X The text from the file which is being edited is held in a buffer Xin main memory. If a file is particularly large, it may not entirely Xfit into main memory. The CP/M version of TVX allows slightly over X20,000 characters in the buffer (950 lines). The MS-DOS versions will Xallow up to almost 64K characters depending on the memory available. XUnix versions will usually allow 120,000 characters and 5000 lines in Xone buffer. If the entire file will not fit into the buffer at once, Xthen only part of it is read in at a time. The buffer size limit in X X X -2- X X X X XTVX Reference Manual 11/27/85 X X Xno way restricts the total size of a file that can be edited by TVX. XTo make editing large files easier, some commands apply to the entire Xfile and cause automatic cross buffer manipulation. X X Because of the internal organization of the text within the Xbuffer, TVX may occasionally "compact" the tiny fragments of unused Xbuffer space generated as a part of normal editing. When this Xhappens, a message is displayed, and input keystrokes are remembered Xbut not echoed until the compaction process is complete. The process Xmay take several seconds. X X While the normal screen is only 80 columns wide, TVX has been Xwritten to support a "virtual" screen width of 240 columns. As you Xmove the cursor right on a line that is longer than 80 columns, the Xscreen will automatically scroll to the left in increments of 16 Xcolumns. Note that on terminals that cannot disable auto wrap around Xfor column 80, when you are making changes to a line that is longer Xthat 80 columns, the line will wrap around to the next display line so Xthat the entire line is visible. The wrap will disappear when you use Xthe 'd' or 'u' commands, or rewrite the screen with the 'v' command. XMost versions will not wrap long lines. X X A key to success when using TVX is to remember that there are two Xmodes of operation. The normal mode is command mode. In this mode, Xall keystrokes are interpreted as commands. When you want to enter Xtext, you must enter insert mode with the 'I' command. While in Xinsert mode, all keystrokes entered will be inserted into the file and Xdisplayed on the screen. You must exit from insert mode with the Xescape key. When you enter insert mode, the message "### Insert Mode X###" will be displayed on the last line of the display. Also, on many Xterminals, TVX will change the cursor character between command and Xinsert mode. X X TVX uses two techniques for protecting the original file from Xediting mistakes. First, each time a file is edited, a new version is Xcreated, and the previous version retained in its original form as a Xbackup. This file will change the original file extension to '.BAK' Xon CP/M and MS-DOS systems, and '.B' on Unix. A more complete Xdescription of TVX file handling is included in an appendix. Also, as Xyou edit your file, TVX has the capability to write all commands Xentered during the session to a log file when that capability is Xenabled. In the event of a major editing mistake, it is possible to Xedit that log file to remove the command errors, and then apply that X"command" file to the previous version of the edited file to get back Xto the state right before the mistake. This feature also allows files Xof TVX commands to be defined by the user and executed in one step. XThe last section of the Reference Manual explains how to use the Xcommand file feature. X X X X X X X X X X X -3- X X X X XTVX Reference Manual 11/27/85 X X X *** Summary of TVX Commands *** X X X Notes: An n preceding a command means optional numeric X argument may be supplied. If omitted n will default to 1, X and n can be zero or negative if appropriate. '$' X represents the escape key, and is used as a terminator for X insert, find, and loops. Control commands are indicated X with '^'. For example, '^K' represents Control-K, and is X usually entered by simultaneously holding down the CTRL key X and the K key. X X XnA - Append to Save Buffer X X The 'A' command is used to append lines of text to the end of the Xsave buffer, even if other commands have been used since the last 'A' Xor 'S' command. The append command works exactly like the 'S' command Xotherwise. X X XB - Buffer beginning X X A 'B' causes the cursor to be moved to the beginning of the Xcurrent buffer. X X X^B - Beginning of file X X The '^B' (Control-B) command is used to position the cursor to Xthe absolute beginning of the file. The '^B' command will always Xwrite out the rest of the file, then re-read the first buffer full. XThis command has the side effect of making a new backup version of the Xfile. It should be noted that any text saved in the save buffer will Xbe preserved during this operation, so that the 'S' save command can Xbe used to move text from the end to the beginning of a multi-buffer Xfile. The search pattern and repeat loops are retained as well. Note Xthe '^B' file beginning is similar in concept to 'B' buffer Xbeginning. X X XnC - Change X X 'C' can be used to change characters. Entering 'nC' is exactly Xequivalent to entering 'nKI'. The command will cause 'n' characters Xto be killed, and insert mode to be entered. The escape must be used Xto terminate the insert as usual. X X XnD - Down X X 'D' moves the cursor down n lines. The cursor is placed at the Xbeginning of the new line. For convenience, the ENTER key performs Xthe identical function. X X X X X -4- X X X X XTVX Reference Manual 11/27/85 X X Xn^D - Down in column X X Control-D ('^D') is similar to 'D', except the cursor remains in Xthe original column. Columns are defined as characters from the Xbeginning of the line, so if a line has tab characters in it, the Xcursor may appear to move out of column on the screen. X X XE - End of the buffer X X 'E' causes the cursor to be placed at the end of the current text Xbuffer. X X Xn^E - Edit repeat buffer n X X When making repeat loops, it is easy to make a mistake. The ^E Xcommand allows any of the repeat buffers to be edited, and then the ^R Xcommand can save the corrected repeat buffer back. If you give a Xvalue 0 for n, the currently selected buffer is used. If n is from 1 Xto the maximum number of repeat buffers, then that repeat buffer will Xbe selected for editing. X X The ^E command will insert the contents of the selected repeat Xbuffer into the current text buffer. The repeat buffer will be Xinserted above the current text line. The repeat buffer will start Xwith a sequence of '#n:<', where n will be replaced by the repeat Xbuffer being edited. The '#n:' identifies which buffer you are Xediting, and is used by the ^R store repeat buffer command to identify Xthe buffer to save to. Escapes will be represented by '^[' instead of Xthe '$' used when entering a repeat buffer initially. A '>^[^[' Xidentifies the end of the repeat loop. X X It is possible to make as many changes as needed to the repeat Xloop. Escapes can be added by using '27i'. If you want to save the Xloop in a different buffer, you can change the number after the '#'. XIt is also important to maintain the '#n:<' start and '>^[^[' ending Xsequences. Also, loops are limited to a maximum of 100 characters. XYou can have carriage returns within the body of a loop, too. If you Xwant to create a new buffer, you can use ^E on an empty repeat buffer Xto get the required '#n:<>^[^[' loop sequence. X X X After you have edited the repeat buffer, it can be saved Xwith the '^R' command. You must place the cursor anywhere on the Xfirst line of the repeat buffer before using '^R'. When you press ^R, Xthe buffer will be saved in the buffer indicated right after the '#'. XThus, unlike ^E, the ^R command accepts no n value. X X XnF - Find text pattern X X 'F' is used to find a text pattern. When 'F' is entered, the Xmessage 'Find?' is echoed on the bottom line. You then enter the Xpattern to find, terminated with the escape key (echoed as $). When Xthe count 'n' is positive (which is the default), find searches the X X X -5- X X X X XTVX Reference Manual 11/27/85 X X Xcurrent buffer from the current position forward. If 'n' is negative, Xthen a backwards search is performed starting with the previous line. X(Use '^F' to search across buffers). Normally, 'F' ignores the case Xof the letters in the pattern. If the ':F' parameter is set with 0, Xthen 'F' command will match only the exact case. See the ':' set Xparameter command for details of the ':F' parameter. If the pattern Xis not found, "Not found" will be printed and the cursor remain at its Xoriginal location. If the pattern is found, then the cursor will be Xplaced immediately following the pattern. The pattern may be at most X100 characters long. If the pattern is only an escape, then the Xprevious pattern will be used again (same as ';'). X TVX supports extensive wild card matching. The ':M' set Xparameter controls whether or not wild card matching is turned on. XNormally, it is. The wild card matching in TVX is based on the Xconcept of 'sets of special characters'. TVX predefines 6 sets of Xcharacters, and allows the user to define one additional set. When a Xspecial control character is included as part of the find pattern, Xthen any character in the specified set will match the pattern. The Xpredefined sets are: X X ^A - Alphanumeric characters: a-z, 0-9 X ^D - Digits: 0-9 X ^L - Letters: a-z X ^O - Other characters: all characters except a-z, 0-9 X ^P - Punctuation: '.', ',', '!', '?' X ^X - Any character: any printable character X ^U - User character: any character in user set, set by ':U' X X Any of the sets may be specified by entering the proper control Xcharacter in the find pattern: Control-A for the ^A set. Thus, Xentering a find pattern of '^L^D' would match any letter followed by Xany digit. Since it may be desirable to match a sequence of one of Xthe character sets, two prefix characters are supported. A '^W' Xbefore one of the above sets will match a 'word' of that set. Thus, X'^W^L' will match any word, and '^N^D' will match any number. The Xfind pattern 'st^W^L' would match words starting with 'st'. The '^N' Xprefix is used to make a 'word' of characters NOT included in the Xgiven set. Thus, '^N^L' will match a 'word' of characters NOT Xincluding the letters a-z. A match 'word' consists of any sequence of Xcharacters (at least one character long) found in the given set, up to Xthe first character not in the set. End of lines also terminate all Xwild card patterns. The only real way to adequately understand TVX Xwild cards is to use them in practice. X X X^F- Find across buffers X X '^F' (Control-F) is the same as Find, except the search will Xcross buffer boundaries. Whenever a buffer is searched without Xfinding the pattern, the next buffer will be read in. The screen will Xnot change until the pattern is found or the file is exhausted. If Xthe pattern is not found anywhere, then the entire file will have been Xwritten out, and there will be an empty buffer. The '^B' command may Xbe used at that point to get back to the beginning of the file. X X X X X -6- X X X X XTVX Reference Manual 11/27/85 X X XG - Get saved text X X 'G' is used with 'S' and '^Y' to move text around. 'G' causes Xthe text in the save buffer to be inserted before the current cursor Xposition. The saved text remains in the save buffer. There must be Xat least one line of text in the main buffer before 'G' will get the Xtext from the save buffer. X X X^G - Get killed line (unkill) X X The '^G' (Control-G) unkill command can be used to "unkill" one Xline, which will be the last line killed with '^K'. If the last Xcommand was 10^K (kill 10 lines), then '^G' will retrieve only the Xlast line killed. The "unkilled" line will be inserted right before Xthe current cursor position. It is also possible to move single lines Xaround the text buffer using '^K' and '^G' - but be cautious. Any Xother '^K' command will reset the last killed line. '^G' can also be Xused to retrieve the entire line involved in a "'" (single quote) or X'"' (double quote) command. X X XnH - Half page X X 'H' is similar to the 'P' Page command. It causes the cursor to Xmove down a half screenful. This will be typically be 12 lines. A Xnegative count (e.g. -h) moves up a half screen. X X XnI - Insert X X 'I' causes the editor leave command mode and enter insert mode. XFollowing the 'I', all text typed in is inserted into the file until a Xterminating escape is typed. Inserted text is echoed on the screen as Xit is inserted. If any value other than the default value 1 is Xsupplied for n, then only one character is inserted, and it will have Xthe ascii value of n. This is the method used to enter characters that Xcannot normally be entered in insert mode, such as escape or Xcharacters not on the keyboard. The message "### Insert Mode ###" is Xdisplayed on the bottom line when insert mode is entered (except when Xinserting on the very last line of the file). Many versions of TVX Xwill change the shape of the cursor when insert mode is entered. X X XJ - Jump back X X The 'J' command will cause a "jump" back to the line of the Xprevious cursor position. Suppose the cursor was positioned somewhere Xin the middle of the file. If the 'E' end command was entered, the Xcursor would move to the end of the current buffer. If the 'J' Xcommand was then used, the cursor would return to the original line. XIt makes it convenient to flip back and forth between two points in Xthe file. It is also useful if a large cursor movement command is Xaccidentally entered (like when you thought you were in insert mode). X X X X X -7- X X X X XTVX Reference Manual 11/27/85 X X XnK - Kill Character forward X X The 'K' command kills or deletes characters in a forward Xdirection. '1K' would delete the character the cursor is positioned Xover, and '5K' would delete the next 5 characters. X X Xn^K - Kill lines X X '^K' (Control-K) is used to kill an entire line. n=1 kills the Xcurrent line, negative n kills previous lines, while positive n kills Xfollowing lines. X X XnL - Left X X 'L' moves the cursor n characters to the left. X X XM - Memory and Status X X The 'M' command is used to display certain status information. XThe name of the file currently being edited (where the output will go) Xis displayed, followed by the version of TVX. The number of free Xcharacters currently available in the buffer is then given (this does Xnot include characters that are free but not compacted yet), followed Xby the number of the last line of the file. Finally, the currently Xselected repeat loop buffer and maximum number of repeat buffers Xallowed is shown. X X XnN - Note current location X X This command notes the current line location. Values of 1 to 9 Xare allowed for n. After entering '3n' for example, you can then move Xaround the buffer, and later use '3^n' to return to the noted Xlocation. This command really remembers the current line, relative to Xthe current buffer beginning. Thus if you edit out lines before the Xnoted location, you will not return to the same line. X X Xn^N - Go back to noted location X X This command is used to go back to a noted location. X X XnO - Open line for insert X X The 'O' command will cause n blank lines to be inserted, and the Xcursor positioned at the beginning of the first new line. Following Xthe 'O' command, insert mode is automatically entered. The 'O' Xcommand is a convenient method for inserting new lines. X X X X X X X -8- X X X X XTVX Reference Manual 11/27/85 X X X^O - Operating System call X X Some versions of TVX (MS-DOS and Unix, for example), will allow Xan operating system command to be executed from inside of the editor. XFor example, it might be useful to get a directory listing. On XMS-DOS, after entering the ^O, the normal 'dir' command is entered. XAfter the directory is shown by the operating system, pressing any key Xwill return to the edited file. X This command has one particularly valuable application - editing Xother files. For example, you may want to add part of another file to Xthe file you are currently editing. Use the '^O' command to edit the Xother file, and create a temporary file with the part you want to Xadd. Then you can use the '^Y' yank command to read in the file. For Xexample: Use '^O' to get enter operating system command prompt. Then Xenter something like 'tvx otherfile -o=tempfile'. You will get a new Xcopy of tvx with the otherfile being edited. Edit it to get the part Xyou want. When you exit that copy of tvx, the part you want to add Xwill be in tempfile. You can now yank it into the current file. X X XnP - Page X X The 'P' commands is the same as '25D' on 24 line terminals, and Xeffectively causes a new screenful to be written. It is a convenient Xmethod for scanning through the file. The n count argument specifies Xthe number of 'pages' to scroll. Negative values for n causes reverse Xscrolling. X X X^P - Print Screen X X If '^P' (Control-P) is entered, and a printer is on line, the Xentire contents of the screen will be sent to the printer. Several Xconsecutive sequences of "P^PP^P..." (or a repeat loop: "10
$$")
Xcan be used to print longer portions of the file. This command will
Xnot normally work on time shared systems such as Unix.
X
X
XnR - Right
X
X 'R' causes the cursor to move n characters to the right. For
Xconvenience, the space bar is equivalent to 'R'.
X
X
X^R - Restore repeat buffer
X
X The '^R' command will save an edited repeat buffer and delete the
Xedited buffer from the text. See '^E' for a complete summary of
Xediting repeat buffers.
X
X
XnS - Save text
X
X Besides the normal text buffer, TVX has a separate "save"
Xbuffer. This buffer can be used to move blocks of text from one part
Xof the file to another. A simple 'S' command will save the current
X
X
X -9-
X
X
X
X
XTVX Reference Manual 11/27/85
X
X
Xline in the save buffer, and move the cursor down one line. On the
Xscreen, 'S' appears to have the same behavior as 'D'. If n is
Xsupplied, then n lines will be saved. 'S' can also be used
Xsequentially. If no other commands intervene, consecutive 'S'
Xcommands will continue adding lines to the save buffer. If any other
Xcommands are entered between consecutive 'S' commands, the previous
Xcontents of the save buffer will be lost, and replaced with the new
Xline. The 'A' command can be used to append lines to the current save
Xbuffer without losing the previous contents.
X The '/' command can be used with 'S' and 'G' to move text. Use
X'S' to save the text to be moved, immediately delete the saved text
Xwith '/', then insert it at the new place with 'G'. The last line of
Xthe file is can be saved in the save buffer only once, and an error
Xmessage will be printed if you attempt to save the last line a second
Xtime.
X
X
XnT - Tidy text
X
X The 'T' tidy command is specifically designed to improve the
Xappearance of strictly text files. When entering letters and
Xdocuments, is it usually desirable to have the lines filled to the
Xright margin. However, after editing, it is common to find a jumble
Xof uneven, difficult to read source lines. The 'T' tidy command will
Xfill source text using the same right margin currently set for
Xauto-wrap.
X Tidy performs essentially the same operation as a word processor
Xfill function. Word are combined on one line until the auto-wrap
Xmargin is passed. The 'n' count refers to the total number of
Xresulting lines, not the number of original lines. Specifying a large
X'n' will tidy large sections of a document. The tidy command
Xrecognizes lines beginning with blanks,tabs, or a period and blank
Xlines as special. It will not fill those lines, thus preserving
Xparagraphs, tables and NROFF-like dot commands.
X One interesting capability of tidy is to put one word per source
Xline. Set the auto-wrap margin to 2, then use the tidy command. The
Xresult will put one word per line.
X
X
X^T - TERMINATE - ABORT EDIT SESSION
X
X The '^T' (Control-T) command aborts directly to the operating
Xsystem. The original file is left untouched, and no backup file is
Xcreated. This is a fairly dangerous command in that all editing
Xperformed will be lost (unless the '^B' file beginning command was
Xused). You will be asked to confirm the '^T' command with a Y or N.
XIf the '^T' is performed accidentally, the backup log file can be
Xapplied to the current version of the file after the '^T' has been
Xedited out of the log file (no backup file will have been created
Xafter the '^T'). The '^T' command is most useful when you decide you
Xdon't want to make any changes and want to exit from TVX quickly.
XExiting with the '^T' command is similar to using the 'R' read only
Xswitch at the beginning.
X If you have used the '^B' command, a work file copy of the
Xoriginal will have been written out containing all the edits performed
Xbefore the '^B'. When you use '^T' and this work file has been saved,
X
X
X -10-
X
X
X
X
XTVX Reference Manual 11/27/85
X
X
Xa message informing you of its existence will be printed. You can
Xthen either use that file, or delete it at the operating system
Xlevel.
X
X
XnU - Up
X
X The 'U' command moves the cursor up n lines, positioning the
Xcursor at the beginning of the line.
X
X
Xn^U - Up in column
X
X The '^U' (Control-U) is the opposite of '^D', and moves the
Xcursor up in column.
X
X
XnV - Verify the screen
X
X In regular screen editing mode, the 'V' command causes the screen
Xto be rewritten. This is sometimes necessary to get a true version of
Xthe screen after error messages have been written or when editing
Xlines longer than 80 columns. On terminals without reverse screen
Xscroll, the 'V' command forces the cursor to the home display line
X(usually line 16). In screen mode, 'V' ignores any n.
X In tty mode, the 'V' command is used to type lines from the file
Xon the terminal. A negative n will type out lines preceding the
Xcurrent line. An n of 1 types the current line, with the current
Xcursor position indicated by '/'. An n greater than 1 types the
Xcurrent line, plus the following n-1 lines. A command '-12v12v' would
Xtype 24 lines on the terminal: 12 before, the current line, and 11
Xfollowing.
X
X
Xn^W - Write out buffer, read next one
X
X The '^W' (Control-W) command is used to explicitly go from one
Xbuffer to the next. By default, when n is >= 0, the entire current
Xbuffer is written to the new version of the file being edited, and the
Xnext buffer full of the original file (if any) is read in. If a
Xnegative n is supplied (any negative value, most easily -^W), then
Xonly the part of the buffer up to (but not including) the current line
Xis written. Then as much more of the file as possible is read to the
Xend of the current buffer. Thus, a negative n is useful when a file
Xwon't fit, and the split point is at an awkward place. It is also
Xuseful when a '^Y' yanked file won't fit.
X
X
X^X - eXit
X
X '^X' (Control-X) causes the remainder of the file to be written
Xout, and the editor exited. The entire file will be written, no
Xmatter where the cursor happens to be positioned when the '^X' command
Xis entered. This is the normal conclusion of an editing session. All
Xwork files are deleted, the original file renamed to the back up file,
Xand the newly edited file renamed to the original name. See the
X
X
X -11-
X
X
X
X
XTVX Reference Manual 11/27/85
X
X
Xappendix on tvx file handling conventions for more details.
X
X
Xn^Y - Yank text to/from external file (file merge)
X
X A '^Y' (Control-Y) with a positive n is similar to 'S' save, but
Xthe text saved in the save buffer is read in from an external file
Xinstead of from the current buffer. When '^Y' is entered, the save
Xbuffer is cleared, the buffer compactor invoked, and then the user is
Xprompted for the name of the file to read. TVX then will read as much
Xof the external file into the save buffer as it can. The 'G' command
Xcan then be used to insert the save buffer text into the current file
Xat the desired location. If there is not enough room in the save
Xbuffer to hold the entire file, then only part of the file is read and
Xa diagnostic message printed. The '-S' switch can be used when TVX is
Xfirst invoked to reserve a large save buffer for merging larger
Xfiles. You can also use the '-^W' command to write out the front part
Xof the file, and then 'G' to get the saved file. (Note: '^Y' may not
Xbe used from within a log command file. See section on backup log
Xfile.)
X A negative n (e.g., '-^Y') can also be used with the yank
Xcommand. If the n is negative, then the contents of the save buffer
Xwill be written to a new file. After '-^Y' is entered, you will be
Xprompted for the name of the output file, and then the contents of the
Xsave buffer will be written to that file.
X
X
XnBACKSPACE - Delete previous character
X
X The BACKSPACE key will delete the previous character on the
Xscreen. It is also used for editing input keystrokes for Insert,
XFind, and repeat loops.
X
X
Xn; - Find again
X
X The ';' (semicolon) command causes the previous pattern to be
Xsearched for again. This is more convenient that entering 'F$'
Xagain. The 'n' has the same meaning, positive searches forwards,
Xnegative backwards.
X
X
X/ - delete last thing
X
X The '/' (slash) command is useful when used with 'F' (find), 'S'
X(save), 'G' (get), 'TAB' (word right), and '{' (word left). It causes
Xthe last pattern used to be deleted. Thus "Fxxx$/Iyyzz$" will delete
Xthe pattern 'xxx' and insert 'yyzz'. When used after an 'S', it
Xcauses the just saved lines to be deleted from the text buffer (but
Xnot the save buffer). After the G, it causes the text just inserted
Xfrom the save buffer to be deleted from the text buffer. After a
X'TAB' or '{', '/' will delete the word or words just skipped over.
XSlash must be used immediately following an 'S', 'G', 'TAB', '{', 'F',
X'^F', or ';' command. This command knows how to take wild card
Xmatches into account.
X
X
X
X -12-
X
X
X
X
XTVX Reference Manual 11/27/85
X
X
X= - delete last thing and enter insert mode
X
X The '=' (equals) command is the same as the '/' command, except
Xinsert mode is automatically, thus achieving the effect of '/I'
Xcommand sequence.
X
X
X' - Delete previous part of line (single quote)
X
X The "'" command will delete all the characters in the current
Xline before the cursor.
X
X
X" - Delete rest of line (double quote)
X
X The '"' command will delete from the cursor forward to the end of
Xthe line. The "end of line" mark will remain. Note that the single
Xquote has one tick, representing the "first" part of the line, while
Xthe double quote has two ticks, representing the "second" part of the
Xline.
X
X
X, - beginning of line (comma)
X
X The ',' command will move the cursor to the beginning of the
Xcurrent line.
X
X
X. - end of line (period)
X
X The '.' command will move the cursor to the end of the current
Xline.
X
X
X* - Insert last pattern found
X
X The last pattern found with the find command (up to 100
Xcharacters) is saved in an internal buffer. The '*' command will
Xinsert that pattern into the text at the current cursor location. If
Xthe last find pattern included wild card characters, the pattern saved
Xwill be the actual text matched, and not the wild cards themselves.
XYou must be back in command mode to use this command.
X
X
XnTAB, n{ - Skip over words
X
X The 'TAB' (TAB key, CTRL-I) and '{' commands skip over words. A
Xword is any contiguous set of alphabetic characters (a-z) or digits
X(0-9). 'TAB' moves forwards, while '{' moves backwards. The 'n'
Xcount may be used to skip over several words at once, and a negative
Xcount reverses the direction of the move. Note that '{' is usually
Xaliased to '[' since these are often reversed case on different
Xterminals.
X
X
X
X
X
X -13-
X
X
X
X
XTVX Reference Manual 11/27/85
X
X
Xn< - begin repeat loop
X
X TVX has three different repeat loop buffers which allow an
Xarbitrary sequence of commands to be repeatedly executed. When n< is
Xtyped, the editor echoes 'Repeat: n<' at the bottom of the screen.
XThe user then types in any series of commands to be repeated n times.
XThe repeat command is terminated with a matching '>' and a double
Xescape (echoed as $$). Repeat loops may not be nested. The repeat
Xloop has two typical useful functions: one is to replace multiple
Xoccurrences of a string with another (e.g., "10