home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-04-06 | 98.6 KB | 2,092 lines |
-
- 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 <ShF5> until its name appears on the status line
- - 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 <AltF5> command to display user screen
- - 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 <AltT><AltU>
- - now offers a "synchronized scrolling" option, activated with <AltS><AltS>,
- 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; <CtrlF3> allows you to load a file
- from the list into a new window, and <ShF3> lets you load a file from the
- 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 <CtrlLeft> and <CtrlRight> commands in the prompt editor are now
- 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 <AltF3> command when the current window was zoomed.
- - 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 <Esc> to get rid of the error message. The
- 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 <Down> or <PgDn>.
-
- 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 <ShF5>.
-
- 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 <F10> and
- select the color you want with the cursor keys. When you've got the correct
- color highlighted, press <Enter>.
-
- The next option that requires special comment is the very first one on the
- second page of options, Modify key assignments. 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 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 <Esc>. To enter a control character into
- one of these strings, simply press <CtrlP> first. For example, to enter an
- <Esc> character, press <CtrlP><Ctrl[>. The default printer reset string simply
- 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 <AltT><AltU>.
-
- 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 <AltT><AltU> command is issued. TPE is designed to work with
- 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 <AltF5> to display "the user
- 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 <Space>, <+>, or <-> here to select the compiler you'll normally
- want to use. Within TPE, you can change this setting with <ShF5>.
-
- 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 <AltF5> to
- 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 <CtrlEnter>.
- 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 <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 [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 <Esc> twice, TPE will create a "NONAME" file for you to
- 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
- <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. (If you are editing in
- 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 <ShF5> to select a
- 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, <F1>, which opens a new window, loads TPE.HLP into
- 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 <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>, <ShF4>
- 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.
-
- Edit file from reload list <ShF3>
- 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 <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.
-
- 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 <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.
-
- 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 <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 <CtrlQ><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.
-
- Toggle synchronized scroll <AltS><AltS>
- When synchronized scrolling is on, all cursor movement commands are passed to
- all visible windows on the screen for processing. This option is especially
- useful when comparing two versions of the same file. Note that many cursor
- movement commands--notably <Up>, <Down>, <Left>, and <Right>--will often have
- no visible effect on windows other than the current one. The effects will be
- visible only if the command causes the window to scroll. Note too that certain
- commmands--such as <End>, <CtrlLeft>, and <CtrlRight>--may have slightly
- different effects in different windows. Synchronized scrolling is temporarily
- disabled when the current window is zoomed.
-
-
- 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 user-defined mode <AltT><AltU>
- Activates/deactivates the user-defined video mode if one was specified with
- TINSTALL. If none was specified, this command does nothing.
-
- 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. If TPE
- found TPE.CFG when it first loaded, that copy of TPE.CFG will be overwritten
- with the new settings. If TPE.CFG was not found initially, a new TPE.CFG file
- will be created in the current directory. This command is of little use if
- you've selected the option to automatically save the configuration data on
- exit.
-
-
- 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 RAM and (if appropriate) virtual 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 virtual 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 4K remains in memory; the rest of the program is
- swapped to disk, EMS, or XMS.
-
- 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.
-
- Similarly, "%x%" may be used to represent the name of the executable file
- associated with the primary file. For example, if the primary file is
- "C:\PAS\MYPROG.PAS" and the default extension for executables is "EXE", then
- "tprof %x%" would be treated as equivalent to "tprof C:\PAS\MYPROG.EXE".
-
- 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.
-
- Load help file <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.).
-
- Display user screen <AltF5>
- This command displays the contents of "the user screen"--the screen that was
- active when TPE first started. If any other programs have been executed while
- within TPE, the output of those programs can be viewed using this command.
- Press any key to return to the TPE screen.
-
-
- 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. Note that this setting also applies to the compiler, assembler, and
- debugger.
-
-
- Commands for Compiling Programs
- ------------------------------------------------------------------------------
-
- Select compiler <ShF5>
- This command allows you to change the current compiler, assuming that you have
- configured TPE for use with multiple compilers. The abbreviation for the
- currently selected compiler will appear on the status lines for all visible
- windows. Note that, unlike TINSTALL, TPE will not allow you to select a given
- compiler unless it has a 1- to 4-character abbreviation.
-
- Compile w/ primary options <F9>
- This command compiles the primary file using the current compiler and its
- 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 current compiler and its
- 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 current compiler. Note that TPE
- will automatically use the first four letters of the compiler's name as its
- abbreviation. For example, if you set the path to the current compiler to
- 'C:\BC\BIN\BCCX.EXE', TPE will set the compiler's abbreviation to 'BCCX'.
-
- Set primary compiler options <AltC><AltO>
- Lets you specify the command line options to be passed to the current 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 current compiler
- when you issue the Compile w/ secondary options command.
-
-
- Commands for Assembling Programs
- ------------------------------------------------------------------------------
-
- Assemble file <AltA>
- This command assembles either the file in the current window (default) or the
- primary file, depending on how TPE is configured. 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 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 first in the current directory and then in TPE's support path
- directory (set with TINSTALL). In the typical case, you will have only one
- file called TPE.MAC, located in your support path. However, if you wish you
- may have multiple files of that name for use on different projects. Just keep
- in mind that 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.
-
-
- TPE's Virtual Memory Manager
- ------------------------------------------------------------------------------
-
- TPE uses a virtual memory manager that allows it to store text being edited in
- "virtual memory," which can be either RAM, EMS, XMS, or disk. By default, TPE
- uses normal RAM, but you can select one of the other sources of memory either
- by changing the default setting with TINSTALL or by passing the appropriate
- command line parameter to TPE when you go to run it: /E for EMS, /X for XMS,
- /D for disk, or /N for normal RAM. 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.
-
- Note that TPE does not store all its data in virtual memory; many things are
- always stored in normal RAM. In particular, TPE allocates a single 16-byte
- data structure in RAM for each line in a given file. In addition, when using
- either XMS or disk for virtual memory, TPE also allocates roughly one third of
- available RAM for buffering data stored in virtual memory. Given 600K of
- available RAM, TPE will therefore be able to edit a file of about 27,000 lines
- if using EMS, or 18,000 lines if using XMS or disk. To see how much RAM and
- virtual memory is still available, use the Show system info command
- (<CtrlJ><V> or <AltI>). The Show available memory command (<CtrlJ><R> or
- <AltM>) displays only the amount of virtual memory remaining.
-
- When TPE runs out of memory, you'll see one of two error messages. If it has
- exhausted the supply of normal RAM, you'll see "Insufficient memory." If it
- runs out of virtual memory, you'll see "Insufficient virtual memory." Please
- keep this distinction in mind. The fact that you have lots of virtual memory
- available doesn't mean that you won't be seeing an "Insufficient memory" error
- message.
-
- There are two other error messages that you might see in this connection. The
- first is simply a warning message: "Warning! Limited RAM available". This
- message will appear only when EMS, XMS, or disk is being used for virtual
- memory. What it means is that the virtual heap is badly fragmented, and that
- TPE is dangerously close to not having enough memory (RAM) reserved to keep
- track of all the blocks of available virtual memory. If you see this warning,
- the best thing to do is to save your work, exit from TPE, and reload TPE with
- the /A option.
-
- The second error message is one we hope you'll never see: "Critical error nnn.
- Data may be lost." What this means is that the virtual memory manager has
- encountered an unrecoverable error, and you need to exit immediately. If the
- error number ("nnn") is 204, you're in good shape. That simply means that the
- virtual heap is so badly fragmented that TPE can no longer keep track of all
- the free memory blocks. No data has been lost, but you should save all your
- work and exit immediately. You shouldn't see this message unless you've
- previously seen the warning message described above.
-
- Any other critical error message is very bad news indeed. It means that an
- I/O error occurred while trying to access the source of virtual memory (a disk
- read error, for example). In all likelihood, at least some of your data has
- been lost. You can try saving your work before exiting, but very likely the
- file will contain garbage or be incomplete.
-
-
- Copyright and License Information
- ------------------------------------------------------------------------------
-
- TPE is copyright (c) 1990-1992 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 ($20 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 49009
- Colorado Springs, CO
- 80949-9009
-
- You can also leave messages in section 6 of the PCVENB forum on CompuServe,
- addressed to Brian Foley [76317,3247].