home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-01-28 | 48.3 KB | 1,124 lines |
-
-
-
-
-
- TVX Reference Manual
-
-
-
- This is the Reference Manual for TVX, a public domain screen
- editor written in C by Dr. Bruce E. Wampler. (Current address: Dr.
- Bruce E. Wampler, University of New Mexico, Department of Computer
- Science, Farris Engineering Center, Albuquerque, NM 87131). Any
- comments, bug reports, or suggestions should be sent to that address.
- This manual contains the formal descriptions for each editor command.
- An appendix gives some notes for installing TVX on various systems.
- The name TVX is derived from "TV" editor for any terminal ("X").
-
-
-
- *** GETTING STARTED ***
-
- To edit a file using TVX, enter the following command line:
-
- tvx filename -switch1 -switch2 ...
-
- The file name specified is the file to be edited, and must obey
- the conventions used by the local operating system (the MS-DOS version
- requires DOS version 2.0, and supports pathnames). If the file is a
- new file (does not exist), TVX will ask if you really want to create
- it. Answer y or n. If you gave an incorrect name, you may give the
- correct name, but the switches entered on the original start line will
- remain in effect. Control-C can be used at this point to abort.
-
- TVX has several switches which control certain operating
- characteristics. Each switch begins with a minus (-), and is
- separated from the file name and other switches by a blank in the
- standard UNIX/C convention. Some switches may be negated by using a
- 'nox' form. Thus, '-b' will cause a .bak file to be generated, while
- a '-nob' causes the .bak file to be deleted on exit from the editor.
- This capability is indicated by []'s. As many switches as necessary
- or desired can be used at one time in any order. A ':' may be used
- instead of a '=' for '-c' and '-o'. The various switches supported
- include:
-
- -c=filename -- read a configuration file. If only -c is
- specified, TVX will look for A:CONFIG.TVX on CP/M and for
- /bin/CONFIG.TVX on MS-DOS. The -c switch is not supported
- on all implementations.
- -[no]b -- generate a .BAK version of the original (the usual
- default). The -nob option means no .BAK file is generated.
- This mode of operation follows the normal Unix convention of
- not keeping past generations of a file.
- -[no]i -- auto indent mode enabled.
- -[no]l -- generate BACKUP.LOG file
- -o=filename -- send edited output to filename. The output file
- can also be changed at any time during the editing session
- with the ':o' command.
- -r -- read only - file can be read in only
- -s -- big save buffer - leaves more buffer for save file
- -t -- tty mode - puts TVX into tty mode, not using the screen.
-
-
- -1-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- See the special appendix on tty mode.
- -w -- word processing mode - sets autowrap on, margin to 65.
- -z -- -z means use Control-Z to mark end of file, -noz means
- don't use. This switch is used only on MS-DOS
- implementations.
- -# -- entering a number from 3 up to the number of lines on the
- screen will create a smaller TVX editing window. This is
- most useful for slower baud rates. A -7 makes a nice, small
- window showing 7 lines.
-
- TVX is mostly a programmer's editor, and can can edit any
- standard text line file. On Unix systems, it is an alternative to
- standard editors such as ed or vi. On MS-DOS, TVX can also be used to
- edit standard BASIC programs. BASIC programs must be saved using the
- ",A" switch from Microsoft BASIC. When editing BASIC files, care must
- be taken to preserve the BASIC statement line numbers. On CP/M, TVX
- can be used as a totally compatible alternative to ED. Because of
- memory limitations, the CP/M version contains a subset of the commands
- available on the regular version.
-
-
- *** General Comments ***
-
- TVX functions almost identically for all versions. All commands
- are normally the same, although it is possible to create custom
- versions with a different command set. Control codes on are normally
- entered by pressing the CTRL key and the letter key at the same time.
- On most versions, the character delete key is BACKSPACE. This
- character delete keys is the one normally used by the respective
- operating systems. It is up to the local implementation to notify the
- user of any variance from these conventions.
-
- Once the file has been read in, the screen will be cleared, and
- the first screenful of the file printed on the screen and the cursor
- positioned over the first character of the file. If a new file is
- being created, the message "buffer empty" will be displayed, and the
- cursor positioned in the upper left corner. TVX is then ready to
- accept commands from the keyboard. TVX works on the principle that
- what you see is what you get. Most commands also take an optional
- numeric count. The default count is always one. Commands that allow
- a count value are preceded by the letter 'n' in the following
- descriptions. Whenever a command produces output or an error message,
- it appears on the bottom line of the screen.
-
- The BACKSPACE key (Control-H on some terminals) is used to edit
- input text. When TVX is accepting commands, BACKSPACE will cause the
- character immediately before the cursor to be deleted.
-
- The text from the file which is being edited is held in a buffer
- in main memory. If a file is particularly large, it may not entirely
- fit into main memory. The CP/M version of TVX allows slightly over
- 20,000 characters in the buffer (950 lines). The MS-DOS versions will
- allow up to almost 64K characters depending on the memory available.
- Unix versions will usually allow 120,000 characters and 5000 lines in
- one buffer. If the entire file will not fit into the buffer at once,
- then only part of it is read in at a time. The buffer size limit in
-
-
- -2-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- no way restricts the total size of a file that can be edited by TVX.
- To make editing large files easier, some commands apply to the entire
- file and cause automatic cross buffer manipulation.
-
- Because of the internal organization of the text within the
- buffer, TVX may occasionally "compact" the tiny fragments of unused
- buffer space generated as a part of normal editing. When this
- happens, a message is displayed, and input keystrokes are remembered
- but not echoed until the compaction process is complete. The process
- may take several seconds.
-
- While the normal screen is only 80 columns wide, TVX has been
- written to support a "virtual" screen width of 240 columns. As you
- move the cursor right on a line that is longer than 80 columns, the
- screen will automatically scroll to the left in increments of 16
- columns. Note that on terminals that cannot disable auto wrap around
- for column 80, when you are making changes to a line that is longer
- that 80 columns, the line will wrap around to the next display line so
- that the entire line is visible. The wrap will disappear when you use
- the 'd' or 'u' commands, or rewrite the screen with the 'v' command.
- Most versions will not wrap long lines.
-
- A key to success when using TVX is to remember that there are two
- modes of operation. The normal mode is command mode. In this mode,
- all keystrokes are interpreted as commands. When you want to enter
- text, you must enter insert mode with the 'I' command. While in
- insert mode, all keystrokes entered will be inserted into the file and
- displayed on the screen. You must exit from insert mode with the
- escape key. When you enter insert mode, the message "### Insert Mode
- ###" will be displayed on the last line of the display. Also, on many
- terminals, TVX will change the cursor character between command and
- insert mode.
-
- TVX uses two techniques for protecting the original file from
- editing mistakes. First, each time a file is edited, a new version is
- created, and the previous version retained in its original form as a
- backup. This file will change the original file extension to '.BAK'
- on CP/M and MS-DOS systems, and '.B' on Unix. A more complete
- description of TVX file handling is included in an appendix. Also, as
- you edit your file, TVX has the capability to write all commands
- entered during the session to a log file when that capability is
- enabled. In the event of a major editing mistake, it is possible to
- edit that log file to remove the command errors, and then apply that
- "command" file to the previous version of the edited file to get back
- to the state right before the mistake. This feature also allows files
- of TVX commands to be defined by the user and executed in one step.
- The last section of the Reference Manual explains how to use the
- command file feature.
-
-
-
-
-
-
-
-
-
-
- -3-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- *** Summary of TVX Commands ***
-
-
- Notes: An n preceding a command means optional numeric
- argument may be supplied. If omitted n will default to 1,
- and n can be zero or negative if appropriate. '$'
- represents the escape key, and is used as a terminator for
- insert, find, and loops. Control commands are indicated
- with '^'. For example, '^K' represents Control-K, and is
- usually entered by simultaneously holding down the CTRL key
- and the K key.
-
-
- nA - Append to Save Buffer
-
- The 'A' command is used to append lines of text to the end of the
- save buffer, even if other commands have been used since the last 'A'
- or 'S' command. The append command works exactly like the 'S' command
- otherwise.
-
-
- B - Buffer beginning
-
- A 'B' causes the cursor to be moved to the beginning of the
- current buffer.
-
-
- ^B - Beginning of file
-
- The '^B' (Control-B) command is used to position the cursor to
- the absolute beginning of the file. The '^B' command will always
- write out the rest of the file, then re-read the first buffer full.
- This command has the side effect of making a new backup version of the
- file. It should be noted that any text saved in the save buffer will
- be preserved during this operation, so that the 'S' save command can
- be used to move text from the end to the beginning of a multi-buffer
- file. The search pattern and repeat loops are retained as well. Note
- the '^B' file beginning is similar in concept to 'B' buffer
- beginning.
-
-
- nC - Change
-
- 'C' can be used to change characters. Entering 'nC' is exactly
- equivalent to entering 'nKI'. The command will cause 'n' characters
- to be killed, and insert mode to be entered. The escape must be used
- to terminate the insert as usual.
-
-
- nD - Down
-
- 'D' moves the cursor down n lines. The cursor is placed at the
- beginning of the new line. For convenience, the ENTER key performs
- the identical function.
-
-
-
-
- -4-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- n^D - Down in column
-
- Control-D ('^D') is similar to 'D', except the cursor remains in
- the original column. Columns are defined as characters from the
- beginning of the line, so if a line has tab characters in it, the
- cursor may appear to move out of column on the screen.
-
-
- E - End of the buffer
-
- 'E' causes the cursor to be placed at the end of the current text
- buffer.
-
-
- n^E - Edit repeat buffer n
-
- When making repeat loops, it is easy to make a mistake. The ^E
- command allows any of the repeat buffers to be edited, and then the ^R
- command can save the corrected repeat buffer back. If you give a
- value 0 for n, the currently selected buffer is used. If n is from 1
- to the maximum number of repeat buffers, then that repeat buffer will
- be selected for editing.
-
- The ^E command will insert the contents of the selected repeat
- buffer into the current text buffer. The repeat buffer will be
- inserted above the current text line. The repeat buffer will start
- with a sequence of '#n:<', where n will be replaced by the repeat
- buffer being edited. The '#n:' identifies which buffer you are
- editing, and is used by the ^R store repeat buffer command to identify
- the buffer to save to. Escapes will be represented by '^[' instead of
- the '$' used when entering a repeat buffer initially. A '>^[^['
- identifies the end of the repeat loop.
-
- It is possible to make as many changes as needed to the repeat
- loop. Escapes can be added by using '27i'. If you want to save the
- loop in a different buffer, you can change the number after the '#'.
- It is also important to maintain the '#n:<' start and '>^[^[' ending
- sequences. Also, loops are limited to a maximum of 100 characters.
- You can have carriage returns within the body of a loop, too. If you
- want to create a new buffer, you can use ^E on an empty repeat buffer
- to get the required '#n:<>^[^[' loop sequence.
-
-
- After you have edited the repeat buffer, it can be saved
- with the '^R' command. You must place the cursor anywhere on the
- first line of the repeat buffer before using '^R'. When you press ^R,
- the buffer will be saved in the buffer indicated right after the '#'.
- Thus, unlike ^E, the ^R command accepts no n value.
-
-
- nF - Find text pattern
-
- 'F' is used to find a text pattern. When 'F' is entered, the
- message 'Find?' is echoed on the bottom line. You then enter the
- pattern to find, terminated with the escape key (echoed as $). When
- the count 'n' is positive (which is the default), find searches the
-
-
- -5-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- current buffer from the current position forward. If 'n' is negative,
- then a backwards search is performed starting with the previous line.
- (Use '^F' to search across buffers). Normally, 'F' ignores the case
- of the letters in the pattern. If the ':F' parameter is set with 0,
- then 'F' command will match only the exact case. See the ':' set
- parameter command for details of the ':F' parameter. If the pattern
- is not found, "Not found" will be printed and the cursor remain at its
- original location. If the pattern is found, then the cursor will be
- placed immediately following the pattern. The pattern may be at most
- 100 characters long. If the pattern is only an escape, then the
- previous pattern will be used again (same as ';').
- TVX supports extensive wild card matching. The ':M' set
- parameter controls whether or not wild card matching is turned on.
- Normally, it is. The wild card matching in TVX is based on the
- concept of 'sets of special characters'. TVX predefines 6 sets of
- characters, and allows the user to define one additional set. When a
- special control character is included as part of the find pattern,
- then any character in the specified set will match the pattern. The
- predefined sets are:
-
- ^A - Alphanumeric characters: a-z, 0-9
- ^D - Digits: 0-9
- ^L - Letters: a-z
- ^O - Other characters: all characters except a-z, 0-9
- ^P - Punctuation: '.', ',', '!', '?'
- ^X - Any character: any printable character
- ^U - User character: any character in user set, set by ':U'
-
- Any of the sets may be specified by entering the proper control
- character in the find pattern: Control-A for the ^A set. Thus,
- entering a find pattern of '^L^D' would match any letter followed by
- any digit. Since it may be desirable to match a sequence of one of
- the character sets, two prefix characters are supported. A '^W'
- before one of the above sets will match a 'word' of that set. Thus,
- '^W^L' will match any word, and '^N^D' will match any number. The
- find pattern 'st^W^L' would match words starting with 'st'. The '^N'
- prefix is used to make a 'word' of characters NOT included in the
- given set. Thus, '^N^L' will match a 'word' of characters NOT
- including the letters a-z. A match 'word' consists of any sequence of
- characters (at least one character long) found in the given set, up to
- the first character not in the set. End of lines also terminate all
- wild card patterns. The only real way to adequately understand TVX
- wild cards is to use them in practice.
-
-
- ^F- Find across buffers
-
- '^F' (Control-F) is the same as Find, except the search will
- cross buffer boundaries. Whenever a buffer is searched without
- finding the pattern, the next buffer will be read in. The screen will
- not change until the pattern is found or the file is exhausted. If
- the pattern is not found anywhere, then the entire file will have been
- written out, and there will be an empty buffer. The '^B' command may
- be used at that point to get back to the beginning of the file.
-
-
-
-
- -6-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- G - Get saved text
-
- 'G' is used with 'S' and '^Y' to move text around. 'G' causes
- the text in the save buffer to be inserted before the current cursor
- position. The saved text remains in the save buffer. There must be
- at least one line of text in the main buffer before 'G' will get the
- text from the save buffer.
-
-
- ^G - Get killed line (unkill)
-
- The '^G' (Control-G) unkill command can be used to "unkill" one
- line, which will be the last line killed with '^K'. If the last
- command was 10^K (kill 10 lines), then '^G' will retrieve only the
- last line killed. The "unkilled" line will be inserted right before
- the current cursor position. It is also possible to move single lines
- around the text buffer using '^K' and '^G' - but be cautious. Any
- other '^K' command will reset the last killed line. '^G' can also be
- used to retrieve the entire line involved in a "'" (single quote) or
- '"' (double quote) command.
-
-
- nH - Half page
-
- 'H' is similar to the 'P' Page command. It causes the cursor to
- move down a half screenful. This will be typically be 12 lines. A
- negative count (e.g. -h) moves up a half screen.
-
-
- nI - Insert
-
- 'I' causes the editor leave command mode and enter insert mode.
- Following the 'I', all text typed in is inserted into the file until a
- terminating escape is typed. Inserted text is echoed on the screen as
- it is inserted. If any value other than the default value 1 is
- supplied for n, then only one character is inserted, and it will have
- the ascii value of n. This is the method used to enter characters that
- cannot normally be entered in insert mode, such as escape or
- characters not on the keyboard. The message "### Insert Mode ###" is
- displayed on the bottom line when insert mode is entered (except when
- inserting on the very last line of the file). Many versions of TVX
- will change the shape of the cursor when insert mode is entered.
-
-
- J - Jump back
-
- The 'J' command will cause a "jump" back to the line of the
- previous cursor position. Suppose the cursor was positioned somewhere
- in the middle of the file. If the 'E' end command was entered, the
- cursor would move to the end of the current buffer. If the 'J'
- command was then used, the cursor would return to the original line.
- It makes it convenient to flip back and forth between two points in
- the file. It is also useful if a large cursor movement command is
- accidentally entered (like when you thought you were in insert mode).
-
-
-
-
- -7-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- nK - Kill Character forward
-
- The 'K' command kills or deletes characters in a forward
- direction. '1K' would delete the character the cursor is positioned
- over, and '5K' would delete the next 5 characters.
-
-
- n^K - Kill lines
-
- '^K' (Control-K) is used to kill an entire line. n=1 kills the
- current line, negative n kills previous lines, while positive n kills
- following lines.
-
-
- nL - Left
-
- 'L' moves the cursor n characters to the left.
-
-
- M - Memory and Status
-
- The 'M' command is used to display certain status information.
- The name of the file currently being edited (where the output will go)
- is displayed, followed by the version of TVX. The number of free
- characters currently available in the buffer is then given (this does
- not include characters that are free but not compacted yet), followed
- by the number of the last line of the file. Finally, the currently
- selected repeat loop buffer and maximum number of repeat buffers
- allowed is shown.
-
-
- nN - Note current location
-
- This command notes the current line location. Values of 1 to 9
- are allowed for n. After entering '3n' for example, you can then move
- around the buffer, and later use '3^n' to return to the noted
- location. This command really remembers the current line, relative to
- the current buffer beginning. Thus if you edit out lines before the
- noted location, you will not return to the same line.
-
-
- n^N - Go back to noted location
-
- This command is used to go back to a noted location.
-
-
- nO - Open line for insert
-
- The 'O' command will cause n blank lines to be inserted, and the
- cursor positioned at the beginning of the first new line. Following
- the 'O' command, insert mode is automatically entered. The 'O'
- command is a convenient method for inserting new lines.
-
-
-
-
-
-
- -8-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- ^O - Operating System call
-
- Some versions of TVX (MS-DOS and Unix, for example), will allow
- an operating system command to be executed from inside of the editor.
- For example, it might be useful to get a directory listing. On
- MS-DOS, after entering the ^O, the normal 'dir' command is entered.
- After the directory is shown by the operating system, pressing any key
- will return to the edited file.
- This command has one particularly valuable application - editing
- other files. For example, you may want to add part of another file to
- the file you are currently editing. Use the '^O' command to edit the
- other file, and create a temporary file with the part you want to
- add. Then you can use the '^Y' yank command to read in the file. For
- example: Use '^O' to get enter operating system command prompt. Then
- enter something like 'tvx otherfile -o=tempfile'. You will get a new
- copy of tvx with the otherfile being edited. Edit it to get the part
- you want. When you exit that copy of tvx, the part you want to add
- will be in tempfile. You can now yank it into the current file.
-
-
- nP - Page
-
- The 'P' commands is the same as '25D' on 24 line terminals, and
- effectively causes a new screenful to be written. It is a convenient
- method for scanning through the file. The n count argument specifies
- the number of 'pages' to scroll. Negative values for n causes reverse
- scrolling.
-
-
- ^P - Print Screen
-
- If '^P' (Control-P) is entered, and a printer is on line, the
- entire contents of the screen will be sent to the printer. Several
- consecutive sequences of "P^PP^P..." (or a repeat loop: "10<P^P>$$")
- can be used to print longer portions of the file. This command will
- not normally work on time shared systems such as Unix.
-
-
- nR - Right
-
- 'R' causes the cursor to move n characters to the right. For
- convenience, the space bar is equivalent to 'R'.
-
-
- ^R - Restore repeat buffer
-
- The '^R' command will save an edited repeat buffer and delete the
- edited buffer from the text. See '^E' for a complete summary of
- editing repeat buffers.
-
-
- nS - Save text
-
- Besides the normal text buffer, TVX has a separate "save"
- buffer. This buffer can be used to move blocks of text from one part
- of the file to another. A simple 'S' command will save the current
-
-
- -9-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- line in the save buffer, and move the cursor down one line. On the
- screen, 'S' appears to have the same behavior as 'D'. If n is
- supplied, then n lines will be saved. 'S' can also be used
- sequentially. If no other commands intervene, consecutive 'S'
- commands will continue adding lines to the save buffer. If any other
- commands are entered between consecutive 'S' commands, the previous
- contents of the save buffer will be lost, and replaced with the new
- line. The 'A' command can be used to append lines to the current save
- buffer without losing the previous contents.
- The '/' command can be used with 'S' and 'G' to move text. Use
- 'S' to save the text to be moved, immediately delete the saved text
- with '/', then insert it at the new place with 'G'. The last line of
- the file is can be saved in the save buffer only once, and an error
- message will be printed if you attempt to save the last line a second
- time.
-
-
- nT - Tidy text
-
- The 'T' tidy command is specifically designed to improve the
- appearance of strictly text files. When entering letters and
- documents, is it usually desirable to have the lines filled to the
- right margin. However, after editing, it is common to find a jumble
- of uneven, difficult to read source lines. The 'T' tidy command will
- fill source text using the same right margin currently set for
- auto-wrap.
- Tidy performs essentially the same operation as a word processor
- fill function. Word are combined on one line until the auto-wrap
- margin is passed. The 'n' count refers to the total number of
- resulting lines, not the number of original lines. Specifying a large
- 'n' will tidy large sections of a document. The tidy command
- recognizes lines beginning with blanks,tabs, or a period and blank
- lines as special. It will not fill those lines, thus preserving
- paragraphs, tables and NROFF-like dot commands.
- One interesting capability of tidy is to put one word per source
- line. Set the auto-wrap margin to 2, then use the tidy command. The
- result will put one word per line.
-
-
- ^T - TERMINATE - ABORT EDIT SESSION
-
- The '^T' (Control-T) command aborts directly to the operating
- system. The original file is left untouched, and no backup file is
- created. This is a fairly dangerous command in that all editing
- performed will be lost (unless the '^B' file beginning command was
- used). You will be asked to confirm the '^T' command with a Y or N.
- If the '^T' is performed accidentally, the backup log file can be
- applied to the current version of the file after the '^T' has been
- edited out of the log file (no backup file will have been created
- after the '^T'). The '^T' command is most useful when you decide you
- don't want to make any changes and want to exit from TVX quickly.
- Exiting with the '^T' command is similar to using the 'R' read only
- switch at the beginning.
- If you have used the '^B' command, a work file copy of the
- original will have been written out containing all the edits performed
- before the '^B'. When you use '^T' and this work file has been saved,
-
-
- -10-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- a message informing you of its existence will be printed. You can
- then either use that file, or delete it at the operating system
- level.
-
-
- nU - Up
-
- The 'U' command moves the cursor up n lines, positioning the
- cursor at the beginning of the line.
-
-
- n^U - Up in column
-
- The '^U' (Control-U) is the opposite of '^D', and moves the
- cursor up in column.
-
-
- nV - Verify the screen
-
- In regular screen editing mode, the 'V' command causes the screen
- to be rewritten. This is sometimes necessary to get a true version of
- the screen after error messages have been written or when editing
- lines longer than 80 columns. On terminals without reverse screen
- scroll, the 'V' command forces the cursor to the home display line
- (usually line 16). In screen mode, 'V' ignores any n.
- In tty mode, the 'V' command is used to type lines from the file
- on the terminal. A negative n will type out lines preceding the
- current line. An n of 1 types the current line, with the current
- cursor position indicated by '/'. An n greater than 1 types the
- current line, plus the following n-1 lines. A command '-12v12v' would
- type 24 lines on the terminal: 12 before, the current line, and 11
- following.
-
-
- n^W - Write out buffer, read next one
-
- The '^W' (Control-W) command is used to explicitly go from one
- buffer to the next. By default, when n is >= 0, the entire current
- buffer is written to the new version of the file being edited, and the
- next buffer full of the original file (if any) is read in. If a
- negative n is supplied (any negative value, most easily -^W), then
- only the part of the buffer up to (but not including) the current line
- is written. Then as much more of the file as possible is read to the
- end of the current buffer. Thus, a negative n is useful when a file
- won't fit, and the split point is at an awkward place. It is also
- useful when a '^Y' yanked file won't fit.
-
-
- ^X - eXit
-
- '^X' (Control-X) causes the remainder of the file to be written
- out, and the editor exited. The entire file will be written, no
- matter where the cursor happens to be positioned when the '^X' command
- is entered. This is the normal conclusion of an editing session. All
- work files are deleted, the original file renamed to the back up file,
- and the newly edited file renamed to the original name. See the
-
-
- -11-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- appendix on tvx file handling conventions for more details.
-
-
- n^Y - Yank text to/from external file (file merge)
-
- A '^Y' (Control-Y) with a positive n is similar to 'S' save, but
- the text saved in the save buffer is read in from an external file
- instead of from the current buffer. When '^Y' is entered, the save
- buffer is cleared, the buffer compactor invoked, and then the user is
- prompted for the name of the file to read. TVX then will read as much
- of the external file into the save buffer as it can. The 'G' command
- can then be used to insert the save buffer text into the current file
- at the desired location. If there is not enough room in the save
- buffer to hold the entire file, then only part of the file is read and
- a diagnostic message printed. The '-S' switch can be used when TVX is
- first invoked to reserve a large save buffer for merging larger
- files. You can also use the '-^W' command to write out the front part
- of the file, and then 'G' to get the saved file. (Note: '^Y' may not
- be used from within a log command file. See section on backup log
- file.)
- A negative n (e.g., '-^Y') can also be used with the yank
- command. If the n is negative, then the contents of the save buffer
- will be written to a new file. After '-^Y' is entered, you will be
- prompted for the name of the output file, and then the contents of the
- save buffer will be written to that file.
-
-
- nBACKSPACE - Delete previous character
-
- The BACKSPACE key will delete the previous character on the
- screen. It is also used for editing input keystrokes for Insert,
- Find, and repeat loops.
-
-
- n; - Find again
-
- The ';' (semicolon) command causes the previous pattern to be
- searched for again. This is more convenient that entering 'F$'
- again. The 'n' has the same meaning, positive searches forwards,
- negative backwards.
-
-
- / - delete last thing
-
- The '/' (slash) command is useful when used with 'F' (find), 'S'
- (save), 'G' (get), 'TAB' (word right), and '{' (word left). It causes
- the last pattern used to be deleted. Thus "Fxxx$/Iyyzz$" will delete
- the pattern 'xxx' and insert 'yyzz'. When used after an 'S', it
- causes the just saved lines to be deleted from the text buffer (but
- not the save buffer). After the G, it causes the text just inserted
- from the save buffer to be deleted from the text buffer. After a
- 'TAB' or '{', '/' will delete the word or words just skipped over.
- Slash must be used immediately following an 'S', 'G', 'TAB', '{', 'F',
- '^F', or ';' command. This command knows how to take wild card
- matches into account.
-
-
-
- -12-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- = - delete last thing and enter insert mode
-
- The '=' (equals) command is the same as the '/' command, except
- insert mode is automatically, thus achieving the effect of '/I'
- command sequence.
-
-
- ' - Delete previous part of line (single quote)
-
- The "'" command will delete all the characters in the current
- line before the cursor.
-
-
- " - Delete rest of line (double quote)
-
- The '"' command will delete from the cursor forward to the end of
- the line. The "end of line" mark will remain. Note that the single
- quote has one tick, representing the "first" part of the line, while
- the double quote has two ticks, representing the "second" part of the
- line.
-
-
- , - beginning of line (comma)
-
- The ',' command will move the cursor to the beginning of the
- current line.
-
-
- . - end of line (period)
-
- The '.' command will move the cursor to the end of the current
- line.
-
-
- * - Insert last pattern found
-
- The last pattern found with the find command (up to 100
- characters) is saved in an internal buffer. The '*' command will
- insert that pattern into the text at the current cursor location. If
- the last find pattern included wild card characters, the pattern saved
- will be the actual text matched, and not the wild cards themselves.
- You must be back in command mode to use this command.
-
-
- nTAB, n{ - Skip over words
-
- The 'TAB' (TAB key, CTRL-I) and '{' commands skip over words. A
- word is any contiguous set of alphabetic characters (a-z) or digits
- (0-9). 'TAB' moves forwards, while '{' moves backwards. The 'n'
- count may be used to skip over several words at once, and a negative
- count reverses the direction of the move. Note that '{' is usually
- aliased to '[' since these are often reversed case on different
- terminals.
-
-
-
-
-
- -13-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- n< - begin repeat loop
-
- TVX has three different repeat loop buffers which allow an
- arbitrary sequence of commands to be repeatedly executed. When n< is
- typed, the editor echoes 'Repeat: n<' at the bottom of the screen.
- The user then types in any series of commands to be repeated n times.
- The repeat command is terminated with a matching '>' and a double
- escape (echoed as $$). Repeat loops may not be nested. The repeat
- loop has two typical useful functions: one is to replace multiple
- occurrences of a string with another (e.g., "10<fone$=two$>$$"), a
- second is to save a complicated sequence of commands to be repeated as
- necessary with the '&' command (i.e., a macro facility). Each repeat
- loop may have up to 100 characters.
- When a repeat loop is entered from the keyboard, it is saved in
- one of three repeat loop buffers, each identified by an integer
- value. The repeat buffer which is currently in use can be set with
- the 'n:R' command. Buffer 1 will be used by default. The number of
- repeat buffers available and the currently active one can be
- determined by using the 'M' command. The availability of three repeat
- buffers allows the definition of 'edit macros'. Commonly used
- sequences of editor commands can be saved in a given repeat buffer,
- then selected with 'n:R' and executed with the '&' command.
- For example, "3:R<fpat1$>$$" would select repeat buffer 3 and
- enter the repeat command into it (and execute the command once).
- Other "macros" could be entered in other buffers, and then the given
- example used again by "3:R&". A count 'n' of 0 can be used to enter a
- macro without executing it. The indirect command file facility ('@'
- command) can also be used to define and load commonly used macros.
- The results of using one repeat buffer from within another is not
- guaranteed, and should be tried only at your own risk.
- The '#' command has been provided to simplify the above
- sequence. Entering '23#4' for example, is exactly the same as
- entering '4:r23&'. The n value is a count, and the single digit after
- the '#' is the repeat buffer to use.
-
-
- >$$ - End of repeat loop
-
- The repeat loop is terminated by a '>' and a double escape.
- Note: '$$' represents escape.
-
-
- n& - execute repeat loop
-
- The '&' command executes the commands in the currently selected
- repeat buffer n times.
-
-
- n#k - execute repeat loop k
-
- This command is an easy to execute a specified repeat buffer.
- The n is a count and the k is a single digit repeat buffer number.
- This command is exactly equivalent to 'k:rn&'. Repeat buffer k
- becomes the current buffer after '#' is executed.
-
-
-
-
- -14-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- ? - Help
-
- The '?' command causes help screens do be displayed. There are
- two help screens. The first includes a summary of transitory values:
- a summary of settable ':' parameters, the contents of the repeat and
- find buffers, as well as buffer space left. On 16 or bit processors,
- if the space left is greater than 32,000 characters, then 30,000+x
- will be shown, where the total is 30,000 plus x. The first screen also
- shows the last 16 commands you have entered. This may be useful if
- you entered "commands" while you thought you were in insert mode to
- see what your keystrokes might have done. The second screen of help
- summarizes the command set.
-
-
- @ - Invoke command file
-
- Causes prompt for command file name. Commands in that file are
- then read in and executed. See description of backup command files
- below for details.
-
-
- n:P - Set special parameters
-
- The ':' (colon) command is used to set several TVX
- characteristics. The value n entered before the ':' is the value to
- set the parameter to, and the character P that follows the ':' defines
- the parameter to set. Valid parameters include:
-
- n:A - set autoindent. A value of 1 turns on autoindent, 0 off.
- Autoindent is useful for programmers. When autoindent is on, each
- new line started while in insert mode will be indented to the same
- leading tab/blank space as the previous line. Use blanks or tabs
- to add indentation, and backspace to backup over indentation.
-
- n:D - set home "display" line to n. The display line is the line the
- cursor homes to after a verify command. (Default home display
- line: 16 on 24 line terminals, 9 on 16 line terminals.)
-
- n:E - Expand tab value. The default value for ':E' is 8, which causes
- the tab character (^I) to be expanded to multiples of 8 columns.
- This is the standard used on most systems. Setting ':E' to 0 will
- cause tabs to be displayed as '^I' instead. Other values are
- possible, but less useful.
-
- n:F - Find case mode: n <= 0 sets find mode to search for exact case
- of pattern, n > 0 (default) set search mode to ignore upper/lower
- case.
-
- n:M - Match wild cards. (default=1). If on, then matching of the TVX
- wild card sets is enabled. If off, then the wild card control
- characters will match the actual control characters in the file.
-
- :o - set output file name. When ':o' is entered, you will be prompted
- for the name of the edited output file. This overrides the '-o'
- command line switch, and can be used to change your mind about the
- name of the edited file. If the output file name is different than
-
-
- -15-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- the input file name, the input file will not be renamed to the
- backup file name.
-
- n:R - select repeat buffer n. (default=1). Repeat buffer n becomes
- the current repeat buffer executed with the '&' command. The 'm'
- status command will show how many repeat buffers are available for
- a given implementation.
-
- n:S - scroll lines: This parameter sets how many lines the cursor will
- move before the screen scrolls. The exact effect of the scroll
- parameter depends on the terminal characteristics. On terminals
- that allow a blank line to be inserted at the top, ':S' sets how
- many lines cursor will move above and below home display line
- before scrolling. Default is 0. Changing the scroll value to 4
- would let the cursor move up and down 4 lines from the home display
- line before actually scrolling the screen. Some users might find
- this update mode more pleasant to use. This will be almost
- essential on heavily loaded time shared systems. For terminals
- that do not allow a blank line to be inserted at the top (no
- reverse scroll), 'n:S' sets how many lines cursor will move above
- the home display line before the screen is rewritten. Default is
- 14, which causes the cursor to move nearly all the way to the top
- before rewriting the screen.
-
- n:T - tty mode. A 0 is screen mode, a 1 is tty mode.
-
- n:V - virtual window lines. The 'n:V' will set the virtual window to
- n lines. N must be between 3 and the number of hardware lines on
- the terminal. A smaller virtual window is extremely useful on busy
- time shared systems, or when TVX is used over a telephone line at a
- relatively slow baud rate. Typically, a virtual window of 7 or 9
- is big enough to show a reasonable part of the file, yet small
- enough to reduce the overhead of screen update at slow speeds. A
- window of 3 or 5 can even be used if needed. Note that the virtual
- window can be set at start up time by using the '-#' switch. The
- virtual window will use the top n physical lines of the display.
- Error messages and prompts will still be displayed on the bottom
- physical line. Scanning up with 'u' will cause the lines to be
- scrolled onto the unused part of the screen, and gives a true
- picture of the file showing more lines than the window size.
-
- n:W - set auto wrap width. The ':W' parameter sets the column number
- used for auto wrap mode. When the auto wrap is set to a value
- greater that 1, TVX will automatically insert an end of line when
- the user types the first blank after the given column. Normally,
- the user must manually hit the RETURN key to force an end of line.
- The auto wrap mode allows continuous entry of text without worrying
- about the right margin. A good value to use for ':W' is 10 columns
- less than the screen width (70 on 80 columns screens).
-
- An invalid parameter value or name causes an error message.
-
-
-
-
-
-
-
- -16-
-
-
-
-
- TVX Reference Manual 11/27/85
-
-
- *** BACKUP LOG FILE FEATURE ***
-
- TVX has a backup log file feature. When the feature is enabled,
- all commands entered in any given session are saved on a file called
- "BACKUP.LOG" on the currently logged drive on CP/M and the current
- directory on MS-DOS and Unix systems. If for some reason you destroy
- your file during an editing session (like accidentally entering
- "100^K" instead of "100K"), you won't have to manually re-edit the
- backup version of the file. (By default, the log file is disabled.)
- The 'B' invocation time switch will respectively disable or enable the
- log file feature.)
-
- The "BACKUP.LOG" (the CP/M convention will be used in this
- description) file contains all the commands you entered in the last
- session. Most commands will appear in the log file as you entered
- them: R, U, D, etc. However, all control characters, backspace, and
- the atsign are encoded in the log file to make them appear as
- printable characters. The atsign '@' is used as an encoding
- character. So, for example, tabs appear as '@I', escapes as '@[',
- RETURNs as '@M', and so on. Control-A would appear as '@A'. The '@'
- itself would appear as '@@'. Backspace appears as '@H'. These escape
- sequences may be split across the end of a line in the log file. The
- end of line marks in the log file are not part of the command stream
- and are ignored.
-
- The procedure for using the "BACKUP.LOG" file to restore your
- file is as follows. When you realize you have made a mistake, enter
- the '^X' exit command. Copy "BACKUP.LOG" to a temporary working
- file. Now edit that temporary version of the log file to remove the
- mistakes, which should be near the end of the file.
-
- Once the log file has been edited to remove the bad commands, you
- should then re-edit the original file (the one without the mistakes).
- The latest version of the file will be the one with the mistakes, and
- should usually be killed. Start TVX and read in the file. Then enter
- the '@' command and supply the name of the "repaired" log file. All
- the commands in that log file will be applied to the original file.
- You should be careful to start the '@' command when the cursor is at a
- specific place such as the beginning of the file. After the '@'
- command is finished, your file will be in the same shape it was before
- the mistake.
-
- For example, suppose you are editing a file called "MYFILE0.TXT"
- and that you accidentally kill 100 lines. When you realize your
- mistake, you enter '^X' to exit. Then you should copy or rename the
- BACKUP.LOG file to a new temporary file - say FIX.LOG. The current
- version of the file you were editing is the bad file and should be
- deleted. On CP/M and MS-DOS versions, you would rename MYFILE0.BAK to
- be MYFILE0.TXT again. Then, edit FIX.LOG to remove the command that
- killed 100 lines and the quit command ("100@K@X"). Exit again, and
- re-edit MYFILE0.TXT. If you then enter the '@' command, and respond
- with FIX.LOG as the name of the command file, your file will be
- brought back to the state it was in right before the '100^K'.
-
- There are two cases that require special attention when using the
- backup log file. If you used a '^B' command during the session with
-
-
- -17-
-
-
- S
-