home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
windows
/
tpe.zip
/
TPE.DOC
< prev
next >
Wrap
Text File
|
1990-03-15
|
73KB
|
1,582 lines
TPE: Turbo Powered Editor
Version 2.0
Brian Foley
TurboPower Software
March 1990
Introduction
------------------------------------------------------------------------------
TPE is a programmer's editor that we at TurboPower Software developed for our
own use. TPE was created initially by fusing together parts of two editors in
Borland's Editor Toolbox, FirstEd and MicroStar. Over time, however, TPE has
evolved into a fairly distinctive program. The architecture remains the same,
but the list of features has changed substantially. We'll get to those in a
moment.
As you may have noticed, this is version 2.0 of TPE. What happened to version
1.x? Well, as we said, TPE was developed primarily for our own use, and for
the most part it has remained "our little secret" for roughly three years. We
have given it to various friends and acquaintances during that time, however,
and many of them have become overnight converts. "Why don't you put it on
CompuServe?" they would ask. "We don't want to face the non-stop stream of
requests for enhancements. Everyone has his own idea of how a text editor
should work," we would reply. Or "Why don't you sell it?" they would ask. "We
don't want to get into that market. We like the business we're in." And we
still feel that way.
So why are we releasing TPE to the public at this late date? The main reason
is that an awful lot of Turbo Pascal programmers we talk to seem to need it,
or at least something like it. Many really like the Turbo Pascal IDE, the ease
with which they can go from editing to compiling to debugging, but they are
increasingly feeling cramped by the program's memory requirements. Many also
like the alternative IDE in our Turbo Analyst package, but feel constrained by
the limitations of its editor. These are problems that we just don't face
ourselves, and the simple reason is that we use TPE for almost everything we
write. We finally decided that it just wasn't right to keep it to ourselves
any more. So here it is.
Since the list of features in TPE is indeed long, we'll just hit on some of
the highlights here:
- Up to eight zoomable and resizable windows for editing multiple files
or different parts of a single file
- Edit files as large as will fit into memory
- Cut and paste between windows
- WordStar-compatible command structure
- Fully configurable keyboard
- Word wrap, smart tabs, fixed tabs, autoindent mode
- Keyboard macro system, search-and-apply-macro command, ability to create
self-repeating and self-aborting macros
- Text markers
- Undo command
- Four line-drawing modes
- Solid (block) cursor option
- Commands for indenting, aligning, and reformatting blocks of text
- Brace-matching commands for finding mismatched comment braces,
parentheses, etc.
- Support for the EGA's 43-line and the VGA's 50-line mode
- Swapping exec function--TPE uses only 4K of memory while executing DOS
commands or other programs
- Hotkey access to compiler, assembler, and debugger
In comparison with the best known commercial programmer's editors, TPE really
lacks only three things: 1) It cannot edit files larger than will fit in
memory. 2) It does not have a full undo facility, just a simple undelete
function. And 3) its macro system is fairly simplistic.
On the other hand, TPE has the three F's: it's Fast, Flexible, and Free.
Installing TPE with TINSTALL
------------------------------------------------------------------------------
Before using TPE, you will want to run the installation program that comes
with it, TINSTALL. There are many configuration options available in TINSTALL,
but only a few are truly important, so we'll cover those first.
When you load TINSTALL, you'll be presented with a scrollable data entry
screen that displays several basic configuration options. The ones we're
interested in now are on subsequent pages. To get to them, press either <Down>
or <PgDn>.
The following are the configuration options you should set initially:
Configuration option Default setting (if any)
---------------------------------------- -----------------------------------
Printer to use LPT1
You can choose LPT1, LPT2, LPT3, COM1, or COM2. This setting is important
only in the sense that you can't print with TPE if it is wrong.
Name of swap file $TPE$.SWP
This option is important only if your machine lacks EMS, or if you don't
have enough EMS for TPE to use it when swapping itself out before
executing other programs. (The amount of EMS needed varies depending on
the number of files loaded, etc., but at least 130K is needed in all
cases.) The default filename is fine, but you will probably want to
specify a complete pathname, so that the swap file will always be in the
same place.
Pathname for compiler C:\TP55\TPC.EXE
Primary options for compiler /M /$D- /$L- /L
Secondary options for compiler /M /$D+ /$L+ /L /V
These let you specify the complete pathname for your compiler and any
command line options that should be sent to it. The two sets of options
correspond to two different Compile program commands in the editor. This
allows you to easily alternate between compiling with or without debug
information.
Pathname for assembler C:\TASM\TASM.EXE
Options for assembler
These let you specify the complete pathname for your assembler and any
command line options that should be sent to it. Note that TPE doesn't
know whether or not the program is really an assembler. The program you
specify here can be just about anything that works with source files:
another compiler, a program lister, a pretty printer...
Pathname for debugger C:\TD15\TD.EXE
Options for debugger
These let you specify the complete pathname for your debugger and any
command line options that should be sent to it.
Directory for supporting files
This setting determines where TPE will look for its help file (TPE.HLP)
and its standard macro file (TPE.MAC). Typically this will be the
directory containing TPE.EXE. If no directory is specified here, TPE will
look in the current directory, the directory from which the program was
loaded (under DOS 3.x or higher), and the directories on the DOS path.
Of the remaining configuration options, only a couple require detailed
explanations, so we'll go over those next.
On the next to last page of configuration options, you'll find a section
labelled "Video attributes". The options in this section let you change the
colors used by TPE. There are two sets of colors: one for color systems, the
other for monochrome adapters and color adapters running in a black-and-white
video mode (BW80). These are the color settings and what they mean:
Attribute Color Mono
---------------------------------------- ------- ---------------------------
Text 1E 07
Ordinary text within an editing window.
Marked blocks 1B 0F
Color used to highlight marked blocks. Also used to display control
characters embedded in the text.
Text markers 5F 09
Color used to display text markers (sometimes called bookmarks).
Highlighted search text 4F 70
Color used to temporarily highlight text found in a search operation.
Window status line 2F 70
Color used for each window's status line.
Command line 0B 07
Color used for the command line at the top of the screen.
Block cursor 4F 70
Color used for a solid (non-blinking) block cursor.
Menu items (unselected) 3F 07
Color used for unselected items in a menu (filenames in a directory list,
for example).
Menu items (selected) 3F 0F
Color used to highlight a selected item in a menu.
Menu items (alternate) 4F 70
Alternate color used for unselected items in a menu (directory names in a
directory list, for example).
Menu frame 3E 0F
Color used for the frame around a menu/pick list.
When the cursor is on one of these fields, the line at the top of the screen
will change colors to give you a sample of the current color setting for that
particular item.
There are two ways to change one of these colors. If you know the hex value
for the color you want, you can just enter it. For example, for white text on
a red background, you'd enter "4F". The easier way is to press <F10> and
select the color you want with the cursor keys. When you've got the correct
color highlighted, press <Enter>.
The other option that requires special comment is the very last one, Modify
key assignments, which you can get to quickly by pressing <CtrlPgDn>. When you
press <Enter> with the cursor on this field, a new window will appear that
shows all the commands in TPE and the keys they are assigned to.
To change or add a key assignment, move the highlight bar to the one you want
to modify and press <Enter>, then press the key(s) you want to assign the
command to. While entering a key assignment, the following commands are
available:
<BkSp>, <CtrlBkSp>
Delete last key
<CtrlC>, <CtrlY>
Clear the key assignment
<CtrlR>, <CtrlQ><L>
Restore the previous value
<Enter>
Accept key assignment
<Esc>, <CtrlBreak>
Cancel the operation
If you need to enter one of these keys as part of the key assignment, press
<ScrollLock> to switch to literal mode rather than command mode, enter the
key(s), then press <ScrollLock> to switch back to command mode.
To accept any changes that you have made and return to the main entry screen,
press <Esc> or <CtrlEnter>. TINSTALL will then check to make sure that there
are no conflicts among the key assignments. If any conflicts are found, an
error message will be displayed and the keys causing the conflicts will be
highlighted. TINSTALL will not allow you to return to the main entry screen
until you have resolved all conflicts. If you decide that you'd rather just
leave the keys the way they were before you made your changes, you can press
<CtrlR> to Restore the default settings, then press <Esc>.
The rest of the options are fairly self-explanatory, so we'll give only a
brief description of what they mean. Most of them correspond to TPE commands
that we'll be discussing later.
Configuration option Default setting (if any)
---------------------------------------- -----------------------------------
Editing options
Insert mode on by default Y
If Yes, insert mode will be the default, else overtype mode.
AutoIndent on by default Y
If Yes, autoindent mode is on by default.
Word wrap on by default Y
If Yes, word wrap is on by default.
Fixed tabs on by default N
If Yes, fixed tabs will be the default, else smart tabs.
Compress lines before wrapping Y
If Yes, excess white space will be compressed out of a line when wrapping.
Default left margin 1
Specifies the default left margin.
Default right margin 78
Specifies the default right margin.
Default size for fixed tabs 8
Specifies the default spacing for fixed tabs.
Indent level for marked blocks 2
This setting governs the behavior of the indent and unindent block
commands.
Lines to reserve on undelete stack 20
Specifies the size of the stack used to store deleted lines.
Window options
Use block cursor when editing Y
If Yes, a solid block cursor is used rather than a blinking cursor.
Zoom windows by default N
If Yes, new windows will be zoomed when first opened.
Printing options
Send formfeed at end of print job Y
If Yes, a formfeed is sent to the printer at the end of each print file or
print block command.
Exec options
Default extension for executables EXE
Normally this will be "EXE"; change it to "COM" only if you write mostly
programs that compile to COM files.
Use EMS if available Y
If Yes, EMS is used for swapping if it is available.
Display "Swapping..." message Disk
Determines whether or not a "Swapping" message is displayed when executing
other programs. If "Disk", it is displayed only when swapping to disk. If
"Always", it is displayed when swapping to disk or EMS. If "Never", it is
never displayed.
Confirm parameters Y
If Yes, you will be given a chance to edit the command line sent to a
program being executed.
File options
Create BAK files when saving Y
If Yes, TPE will rename existing files with a BAK extension before
overwriting them.
Expand tabs to spaces when reading Y
If Yes, tab characters are expanded to spaces when reading in a new file.
Compress spaces to tabs when writing N
If Yes, spaces are compressed to tab characters when writing a file to
disk.
Default extension for filenames PAS
Extension to be applied to filenames when none is specified. If you don't
want one to be applied, leave this field empty.
Screen options
Edit in 43-/50-line mode on EGA/VGA N
If Yes, TPE will switch to 43-/50-line mode when the program first starts.
Suppress snow (CGA adapters only) Y
If Yes, TPE will try to suppress snow when writing to video memory on a
CGA card.
Brief digression: As you look at the default settings, you'll see that the
program is configured for use with Turbo Pascal 5.5, Turbo Assembler, and
Turbo Debugger. That doesn't mean it can't be used with other languages and
tools, however. One of the most enthusiastic users of TPE is a C programmer,
and another programs mostly in assembly language.
Now, when you have set the options the way you want them, press <CtrlEnter>.
TINSTALL will then save any changes you have made by modifying TPE.EXE, and it
will write a new version of TPE.HLP that reflects the key assignments you have
specified. Note that, if it doesn't yet exist, TPE.HLP will be created whether
you have modified any configuration settings or not. If you haven't changed
anything and you don't want TPE.HLP to be created, or if you want to cancel
the changes you have made, press <Esc> to exit instead of <CtrlEnter>.
Starting TPE
------------------------------------------------------------------------------
Now that you've got TPE installed for your system, you're ready to run the
program. TPE expects a command line of the following form:
TPE [filename1] [filename2] [filename3]
That is, you may specify up to three filenames on the command line. If you
have given TPE a default extension to use ("PAS" is the default), it will
apply it to these filenames if no extension is specified. For example, to edit
MYPROG.PAS, you could enter either of the following
tpe myprog
tpe myprog.pas
If you need to edit a file without an extension, add a period to the end of
the name:
tpe readme.
Although a filename may contain wildcards, TPE will ignore all filenames
thereafter. That is, the following will work:
tpe myprog myprog.inc *.doc
TPE would load MYPROG.PAS and MYPROG.INC into the editor, and it would then
display a list of all files in the current directory with an extension of DOC.
This will not work, however:
tpe *.pas myprog.inc *.doc
TPE would ignore everything after "*.pas".
If you don't specify any filenames as parameters, TPE will start by displaying
a directory list. If there's a default extension, it will use that extension
(e.g., "*.PAS"); if not, it will display all files in the directory (if memory
allows). If you press <Esc> twice, TPE will create a "NONAME" file for you to
edit, which you can rename later when you go to save the file.
As indicated earlier, the top line of the screen is used as a command line.
It's where you respond to requests for search strings, filenames, etc., and it
is also used to display messages. The remainder of the screen is used for the
editing windows, up to 8 of them at a time. At the top of each window is a
status line of the following form:
»SAVE« FILENAME.EXT Line nnnn Col nnn Byte nnnnn INS SMT AI WW * TE »ZOOM«
The "»SAVE«" indicator is present only when the file has been modified. If you
are in a line-drawing mode, it will be replaced by a series of characters that
indicate which of the four modes you are in (e.g., "─│┌┐└┘"). Or, if
<ScrollLock> is on, "ScLock" will appear here instead, to indicate that the
line drawing mode is being temporarily overridden.
"FILENAME.EXT" is the name of the file being edited. If you need to be
reminded of its full pathname, use the <AltI> command.
The next three slots on the command line indicate the position of the cursor
relative to the beginning of the file.
"INS" means that you are in insert mode. "OVR" means that you are in overtype
mode.
"SMT" means that smart tabs are in use. "FXT" means that fixed tabs are in
use.
"AI" means that autoindent mode is in effect.
"WW" means that word wrap is on.
"*" indicates that snow-checking is on. It will never appear unless you have a
CGA card.
"TE" means that tab expansion is on (when reading files).
"»ZOOM«" means that the current window has been zoomed. If macro recording is
on, "RECORD" will appear here instead. Or, if a macro is currently being
played back, "MACRO!" will appear here until the macro is finished. (This
visual reminder is useful because screen updates are suppressed while a macro
is in progress.)
The next few sections provide descriptions of all the commands in TPE,
arranged into categories. The one that you will probably find most useful at
first is the help command, <F1>, which opens a new window and loads TPE.HLP
into it. This file, created by TINSTALL, gives a complete list of all the
commands (arranged pretty much as they are here) and the keys they are
assigned to.
Basic Cursor Movement Commands
------------------------------------------------------------------------------
Character left <Left>, <CtrlS>
Cursor left one character.
Character right <Right>, <CtrlD>
Cursor right one character.
Word left <CtrlLeft>, <CtrlA>
Cursor left one word. A "word" is any sequence of characters delimited by
one of the following characters: space, tab, carriage return, line feed,
< > , . / ? ; : " [ ] { } - = \ + | ( ) * % @ & ^ $ # ! ~. If the cursor is
at the beginning of a line, it is moved to the end of the previous line.
Word right <CtrlRight>, <CtrlF>
Cursor right one word. If the cursor is at the end of a line, it is moved to
the beginning of the following line.
Cursor to left side <Home>, <CtrlQ><S>
Cursor to beginning of line.
Cursor to right side <End>, <CtrlQ><D>
Cursor to end of line--i.e., the position following the last non-blank
character on the line. Trailing blanks are always removed from all lines to
preserve space.
Line up <Up>, <CtrlE>
Cursor up one line.
Line down <Down>, <CtrlX>
Cursor down one line.
Scroll up <CtrlW>
Scroll window up one line. The cursor will remain on the current line unless
that line is at the bottom of the window.
Scroll down <CtrlZ>
Scroll window down one line. The cursor will remain on the current line unless
that line is at the top of the window.
Page up <PgUp>, <CtrlR>
Scroll window up one page.
Page down <PgDn>, <CtrlC>
Scroll window down one page.
More Cursor Movement Commands
------------------------------------------------------------------------------
Top of file <CtrlPgUp>, <CtrlQ><R>
Cursor to beginning of file.
End of file <CtrlPgDn>, <CtrlQ><C>
Cursor to end of file.
Top of window <CtrlHome>, <CtrlQ><E>
Cursor to top line of current window. The cursor remains in the same column.
Bottom of window <CtrlEnd>, <CtrlQ><X>
Cursor to bottom line of current window. The cursor remains in the same
column.
Up to equal indent <CtrlJ><B>
Moves the cursor to the beginning of the first previous line with the same
indentation level as the current line. For example, if the first non-blank
character in the current line is at column 20, the cursor is moved to the
next line up that also begins at column 20.
Down to equal indent <CtrlJ><E>
Moves the cursor to the beginning of the next line with the same indentation
level as the current line.
Go to line <CtrlJ><L>
Prompts for a line number, then moves the cursor to the specified line. Any
positive integer value in the range 1 to 32767 is valid. If the value is
preceded by a plus (+) or minus (-) sign, the target line number will be
calculated relative to the current line. If the target line number is greater
than the number of lines in the file, the cursor will be moved to the last
line in the file.
Go to column <CtrlJ><C>
Prompts for a column number, then moves the cursor to the specified column of
the current line. Any positive integer value in the range 1 to 999 is valid.
If the value is preceded by a plus (+) or minus (-) sign, the target column
number will be calculated relative to the current column. If the target column
is greater than 999 or less than 1, the command is ignored.
Go to byte <CtrlJ><A>
Prompts for an byte offset, then moves the cursor to the specified absolute
offset within the file. If the value is preceded by a plus (+) or minus (-)
sign, the target offset will be calculated relative to the current offset. If
the target offset is greater than the number of bytes in the file, the cursor
will be moved to the end of the file.
Previous cursor position <CtrlQ><P>
Jump to the position the cursor was at before it was moved to the current
line. This command is especially useful following a global search or replace
operation.
Match braces forward <CtrlQ><[>
This command may be used to locate a matching "brace" character or character
pair. For example, if the cursor is on a '{' character, this command would
move the cursor to the corresponding '}'. The following characters and
character pairs may be matched:
' ' single quotes
" " double quotes
( ) parentheses
[ ] square brackets
< > angle brackets
{ } Pascal-style comment braces
(* *) Pascal-style comments
/* */ C-style comments
Note that this command accounts for nested braces. For example, if the cursor
were on the first '(' in
I := (X*(Y+Z));
the cursor would move to the ')' preceding the ';', not the one following the
'Z'. Although the name of the command implies that it always searches in a
forward direction, in most cases the search direction is determined by the
character that the cursor is on. For example, if it is on a '}', it will
search backwards. The only exceptions are the single- and double-quote
characters, cases in which the search direction cannot be inferred. This
command will always search forward for a match in these cases.
Match braces backward <CtrlQ><]>
This command is identical to the Match braces forward command, except in those
cases where the cursor is on single- or double-quote character. In these
cases, the command will always search backward.
Insertion and Deletion Commands
------------------------------------------------------------------------------
New line <Enter>
In insert mode, this command inserts a line break at the position of the
cursor; if autoindent mode is in effect, the cursor moves to the next line and
to the same column as the first non-blank character in the previous line;
otherwise, to column 1 of the new line. In overtype mode, this command moves
the cursor to column 1 of the next line without inserting a new line, whether
autoindent mode is in effect or not.
Insert line <CtrlN>
Inserts a line break at the position of the cursor without moving the cursor.
Insert control char <CtrlP>
Allows control characters to be entered into the text. For example, pressing
<CtrlP><CtrlG> would insert a ^G into the text (pressing <CtrlP><G> would
insert a G). Control characters are always displayed as highlighted capital
letters in the color used for marked blocks.
Delete current character <Del>, <CtrlG>
Deletes the character under the cursor and moves any characters to the right
of it one position to the left. This command does not work across line
breaks.
Delete left character <Bksp>, <CtrlBksp>
Moves the cursor one character to the left and deletes the character there.
Any characters to the right of the cursor are moved one position to the left.
If the cursor is at the beginning of a line, the current line will be joined
with the previous line.
Delete right word <CtrlT>
Deletes the word to the right of the cursor (see the definition of "word"
given above for the Word left command). This command works across line breaks
and thus may be used to remove line breaks.
Delete line right <CtrlQ><Y>, <F6>
Delete all text from the cursor to the end of the line.
Delete line <CtrlY>, <CtrlF6>
Delete the current line.
Delete line (no undo) *none*
This command is the same as the Delete line command, but the deleted line is
not saved in the undo buffer. It is potentially useful when using the undo
buffer to temporarily store lines being moved.
Tab Commands
------------------------------------------------------------------------------
Tab <Tab>, <CtrlI>
Moves the cursor to the next tab stop. If insert mode is on, any text to the
right of the cursor is moved to the right of the tab stop. When fixed tabs are
in effect, the tab stops occur at 8-column intervals (by default). When smart
tabs are in effect (the default setting), the tab stops are determined by the
locations of the words on the previous line; the first character in each word
represents a tab stop.
Backward tab <ShTab>
Moves the cursor to the previous tab stop. This command does nothing if smart
tabs are in effect.
Toggle fixed tabs <CtrlO><F>
Toggles the tab mode between smart tabs and fixed tabs.
Set tab size <AltS><AltT>
Prompts the user for the number of columns between tab stops. The value
specified must be in the range 1..100.
Toggle tab expansion <AltT><AltT>
Activates or deactivates option to "expand" tab characters to spaces when
reading in files created with other editors. The assumed size of the tabs is
specified with the Set tab size command.
Toggle tab writing <AltT><AltW>
Activates or deactivates option to compress spaces to tab characters when
writing files to disk. The assumed size of the tabs is specified with the Set
tab size command. Note that TPE will not try to compress spaces within
quotation marks.
Undo Commands
------------------------------------------------------------------------------
Restore line <CtrlQ><L>, <ShF6>
Restore the original contents of the current line.
Undo last deletion <CtrlQ><U>, <AltU>
Used to restore whole lines deleted with the Delete line or Delete block
commands. It will not restore single characters or words. To "undo" your most
recent changes to the current line, use the Restore Line command. The size of
the "undo buffer" used to save deleted lines may be specified with the Set
undo limit command or with TINSTALL.
Insert undo buffer <CtrlQ><V>
Inserts the entire contents of the undo buffer into the current window just
prior to the current line. This command is intended primarily to be used in
macros.
Flush undo buffer <CtrlQ><J>
Empties the undo buffer. This command is intended primarily for use in
macros, in cases where you wish to use the undo buffer as a scratchpad.
Set undo limit <AltS><AltU>
Allows you to set the size of the "undo buffer" used to store deleted lines.
The default value is 20 lines. The size of this buffer may also be set with
TINSTALL.
Search and Replace
------------------------------------------------------------------------------
Find pattern <CtrlQ><F>, <F4>
This command lets you search for any string of up to 67 characters. When you
enter this command, you will be prompted for a search string. The last search
string entered (if any) will be displayed as a default. You may select it
again by pressing <Enter>, edit it, or enter a new search string. <Esc> or
<CtrlU> will cancel a search command, and <CtrlP> may be used to enter control
characters: for example, to find a period at the end of a line, you would
enter <.><CtrlP><CtrlM>.
After the search string is entered, you are asked for search options. The
options you used last are displayed at first. You may enter new options, edit
the current options, or select them by pressing <Enter>. The following options
are available:
B Search backward from the current position of the cursor toward the
beginning of the file.
G Search globally. The entire file is scanned for the search string,
regardless of the current position of the cursor. The search starts at the
beginning of the file if searching forward; at the end if searching
backward.
L Search only within the currently marked block.
n Find the n'th occurrence of the search string. The search starts at the
position of the cursor unless the L or G option is also specified.
U Ignore case; treat all alphabetic characters as if they were in upper
case.
W Search for whole words only; skip matching patterns that are embedded in
other words.
If the text contains a target matching the search string, the target is
highlighted and the cursor is positioned just beyond it.
Find and replace <CtrlQ><A>, <F3>
This command allows you to replace one string of up to 67 characters with
another. You will be prompted first for a search string, next for a
replacement string, and finally for the search options. The valid options are
the same as those for the Find pattern command, with the following exceptions:
N Replace without asking.
n Make a maximum of n replacements. (Overridden by L option.)
If the text contains a target matching the search string, the target is
highlighted and the cursor is positioned just beyond it. You are then asked if
you wish to replace it. Press <Y> to replace it, <N> to ignore it, <A> to
replace it and all subsequent matches without asking, or <Q> to abort the
operation. If the N option was selected, this question will not be asked.
Search and apply macro <CtrlQ><M>
The Search and apply macro command lets you search for any string of up to 67
characters and then "apply a macro" to it: that is, move the cursor to the
location of the target, and execute the commands stored in the macro. Search
strings are entered in the same way that they are for the Find pattern
command. After the search string is entered, you are shown a menu containing
all of the macros you've defined. Move the highlight with the up and down
cursor keys, and select the macro to apply by pressing <Enter>. You can abort
the operation by pressing <Esc>.
Finally, you are prompted for options. The options you used last are
displayed at first. You may enter new options (canceling the old ones), edit
the current options, or select them by pressing <Enter>. All the options
available for the Find and Replace command are available here as well. The
screen will not be updated while a search and apply macro operation is being
performed. If you need to stop it, use the Abort command (<CtrlU>).
The Search and apply macro command can be invoked inside a macro, making it
possible to create an almost unlimited array of special commands. Note,
however, that it may not be invoked recursively. That is, the macro to be
applied may not itself execute the Search and apply macro command.
Find next <CtrlL>
Repeat the last search operation, if any. If the last search command called
for a Find pattern operation, the same search string and options will be used
to repeat it. If it was a Find and replace operation, the replacement string
will be reused as well. If it was a search and apply macro operation, the
search string, options, and macro will all be reused. Note that if a search
and apply macro operation is in progress, the last search operation will
temporarily be considered Find pattern, to allow the macro to search for a
second instance of the same string. For example, suppose you wanted to delete
all text not within single quotes from the following block:
'One', abcdefg
'Two', hijklmn
'Three', opqrstu
To do this, you could search for a single quote, and then apply the following
macro to it:
<BkSp> Delete the first '
<CtrlL> Find the second one on the line
<Left> Move cursor over the second '
<CtrlQ><Y> Delete to end of line
To perform this operation on the entire block, you would specify "LN" as your
search options.
File Commands
------------------------------------------------------------------------------
Edit another file <AltF3>
Load a new file into the current window. If the file being edited has been
modified, you'll be asked to confirm that you wish to abandon it.
Save and continue edit <CtrlK><S>, <F2>
Save the current file and continue editing.
Abandon file <CtrlK><Q>, <AltF2>
Abandon the current file and close its window. If the file has been modified,
and it is not being edited in another window, you will be asked to confirm
this request.
Save and exit to DOS <CtrlK><X>, <CtrlF2>
Save the current file and close its window. If the current window is the only
window, this command exits to DOS.
Save all and exit to DOS <AltX>
Save all modified files and exit to DOS.
Save all and continue <ShF2>
Save all modified files and continue editing. This command is especially
useful in macros that execute other programs.
Save/switch files <CtrlK><D>
Save the current file and load a new one into the current window.
Write to named file <CtrlK><N>
Save the current file under a new name.
Read block <CtrlK><R>, <AltF10>
Reads a file into the window at the current position of the cursor and marks
it as a block.
Write block <CtrlK><W>, <F10>
Writes the currently marked block to a file. You are first prompted for a
filename. If the file already exists, you are asked if you want to append the
block to the file or to overwrite it; if it does not exist, a new file is
created. The block is left unchanged, and the block markers remain in place.
If no block is marked, this command is ignored.
Window Commands
------------------------------------------------------------------------------
Add window <CtrlO><A>, <AltW>
Opens another text window. You will be prompted for a file to edit; if none is
specified, a "NONAME" file is created, which you may later save as a named
file using any of the Save file commands described above. If too many windows
are open, you will get an error message. If you enter the name of a file
already being edited, the new window will allow you to view a different
section of the file than is displayed in the first window.
Previous window <CtrlO><P>, <ShF1>
Makes the previous text window the current window.
Next window <CtrlO><N>, <AltF1>
Makes the next text window the current window.
Resize current window <CtrlO><S>
Allows you to change the size of the current window. You adjust the size by
pressing the up and down cursor keys. When you are finished, pressing <Enter>
or <Esc> returns you to the editor.
Zoom current window <CtrlO><Z>, <AltZ>
Zooms the current window to fill the entire screen, hiding the other text
windows. When a window has been zoomed, "»ZOOM«" will appear at the top right
corner of the status line. If you change windows while zoomed, the window you
change to will be zoomed as well. If only one window is open at the time this
command is given, the command does nothing except request that the next window
opened should be zoomed.
Block Commands
------------------------------------------------------------------------------
Begin block <CtrlK><B>, <F7>
Marks the beginning of a block. The marker itself is not visible on the
screen, and the block becomes visible only when the end block marker is set.
You may also use the begin block marker as an extra text marker and jump
directly to it with the Top of block command.
End block <CtrlK><K>, <F8>
Marks the end of a block. Like the begin block marker, the end block marker
is invisible, and the block itself will not be displayed unless both markers
are set. You may also use the end block marker as an extra text marker
and jump directly to it with the Bottom of block command.
Top of block <CtrlQ><B>
Moves the cursor to the position of the block begin marker. The command works
even if the block is hidden or the block end marker is not set.
Bottom of block <CtrlQ><K>
Moves the cursor to the position of the block end marker. The command works
even if the block is hidden or the block begin marker is not set.
Copy block <CtrlK><C>, <AltF7>
Copy the currently marked and displayed block to the position of the cursor.
The block markers are placed around the new copy of the block.
Move block <CtrlK><V>, <AltF8>
Move the currently marked and displayed block to the position of the cursor.
The block markers remain around the block at its new position.
Delete block <CtrlK><Y>
Delete the currently marked and displayed block. Although the Undo command can
usually restore portions of an accidentally deleted block, there is no command
to restore a deleted block in its entirety, so you should use this command
with care.
Toggle block display <CtrlK><H>
Toggle the display of marked blocks. Note that several of the other block
commands do nothing or generate error messages if a marked block is not
displayed.
Mark current word <CtrlK><T>
Mark the current word as a block. See the description of the Word left command
for a definition of "word."
Indent block <CtrlK><I>
Indent all lines in the currently marked and displayed block by a fixed number
of spaces. The default indention level of 2 may be changed using either
TINSTALL or the Set indentation level command. The cursor must be within the
block when the command is issued.
Unindent block <CtrlK><U>
Unindent all lines in the currently marked and displayed block by a fixed
number of spaces (default is 2). Note that this command will not delete any
non-blank characters at the beginning of a line. The cursor must be within the
block when the command is issued.
Increment marked block <^K><^G>
Decrement marked block <^K><^L>
These two commands are somewhat similar to the Upper case, Lower case, and
Toggle case commands. If the cursor is not within a marked and displayed
block, they increment or decrement the value of the character at the cursor,
provided that it is not a space. If the cursor is within a block, the contents
of that block are examined. If the block is all on one line *and* the string
of characters within the block is a valid integer number in decimal format
within the range -MaxLongInt..MaxLongInt, the command will increment or
decrement that number. For example, if the block consists of "10", " 10", or
"010", and the Increment marked block command were given, the block would be
changed to "11", " 11", or "011" respectively. If the block is not on one
line, or if the contents of the block is not a valid number, each non-blank
character in the block will be incremented/decremented. For example, "BCDE"
would become "CDEF"/"ABCD".
One obvious use for these commands is to construct a macro such as the
following:
<CtrlK><CtrlT> Mark the current word as a block
<CtrlK><CtrlG> Increment the value of the block
<Down> Move the cursor to the next line
<AltS><AltA> Abort the macro if the new line is empty
<AltS><AltR> Repeat this macro
Assuming that the cursor were at the top of a column of numbers (a series of
constant declarations, for example), this macro would increment each number in
the column until it reached a blank line.
Before After
------ -------
"99" "100"
" 99" "100"
" 99" " 100"
"0100" "0101"
"0101" "0102"
"0102" "0103"
As you can see, it is acceptable for numbers to be left-padded with either
zeros or spaces. If the number after incrementing is wider than it was before,
all text to the right of the number will be pushed forward to make room.
Align block <CtrlK><A>
Aligns all lines in the currently marked and displayed block with the first
line. For example, if the first non-blank character in the first line is at
column 5, the text in the remaining lines in the block will be adjusted so
that the first non-blank character in each line is at column 5. The cursor
must be within the block when the command is issued.
Reformat block <CtrlK><F>
Reformats all paragraphs completely contained within the currently marked and
displayed block. Note that this command does nothing if word wrap is off.
Printing Commands
------------------------------------------------------------------------------
Print current file <AltK><AltP>
Prints the current file in its entirety by writing it to the default printer
device (LPT1). You can change the default printer device using TINSTALL if
LPT1 is inappropriate for your system. (The other choices are LPT2, LPT3,
COM1, and COM2.) By default, TPE will send a formfeed (^L^M) to the printer at
the end of a print job, but you may disable this behavior using TINSTALL if
you wish.
Print block <CtrlK><P>
Writes the currently marked and displayed block to the default printer device.
By default, TPE will send a formfeed to the printer at the end of the print
job.
Text Marker Commands
------------------------------------------------------------------------------
Toggle marker display <CtrlK><M>
Toggle the display of text markers.
Set marker 0..9 <CtrlK><0>..<CtrlK><9>
Sets one of the ten text markers at the position of the cursor. <CtrlK><0>
sets marker 0, <CtrlK><1> sets marker 1, etc.
Jump marker 0..9 <CtrlQ><0>..<CtrlQ><9>
Moves the cursor to the specified text marker. <CtrlQ><0> jumps to marker 0,
<CtrlQ><1> jumps to marker 1, etc.
Macro Commands
------------------------------------------------------------------------------
Toggle macro record <CtrlJ><T>
Turns macro recording on or off. When macro recording is on, all subsequent
keystrokes (up to the 255-keystroke limit) are saved in the scrap macro until
macro recording is turned off again. (Keystrokes used to turn it on and off
are not saved.) Once the macro is recorded, you are asked to select a macro
"slot" to store it in.
Edit macro <AltS><AltM>
Edit an existing macro. In the macro editor, special keys (function keys,
cursor keys, etc.) are represented by abbreviated forms of their names--for
example, <Esc><CtrlN><Enter>--and these symbols are highlighted. Regular
keystrokes are shown as normal characters, without highlighting. When you
issue this command, you are asked to select a macro to edit, then to enter a
name for the macro (optional). Then you enter the macro editor itself. Several
keys serve special purposes here: the cursor keys behave as usual, moving the
cursor so you can select a particular keystroke to change; <BkSp> deletes a
single keystroke, just as it does in the regular editor; <CtrlBkSp> deletes an
entire macro; <Enter> accepts the macro. The <ScrollLock> key acts as a
toggle, turning literal interpretation of keystrokes on and off. For example,
if you wanted to insert the <Enter> key or the <BkSp> key into the macro, you
would first press <ScrollLock>. Pressing it again would restore all special
keys to their normal functions. The bottom right corner of the macro editor
window indicates whether the editor is in Command mode or Literal mode.
Load macros from disk <AltS><AltL>
Allows you to load a file of previously saved macros. If the file you specify
does not exist, an error message is displayed.
Write macros to disk <AltS><AltW>
Saves the current macros to the file you specify.
Playback macro by menu <AltT><AltM>
Displays a list of the currently defined macros. To play one of them back,
move the highlight over the appropriate menu item and press <Enter>. Press
<Esc> instead if you do not wish to playback a macro.
Playback macro 1..9 <Alt1>..<Alt9>
Plays back the specified macro one time. <Alt1> plays back macro 1, <Alt2>
macro 2, and so on.
Playback scrap macro <CtrlJ><I>
Plays back the scrap macro (macro 0) a specified number of times. The scrap
macro is always the same as the last macro that was recorded, even if that
macro was saved as a normal macro (1-9). Note that the limit on the number of
times that the macro can be played back depends on the length of the macro (if
nothing else is in the keyboard buffer, the limit is '512 div Length(Macro)').
Playback scrap macro 1..9 time(s) <CtrlJ><1>..<CtrlJ><9>
Plays back the scrap macro 1 to 9 times. <CtrlJ><1> plays it back once,
<CtrlJ><2> twice, and so on.
Special Commands for Use in Macros
------------------------------------------------------------------------------
Force insert mode <AltF><AltI>
Forces insert mode on.
Force overtype mode <AltF><AltO>
Forces insert mode off.
Force autoindent mode <AltF><AltA>
Forces autoindent mode on.
Force word wrap on <AltF><AltW>
Forces word wrap mode on.
Abort macro if line empty <AltS><AltA>
Aborts the macro if the current line is empty.
Abort macro if end of file <AltS><AltF>
Aborts the macro if the cursor is at the first *or* last line of the file.
Abort macro if out of block <AltS><AltK>
Aborts the macro if the cursor is not within the currently marked block.
Repeat last macro <AltS><AltR>
Repeats the last macro. This command should generally be used only at the end
of a macro that is designed to be self-repeating *and* self-aborting. For
example, you might have a macro such as the following:
<AltS><AltK> Abort macro if cursor is not in the marked block
<Home><Del><Del> Delete two spaces at the start of the current line
<Down> Move the cursor to the next line
<AltS><AltR> Repeat last macro--i.e., this macro
(This macro is taken from the default macro file, TPE.MAC, where it
is assigned to <Alt2>. See the discussion of The Standard Macro File, below.)
The macro works something like this:
while CursorInMarkedBlock do begin { <AltS><AltK> }
HomeTheCursor; { <Home> }
DeleteOneChar; { <Del> }
DeleteOneChar; { <Del> }
CursorDown; { <Down> }
end; { <AltS><AltR> }
The conditional test for aborting the macro should generally appear at the
beginning of the macro or just prior to the Repeat last macro command. If the
test is at the beginning, the macro will work like a "while" loop, meaning
that it will never be executed if the condition isn't met initially. If it is
just before the end, it will work like a "repeat..until" loop, meaning that
the first part of the macro will always be executed once:
repeat
HomeTheCursor; { <Home> }
DeleteOneChar; { <Del> }
DeleteOneChar; { <Del> }
CursorDown; { <Down> }
if not CursorInMarkedBlock then { <AltS><AltK> }
Exit;
until False; { <AltS><AltR> }
Note that it is possible to record a macro that contains the Repeat last macro
command. However, TPE will automatically terminate the recording session as
soon as the command is issued, rather than actually repeating the macro. The
Repeat last macro command will then represent the last command in the recorded
macro.
Text Formatting Commands
------------------------------------------------------------------------------
Reformat paragraph <CtrlB>
Rearranges words from the current line to the end of the paragraph such that
the lines are as full as possible, given the constraints imposed by the left
and right margins. The end of a paragraph is signaled by a blank line. This
command is available only when word wrap is on.
Center line <CtrlO><C>
Centers the current line within the left and right margins.
Upper case <CtrlO><U>
Convert all characters in the currently marked and displayed block to upper
case. If the cursor is not within a marked and displayed block, the character
at the cursor is converted to upper case.
Lower case <CtrlO><V>
Convert all characters in the currently marked and displayed block to lower
case. If the cursor is not within a marked and displayed block, the character
at the cursor is converted to lower case.
Toggle case <CtrlO><O>
Toggle the case of all characters in the currently marked and displayed block.
If the cursor is not within a marked and displayed block, the case of the
character at the cursor is toggled.
Mode Toggle Commands
------------------------------------------------------------------------------
Toggle insert mode <Ins>, <CtrlV>
Toggle insert mode on or off. A fat cursor indicates insert mode; a thin
cursor indicates overtype mode. (If a solid block cursor is in use, only the
status line will indicate whether you are in insert or overtype mode.)
Toggle autoindent mode <CtrlO><I>
Toggle autoindent mode on or off. In autoindent mode, pressing <Enter> while
in insert mode will cause the new line inserted to have the same indentation
level as the previous line. Autoindent mode also affects the way that text is
formatted when word wrap occurs--the new line will have the same indentation
level as the previous line--and hence the behavior of the reformatting
commands.
Toggle word wrap <CtrlO><W>
Toggle word wrap on or off. When word wrap is on, any attempt to insert or
append text beyond the right margin will cause a new line to be inserted
following the current line and all words that are at least partially beyond
the right margin to be moved to the new line.
Toggle compress at wrap <AltT><AltC>
This option, which is on by default, tells TPE to compress excess white space
out of a line before trying to word wrap it. For example,
this is a test
would become
this is a test
after compression. Leading white space is never removed. Note that this
setting also affects the behavior of the reformatting commands.
Commands for Controlling Text Formatting
------------------------------------------------------------------------------
Set left margin <CtrlO><L>
Set the left margin for text displayed on the screen. The default left margin
of 1 may be changed with TINSTALL.
Set right margin <CtrlO><R>
Set the right margin for text displayed on the screen. The default right
margin of 78 may be changed with TINSTALL.
Set indentation level <CtrlO><B>
Set the indentation level for marked blocks. This setting affects the behavior
of the Indent block and Unindent block commands. The default indentation level
of 2 may be changed with TINSTALL.
Screen Toggle Commands
------------------------------------------------------------------------------
Toggle 43-/50-line mode <AltT><AltE>
Activates/deactivates the 43-line mode on EGA's or the 50-line mode on VGA's.
Note that TPE will restore the mode that the system was in initially before
exiting to DOS or executing another program.
Toggle line-drawing mode <AltL>
This command lets you activate/deactivate one of TPE's four line-drawing
modes. In a line-drawing mode, pressing <Left>, <Right>, <Up>, or <Down> will
cause an appropriate line-drawing character to be placed at the position of
the cursor, overwriting the character beneath the cursor, if any. The cursor
will then be moved in the direction indicated, if appropriate. Note that, when
line-drawing characters are being inserted, the current margins are ignored,
as are the states of the autoindent, word wrap, and insert mode toggles.
By default, TPE runs in "edit mode," in which the four cursor keys simply move
the cursor. Pressing <AltL> repeatedly allows you to select one of the four
line-drawing modes, corresponding to the following sets of characters:
─│┌┐└┘ ═║╔╗╚╝ ─║╓╖╙╜ ═│╒╕╘╛
Pressing <AltL> a fifth time brings you back to edit mode. You can switch back
to edit mode immediately by pressing <AltE> (Force edit mode), or you can
temporarily switch to edit mode by pressing <ScrollLock>. Note that ScrollLock
is forced off when you give either the <AltL> or the <AltE> command.
As with other mode toggles, activating a line-drawing mode in the current
window has no effect on other windows. When one of the line-drawing modes is
in effect for a given window, the left side of its status line is used to
display the corresponding character set. If ScrollLock is active, however, and
that window is the current window, 'ScLock' is displayed there instead to
remind you that the line-drawing mode has been temporarily overridden. If the
window is in edit mode, that portion of the status line is used to display the
'»SAVE«' reminder, as usual.
Force edit mode <AltE>
Forces a return to edit mode.
Toggle snow check <AltT><AltS>
Turns snow checking on or off. Since snow checking is needed only for older
CGA adapters, TPE will ignore this command if the current display is not a
CGA.
Toggle block cursor <AltT><AltB>
Hides the blinking cursor you normally see on the screen and replaces it with
a solid, non-blinking "block cursor". You can change the appearance of the
block cursor with TINSTALL. The blinking cursor is restored when you exit from
TPE or when you execute another program.
Toggle initial zoom <AltT><AltZ>
If the initial zoom option is in effect (it is off by default), new windows
will automatically be zoomed when they are first opened.
Program Configuration Commands
------------------------------------------------------------------------------
Set support path <AltS><AltP>
The support path is the drive:\directory where TPE looks for its help file
(TPE.HLP) and the standard macro file (TPE.MAC).
Set default extension <AltS><AltE>
Used to specify the default extension for filenames. This extension is
automatically added to filenames lacking extensions. For example, if you have
set the default extension to "PAS" (the default setting) and wish TPE to load
"MYPROG.PAS" when the program starts, you can enter
tpe myprog
at the command line. Note that you must issue the Save defaults command if you
want to make this setting permanent.
Save defaults <AltS><AltD>
Allows you to save the current configuration settings as the defaults. More
specifically, the current values of any settings that can be changed with
TINSTALL will be saved.
Miscellaneous Commands
------------------------------------------------------------------------------
Show system info <CtrlJ><V>, <AltI>
Shows you a variety of statistics about the file in the current window, as
well as certain "system information": the version of TPE in use; the full
pathname of the file being edited; the number of lines, bytes, and words in
the file; the amount of memory remaining; the current drive and directory; and
the amount of space remaining on the current drive.
Show available memory <CtrlJ><R>, <AltM>
Displays the amount of memory available within the editor.
Invoke DOS shell <CtrlJ><O>, <AltD>
This command gives you access to DOS services or to other programs from within
TPE. You will be prompted for the name of a program or a DOS command to be
executed. If you need to run several programs, you can invoke a DOS "shell"
simply by leaving the command string blank and pressing <Enter>. To return to
TPE from a DOS shell, enter "EXIT" at the DOS command line.
As mentioned elsewhere, one of the nicest features of TPE is its ability to
swap itself almost entirely out of memory before executing other programs.
Only a tiny kernel of about 3-4K remains in memory; the rest of the program is
swapped to disk or EMS.
Note that you cannot load a second copy of TPE while you are shelled out to
DOS. If you try to do so, TPE will abort with the message "TPE is already
loaded."
One other special note about this command. TPE analyzes the command line you
specify and replaces each instance of "%p%" with the full pathname of the
primary file. (See the next section of the documentation.) For example, if the
primary file is "C:\PAS\MYPROG.PAS", then "tpc %p%" would be treated as
equivalent to "tpc C:\PAS\MYPROG.PAS". Note that there may be more than one
instance of "%p%" in the command string. This feature makes it possible to
create a macro that executes a utility program and automatically passes it the
name of the primary file. For example, the macro "<ShF2><AltD>psa %p%<Enter>"
would save all modified files and then execute the PSA program from Turbo
Analyst, passing it the name of the primary file as a parameter.
Log drive/path <CtrlJ><D>, <AltP>
Allows you to change the active drive and directory. You may enter a drive and
path, or you can specify a "file mask" and choose a new path from a directory
listing. For example, entering
C:\*.*
would show you a list of all the subdirectories that branch out of the root
directory on drive C. When the name of the directory you want is displayed at
the top of the window, press <Esc> to make it the current directory.
Abort <CtrlU>
Used to halt an operation in progress. The keyboard buffer is checked
regularly to see if the abort command has been issued; if it has, the buffer
is emptied and the operation is stopped.
Help <F1>
This command tells TPE to load the help file (TPE.HLP) created by TINSTALL. If
the file is found on the support path, and there are fewer than 8 windows
open, TPE will open a new window, load TPE.HLP into it, and then zoom the
window. There is nothing special about the help file. It is an ordinary ASCII
text file, and you may do anything with it that you could do with any other
file (perform searches, edit it, etc.).
Commands for Executing a Program
------------------------------------------------------------------------------
Set primary file <AltC><AltP>
This command lets you specify the name of the "primary file," usually the main
source file for the program you are working on in the editor.
Reset primary file <AltC><AltR>
This command makes the file in the current window the primary file.
Execute primary file <CtrlF9>, <AltR>
This command executes the program corresponding to the primary file. When
searching for the program to be executed, TPE will apply the default extension
for executables to the name of the primary file (see the Set extension for
executables command). It will look for the file first in the current directory
and then on the DOS path. If it is unable to locate the program, you will be
asked to enter its name. If the Confirmation of parameters option is On, as it
is by default, you will be given an opportunity to edit the command line to be
passed to the program before it is executed. (The state of this option may be
changed using the Toggle confirmation of parameters command.)
Set extension for executables <AltC><AltE>
Lets you specify the default extension to be applied to the name of an
executable program. The default setting of "EXE" should be left alone unless
you are compiling/running/debugging a program that compiles to a COM file.
Set default parameters <AltC><AltS>
Lets you specify a list of parameters to be passed to a program when the
Execute primary file or Debug primary file commands are issued.
Toggle confirmation of parameters <AltC><AltT>
This command toggles the option that determines whether or not you will be
asked to confirm the command line to be passed to a program being executed.
This option is On by default, unless you have changed the default setting with
TINSTALL.
Commands for Compiling Programs
------------------------------------------------------------------------------
Compile w/ primary options <F9>
This command compiles the primary file using the primary compiler options.
Normally this command is used to compile a program *without* debug
information. If the Confirmation of parameters option is On, as it is by
default, you will be given an opportunity to edit the command line to be
passed to the compiler before it is executed.
Compile w/ secondary options <AltF9>
This command compiles the primary file using the secondary compiler options.
Normally this command is used to compile a program *with* debug information,
in preparation for running it in the debugger. If the Confirmation of
parameters option is On, as it is by default, you will be given an opportunity
to edit the command line to be passed to the compiler before it is executed.
Set path to compiler <AltC><AltN>
Lets you specify the complete pathname of the compiler.
Set primary compiler options <AltC><AltO>
Lets you specify the command line options to be passed to the compiler when
you issue the Compile w/ primary options command.
Set secondary compiler options <AltC><Alt2>
Lets you specify the command line options to be passed to the compiler when
you issue the Compile w/ secondary options command.
Commands for Assembling Programs
------------------------------------------------------------------------------
Assemble primary file <AltA>
This command assembles the primary file. If the Confirmation of parameters
option is On, as it is by default, you will be given an opportunity to edit
the command line to be passed to the assembler before it is executed.
Set path to assembler <AltC><AltA>
Lets you specify the complete pathname of the assembler.
Set assembler options <AltC><AltC>
Lets you specify the command line options to be passed to the assembler when
you issue the Assemble primary file command.
Commands for Debugging Programs
------------------------------------------------------------------------------
Debug primary file <ShF9>
This command invokes the debugger, passing it any command-line options
specified with the Set debugger options command, followed by the name of the
primary file (after applying the default extension for executables to the
filename), plus any command line options you have specified with the Set
default parameters command. If the Confirmation of parameters option is On, as
it is by default, you will be given an opportunity to edit the command line to
be passed to the debugger before it is executed.
Set path to debugger <AltC><AltD>
Lets you specify the complete pathname of the debugger.
Set debugger options <AltC><AltG>
Lets you specify the command line options to be passed to the debugger when
you issue the Debug primary file command.
The Standard Macro File: TPE.MAC
------------------------------------------------------------------------------
When TPE first starts, it looks for a macro file called TPE.MAC. It looks for
this file in the following places, in this order:
- the current directory
- the "support path" directory, if any
- the directory that TPE.EXE was loaded from (under DOS 3.x or higher)
- the directories on the DOS PATH
In the typical case, you will have only one file called TPE.MAC, located in
your support path directory (set with TINSTALL). However, if you wish you may
have multiple files of that name for use on different projects. Just keep in
mind TPE will look only in the current directory for a project-specific macro
file.
In any case, if a file called TPE.MAC is found, the macros are loaded and
effectively become part of the TPE command set. We have provided a file by
this name containing the macros we routinely use. You may edit these macros,
add new ones, or replace the file entirely.
The standard macros in TPE.MAC are as follows:
0 Scrap
This macro is reserved for recording purposes, and is never saved by the
Write macro file command. Hence it is always empty when TPE starts.
1 Destructive unindent
This macro deletes two characters at the beginning of each line in the
currently marked block.
2 Destructive unindent one
This macro is chained to by macro 1. It deletes two characters at the
beginning of each line in the currently marked block, starting at the
current line.
3 Procedure shell
This macro constructs a "shell" for a procedure:
procedure ;
{-}
begin
end;
Like all the "shell" macros, it forces insert and autoindent modes on.
4 Function shell
Constructs a "shell" for a function:
function :;
{-}
begin
end;
5 Program shell
Constructs a "shell" for a program:
program ;
{-}
uses ;
type
const
var
begin
end.
6 Unused
7 Unit shell
Constructs a "shell" for a unit:
unit ;
{-}
interface
uses ;
implementation
{begin}
end.
8 Indent marked block
Simply executes the indent marked block command (<CtrlK><CtrlI>). A
holdover from the days before there was such a command.
9 Unindent marked block
Executes the unindent marked block command (<CtrlK><CtrlU>). Another
holdover.
Even if you don't have any use for the macros themselves, you will probably
want to study them when you start writing your own.
Copyright and License Information
------------------------------------------------------------------------------
TPE is copyright (c) 1990 by TurboPower Software. All Rights Reserved.
Although TPE is copyrighted software, license is hereby granted to distribute
the program for personal, non-commercial use. You may use the program
yourself, give it to your friends or co-workers, or distribute it for a
cost-based fee ($10 or less) as part of a user's group or bulletin board
service.
TPE is not shareware: we're not asking for a donation. However, if you request
that we send you a new version, we'll ask for $20 to cover our time and costs.
You will receive only a disk containing the latest version of the program. You
will not receive any printed documentation. The only "manual" for TPE is this
DOC file.
Alternatively, the current version of the program may be downloaded from
our data library on CompuServe, LIB 6 of the PCVENB forum. The name of the
file to download is TPE.LZH.
Since TPE is neither commercial software nor shareware, and we are not
attempting to make any profit from it, we would ask that you please restrain
your natural urge to suggest enhancements to it. Responding to such requests
can take lots of time, time that we ought to be spending developing new
products, enhancing existing ones, and supporting our paying customers. Your
consideration will be much appreciated.
On the other hand, please feel free to contact us if you encounter a problem
with the program. We depend heavily on this program ourselves, and we have a
vested interest in insuring that it works properly. If you encounter a problem
with TPE, you may contact Brian Foley at:
TurboPower Software
P.O. Box 66747
Scotts Valley, CA
95067-0747
You can also leave messages in section 6 of the PCVENB forum on CompuServe,
addressed to Brian Foley [76317,3247].