Full Description of File
Foley. Features: Very configurable, Multiple
windows, Runs compilers/debugger with a key
using swapping exec (4K), Keyboard macros,
RePosition at Borland compiler errors, Cut &
Paste, Bookmarks, Virtual Memory, Re-Edit
file list, Align, Indent, and Reformat.
TPE is Fast, Flexible, and Free!
TPE version 3.4. Excellent freeware programmer’s editor from TurboPower Software, for use with any language. Compiles from editor, jumps to offending line on compiler error, many other features. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
FILE_ID.DIZ | 345 | 256 | deflated |
TINSTALL.EXE | 145744 | 57549 | deflated |
TPE.CFG | 2781 | 960 | deflated |
TPE.DOC | 100999 | 28358 | deflated |
TPE.EXE | 143824 | 67389 | deflated |
TPE.HLP | 17631 | 2378 | deflated |
TPE.ICO | 1086 | 488 | deflated |
TPE.MAC | 488 | 273 | deflated |
VEGATRAP.COM | 62 | 62 | stored |
Download File TPE34.ZIP Here
Contents of the TPE.DOC file
TPE: Turbo Powered Editor
Version 3.4
Brian Foley
TurboPower Software
April 1992
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 now defunct Editor Toolbox: FirstEd and MicroStar. Over time,
however, TPE has evolved into a fairly distinctive program. The basic
architecture remains largely the same, but the list of features has changed
substantially. We'll get to those in a moment.
TPE was developed primarily for our own use, and for the most part it remained
"our little secret" for roughly three years. We gave it to various friends and
acquaintances during that time, however, and many of them became 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 did we decide to release TPE to the public after all? 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:
- Virtual memory management (optional) allows editing of files larger than
will fit into memory
- Up to eight zoomable and resizable windows for editing multiple files
or different parts of a single file
- Swapping exec function--TPE uses only 4K of memory while executing DOS
commands or other programs
- Hotkey access to compilers (up to 5), assembler, and debugger
- Recognizes compiler errors generated by Turbo Pascal (TPC, TPCX, TPCW),
Turbo Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC,
BCCX) and moves cursor to position of the error
- Maintains list of 20 most recently edited files and allows easy retrieval
of them
- Support for EGA 43-line, VGA 50-line, and user-defined text modes
- Synchronized scrolling option for comparing the contents of two windows
- 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, brackets, etc.
In comparison with the best known commercial programmer's editors, TPE really
lacks only two things: 1) It does not have a full undo facility, just a simple
undelete function, and 2) its macro system is fairly simplistic.
On the other hand, TPE has the three F's: it's Fast, Flexible, and Free.
What's New in TPE 3.0
------------------------------------------------------------------------------
Version 3.0 offers a multitude of enhancements over version 2.x. The following
is a concise list of the things that are new and different in 3.0. Most of
these items are described in greater detail elsewhere in the documentation.
- now includes virtual memory manager to allow editing of files larger than
will fit into memory; select the source of virtual memory in TINSTALL or
with command line option
- now allows you to define up to 5 compilers; select the one you want to use
by pressing
- can now swap to XMS as well as EMS and disk when executing other programs
- now uses separate file (TPE.CFG) for storing configuration data, allowing
TPE.EXE to be compressed; CFG file can optionally be updated on exit
- new
- now traps compiler errors generated by Turbo Pascal, TASM, MASM, and
Borland C++ and moves the cursor to the position of the first error or
warning
- now has option to pause after executing the primary file
- now has option to save all modified files before executing a DOS shell
- now has option to assemble the file in the current window (rather than the
primary file, so that you don't have to change the primary file in order
to assemble the file you're editing)
- now lets you specify (via TINSTALL) a user-defined video mode that you can
use by default or switch in and out of with
- now offers a "synchronized scrolling" option, activated with
which causes all visible windows to scroll in unison when a cursor
movement command is issued
- now maintains a file "reload list" containing the last 20 files that you've
edited, the location of the cursor when the window was closed, and the
options that were set for the window;
from the list into a new window, and
list into the current window; reload list also stores primary file setting
- the reload list is saved automatically in TPE.RLL, either in the current
directory or in the support path, when you exit (optional)
- if the reload list was saved, you can use 'TPE /L' to reload the last file
you edited, or 'TPE /A' to reload all files that were open when you last
exited from TPE; specifying either /L or /A will also restore your primary
file setting
- you can now specify up to 8 filenames on TPE's command line (old limit
was 3); you can also now specify a command line parameter that indicates a
line number to jump to following the filename
- other command line parameters let you select the video mode to use while
editing or request use of black-and-white video attributes; use "TPE /?"
to see a list of available command line options
- new option to change format of status line so that it displays total
number of lines in the file rather than the absolute position of the
cursor within the file
- now lets you set default search options with TINSTALL
- now lets you specify printer initialization/reset strings
- the
consistent with those in TPE itself
- directory list now supplies '..' if necessary when displaying
subdirectories on Netware drives
- now has command line option to allow editing of UNIX files
TPE 3.1
------------------------------------------------------------------------------
TPE 3.1 is a maintenance release that fixes a couple of bugs/problems in 3.0:
- The option to compress spaces to tabs when writing files to disk did not
work properly, and caused data to be lost.
- In one particular case, the display wasn't updated correctly when using
the
- 3.0 didn't work very well with Borland C++, whose compilers (BCC and BCCX)
expect the compiler options to be specified before the filename rather
than after. TPE now offers two ways to handle this problem. First, if the
abbreviation for the compiler being used starts with 'BCC', TPE will
automatically insert the compiler options before the filename. Second, if
the first character in the compiler options string is a less than sign
('<'), TPE will remove that character from the string of options and
insert them before the filename.
One user's suggestion was also incorporated into 3.1. When a compiler error
occurs, you no longer have to press
message is now displayed until a key is pressed or 15 seconds elapse,
whichever comes first.
Also, TPE.LZH now includes a tiny TSR called VEGATRAP.COM that allows TPE's
user-defined video mode feature to work with VEGA VGA cards, which use a
proprietary video BIOS call to activate special text modes (such as 132-column
modes).
TPE 3.2
------------------------------------------------------------------------------
TPE 3.2 is primarily a maintenance release (internal) that fixes a couple of
bugs/problems in 3.x:
- In some cases TPE failed to display the last line in a file if it did not
contain a CR/LF.
- Fixed lingering problems with the option to compress spaces to tabs when
writing to disk.
New features:
- A "%x%" directive has been added to go along with "%p%" to allow macros to
exec the executable file associated with the primary file. See the entry
for the Invoke DOS shell command, below.
TPE 3.3
------------------------------------------------------------------------------
TPE 3.3 is another maintenance release (public) that fixes a couple of
bugs/problems in 3.x:
- TPE did not deal properly with compiler errors in Turbo Pascal units with
unit names longer than 8 characters.
- An extraneous blank was being added to the parameters passed to a compiler
or assembler.
Enhancements:
- Added /C command line option to allow specification of an alternate CFG
file.
TPE 3.4
------------------------------------------------------------------------------
TPE 3.4 is a maintenance release that fixes a bug in 3.x:
- When compressing spaces to tabs, TPE did not deal properly with lines in
which there were an odd number of quotation marks
Enhancements:
- Added /R command line option, which invokes the reload list when the
program first starts
- Expanded reload list from 8 entries to 20
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. Most of the ones
we're interested in now are on subsequent pages. To get to one you can't see
at first, press either
The following are the configuration options you should set initially:
Configuration option Default setting (if any)
---------------------------------------- -----------------------------------
Directory for supporting files
This setting determines where TPE will look for its help file (TPE.HLP),
its standard macro file (TPE.MAC), and (by default) its reload list file
(TPE.RLL). Typically this will be the drive:\directory containing TPE.EXE
and TPE.CFG.
Source of virtual memory for editing RAM
This setting determines the source of memory to be used to store text
being edited. By default, TPE uses normal RAM, but you can also select
EMS, XMS, or Disk here. If the desired source of virtual memory is not
available, or is too limited to be of use, TPE will display an error
message when it starts and use normal RAM instead. We generally advise use
of Disk space for virtual memory only if you have a large (1-2 megabyte)
disk cache installed. See the section on TPE's Virtual Memory Manager,
below, for additional information about this feature.
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/XMS, or if you
don't have enough EMS/XMS for TPE to use it when swapping itself out
before executing other programs. (The amount of EMS/XMS needed varies
depending on the number of files loaded, etc., but at least 250K is needed
in all cases, more if EMS/XMS is being used by the virtual memory
manager.) 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.
Compiler 1
Name of compiler TPC C:\TP6\TPC.EXE
Primary options /M /$D- /$L- /L
Secondary options /M /$D+ /$L+ /L /V
These let you specify the complete pathname for your primary compiler and
any command line options that should be sent to it, as well as an
abbreviation of up to 4 letters that uniquely identifies this compiler.
This abbreviation will be displayed on the status line when this compiler
is the default compiler. The two sets of options correspond to two
different Compile program commands in the editor, allowing you to easily
alternate between compiling with or without debug information. Note that
you can specify up to four other compilers for TPE to use (Compilers 2-5).
TINSTALL also lets you select a Default compiler (normally Compiler 1),
and TPE lets you switch compilers dynamically by pressing
Pathname for assembler C:\TASM\TASM.EXE
Options for assembler
Assemble file in current window Y
These let you specify the complete pathname for your assembler and any
command line options that should be sent to it. If the Assemble file in
current window option is set to Y, TPE will pass the name of the file in
the current window to the assembler; if it is set to N, TPE will pass the
name of the primary file.
Pathname for debugger C:\TD\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.
Of the remaining configuration options, only a couple require detailed
explanations, so we'll go over those next.
On the third 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
select the color you want with the cursor keys. When you've got the correct
color highlighted, press
The next option that requires special comment is the very first one on the
second page of options, Modify key assignments. When you press
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
command to. While entering a key assignment, the following commands are
available:
Delete last key
Clear the key assignment
Restore the previous value
Accept key assignment
Cancel the operation
If you need to enter one of these keys as part of the key assignment, press
key(s), then press
To accept any changes that you have made and return to the main entry screen,
press
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
The only other options that require special comment are the following:
Configuration option Default setting
---------------------------------------- -----------------------------------
Printer initialization string
Printer reset string ^L^M
These options allow you to specify special strings that are to be sent to the
printer before and after text is sent to the printer. They require special
comment only because any strings you may specify will typically need to
contain control characters, such as
one of these strings, simply press
sends a form feed and carriage return to the printer to eject the last page.
If this isn't necessary for your printer, you should clear this string.
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)
---------------------------------------- -----------------------------------
Configuration options
File for virtual memory on disk $TPE$.VMF
Specifies the name of the file that the virtual memory manager will use if
Disk is the source of virtual memory. If no directory is specified, the
file will be stored in the current directory.
Amount of EMS/XMS to reserve (in KB) 0
This value specifies the amount of EMS or XMS (in kilobytes) that the
virtual memory manager is supposed to leave available for other programs.
Note that it always sets aside enough memory for the swapping exec
function to use EMS/XMS if you answer Yes to either the "Use EMS if
available" question or the "Use XMS if available" question" (see below).
Save config data on exit N
If this option is on, the CFG file is updated automatically on exit.
Save reload list on exit Y
If this option is on, the reload list is saved automatically on exit.
Directory for reload list Support path
This option lets you specify where you want the reload list stored when
you exit from TPE. By default, it's stored in the support path, but you
can also select Currrent dir, in which case you can maintain multiple
reload lists in multiple directories.
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.
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.
Default search options U
Default options to use for search and find-and-replace commands.
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.
Use black and white video attributes N
If Yes, TPE will use black and white (monochrome) video attributes, even
if a color adapter is detected.
Status line format (bytes or lines) Byte count
If this option is set to Byte count, the status line for each window will
display the absolute position of the cursor within the file. If it is set
to Total lines, the status line will instead display the total number of
lines in the file--e.g., "5 / 1024", where 5 is the current line number
and 1024 is the total number of lines in the file.
Screen options
User-defined video mode specified N
If Yes, you must specify a user-defined video mode in the next field. This
mode can be toggled on/off within TPE using
User-defined video mode 00
If the answer to the previous question is Yes, this field should specify,
using hexadecimal notation, the number of the video mode you want TPE to
use when the
text modes that display anywhere from 40 to 132 columns, and virtually
any number of rows. Specifying 01 here, for example, will allow you to
activate 40x25 mode on any non-monochrome adapter. Specifying 55 here will
allow you to activate 132x25 mode on a VGA that uses the Paradise chip
set. Be forewarned that not all video cards that implement non-standard
text modes allow them to be activated using the standard BIOS Set video
mode function. If yours doesn't, you won't be able to use this facility in
TPE.
Default to 43-/50-line mode (EGA/VGA) N
If Yes, TPE will switch to 43-/50-line mode when the program first starts.
Default to user-defined video mode N
If Yes, TPE will switch to the user-defined video mode when the program
first starts.
Suppress snow (CGA) Y
If Yes, TPE will try to suppress snow when writing to video memory on a
CGA card.
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.
Use XMS if available Y
If Yes, XMS 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, EMS, or XMS. If "Never",
it is never displayed.
Save modified files before exec N
If Yes, TPE will save all modified files before executing a DOS shell or
executing a program you specify. Note that this is always done when TPE
execs the compiler, assembler, debugger, or the program associated with
the primary file.
Pause after running primary program N
If Yes, you will be asked to press a key to return to TPE after it has
executed the program associated with the primary file. Note that you can
view the output of your program by pressing
screen."
Confirm parameters Y
If Yes, you will be given a chance to edit the command line sent to any
program being executed.
Compilers
Default compiler 1 (TPC)
Press
want to use. Within TPE, you can change this setting with
Trap compilation errors Y
If Yes, TPE will attempt to identify errors reported by the compiler or
assembler, and to move the cursor to the position of the error. TPE
currently recognizes errors and warnings reported by recent versions of
Turbo Pascal (TPC and TPCX), Turbo Pascal for Windows (TPCW), Turbo
Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC, BCCX).
You'll probably want to set this to N only if your default compiler is not
one of these. Note that in the case of compilers/assemblers that can
generate multiple errors and warnings, TPE will pay attention only to the
first error or warning still visible on the user screen. Press
view any other error messages that were generated.
Open new window for compile errors Y
If Yes, TPE will open a new window when it detects a compiler error in a
file that is not currently loaded. If No, TPE will load the file into the
current window if it is not already loaded.
Assembler
Name of assembler C:\TASM\TASM.EXE
Specify the complete pathname of your assembler (if any).
Options for assembler
Specify the default options you want passed to the assembler. If you're
using MASM, you should specify ";" here if nothing else.
Assemble file in current window Y
If Yes, TPE will pass the assembler the name of the file in the current
window. If No, it will pass the name of the primary file.
Debugger
Name of debugger C:\TD\TD.EXE
Specify the complete pathname of your debugger (if any).
Options for debugger
Specify the default options you want passed to the debugger.
As you look at the default settings, you'll see that the program is configured
for use with Turbo Pascal 6.0, 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
TINSTALL will then save any changes you have made by modifying (or creating)
TPE.CFG, 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
of
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 [Options] [FileName1] .. [FileName8]
That is, you may specify up to eight 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
edit, which you can rename later when you go to save the file.
TPE also recognizes the following command line options:
/L Reload last file (can be used multiple times)
/A Reload all files
/R Display reload list on startup
/Jnnn Jump to line nnn. MUST follow a filename.
/E Use EMS for virtual memory
/X Use XMS for virtual memory
/D Use disk for virtual memory
/N Use normal RAM
/U Use user-defined video mode
/43 Use EGA 43-line mode
/50 Use VGA 50-line mode (same as /43)
/BW Use black and white (mono) video attributes
/UNIX Edit UNIX files
/Cfilename Specifies CFG file to use
/? Display this help screen
These options are fairly self-explanatory. /E, /X, /D, and /N allow you to
specify the source of the memory to be used by the virtual memory manager,
overriding the default setting selected with TINSTALL. /U, /43, and /50 let
you specify the text mode to be used while editing. And /BW lets you request
the use of black-and-white video attributes. You might use this when running
TPE on a laptop.
The /J option lets you specify a line number to jump to:
tpe myprog.pas /J750
would load MYPROG.PAS and move the cursor to line 750. This parameter should be
used only if the previous parameter was an actual filename. If it wasn't a
filename, the parameter will be ignored.
The /UNIX option should be specified when editing files intended to be used
under UNIX. If this option is specified, TPE uses ^J (rather than ^M^J) as a
line delimiter, and it does not append a ^Z to the ends of files it creates.
The /C option may be used to specify a special CFG file to use. You might use
this option, for example, if you program in multiple languages, and you want
to use one set of configuration options for one language and a different one
for another.
/L and /A require some explanation. By default, when you exit from TPE, it
writes the contents of its reload list to a file, TPE.RLL, either in the
current directory or in the support directory. Just before doing so, it adds
all files currently in memory to the reload list and marks them as loaded.
The file above the current file is added first, and the current file is added
last, at the top of the list. Now, if you start TPE with the /L option, it
will automatically load the file that was current when you last exited and put
the cursor right where it was. To load both that file and the one that was
below it, use "TPE /L /L". To reload all files that were loaded at the time
you exited, use "TPE /A". The windows won't necessarily be the same size or in
the same place as they were, but the same files will be loaded (unless
multiple windows were open onto the same file) and the cursor will be in the
right place in each window. Note that specifying either /L or /A will also
restore your primary file setting to what it was when you exited.
If the /R option is specified, the reload list will be displayed instead of a
directory list if no files are specified, directly or indirectly, on the
command line.
TPE's Configuration File (TPE.CFG)
------------------------------------------------------------------------------
A few words about the TPE.CFG file are also in order here. TPE will normally
look for it first in the current directory, then in the directory that TPE.EXE
was loaded from (under DOS 3.x or higher), then in all directories on DOS's
PATH. If it can't find it, it will display an error message and proceed to use
the "factory default" settings.
Note, however, that if you need to run TPE.EXE from a network drive and have
multiple users using it, each with his own TPE.CFG file, what you can do is
have each user set an environment variable that specifies the directory where
his copy of TPE is stored:
SET TPE=C:\TPE
DO NOT specify the name of the configuration file, which is assumed to be
TPE.CFG, just the drive and directory. This environment variable, if it
exists, will be used only to locate TPE.CFG. (TINSTALL does not check for the
existence of this environment variable, incidentally, only TPE.)
Note too that, although it is possible to have multiple TPE.CFG files stored
in multiple directories, we generally recommend that you maintain a single CFG
file, preferably in the same directory as TPE.EXE. If you have multiple CFG
files with different settings stored in various directories, the behavior of
TPE will change depending on where you are when you load it. This could
conceivably be desirable in certain cases, but it can also lead to confusion
in others. For this last reason, we discourage the practice.
On the other hand, if you've selected the Save config data on exit
option, and you're the kind of programmer who works on a variety of projects
at once, each with its own directory, and you always change to the appropriate
directory before working on that project, you may also prefer to maintain
multiple CFG files, one in each of these directories. If so, you will probably
also want to select the option to save the reload list in the current
directory rather than the support path.
As of version 3.3, it is also possible to use the /C option to specify an
alternate CFG file to be used. Because typing in the name of your CFG file on
the command line is a bit cumbersome, you would probably want to use this
option only in cases where another program is invoking TPE and is passing it
pre-defined parameters.
The Status Line
------------------------------------------------------------------------------
As indicated earlier, the top line of TPE's 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 nnnnnn Col nnn Byte nnnnnnnn TPC INS ST AI WW * 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
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
a user-defined 132-column mode, the full pathname will be displayed here if
possible.)
The next three slots on the command line indicate the position of the cursor
relative to the beginning of the file. Note that if you have selected the
Total lines option within TINSTALL, the format of the status line will be
slightly different:
SAVE FILENAME.EXT Line nnnnnnn / nnnnnnn Col nnn TPC INS ST AI WW * ZOOM
In this format, the "nnnnnnn / nnnnnnn" following Line means "Current line /
Total lines".
"TPC" means that the default compiler is TPC.EXE. Use
different compiler.
"INS" means that you are in insert mode. "OVR" means that you are in overtype
mode.
"ST" means that smart tabs are in use. "FT" 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.
"ZOOM" means that the current window has been zoomed. Three other messages
can appear in this position: If the synchronized scrolling option is on,
"SYNC" will appear here. 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,
it, and then zooms the window. 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
Cursor left one character.
Character right
Cursor right one character.
Word left
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
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
Cursor to beginning of line.
Cursor to right side
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
Cursor up one line.
Line down
Cursor down one line.
Scroll up
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
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
Scroll window up one page.
Page down
Scroll window down one page.
More Cursor Movement Commands
------------------------------------------------------------------------------
Top of file
Cursor to beginning of file.
End of file
Cursor to end of file.
Top of window
Cursor to top line of current window. The cursor remains in the same column.
Bottom of window
Cursor to bottom line of current window. The cursor remains in the same
column.
Up to equal indent
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
Moves the cursor to the beginning of the next line with the same indentation
level as the current line.
Go to line
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
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
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
,
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
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
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
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
Inserts a line break at the position of the cursor without moving the cursor.
Insert control char
Allows control characters to be entered into the text. For example, pressing
insert a G). Control characters are always displayed as highlighted capital
letters in the color used for marked blocks.
Delete current character ,
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
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
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
Delete all text from the cursor to the end of the line.
Delete line
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
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
Moves the cursor to the previous tab stop. This command does nothing if smart
tabs are in effect.
Toggle fixed tabs
Toggles the tab mode between smart tabs and fixed tabs.
Set tab size
Prompts the user for the number of columns between tab stops. The value
specified must be in the range 1..100.
Toggle tab expansion
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
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
Restore the original contents of the current line.
Undo last deletion
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
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
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
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
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
characters: for example, to find a period at the end of a line, you would
enter <.>
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
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
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
replace it and all subsequent matches without asking, or to abort the
operation. If the N option was selected, this question will not be asked.
Search and apply macro
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
the operation by pressing
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
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 (
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
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:
To perform this operation on the entire block, you would specify "LN" as your
search options.
File Commands
------------------------------------------------------------------------------
Edit another file
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.
Edit file from reload list
Load a new file, selected from the reload list, 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 ,
Save the current file and continue editing.
Abandon file ,
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.
Abandon all and exit to DOS *none*
Abandon all files and exit to DOS. If any of the files in memory have been
modified, you will be asked if you want to save them.
Save and exit to DOS
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
Save all modified files and exit to DOS.
Save all and continue
Save all modified files and continue editing. This command is especially
useful in macros that execute other programs.
Save/switch files
Save the current file and load a new one into the current window.
Write to named file
Save the current file under a new name.
Read block
Reads a file into the window at the current position of the cursor and marks
it as a block.
Write block
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
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.
Add window from reload list <^F3>
This command is largely identical to the Add window command, but instead of
being prompted for a file to edit you are asked to pick a file from the reload
list.
Previous window
Makes the previous text window the current window.
Next window
Makes the next text window the current window.
Resize current window
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
or
Zoom current window
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
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
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
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
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
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
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
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
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
Mark the current word as a block. See the description of the Word left command
for a definition of "word."
Indent block
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
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: