home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource3
/
178_01
/
tvx_refa.doc
< prev
next >
Wrap
Text File
|
1986-01-28
|
50KB
|
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