home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / TPE31.ZIP / TPE.DOC < prev    next >
Encoding:
Text File  |  1991-12-05  |  95.9 KB  |  2,019 lines

  1.  
  2.                           TPE: Turbo Powered Editor
  3.                                  Version 3.1
  4.                                  Brian Foley
  5.                              TurboPower Software
  6.                                 December 1991
  7.  
  8.  
  9. Introduction
  10. ------------------------------------------------------------------------------
  11.  
  12. TPE is a programmer's editor that we at TurboPower Software developed for our
  13. own use. TPE was created initially by fusing together parts of two editors in
  14. Borland's now defunct Editor Toolbox: FirstEd and MicroStar. Over time,
  15. however, TPE has evolved into a fairly distinctive program. The basic
  16. architecture remains largely the same, but the list of features has changed
  17. substantially. We'll get to those in a moment.
  18.  
  19. TPE was developed primarily for our own use, and for the most part it remained
  20. "our little secret" for roughly three years. We gave it to various friends and
  21. acquaintances during that time, however, and many of them became overnight
  22. converts. "Why don't you put it on CompuServe?" they would ask. "We don't want
  23. to face the non-stop stream of requests for enhancements. Everyone has his own
  24. idea of how a text editor should work," we would reply. Or "Why don't you sell
  25. it?" they would ask. "We don't want to get into that market. We like the
  26. business we're in." And we still feel that way.
  27.  
  28. So why did we decide to release TPE to the public after all? The main reason
  29. is that an awful lot of Turbo Pascal programmers we talk to seem to need it,
  30. or at least something like it. Many really like the Turbo Pascal IDE, the ease
  31. with which they can go from editing to compiling to debugging, but they are
  32. increasingly feeling cramped by the program's memory requirements. Many also
  33. like the alternative IDE in our Turbo Analyst package, but feel constrained by
  34. the limitations of its editor. These are problems that we just don't face
  35. ourselves, and the simple reason is that we use TPE for almost everything we
  36. write. We finally decided that it just wasn't right to keep it to ourselves
  37. any more. So here it is.
  38.  
  39. Since the list of features in TPE is indeed long, we'll just hit on some of
  40. the highlights here:
  41.  
  42.    - Virtual memory management (optional) allows editing of files larger than
  43.      will fit into memory
  44.    - Up to eight zoomable and resizable windows for editing multiple files
  45.      or different parts of a single file
  46.    - Swapping exec function--TPE uses only 4K of memory while executing DOS
  47.      commands or other programs
  48.    - Hotkey access to compilers (up to 5), assembler, and debugger
  49.    - Recognizes compiler errors generated by Turbo Pascal (TPC, TPCX, TPCW),
  50.      Turbo Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC,
  51.      BCCX) and moves cursor to position of the error
  52.    - Maintains list of 8 most recently edited files and allows easy retrieval
  53.      of them
  54.    - Support for EGA 43-line, VGA 50-line, and user-defined text modes
  55.    - Synchronized scrolling option for comparing the contents of two windows
  56.    - Cut and paste between windows
  57.    - WordStar-compatible command structure
  58.    - Fully configurable keyboard
  59.    - Word wrap, smart tabs, fixed tabs, autoindent mode
  60.    - Keyboard macro system, search-and-apply-macro command, ability to create
  61.      self-repeating and self-aborting macros
  62.    - Text markers
  63.    - Undo command
  64.    - Four line-drawing modes
  65.    - Solid (block) cursor option
  66.    - Commands for indenting, aligning, and reformatting blocks of text
  67.    - Brace-matching commands for finding mismatched comment braces,
  68.      parentheses, brackets, etc.
  69.  
  70. In comparison with the best known commercial programmer's editors, TPE really
  71. lacks only two things: 1) It does not have a full undo facility, just a simple
  72. undelete function, and 2) its macro system is fairly simplistic.
  73.  
  74. On the other hand, TPE has the three F's: it's Fast, Flexible, and Free.
  75.  
  76.  
  77. What's New in TPE 3.0
  78. ------------------------------------------------------------------------------
  79.  
  80. Version 3.0 offers a multitude of enhancements over version 2.x. The following
  81. is a concise list of the things that are new and different in 3.0. Most of
  82. these items are described in greater detail elsewhere in the documentation.
  83.  
  84.   - now includes virtual memory manager to allow editing of files larger than
  85.     will fit into memory; select the source of virtual memory in TINSTALL or
  86.     with command line option
  87.   - now allows you to define up to 5 compilers; select the one you want to use
  88.     by pressing <ShF5> until its name appears on the status line
  89.   - can now swap to XMS as well as EMS and disk when executing other programs
  90.   - now uses separate file (TPE.CFG) for storing configuration data, allowing
  91.     TPE.EXE to be compressed; CFG file can optionally be updated on exit
  92.   - new <AltF5> command to display user screen
  93.   - now traps compiler errors generated by Turbo Pascal, TASM, MASM, and
  94.     Borland C++ and moves the cursor to the position of the first error or
  95.     warning
  96.   - now has option to pause after executing the primary file
  97.   - now has option to save all modified files before executing a DOS shell
  98.   - now has option to assemble the file in the current window (rather than the
  99.     primary file, so that you don't have to change the primary file in order
  100.     to assemble the file you're editing)
  101.   - now lets you specify (via TINSTALL) a user-defined video mode that you can
  102.     use by default or switch in and out of with <AltT><AltU>
  103.   - now offers a "synchronized scrolling" option, activated with <AltS><AltS>,
  104.     which causes all visible windows to scroll in unison when a cursor
  105.     movement command is issued
  106.   - now maintains a file "reload list" containing the last 8 files that you've
  107.     edited, the location of the cursor when the window was closed, and the
  108.     options that were set for the window; <CtrlF3> allows you to load a file
  109.     from the list into a new window, and <ShF3> lets you load a file from the
  110.     list into the current window; reload list also stores primary file setting
  111.   - the reload list is saved automatically in TPE.RLL, either in the current
  112.     directory or in the support path, when you exit (optional)
  113.   - if the reload list was saved, you can use 'TPE /L' to reload the last file
  114.     you edited, or 'TPE /A' to reload all files that were open when you last
  115.     exited from TPE; specifying either /L or /A will also restore your primary
  116.     file setting
  117.   - you can now specify up to 8 filenames on TPE's command line (old limit
  118.     was 3); you can also now specify a command line parameter that indicates a
  119.     line number to jump to following the filename
  120.   - other command line parameters let you select the video mode to use while
  121.     editing or request use of black-and-white video attributes; use "TPE /?"
  122.     to see a list of available command line options
  123.   - new option to change format of status line so that it displays total
  124.     number of lines in the file rather than the absolute position of the
  125.     cursor within the file
  126.   - now lets you set default search options with TINSTALL
  127.   - now lets you specify printer initialization/reset strings
  128.   - the <CtrlLeft> and <CtrlRight> commands in the prompt editor are now
  129.     consistent with those in TPE itself
  130.   - directory list now supplies '..' if necessary when displaying
  131.     subdirectories on Netware drives
  132.   - now has command line option to allow editing of UNIX files
  133.  
  134. TPE 3.1
  135. ------------------------------------------------------------------------------
  136.  
  137. TPE 3.1 is a maintenance release that fixes a couple of bugs/problems in 3.0:
  138.  
  139.   - The option to compress spaces to tabs when writing files to disk did not
  140.     work properly, and caused data to be lost.
  141.   - In one particular case, the display wasn't updated correctly when using
  142.     the <AltF3> command when the current window was zoomed.
  143.   - 3.0 didn't work very well with Borland C++, whose compilers (BCC and BCCX)
  144.     expect the compiler options to be specified before the filename rather
  145.     than after. TPE now offers two ways to handle this problem. First, if the
  146.     abbreviation for the compiler being used starts with 'BCC', TPE will
  147.     automatically insert the compiler options before the filename. Second, if
  148.     the first character in the compiler options string is a less than sign
  149.     ('<'), TPE will remove that character from the string of options and
  150.     insert them before the filename.
  151.  
  152. One user's suggestion was also incorporated into 3.1. When a compiler error
  153. occurs, you no longer have to press <Esc> to get rid of the error message. The
  154. message is now displayed until a key is pressed or 15 seconds elapse,
  155. whichever comes first.
  156.  
  157. Also, TPE.LZH now includes a tiny TSR called VEGATRAP.COM that allows TPE's
  158. user-defined video mode feature to work with VEGA VGA cards, which use a
  159. proprietary video BIOS call to activate special text modes (such as 132-column
  160. modes).
  161.  
  162.  
  163. Installing TPE with TINSTALL
  164. ------------------------------------------------------------------------------
  165.  
  166. Before using TPE, you will want to run the installation program that comes
  167. with it, TINSTALL. There are MANY configuration options available in TINSTALL,
  168. but only a few are truly important, so we'll cover those first.
  169.  
  170. When you load TINSTALL, you'll be presented with a scrollable data entry
  171. screen that displays several basic configuration options. Most of the ones
  172. we're interested in now are on subsequent pages. To get to one you can't see
  173. at first, press either <Down> or <PgDn>.
  174.  
  175. The following are the configuration options you should set initially:
  176.  
  177.   Configuration option                     Default setting (if any)
  178.   ---------------------------------------- -----------------------------------
  179.   Directory for supporting files
  180.     This setting determines where TPE will look for its help file (TPE.HLP),
  181.     its standard macro file (TPE.MAC), and (by default) its reload list file
  182.     (TPE.RLL). Typically this will be the drive:\directory containing TPE.EXE
  183.     and TPE.CFG.
  184.  
  185.   Source of virtual memory for editing     RAM
  186.     This setting determines the source of memory to be used to store text
  187.     being edited. By default, TPE uses normal RAM, but you can also select
  188.     EMS, XMS, or Disk here. If the desired source of virtual memory is not
  189.     available, or is too limited to be of use, TPE will display an error
  190.     message when it starts and use normal RAM instead. We generally advise use
  191.     of Disk space for virtual memory only if you have a large (1-2 megabyte)
  192.     disk cache installed. See the section on TPE's Virtual Memory Manager,
  193.     below, for additional information about this feature.
  194.  
  195.   Printer to use                           LPT1
  196.     You can choose LPT1, LPT2, LPT3, COM1, or COM2. This setting is important
  197.     only in the sense that you can't print with TPE if it is wrong.
  198.  
  199.   Name of swap file                        $TPE$.SWP
  200.     This option is important only if your machine lacks EMS/XMS, or if you
  201.     don't have enough EMS/XMS for TPE to use it when swapping itself out
  202.     before executing other programs. (The amount of EMS/XMS needed varies
  203.     depending on the number of files loaded, etc., but at least 250K is needed
  204.     in all cases, more if EMS/XMS is being used by the virtual memory
  205.     manager.) The default filename is fine, but you will probably want to
  206.     specify a complete pathname, so that the swap file will always be in the
  207.     same place.
  208.  
  209.   Compiler 1
  210.   Name of compiler                         TPC   C:\TP6\TPC.EXE
  211.   Primary options                          /M /$D- /$L- /L
  212.   Secondary options                        /M /$D+ /$L+ /L /V
  213.     These let you specify the complete pathname for your primary compiler and
  214.     any command line options that should be sent to it, as well as an
  215.     abbreviation of up to 4 letters that uniquely identifies this compiler.
  216.     This abbreviation will be displayed on the status line when this compiler
  217.     is the default compiler. The two sets of options correspond to two
  218.     different Compile program commands in the editor, allowing you to easily
  219.     alternate between compiling with or without debug information. Note that
  220.     you can specify up to four other compilers for TPE to use (Compilers 2-5).
  221.     TINSTALL also lets you select a Default compiler (normally Compiler 1),
  222.     and TPE lets you switch compilers dynamically by pressing <ShF5>.
  223.  
  224.   Pathname for assembler                   C:\TASM\TASM.EXE
  225.   Options for assembler
  226.   Assemble file in current window          Y
  227.     These let you specify the complete pathname for your assembler and any
  228.     command line options that should be sent to it. If the Assemble file in
  229.     current window option is set to Y, TPE will pass the name of the file in
  230.     the current window to the assembler; if it is set to N, TPE will pass the
  231.     name of the primary file.
  232.  
  233.   Pathname for debugger                    C:\TD\TD.EXE
  234.   Options for debugger
  235.     These let you specify the complete pathname for your debugger and any
  236.     command line options that should be sent to it.
  237.  
  238. Of the remaining configuration options, only a couple require detailed
  239. explanations, so we'll go over those next.
  240.  
  241. On the third page of configuration options, you'll find a section labelled
  242. "Video attributes". The options in this section let you change the colors used
  243. by TPE. There are two sets of colors: one for color systems, the other for
  244. monochrome adapters and color adapters running in a black-and-white video mode
  245. (BW80). These are the color settings and what they mean:
  246.  
  247.   Attribute                                Color   Mono
  248.   ---------------------------------------- ------- ---------------------------
  249.   Text                                     1E      07
  250.     Ordinary text within an editing window.
  251.  
  252.   Marked blocks                            1B      0F
  253.     Color used to highlight marked blocks. Also used to display control
  254.     characters embedded in the text.
  255.  
  256.   Text markers                             5F      09
  257.     Color used to display text markers (sometimes called bookmarks).
  258.  
  259.   Highlighted search text                  4F      70
  260.     Color used to temporarily highlight text found in a search operation.
  261.  
  262.   Window status line                       2F      70
  263.     Color used for each window's status line.
  264.  
  265.   Command line                             0B      07
  266.     Color used for the command line at the top of the screen.
  267.  
  268.   Block cursor                             4F      70
  269.     Color used for a solid (non-blinking) block cursor.
  270.  
  271.   Menu items (unselected)                  3F      07
  272.     Color used for unselected items in a menu (filenames in a directory list,
  273.     for example).
  274.  
  275.   Menu items (selected)                    3F      0F
  276.     Color used to highlight a selected item in a menu.
  277.  
  278.   Menu items (alternate)                   4F      70
  279.     Alternate color used for unselected items in a menu (directory names in a
  280.     directory list, for example).
  281.  
  282.   Menu frame                               3E      0F
  283.     Color used for the frame around a menu/pick list.
  284.  
  285. When the cursor is on one of these fields, the line at the top of the screen
  286. will change colors to give you a sample of the current color setting for that
  287. particular item.
  288.  
  289. There are two ways to change one of these colors. If you know the hex value
  290. for the color you want, you can just enter it. For example, for white text on
  291. a red background, you'd enter "4F". The easier way is to press <F10> and
  292. select the color you want with the cursor keys. When you've got the correct
  293. color highlighted, press <Enter>.
  294.  
  295. The next option that requires special comment is the very first one on the
  296. second page of options, Modify key assignments. When you press <Enter> with
  297. the cursor on this field, a new window will appear that shows all the commands
  298. in TPE and the keys they are assigned to.
  299.  
  300. To change or add a key assignment, move the highlight bar to the one you want
  301. to modify and press <Enter>, then press the key(s) you want to assign the
  302. command to. While entering a key assignment, the following commands are
  303. available:
  304.  
  305.   <BkSp>, <CtrlBkSp>
  306.   Delete last key
  307.  
  308.   <CtrlC>, <CtrlY>
  309.   Clear the key assignment
  310.  
  311.   <CtrlR>, <CtrlQ><L>
  312.   Restore the previous value
  313.  
  314.   <Enter>
  315.   Accept key assignment
  316.  
  317.   <Esc>, <CtrlBreak>
  318.   Cancel the operation
  319.  
  320. If you need to enter one of these keys as part of the key assignment, press
  321. <ScrollLock> to switch to literal mode rather than command mode, enter the
  322. key(s), then press <ScrollLock> to switch back to command mode.
  323.  
  324. To accept any changes that you have made and return to the main entry screen,
  325. press <Esc> or <CtrlEnter>. TINSTALL will then check to make sure that there
  326. are no conflicts among the key assignments. If any conflicts are found, an
  327. error message will be displayed and the keys causing the conflicts will be
  328. highlighted. TINSTALL will not allow you to return to the main entry screen
  329. until you have resolved all conflicts. If you decide that you'd rather just
  330. leave the keys the way they were before you made your changes, you can press
  331. <CtrlR> to Restore the default settings, then press <Esc>.
  332.  
  333. The only other options that require special comment are the following:
  334.  
  335.   Configuration option                     Default setting
  336.   ---------------------------------------- -----------------------------------
  337.   Printer initialization string
  338.   Printer reset string                     ^L^M
  339.  
  340. These options allow you to specify special strings that are to be sent to the
  341. printer before and after text is sent to the printer. They require special
  342. comment only because any strings you may specify will typically need to
  343. contain control characters, such as <Esc>. To enter a control character into
  344. one of these strings, simply press <CtrlP> first. For example, to enter an
  345. <Esc> character, press <CtrlP><Ctrl[>. The default printer reset string simply
  346. sends a form feed and carriage return to the printer to eject the last page.
  347. If this isn't necessary for your printer, you should clear this string.
  348.  
  349. The rest of the options are fairly self-explanatory, so we'll give only a
  350. brief description of what they mean. Most of them correspond to TPE commands
  351. that we'll be discussing later.
  352.  
  353.  
  354.   Configuration option                     Default setting (if any)
  355.   ---------------------------------------- -----------------------------------
  356.  
  357. Configuration options
  358.  
  359.   File for virtual memory on disk          $TPE$.VMF
  360.     Specifies the name of the file that the virtual memory manager will use if
  361.     Disk is the source of virtual memory. If no directory is specified, the
  362.     file will be stored in the current directory.
  363.  
  364.   Amount of EMS/XMS to reserve (in KB)     0
  365.     This value specifies the amount of EMS or XMS (in kilobytes) that the
  366.     virtual memory manager is supposed to leave available for other programs.
  367.     Note that it always sets aside enough memory for the swapping exec
  368.     function to use EMS/XMS if you answer Yes to either the "Use EMS if
  369.     available" question or the "Use XMS if available" question" (see below).
  370.  
  371.   Save config data on exit                 N
  372.     If this option is on, the CFG file is updated automatically on exit.
  373.  
  374.   Save reload list on exit                 Y
  375.     If this option is on, the reload list is saved automatically on exit.
  376.  
  377.   Directory for reload list                Support path
  378.     This option lets you specify where you want the reload list stored when
  379.     you exit from TPE. By default, it's stored in the support path, but you
  380.     can also select Currrent dir, in which case you can maintain multiple
  381.     reload lists in multiple directories.
  382.  
  383. File options
  384.  
  385.   Create BAK files when saving             Y
  386.     If Yes, TPE will rename existing files with a BAK extension before
  387.     overwriting them.
  388.  
  389.   Expand tabs to spaces when reading       Y
  390.     If Yes, tab characters are expanded to spaces when reading in a new file.
  391.  
  392.   Compress spaces to tabs when writing     N
  393.     If Yes, spaces are compressed to tab characters when writing a file to
  394.     disk.
  395.  
  396.   Default extension for filenames          PAS
  397.     Extension to be applied to filenames when none is specified. If you don't
  398.     want one to be applied, leave this field empty.
  399.  
  400. Editing options
  401.  
  402.   Insert mode on by default                Y
  403.     If Yes, insert mode will be the default, else overtype mode.
  404.  
  405.   AutoIndent on by default                 Y
  406.     If Yes, autoindent mode is on by default.
  407.  
  408.   Word wrap on by default                  Y
  409.     If Yes, word wrap is on by default.
  410.  
  411.   Fixed tabs on by default                 N
  412.     If Yes, fixed tabs will be the default, else smart tabs.
  413.  
  414.   Compress lines before wrapping           Y
  415.     If Yes, excess white space will be compressed out of a line when wrapping.
  416.  
  417.   Default left margin                      1
  418.     Specifies the default left margin.
  419.  
  420.   Default right margin                     78
  421.     Specifies the default right margin.
  422.  
  423.   Default size for fixed tabs              8
  424.     Specifies the default spacing for fixed tabs.
  425.  
  426.   Indent level for marked blocks           2
  427.     This setting governs the behavior of the indent and unindent block
  428.     commands.
  429.  
  430.   Lines to reserve on undelete stack       20
  431.     Specifies the size of the stack used to store deleted lines.
  432.  
  433.   Default search options                   U
  434.     Default options to use for search and find-and-replace commands.
  435.  
  436. Window options
  437.  
  438.   Use block cursor when editing            Y
  439.     If Yes, a solid block cursor is used rather than a blinking cursor.
  440.  
  441.   Zoom windows by default                  N
  442.     If Yes, new windows will be zoomed when first opened.
  443.  
  444.   Use black and white video attributes     N
  445.     If Yes, TPE will use black and white (monochrome) video attributes, even
  446.     if a color adapter is detected.
  447.  
  448.   Status line format (bytes or lines)      Byte count
  449.     If this option is set to Byte count, the status line for each window will
  450.     display the absolute position of the cursor within the file. If it is set
  451.     to Total lines, the status line will instead display the total number of
  452.     lines in the file--e.g., "5 / 1024", where 5 is the current line number
  453.     and 1024 is the total number of lines in the file.
  454.  
  455. Screen options
  456.  
  457.   User-defined video mode specified        N
  458.     If Yes, you must specify a user-defined video mode in the next field. This
  459.     mode can be toggled on/off within TPE using <AltT><AltU>.
  460.  
  461.   User-defined video mode                  00
  462.     If the answer to the previous question is Yes, this field should specify,
  463.     using hexadecimal notation, the number of the video mode you want TPE to
  464.     use when the <AltT><AltU> command is issued. TPE is designed to work with
  465.     text modes that display anywhere from 40 to 132 columns, and virtually
  466.     any number of rows. Specifying 01 here, for example, will allow you to
  467.     activate 40x25 mode on any non-monochrome adapter. Specifying 55 here will
  468.     allow you to activate 132x25 mode on a VGA that uses the Paradise chip
  469.     set. Be forewarned that not all video cards that implement non-standard
  470.     text modes allow them to be activated using the standard BIOS Set video
  471.     mode function. If yours doesn't, you won't be able to use this facility in
  472.     TPE.
  473.  
  474.   Default to 43-/50-line mode (EGA/VGA)    N
  475.     If Yes, TPE will switch to 43-/50-line mode when the program first starts.
  476.  
  477.   Default to user-defined video mode       N
  478.     If Yes, TPE will switch to the user-defined video mode when the program
  479.     first starts.
  480.  
  481.   Suppress snow (CGA)                      Y
  482.     If Yes, TPE will try to suppress snow when writing to video memory on a
  483.     CGA card.
  484.  
  485. Exec options
  486.  
  487.   Default extension for executables        EXE
  488.     Normally this will be "EXE"; change it to "COM" only if you write mostly
  489.     programs that compile to COM files.
  490.  
  491.   Use EMS if available                     Y
  492.     If Yes, EMS is used for swapping if it is available.
  493.  
  494.   Use XMS if available                     Y
  495.     If Yes, XMS is used for swapping if it is available.
  496.  
  497.   Display "Swapping..." message            Disk
  498.     Determines whether or not a "Swapping" message is displayed when executing
  499.     other programs. If "Disk", it is displayed only when swapping to disk. If
  500.     "Always", it is displayed when swapping to disk, EMS, or XMS. If "Never",
  501.     it is never displayed.
  502.  
  503.   Save modified files before exec          N
  504.     If Yes, TPE will save all modified files before executing a DOS shell or
  505.     executing a program you specify. Note that this is always done when TPE
  506.     execs the compiler, assembler, debugger, or the program associated with
  507.     the primary file.
  508.  
  509.   Pause after running primary program      N
  510.     If Yes, you will be asked to press a key to return to TPE after it has
  511.     executed the program associated with the primary file. Note that you can
  512.     view the output of your program by pressing <AltF5> to display "the user
  513.     screen."
  514.  
  515.   Confirm parameters                       Y
  516.     If Yes, you will be given a chance to edit the command line sent to any
  517.     program being executed.
  518.  
  519. Compilers
  520.  
  521.   Default compiler                         1 (TPC)
  522.     Press <Space>, <+>, or <-> here to select the compiler you'll normally
  523.     want to use. Within TPE, you can change this setting with <ShF5>.
  524.  
  525.   Trap compilation errors                  Y
  526.     If Yes, TPE will attempt to identify errors reported by the compiler or
  527.     assembler, and to move the cursor to the position of the error. TPE
  528.     currently recognizes errors and warnings reported by recent versions of
  529.     Turbo Pascal (TPC and TPCX), Turbo Pascal for Windows (TPCW), Turbo
  530.     Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC, BCCX).
  531.     You'll probably want to set this to N only if your default compiler is not
  532.     one of these. Note that in the case of compilers/assemblers that can
  533.     generate multiple errors and warnings, TPE will pay attention only to the
  534.     first error or warning still visible on the user screen. Press <AltF5> to
  535.     view any other error messages that were generated.
  536.  
  537.   Open new window for compile errors       Y
  538.     If Yes, TPE will open a new window when it detects a compiler error in a
  539.     file that is not currently loaded. If No, TPE will load the file into the
  540.     current window if it is not already loaded.
  541.  
  542. Assembler
  543.  
  544.   Name of assembler                        C:\TASM\TASM.EXE
  545.     Specify the complete pathname of your assembler (if any).
  546.  
  547.   Options for assembler
  548.     Specify the default options you want passed to the assembler. If you're
  549.     using MASM, you should specify ";" here if nothing else.
  550.  
  551.   Assemble file in current window          Y
  552.     If Yes, TPE will pass the assembler the name of the file in the current
  553.     window. If No, it will pass the name of the primary file.
  554.  
  555. Debugger
  556.  
  557.   Name of debugger                         C:\TD\TD.EXE
  558.     Specify the complete pathname of your debugger (if any).
  559.  
  560.   Options for debugger
  561.     Specify the default options you want passed to the debugger.
  562.  
  563. As you look at the default settings, you'll see that the program is configured
  564. for use with Turbo Pascal 6.0, Turbo Assembler, and Turbo Debugger. That
  565. doesn't mean it can't be used with other languages and tools, however. One of
  566. the most enthusiastic users of TPE is a C programmer, and another programs
  567. mostly in assembly language.
  568.  
  569. Now, when you have set the options the way you want them, press <CtrlEnter>.
  570. TINSTALL will then save any changes you have made by modifying (or creating)
  571. TPE.CFG, and it will write a new version of TPE.HLP that reflects the key
  572. assignments you have specified. Note that, if it doesn't yet exist, TPE.HLP
  573. will be created whether you have modified any configuration settings or not.
  574. If you haven't changed anything and you don't want TPE.HLP to be created, or
  575. if you want to cancel the changes you have made, press <Esc> to exit instead
  576. of <CtrlEnter>.
  577.  
  578.  
  579. Starting TPE
  580. ------------------------------------------------------------------------------
  581.  
  582. Now that you've got TPE installed for your system, you're ready to run the
  583. program. TPE expects a command line of the following form:
  584.  
  585.    TPE [Options] [FileName1] .. [FileName8]
  586.  
  587. That is, you may specify up to eight filenames on the command line. If you
  588. have given TPE a default extension to use ("PAS" is the default), it will
  589. apply it to these filenames if no extension is specified. For example, to edit
  590. MYPROG.PAS, you could enter either of the following
  591.  
  592.   tpe myprog
  593.   tpe myprog.pas
  594.  
  595. If you need to edit a file without an extension, add a period to the end of
  596. the name:
  597.  
  598.   tpe readme.
  599.  
  600. Although a filename may contain wildcards, TPE will ignore all filenames
  601. thereafter. That is, the following will work:
  602.  
  603.    tpe myprog myprog.inc *.doc
  604.  
  605. TPE would load MYPROG.PAS and MYPROG.INC into the editor, and it would then
  606. display a list of all files in the current directory with an extension of DOC.
  607.  
  608. This will not work, however:
  609.  
  610.    tpe *.pas myprog.inc *.doc
  611.  
  612. TPE would ignore everything after "*.pas".
  613.  
  614. If you don't specify any filenames as parameters, TPE will start by displaying
  615. a directory list. If there's a default extension, it will use that extension
  616. (e.g., "*.PAS"); if not, it will display all files in the directory (if memory
  617. allows). If you press <Esc> twice, TPE will create a "NONAME" file for you to
  618. edit, which you can rename later when you go to save the file.
  619.  
  620. TPE also recognizes the following command line options:
  621.  
  622.   /L     Reload last file (can be used multiple times)
  623.   /A     Reload all files
  624.   /Jnnn  Jump to line nnn. MUST follow a filename.
  625.   /E     Use EMS for virtual memory
  626.   /X     Use XMS for virtual memory
  627.   /D     Use disk for virtual memory
  628.   /N     Use normal RAM
  629.   /U     Use user-defined video mode
  630.   /43    Use EGA 43-line mode
  631.   /50    Use VGA 50-line mode (same as /43)
  632.   /BW    Use black and white (mono) video attributes
  633.   /UNIX  Edit UNIX files
  634.   /?     Display this help screen
  635.  
  636. These options are fairly self-explanatory. /E, /X, /D, and /N allow you to
  637. specify the source of the memory to be used by the virtual memory manager,
  638. overriding the default setting selected with TINSTALL. /U, /43, and /50 let
  639. you specify the text mode to be used while editing. And /BW lets you request
  640. the use of black-and-white video attributes. You might use this when running
  641. TPE on a laptop.
  642.  
  643. The /J option lets you specify a line number to jump to:
  644.  
  645.    tpe myprog.pas /J750
  646.  
  647. would load MYPROG.PAS and move the cursor to line 750. This parameter should be
  648. used only if the previous parameter was an actual filename. If it wasn't a
  649. filename, the parameter will be ignored.
  650.  
  651. The /UNIX option should be specified when editing files intended to be used
  652. under UNIX. If this option is specified, TPE uses ^J (rather than ^M^J) as a
  653. line delimiter, and it does not append a ^Z to the ends of files it creates.
  654.  
  655. /L and /A require some explanation. By default, when you exit from TPE, it
  656. writes the contents of its reload list to a file, TPE.RLL, either in the
  657. current directory or in the support directory. Just before doing so, it adds
  658. all files currently in memory to the reload list and marks them as loaded.
  659. The file above the current file is added first, and the current file is added
  660. last, at the top of the list. Now, if you start TPE with the /L option, it
  661. will automatically load the file that was current when you last exited and put
  662. the cursor right where it was. To load both that file and the one that was
  663. below it, use "TPE /L /L". To reload all files that were loaded at the time
  664. you exited, use "TPE /A". The windows won't necessarily be the same size or in
  665. the same place as they were, but the same files will be loaded (unless
  666. multiple windows were open onto the same file) and the cursor will be in the
  667. right place in each window. Note that specifying either /L or /A will also
  668. restore your primary file setting to what it was when you exited.
  669.  
  670.  
  671. TPE's Configuration File (TPE.CFG)
  672. ------------------------------------------------------------------------------
  673.  
  674. A few words about the TPE.CFG file are also in order here. TPE will normally
  675. look for it first in the current directory, then in the directory that TPE.EXE
  676. was loaded from (under DOS 3.x or higher), then in all directories on DOS's
  677. PATH. If it can't find it, it will display an error message and proceed to use
  678. the "factory default" settings.
  679.  
  680. Note, however, that if you need to run TPE.EXE from a network drive and have
  681. multiple users using it, each with his own TPE.CFG file, what you can do is
  682. have each user set an environment variable that specifies the directory where
  683. his copy of TPE is stored:
  684.  
  685.   SET TPE=C:\TPE
  686.  
  687. DO NOT specify the name of the configuration file, which is assumed to be
  688. TPE.CFG, just the drive and directory. This environment variable, if it
  689. exists, will be used only to locate TPE.CFG. (TINSTALL does not check for the
  690. existence of this environment variable, incidentally, only TPE.)
  691.  
  692. Note too that, although it is possible to have multiple TPE.CFG files stored
  693. in multiple directories, we generally recommend that you maintain a single CFG
  694. file, preferably in the same directory as TPE.EXE. If you have multiple CFG
  695. files with different settings stored in various directories, the behavior of
  696. TPE will change depending on where you are when you load it. This could
  697. conceivably be desirable in certain cases, but it can also lead to confusion
  698. in others. For this last reason, we discourage the practice.
  699.  
  700. On the other hand, if you've selected the Save config data on exit
  701. option, and you're the kind of programmer who works on a variety of projects
  702. at once, each with its own directory, and you always change to the appropriate
  703. directory before working on that project, you may also prefer to maintain
  704. multiple CFG files, one in each of these directories. If so, you will probably
  705. also want to select the option to save the reload list in the current
  706. directory rather than the support path.
  707.  
  708.  
  709. The Status Line
  710. ------------------------------------------------------------------------------
  711.  
  712. As indicated earlier, the top line of TPE's screen is used as a command line.
  713. It's where you respond to requests for search strings, filenames, etc., and it
  714. is also used to display messages. The remainder of the screen is used for the
  715. editing windows, up to 8 of them at a time. At the top of each window is a
  716. status line of the following form:
  717.  
  718. »SAVE« FILENAME.EXT Line nnnnnn Col nnn Byte nnnnnnnn TPC  INS ST AI WW * »ZOOM«
  719.  
  720. The "»SAVE«" indicator is present only when the file has been modified. If you
  721. are in a line-drawing mode, it will be replaced by a series of characters that
  722. indicate which of the four modes you are in (e.g., "─│┌┐└┘"). Or, if
  723. <ScrollLock> is on, "ScLock" will appear here instead, to indicate that the
  724. line drawing mode is being temporarily overridden.
  725.  
  726. "FILENAME.EXT" is the name of the file being edited. If you need to be
  727. reminded of its full pathname, use the <AltI> command. (If you are editing in
  728. a user-defined 132-column mode, the full pathname will be displayed here if
  729. possible.)
  730.  
  731. The next three slots on the command line indicate the position of the cursor
  732. relative to the beginning of the file. Note that if you have selected the
  733. Total lines option within TINSTALL, the format of the status line will be
  734. slightly different:
  735.  
  736. »SAVE« FILENAME.EXT Line nnnnnnn / nnnnnnn  Col nnn   TPC  INS ST AI WW * »ZOOM«
  737.  
  738. In this format, the "nnnnnnn / nnnnnnn" following Line means "Current line /
  739. Total lines".
  740.  
  741. "TPC" means that the default compiler is TPC.EXE. Use <ShF5> to select a
  742. different compiler.
  743.  
  744. "INS" means that you are in insert mode. "OVR" means that you are in overtype
  745. mode.
  746.  
  747. "ST" means that smart tabs are in use. "FT" means that fixed tabs are in use.
  748.  
  749. "AI" means that autoindent mode is in effect.
  750.  
  751. "WW" means that word wrap is on.
  752.  
  753. "*" indicates that snow-checking is on. It will never appear unless you have a
  754. CGA card.
  755.  
  756. "»ZOOM«" means that the current window has been zoomed. Three other messages
  757. can appear in this position: If the synchronized scrolling option is on,
  758. "∙SYNC∙" will appear here. If macro recording is on, "RECORD" will appear here
  759. instead. Or, if a macro is currently being played back, "MACRO!" will appear
  760. here until the macro is finished. (This visual reminder is useful because
  761. screen updates are suppressed while a macro is in progress.)
  762.  
  763. The next few sections provide descriptions of all the commands in TPE,
  764. arranged into categories. The one that you will probably find most useful at
  765. first is the help command, <F1>, which opens a new window, loads TPE.HLP into
  766. it, and then zooms the window. This file, created by TINSTALL, gives a
  767. complete list of all the commands (arranged pretty much as they are here) and
  768. the keys they are assigned to.
  769.  
  770. Basic Cursor Movement Commands
  771. ------------------------------------------------------------------------------
  772.  
  773. Character left                                   <Left>, <CtrlS>
  774. Cursor left one character.
  775.  
  776. Character right                                  <Right>, <CtrlD>
  777. Cursor right one character.
  778.  
  779. Word left                                        <CtrlLeft>, <CtrlA>
  780. Cursor left one word. A "word" is any sequence of characters delimited by
  781. one of the following characters: space, tab, carriage return, line feed,
  782. < > , . / ? ; : " [ ] { } - = \ + | ( ) % @ & ^ $ # ! ~. If the cursor is
  783. at the beginning of a line, it is moved to the end of the previous line.
  784.  
  785. Word right                                       <CtrlRight>, <CtrlF>
  786. Cursor right one word. If the cursor is at the end of a line, it is moved to
  787. the beginning of the following line.
  788.  
  789. Cursor to left side                              <Home>, <CtrlQ><S>
  790. Cursor to beginning of line.
  791.  
  792. Cursor to right side                             <End>, <CtrlQ><D>
  793. Cursor to end of line--i.e., the position following the last non-blank
  794. character on the line. Trailing blanks are always removed from all lines to
  795. preserve space.
  796.  
  797. Line up                                          <Up>, <CtrlE>
  798. Cursor up one line.
  799.  
  800. Line down                                        <Down>, <CtrlX>
  801. Cursor down one line.
  802.  
  803. Scroll up                                        <CtrlW>
  804. Scroll window up one line. The cursor will remain on the current line unless
  805. that line is at the bottom of the window.
  806.  
  807. Scroll down                                      <CtrlZ>
  808. Scroll window down one line. The cursor will remain on the current line unless
  809. that line is at the top of the window.
  810.  
  811. Page up                                          <PgUp>, <CtrlR>
  812. Scroll window up one page.
  813.  
  814. Page down                                        <PgDn>, <CtrlC>
  815. Scroll window down one page.
  816.  
  817.  
  818. More Cursor Movement Commands
  819. ------------------------------------------------------------------------------
  820.  
  821. Top of file                                      <CtrlPgUp>, <CtrlQ><R>
  822. Cursor to beginning of file.
  823.  
  824. End of file                                      <CtrlPgDn>, <CtrlQ><C>
  825. Cursor to end of file.
  826.  
  827. Top of window                                    <CtrlHome>, <CtrlQ><E>
  828. Cursor to top line of current window. The cursor remains in the same column.
  829.  
  830. Bottom of window                                 <CtrlEnd>, <CtrlQ><X>
  831. Cursor to bottom line of current window. The cursor remains in the same
  832. column.
  833.  
  834. Up to equal indent                               <CtrlJ><B>
  835. Moves the cursor to the beginning of the first previous line with the same
  836. indentation level as the current line. For example, if the first non-blank
  837. character in the current line is at column 20, the cursor is moved to the
  838. next line up that also begins at column 20.
  839.  
  840. Down to equal indent                             <CtrlJ><E>
  841. Moves the cursor to the beginning of the next line with the same indentation
  842. level as the current line.
  843.  
  844. Go to line                                       <CtrlJ><L>
  845. Prompts for a line number, then moves the cursor to the specified line. Any
  846. positive integer value in the range 1 to 32767 is valid. If the value is
  847. preceded by a plus (+) or minus (-) sign, the target line number will be
  848. calculated relative to the current line. If the target line number is greater
  849. than the number of lines in the file, the cursor will be moved to the last
  850. line in the file.
  851.  
  852. Go to column                                     <CtrlJ><C>
  853. Prompts for a column number, then moves the cursor to the specified column of
  854. the current line. Any positive integer value in the range 1 to 999 is valid.
  855. If the value is preceded by a plus (+) or minus (-) sign, the target column
  856. number will be calculated relative to the current column. If the target column
  857. is greater than 999 or less than 1, the command is ignored.
  858.  
  859. Go to byte                                       <CtrlJ><A>
  860. Prompts for an byte offset, then moves the cursor to the specified absolute
  861. offset within the file. If the value is preceded by a plus (+) or minus (-)
  862. sign, the target offset will be calculated relative to the current offset. If
  863. the target offset is greater than the number of bytes in the file, the cursor
  864. will be moved to the end of the file.
  865.  
  866. Previous cursor position                         <CtrlQ><P>
  867. Jump to the position the cursor was at before it was moved to the current
  868. line. This command is especially useful following a global search or replace
  869. operation.
  870.  
  871. Match braces forward                             <CtrlQ><[>
  872. This command may be used to locate a matching "brace" character or character
  873. pair. For example, if the cursor is on a '{' character, this command would
  874. move the cursor to the corresponding '}'. The following characters and
  875. character pairs may be matched:
  876.  
  877.       '    '          single quotes
  878.       "    "          double quotes
  879.       (    )          parentheses
  880.       [    ]          square brackets
  881.       <    >          angle brackets
  882.       {    }          Pascal-style comment braces
  883.       (*   *)         Pascal-style comments
  884.       /*   */         C-style comments
  885.  
  886. Note that this command accounts for nested braces. For example, if the cursor
  887. were on the first '(' in
  888.  
  889.    I := (X*(Y+Z));
  890.  
  891. the cursor would move to the ')' preceding the ';', not the one following the
  892. 'Z'. Although the name of the command implies that it always searches in a
  893. forward direction, in most cases the search direction is determined by the
  894. character that the cursor is on. For example, if it is on a '}', it will
  895. search backwards. The only exceptions are the single- and double-quote
  896. characters, cases in which the search direction cannot be inferred. This
  897. command will always search forward for a match in these cases.
  898.  
  899. Match braces backward                            <CtrlQ><]>
  900. This command is identical to the Match braces forward command, except in those
  901. cases where the cursor is on single- or double-quote character. In these
  902. cases, the command will always search backward.
  903.  
  904.  
  905. Insertion and Deletion Commands
  906. ------------------------------------------------------------------------------
  907.  
  908. New line                                         <Enter>
  909. In insert mode, this command inserts a line break at the position of the
  910. cursor; if autoindent mode is in effect, the cursor moves to the next line and
  911. to the same column as the first non-blank character in the previous line;
  912. otherwise, to column 1 of the new line. In overtype mode, this command moves
  913. the cursor to column 1 of the next line without inserting a new line, whether
  914. autoindent mode is in effect or not.
  915.  
  916. Insert line                                      <CtrlN>
  917. Inserts a line break at the position of the cursor without moving the cursor.
  918.  
  919. Insert control char                              <CtrlP>
  920. Allows control characters to be entered into the text. For example, pressing
  921. <CtrlP><CtrlG> would insert a ^G into the text (pressing <CtrlP><G> would
  922. insert a G). Control characters are always displayed as highlighted capital
  923. letters in the color used for marked blocks.
  924.  
  925. Delete current character                         <Del>, <CtrlG>
  926. Deletes the character under the cursor and moves any characters to the right
  927. of it one position to the left. This command does not work across line
  928. breaks.
  929.  
  930. Delete left character                            <Bksp>, <CtrlBksp>
  931. Moves the cursor one character to the left and deletes the character there.
  932. Any characters to the right of the cursor are moved one position to the left.
  933. If the cursor is at the beginning of a line, the current line will be joined
  934. with the previous line.
  935.  
  936. Delete right word                                <CtrlT>
  937. Deletes the word to the right of the cursor (see the definition of "word"
  938. given above for the Word left command). This command works across line breaks
  939. and thus may be used to remove line breaks.
  940.  
  941. Delete line right                                <CtrlQ><Y>, <F6>
  942. Delete all text from the cursor to the end of the line.
  943.  
  944. Delete line                                      <CtrlY>, <CtrlF6>
  945. Delete the current line.
  946.  
  947. Delete line (no undo)                            *none*
  948. This command is the same as the Delete line command, but the deleted line is
  949. not saved in the undo buffer. It is potentially useful when using the undo
  950. buffer to temporarily store lines being moved.
  951.  
  952.  
  953. Tab Commands
  954. ------------------------------------------------------------------------------
  955.  
  956. Tab                                              <Tab>, <CtrlI>
  957. Moves the cursor to the next tab stop. If insert mode is on, any text to the
  958. right of the cursor is moved to the right of the tab stop. When fixed tabs are
  959. in effect, the tab stops occur at 8-column intervals (by default). When smart
  960. tabs are in effect (the default setting), the tab stops are determined by the
  961. locations of the words on the previous line; the first character in each word
  962. represents a tab stop.
  963.  
  964. Backward tab                                     <ShTab>
  965. Moves the cursor to the previous tab stop. This command does nothing if smart
  966. tabs are in effect.
  967.  
  968. Toggle fixed tabs                                <CtrlO><F>
  969. Toggles the tab mode between smart tabs and fixed tabs.
  970.  
  971. Set tab size                                     <AltS><AltT>
  972. Prompts the user for the number of columns between tab stops. The value
  973. specified must be in the range 1..100.
  974.  
  975. Toggle tab expansion                             <AltT><AltT>
  976. Activates or deactivates option to "expand" tab characters to spaces when
  977. reading in files created with other editors. The assumed size of the tabs is
  978. specified with the Set tab size command.
  979.  
  980. Toggle tab writing                               <AltT><AltW>
  981. Activates or deactivates option to compress spaces to tab characters when
  982. writing files to disk. The assumed size of the tabs is specified with the Set
  983. tab size command. Note that TPE will not try to compress spaces within
  984. quotation marks.
  985.  
  986.  
  987. Undo Commands
  988. ------------------------------------------------------------------------------
  989.  
  990. Restore line                                     <CtrlQ><L>, <ShF6>
  991. Restore the original contents of the current line.
  992.  
  993. Undo last deletion                               <CtrlQ><U>, <AltU>
  994. Used to restore whole lines deleted with the Delete line or Delete block
  995. commands. It will not restore single characters or words. To "undo" your most
  996. recent changes to the current line, use the Restore Line command. The size of
  997. the "undo buffer" used to save deleted lines may be specified with the Set
  998. undo limit command or with TINSTALL.
  999.  
  1000. Insert undo buffer                               <CtrlQ><V>
  1001. Inserts the entire contents of the undo buffer into the current window just
  1002. prior to the current line. This command is intended primarily to be used in
  1003. macros.
  1004.  
  1005. Flush undo buffer                                <CtrlQ><J>
  1006. Empties the undo buffer. This command is intended primarily for use in
  1007. macros, in cases where you wish to use the undo buffer as a scratchpad.
  1008.  
  1009. Set undo limit                                   <AltS><AltU>
  1010. Allows you to set the size of the "undo buffer" used to store deleted lines.
  1011. The default value is 20 lines. The size of this buffer may also be set with
  1012. TINSTALL.
  1013.  
  1014.  
  1015. Search and Replace
  1016. ------------------------------------------------------------------------------
  1017.  
  1018. Find pattern                                     <CtrlQ><F>, <F4>
  1019. This command lets you search for any string of up to 67 characters. When you
  1020. enter this command, you will be prompted for a search string. The last search
  1021. string entered (if any) will be displayed as a default. You may select it
  1022. again by pressing <Enter>, edit it, or enter a new search string. <Esc> or
  1023. <CtrlU> will cancel a search command, and <CtrlP> may be used to enter control
  1024. characters: for example, to find a period at the end of a line, you would
  1025. enter <.><CtrlP><CtrlM>.
  1026.  
  1027. After the search string is entered, you are asked for search options. The
  1028. options you used last are displayed at first. You may enter new options, edit
  1029. the current options, or select them by pressing <Enter>. The following options
  1030. are available:
  1031.  
  1032.   B Search backward from the current position of the cursor toward the
  1033.     beginning of the file.
  1034.  
  1035.   G Search globally. The entire file is scanned for the search string,
  1036.     regardless of the current position of the cursor. The search starts at the
  1037.     beginning of the file if searching forward; at the end if searching
  1038.     backward.
  1039.  
  1040.   L Search only within the currently marked block.
  1041.  
  1042.   n Find the n'th occurrence of the search string. The search starts at the
  1043.     position of the cursor unless the L or G option is also specified.
  1044.  
  1045.   U Ignore case; treat all alphabetic characters as if they were in upper
  1046.     case.
  1047.  
  1048.   W Search for whole words only; skip matching patterns that are embedded in
  1049.     other words.
  1050.  
  1051. If the text contains a target matching the search string, the target is
  1052. highlighted and the cursor is positioned just beyond it.
  1053.  
  1054. Find and replace                                 <CtrlQ><A>, <F3>
  1055. This command allows you to replace one string of up to 67 characters with
  1056. another. You will be prompted first for a search string, next for a
  1057. replacement string, and finally for the search options. The valid options are
  1058. the same as those for the Find pattern command, with the following exceptions:
  1059.  
  1060.   N Replace without asking.
  1061.  
  1062.   n Make a maximum of n replacements. (Overridden by L option.)
  1063.  
  1064. If the text contains a target matching the search string, the target is
  1065. highlighted and the cursor is positioned just beyond it. You are then asked if
  1066. you wish to replace it. Press <Y> to replace it, <N> to ignore it, <A> to
  1067. replace it and all subsequent matches without asking, or <Q> to abort the
  1068. operation. If the N option was selected, this question will not be asked.
  1069.  
  1070. Search and apply macro                           <CtrlQ><M>
  1071. The Search and apply macro command lets you search for any string of up to 67
  1072. characters and then "apply a macro" to it: that is, move the cursor to the
  1073. location of the target, and execute the commands stored in the macro. Search
  1074. strings are entered in the same way that they are for the Find pattern
  1075. command. After the search string is entered, you are shown a menu containing
  1076. all of the macros you've defined. Move the highlight with the up and down
  1077. cursor keys, and select the macro to apply by pressing <Enter>. You can abort
  1078. the operation by pressing <Esc>.
  1079.  
  1080. Finally, you are prompted for options. The options you used last are
  1081. displayed at first. You may enter new options (canceling the old ones), edit
  1082. the current options, or select them by pressing <Enter>. All the options
  1083. available for the Find and Replace command are available here as well. The
  1084. screen will not be updated while a search and apply macro operation is being
  1085. performed. If you need to stop it, use the Abort command (<CtrlU>).
  1086.  
  1087. The Search and apply macro command can be invoked inside a macro, making it
  1088. possible to create an almost unlimited array of special commands. Note,
  1089. however, that it may not be invoked recursively. That is, the macro to be
  1090. applied may not itself execute the Search and apply macro command.
  1091.  
  1092. Find next                                        <CtrlL>, <ShF4>
  1093. Repeat the last search operation, if any. If the last search command called
  1094. for a Find pattern operation, the same search string and options will be used
  1095. to repeat it. If it was a Find and replace operation, the replacement string
  1096. will be reused as well. If it was a search and apply macro operation, the
  1097. search string, options, and macro will all be reused. Note that if a search
  1098. and apply macro operation is in progress, the last search operation will
  1099. temporarily be considered Find pattern, to allow the macro to search for a
  1100. second instance of the same string. For example, suppose you wanted to delete
  1101. all text not within single quotes from the following block:
  1102.  
  1103.    'One', abcdefg
  1104.    'Two', hijklmn
  1105.    'Three', opqrstu
  1106.  
  1107. To do this, you could search for a single quote, and then apply the following
  1108. macro to it:
  1109.  
  1110.    <BkSp>        Delete the first '
  1111.    <CtrlL>       Find the second one on the line
  1112.    <Left>        Move cursor over the second '
  1113.    <CtrlQ><Y>    Delete to end of line
  1114.  
  1115. To perform this operation on the entire block, you would specify "LN" as your
  1116. search options.
  1117.  
  1118.  
  1119. File Commands
  1120. ------------------------------------------------------------------------------
  1121.  
  1122. Edit another file                                <AltF3>
  1123. Load a new file into the current window. If the file being edited has been
  1124. modified, you'll be asked to confirm that you wish to abandon it.
  1125.  
  1126. Edit file from reload list                       <ShF3>
  1127. Load a new file, selected from the reload list, into the current window. If
  1128. the file being edited has been modified, you'll be asked to confirm that you
  1129. wish to abandon it.
  1130.  
  1131. Save and continue edit                           <CtrlK><S>, <F2>
  1132. Save the current file and continue editing.
  1133.  
  1134. Abandon file                                     <CtrlK><Q>, <AltF2>
  1135. Abandon the current file and close its window. If the file has been modified,
  1136. and it is not being edited in another window, you will be asked to confirm
  1137. this request.
  1138.  
  1139. Abandon all and exit to DOS                      *none*
  1140. Abandon all files and exit to DOS. If any of the files in memory have been
  1141. modified, you will be asked if you want to save them.
  1142.  
  1143. Save and exit to DOS                             <CtrlK><X>, <CtrlF2>
  1144. Save the current file and close its window. If the current window is the only
  1145. window, this command exits to DOS.
  1146.  
  1147. Save all and exit to DOS                         <AltX>
  1148. Save all modified files and exit to DOS.
  1149.  
  1150. Save all and continue                            <ShF2>
  1151. Save all modified files and continue editing. This command is especially
  1152. useful in macros that execute other programs.
  1153.  
  1154. Save/switch files                                <CtrlK><D>
  1155. Save the current file and load a new one into the current window.
  1156.  
  1157. Write to named file                              <CtrlK><N>
  1158. Save the current file under a new name.
  1159.  
  1160. Read block                                       <CtrlK><R>, <AltF10>
  1161. Reads a file into the window at the current position of the cursor and marks
  1162. it as a block.
  1163.  
  1164. Write block                                      <CtrlK><W>, <F10>
  1165. Writes the currently marked block to a file. You are first prompted for a
  1166. filename. If the file already exists, you are asked if you want to append the
  1167. block to the file or to overwrite it; if it does not exist, a new file is
  1168. created. The block is left unchanged, and the block markers remain in place.
  1169. If no block is marked, this command is ignored.
  1170.  
  1171.  
  1172. Window Commands
  1173. ------------------------------------------------------------------------------
  1174.  
  1175. Add window                                       <CtrlO><A>, <AltW>
  1176. Opens another text window. You will be prompted for a file to edit; if none is
  1177. specified, a "NONAME" file is created, which you may later save as a named
  1178. file using any of the Save file commands described above. If too many windows
  1179. are open, you will get an error message. If you enter the name of a file
  1180. already being edited, the new window will allow you to view a different
  1181. section of the file than is displayed in the first window.
  1182.  
  1183. Add window from reload list                      <^F3>
  1184. This command is largely identical to the Add window command, but instead of
  1185. being prompted for a file to edit you are asked to pick a file from the reload
  1186. list.
  1187.  
  1188. Previous window                                  <CtrlO><P>, <ShF1>
  1189. Makes the previous text window the current window.
  1190.  
  1191. Next window                                      <CtrlO><N>, <AltF1>
  1192. Makes the next text window the current window.
  1193.  
  1194. Resize current window                            <CtrlO><S>
  1195. Allows you to change the size of the current window. You adjust the size by
  1196. pressing the up and down cursor keys. When you are finished, pressing <Enter>
  1197. or <Esc> returns you to the editor.
  1198.  
  1199. Zoom current window                              <CtrlO><Z>, <AltZ>
  1200. Zooms the current window to fill the entire screen, hiding the other text
  1201. windows. When a window has been zoomed, "»ZOOM«" will appear at the top right
  1202. corner of the status line. If you change windows while zoomed, the window you
  1203. change to will be zoomed as well. If only one window is open at the time this
  1204. command is given, the command does nothing except request that the next window
  1205. opened should be zoomed.
  1206.  
  1207.  
  1208. Block Commands
  1209. ------------------------------------------------------------------------------
  1210.  
  1211. Begin block                                      <CtrlK><B>, <F7>
  1212. Marks the beginning of a block. The marker itself is not visible on the
  1213. screen, and the block becomes visible only when the end block marker is set.
  1214. You may also use the begin block marker as an extra text marker and jump
  1215. directly to it with the Top of block command.
  1216.  
  1217. End block                                        <CtrlK><K>, <F8>
  1218. Marks the end of a block. Like the begin block marker, the end block marker
  1219. is invisible, and the block itself will not be displayed unless both markers
  1220. are set. You may also use the end block marker as an extra text marker
  1221. and jump directly to it with the Bottom of block command.
  1222.  
  1223. Top of block                                     <CtrlQ><B>
  1224. Moves the cursor to the position of the block begin marker. The command works
  1225. even if the block is hidden or the block end marker is not set.
  1226.  
  1227. Bottom of block                                  <CtrlQ><K>
  1228. Moves the cursor to the position of the block end marker. The command works
  1229. even if the block is hidden or the block begin marker is not set.
  1230.  
  1231. Copy block                                       <CtrlK><C>, <AltF7>
  1232. Copy the currently marked and displayed block to the position of the cursor.
  1233. The block markers are placed around the new copy of the block.
  1234.  
  1235. Move block                                       <CtrlK><V>, <AltF8>
  1236. Move the currently marked and displayed block to the position of the cursor.
  1237. The block markers remain around the block at its new position.
  1238.  
  1239. Delete block                                     <CtrlK><Y>
  1240. Delete the currently marked and displayed block. Although the Undo command can
  1241. usually restore portions of an accidentally deleted block, there is no command
  1242. to restore a deleted block in its entirety, so you should use this command
  1243. with care.
  1244.  
  1245. Toggle block display                             <CtrlK><H>
  1246. Toggle the display of marked blocks. Note that several of the other block
  1247. commands do nothing or generate error messages if a marked block is not
  1248. displayed.
  1249.  
  1250. Mark current word                                <CtrlK><T>
  1251. Mark the current word as a block. See the description of the Word left command
  1252. for a definition of "word."
  1253.  
  1254. Indent block                                     <CtrlK><I>
  1255. Indent all lines in the currently marked and displayed block by a fixed number
  1256. of spaces. The default indention level of 2 may be changed using either
  1257. TINSTALL or the Set indentation level command. The cursor must be within the
  1258. block when the command is issued.
  1259.  
  1260. Unindent block                                   <CtrlK><U>
  1261. Unindent all lines in the currently marked and displayed block by a fixed
  1262. number of spaces (default is 2). Note that this command will not delete any
  1263. non-blank characters at the beginning of a line. The cursor must be within the
  1264. block when the command is issued.
  1265.  
  1266. Increment marked block                           <^K><^G>
  1267. Decrement marked block                           <^K><^L>
  1268. These two commands are somewhat similar to the Upper case, Lower case, and
  1269. Toggle case commands. If the cursor is not within a marked and displayed
  1270. block, they increment or decrement the value of the character at the cursor,
  1271. provided that it is not a space. If the cursor is within a block, the contents
  1272. of that block are examined. If the block is all on one line *and* the string
  1273. of characters within the block is a valid integer number in decimal format
  1274. within the range -MaxLongInt..MaxLongInt, the command will increment or
  1275. decrement that number. For example, if the block consists of "10", " 10", or
  1276. "010", and the Increment marked block command were given, the block would be
  1277. changed to "11", " 11", or "011" respectively. If the block is not on one
  1278. line, or if the contents of the block is not a valid number, each non-blank
  1279. character in the block will be incremented/decremented. For example, "BCDE"
  1280. would become "CDEF"/"ABCD".
  1281.  
  1282. One obvious use for these commands is to construct a macro such as the
  1283. following:
  1284.  
  1285.      <CtrlK><CtrlT>    Mark the current word as a block
  1286.      <CtrlK><CtrlG>    Increment the value of the block
  1287.      <Down>            Move the cursor to the next line
  1288.      <AltS><AltA>      Abort the macro if the new line is empty
  1289.      <AltS><AltR>      Repeat this macro
  1290.  
  1291. Assuming that the cursor were at the top of a column of numbers (a series of
  1292. constant declarations, for example), this macro would increment each number in
  1293. the column until it reached a blank line.
  1294.  
  1295.      Before         After
  1296.      ------        -------
  1297.        "99"          "100"
  1298.       " 99"         "100"
  1299.      "  99"        " 100"
  1300.      "0100"        "0101"
  1301.      "0101"        "0102"
  1302.      "0102"        "0103"
  1303.  
  1304. As you can see, it is acceptable for numbers to be left-padded with either
  1305. zeros or spaces. If the number after incrementing is wider than it was before,
  1306. all text to the right of the number will be pushed forward to make room.
  1307.  
  1308. Align block                                      <CtrlK><A>
  1309. Aligns all lines in the currently marked and displayed block with the first
  1310. line. For example, if the first non-blank character in the first line is at
  1311. column 5, the text in the remaining lines in the block will be adjusted so
  1312. that the first non-blank character in each line is at column 5. The cursor
  1313. must be within the block when the command is issued.
  1314.  
  1315. Reformat block                                   <CtrlK><F>
  1316. Reformats all paragraphs completely contained within the currently marked and
  1317. displayed block. Note that this command does nothing if word wrap is off.
  1318.  
  1319.  
  1320. Printing Commands
  1321. ------------------------------------------------------------------------------
  1322.  
  1323. Print current file                               <AltK><AltP>
  1324. Prints the current file in its entirety by writing it to the default printer
  1325. device (LPT1). You can change the default printer device using TINSTALL if
  1326. LPT1 is inappropriate for your system. (The other choices are LPT2, LPT3,
  1327. COM1, and COM2.) By default, TPE will send a formfeed (^L^M) to the printer at
  1328. the end of a print job, but you may disable this behavior using TINSTALL if
  1329. you wish.
  1330.  
  1331. Print block                                      <CtrlK><P>
  1332. Writes the currently marked and displayed block to the default printer device.
  1333. By default, TPE will send a formfeed to the printer at the end of the print
  1334. job.
  1335.  
  1336.  
  1337. Text Marker Commands
  1338. ------------------------------------------------------------------------------
  1339.  
  1340. Toggle marker display                            <CtrlK><M>
  1341. Toggle the display of text markers.
  1342.  
  1343. Set marker 0..9                                  <CtrlK><0>..<CtrlK><9>
  1344. Sets one of the ten text markers at the position of the cursor. <CtrlK><0>
  1345. sets marker 0, <CtrlK><1> sets marker 1, etc.
  1346.  
  1347. Jump marker 0..9                                 <CtrlQ><0>..<CtrlQ><9>
  1348. Moves the cursor to the specified text marker. <CtrlQ><0> jumps to marker 0,
  1349. <CtrlQ><1> jumps to marker 1, etc.
  1350.  
  1351.  
  1352. Macro Commands
  1353. ------------------------------------------------------------------------------
  1354.  
  1355. Toggle macro record                              <CtrlJ><T>
  1356. Turns macro recording on or off. When macro recording is on, all subsequent
  1357. keystrokes (up to the 255-keystroke limit) are saved in the scrap macro until
  1358. macro recording is turned off again. (Keystrokes used to turn it on and off
  1359. are not saved.) Once the macro is recorded, you are asked to select a macro
  1360. "slot" to store it in.
  1361.  
  1362. Edit macro                                       <AltS><AltM>
  1363. Edit an existing macro. In the macro editor, special keys (function keys,
  1364. cursor keys, etc.) are represented by abbreviated forms of their names--for
  1365. example, <Esc><CtrlN><Enter>--and these symbols are highlighted. Regular
  1366. keystrokes are shown as normal characters, without highlighting. When you
  1367. issue this command, you are asked to select a macro to edit, then to enter a
  1368. name for the macro (optional). Then you enter the macro editor itself. Several
  1369. keys serve special purposes here: the cursor keys behave as usual, moving the
  1370. cursor so you can select a particular keystroke to change; <BkSp> deletes a
  1371. single keystroke, just as it does in the regular editor; <CtrlBkSp> deletes an
  1372. entire macro; <Enter> accepts the macro. The <ScrollLock> key acts as a
  1373. toggle, turning literal interpretation of keystrokes on and off. For example,
  1374. if you wanted to insert the <Enter> key or the <BkSp> key into the macro, you
  1375. would first press <ScrollLock>. Pressing it again would restore all special
  1376. keys to their normal functions. The bottom right corner of the macro editor
  1377. window indicates whether the editor is in Command mode or Literal mode.
  1378.  
  1379. Load macros from disk                            <AltS><AltL>
  1380. Allows you to load a file of previously saved macros. If the file you specify
  1381. does not exist, an error message is displayed.
  1382.  
  1383. Write macros to disk                             <AltS><AltW>
  1384. Saves the current macros to the file you specify.
  1385.  
  1386. Playback macro by menu                           <AltT><AltM>
  1387. Displays a list of the currently defined macros. To play one of them back,
  1388. move the highlight over the appropriate menu item and press <Enter>. Press
  1389. <Esc> instead if you do not wish to playback a macro.
  1390.  
  1391. Playback macro 1..9                              <Alt1>..<Alt9>
  1392. Plays back the specified macro one time. <Alt1> plays back macro 1, <Alt2>
  1393. macro 2, and so on.
  1394.  
  1395. Playback scrap macro                             <CtrlJ><I>
  1396. Plays back the scrap macro (macro 0) a specified number of times. The scrap
  1397. macro is always the same as the last macro that was recorded, even if that
  1398. macro was saved as a normal macro (1-9). Note that the limit on the number of
  1399. times that the macro can be played back depends on the length of the macro (if
  1400. nothing else is in the keyboard buffer, the limit is '512 div Length(Macro)').
  1401.  
  1402. Playback scrap macro 1..9 time(s)                <CtrlJ><1>..<CtrlJ><9>
  1403. Plays back the scrap macro 1 to 9 times. <CtrlJ><1> plays it back once,
  1404. <CtrlJ><2> twice, and so on.
  1405.  
  1406.  
  1407. Special Commands for Use in Macros
  1408. ------------------------------------------------------------------------------
  1409.  
  1410. Force insert mode                                <AltF><AltI>
  1411. Forces insert mode on.
  1412.  
  1413. Force overtype mode                              <AltF><AltO>
  1414. Forces insert mode off.
  1415.  
  1416. Force autoindent mode                            <AltF><AltA>
  1417. Forces autoindent mode on.
  1418.  
  1419. Force word wrap on                               <AltF><AltW>
  1420. Forces word wrap mode on.
  1421.  
  1422. Abort macro if line empty                        <AltS><AltA>
  1423. Aborts the macro if the current line is empty.
  1424.  
  1425. Abort macro if end of file                       <AltS><AltF>
  1426. Aborts the macro if the cursor is at the first *or* last line of the file.
  1427.  
  1428. Abort macro if out of block                      <AltS><AltK>
  1429. Aborts the macro if the cursor is not within the currently marked block.
  1430.  
  1431. Repeat last macro                                <AltS><AltR>
  1432. Repeats the last macro. This command should generally be used only at the end
  1433. of a macro that is designed to be self-repeating *and* self-aborting. For
  1434. example, you might have a macro such as the following:
  1435.  
  1436.    <AltS><AltK>      Abort macro if cursor is not in the marked block
  1437.    <Home><Del><Del>  Delete two spaces at the start of the current line
  1438.    <Down>            Move the cursor to the next line
  1439.    <AltS><AltR>      Repeat last macro--i.e., this macro
  1440.  
  1441. (This macro is taken from the default macro file, TPE.MAC, where it
  1442. is assigned to <Alt2>. See the discussion of The Standard Macro File, below.)
  1443.  
  1444. The macro works something like this:
  1445.  
  1446.    while CursorInMarkedBlock do begin  { <AltS><AltK> }
  1447.      HomeTheCursor;                    { <Home> }
  1448.      DeleteOneChar;                    { <Del> }
  1449.      DeleteOneChar;                    { <Del> }
  1450.      CursorDown;                       { <Down> }
  1451.    end;                                { <AltS><AltR> }
  1452.  
  1453. The conditional test for aborting the macro should generally appear at the
  1454. beginning of the macro or just prior to the Repeat last macro command. If the
  1455. test is at the beginning, the macro will work like a "while" loop, meaning
  1456. that it will never be executed if the condition isn't met initially. If it is
  1457. just before the end, it will work like a "repeat..until" loop, meaning that
  1458. the first part of the macro will always be executed once:
  1459.  
  1460.    repeat
  1461.      HomeTheCursor;                    { <Home> }
  1462.      DeleteOneChar;                    { <Del> }
  1463.      DeleteOneChar;                    { <Del> }
  1464.      CursorDown;                       { <Down> }
  1465.      if not CursorInMarkedBlock then   { <AltS><AltK> }
  1466.        Exit;
  1467.    until False;                        { <AltS><AltR> }
  1468.  
  1469. Note that it is possible to record a macro that contains the Repeat last macro
  1470. command. However, TPE will automatically terminate the recording session as
  1471. soon as the command is issued, rather than actually repeating the macro. The
  1472. Repeat last macro command will then represent the last command in the recorded
  1473. macro.
  1474.  
  1475.  
  1476. Text Formatting Commands
  1477. ------------------------------------------------------------------------------
  1478.  
  1479. Reformat paragraph                               <CtrlB>
  1480. Rearranges words from the current line to the end of the paragraph such that
  1481. the lines are as full as possible, given the constraints imposed by the left
  1482. and right margins. The end of a paragraph is signaled by a blank line. This
  1483. command is available only when word wrap is on.
  1484.  
  1485. Center line                                      <CtrlO><C>
  1486. Centers the current line within the left and right margins.
  1487.  
  1488. Upper case                                       <CtrlO><U>
  1489. Convert all characters in the currently marked and displayed block to upper
  1490. case. If the cursor is not within a marked and displayed block, the character
  1491. at the cursor is converted to upper case.
  1492.  
  1493. Lower case                                       <CtrlO><V>
  1494. Convert all characters in the currently marked and displayed block to lower
  1495. case. If the cursor is not within a marked and displayed block, the character
  1496. at the cursor is converted to lower case.
  1497.  
  1498. Toggle case                                      <CtrlO><O>
  1499. Toggle the case of all characters in the currently marked and displayed block.
  1500. If the cursor is not within a marked and displayed block, the case of the
  1501. character at the cursor is toggled.
  1502.  
  1503. Mode Toggle Commands
  1504. ------------------------------------------------------------------------------
  1505.  
  1506. Toggle insert mode                               <Ins>, <CtrlV>
  1507. Toggle insert mode on or off. A fat cursor indicates insert mode; a thin
  1508. cursor indicates overtype mode. (If a solid block cursor is in use, only the
  1509. status line will indicate whether you are in insert or overtype mode.)
  1510.  
  1511. Toggle autoindent mode                           <CtrlQ><I>
  1512. Toggle autoindent mode on or off. In autoindent mode, pressing <Enter> while
  1513. in insert mode will cause the new line inserted to have the same indentation
  1514. level as the previous line. Autoindent mode also affects the way that text is
  1515. formatted when word wrap occurs--the new line will have the same indentation
  1516. level as the previous line--and hence the behavior of the reformatting
  1517. commands.
  1518.  
  1519. Toggle word wrap                                 <CtrlO><W>
  1520. Toggle word wrap on or off. When word wrap is on, any attempt to insert or
  1521. append text beyond the right margin will cause a new line to be inserted
  1522. following the current line and all words that are at least partially beyond
  1523. the right margin to be moved to the new line.
  1524.  
  1525. Toggle compress at wrap                          <AltT><AltC>
  1526. This option, which is on by default, tells TPE to compress excess white space
  1527. out of a line before trying to word wrap it. For example,
  1528.  
  1529.    this      is      a       test
  1530.  
  1531. would become
  1532.  
  1533.    this is a test
  1534.  
  1535. after compression. Leading white space is never removed. Note that this
  1536. setting also affects the behavior of the reformatting commands.
  1537.  
  1538. Toggle synchronized scroll                       <AltS><AltS>
  1539. When synchronized scrolling is on, all cursor movement commands are passed to
  1540. all visible windows on the screen for processing. This option is especially
  1541. useful when comparing two versions of the same file. Note that many cursor
  1542. movement commands--notably <Up>, <Down>, <Left>, and <Right>--will often have
  1543. no visible effect on windows other than the current one. The effects will be
  1544. visible only if the command causes the window to scroll. Note too that certain
  1545. commmands--such as <End>, <CtrlLeft>, and <CtrlRight>--may have slightly
  1546. different effects in different windows. Synchronized scrolling is temporarily
  1547. disabled when the current window is zoomed.
  1548.  
  1549. Commands for Controlling Text Formatting
  1550. ------------------------------------------------------------------------------
  1551.  
  1552. Set left margin                                  <CtrlO><L>
  1553. Set the left margin for text displayed on the screen. The default left margin
  1554. of 1 may be changed with TINSTALL.
  1555.  
  1556. Set right margin                                 <CtrlO><R>
  1557. Set the right margin for text displayed on the screen. The default right
  1558. margin of 78 may be changed with TINSTALL.
  1559.  
  1560. Set indentation level                            <CtrlO><B>
  1561. Set the indentation level for marked blocks. This setting affects the behavior
  1562. of the Indent block and Unindent block commands. The default indentation level
  1563. of 2 may be changed with TINSTALL.
  1564.  
  1565. Screen Toggle Commands
  1566. ------------------------------------------------------------------------------
  1567.  
  1568. Toggle 43-/50-line mode                          <AltT><AltE>
  1569. Activates/deactivates the 43-line mode on EGA's or the 50-line mode on VGA's.
  1570. Note that TPE will restore the mode that the system was in initially before
  1571. exiting to DOS or executing another program.
  1572.  
  1573. Toggle user-defined mode                         <AltT><AltU>
  1574. Activates/deactivates the user-defined video mode if one was specified with
  1575. TINSTALL. If none was specified, this command does nothing.
  1576.  
  1577. Toggle line-drawing mode                         <AltL>
  1578. This command lets you activate/deactivate one of TPE's four line-drawing
  1579. modes. In a line-drawing mode, pressing <Left>, <Right>, <Up>, or <Down> will
  1580. cause an appropriate line-drawing character to be placed at the position of
  1581. the cursor, overwriting the character beneath the cursor, if any. The cursor
  1582. will then be moved in the direction indicated, if appropriate. Note that, when
  1583. line-drawing characters are being inserted, the current margins are ignored,
  1584. as are the states of the autoindent, word wrap, and insert mode toggles.
  1585.  
  1586. By default, TPE runs in "edit mode," in which the four cursor keys simply move
  1587. the cursor. Pressing <AltL> repeatedly allows you to select one of the four
  1588. line-drawing modes, corresponding to the following sets of characters:
  1589.  
  1590.   ─│┌┐└┘    ═║╔╗╚╝    ─║╓╖╙╜    ═│╒╕╘╛
  1591.  
  1592. Pressing <AltL> a fifth time brings you back to edit mode. You can switch back
  1593. to edit mode immediately by pressing <AltE> (Force edit mode), or you can
  1594. temporarily switch to edit mode by pressing <ScrollLock>. Note that ScrollLock
  1595. is forced off when you give either the <AltL> or the <AltE> command.
  1596.  
  1597. As with other mode toggles, activating a line-drawing mode in the current
  1598. window has no effect on other windows. When one of the line-drawing modes is
  1599. in effect for a given window, the left side of its status line is used to
  1600. display the corresponding character set. If ScrollLock is active, however, and
  1601. that window is the current window, 'ScLock' is displayed there instead to
  1602. remind you that the line-drawing mode has been temporarily overridden. If the
  1603. window is in edit mode, that portion of the status line is used to display the
  1604. '»SAVE«' reminder, as usual.
  1605.  
  1606. Force edit mode                                  <AltE>
  1607. Forces a return to edit mode.
  1608.  
  1609. Toggle snow check                                <AltT><AltS>
  1610. Turns snow checking on or off. Since snow checking is needed only for older
  1611. CGA adapters, TPE will ignore this command if the current display is not a
  1612. CGA.
  1613.  
  1614. Toggle block cursor                              <AltT><AltB>
  1615. Hides the blinking cursor you normally see on the screen and replaces it with
  1616. a solid, non-blinking "block cursor". You can change the appearance of the
  1617. block cursor with TINSTALL. The blinking cursor is restored when you exit from
  1618. TPE or when you execute another program.
  1619.  
  1620. Toggle initial zoom                              <AltT><AltZ>
  1621. If the initial zoom option is in effect (it is off by default), new windows
  1622. will automatically be zoomed when they are first opened.
  1623.  
  1624.  
  1625. Program Configuration Commands
  1626. ------------------------------------------------------------------------------
  1627.  
  1628. Set support path                                 <AltS><AltP>
  1629. The support path is the drive:\directory where TPE looks for its help file
  1630. (TPE.HLP) and the standard macro file (TPE.MAC).
  1631.  
  1632. Set default extension                            <AltS><AltE>
  1633. Used to specify the default extension for filenames. This extension is
  1634. automatically added to filenames lacking extensions. For example, if you have
  1635. set the default extension to "PAS" (the default setting) and wish TPE to load
  1636. "MYPROG.PAS" when the program starts, you can enter
  1637.  
  1638.      tpe myprog
  1639.  
  1640. at the command line. Note that you must issue the Save defaults command if you
  1641. want to make this setting permanent.
  1642.  
  1643. Save defaults                                    <AltS><AltD>
  1644. Allows you to save the current configuration settings as the defaults. If TPE
  1645. found TPE.CFG when it first loaded, that copy of TPE.CFG will be overwritten
  1646. with the new settings. If TPE.CFG was not found initially, a new TPE.CFG file
  1647. will be created in the current directory. This command is of little use if
  1648. you've selected the option to automatically save the configuration data on
  1649. exit.
  1650.  
  1651.  
  1652. Miscellaneous Commands
  1653. ------------------------------------------------------------------------------
  1654.  
  1655. Show system info                                 <CtrlJ><V>, <AltI>
  1656. Shows you a variety of statistics about the file in the current window, as
  1657. well as certain "system information": the version of TPE in use; the full
  1658. pathname of the file being edited; the number of lines, bytes, and words in
  1659. the file; the amount of RAM and (if appropriate) virtual memory remaining; the
  1660. current drive and directory; and the amount of space remaining on the current
  1661. drive.
  1662.  
  1663. Show available memory                            <CtrlJ><R>, <AltM>
  1664. Displays the amount of virtual memory available within the editor.
  1665.  
  1666. Invoke DOS shell                                 <CtrlJ><O>, <AltD>
  1667. This command gives you access to DOS services or to other programs from within
  1668. TPE. You will be prompted for the name of a program or a DOS command to be
  1669. executed. If you need to run several programs, you can invoke a DOS "shell"
  1670. simply by leaving the command string blank and pressing <Enter>. To return to
  1671. TPE from a DOS shell, enter "EXIT" at the DOS command line.
  1672.  
  1673. As mentioned elsewhere, one of the nicest features of TPE is its ability to
  1674. swap itself almost entirely out of memory before executing other programs.
  1675. Only a tiny kernel of about 4K remains in memory; the rest of the program is
  1676. swapped to disk, EMS, or XMS.
  1677.  
  1678. Note that you cannot load a second copy of TPE while you are shelled out to
  1679. DOS. If you try to do so, TPE will abort with the message "TPE is already
  1680. loaded."
  1681.  
  1682. One other special note about this command. TPE analyzes the command line you
  1683. specify and replaces each instance of "%p%" with the full pathname of the
  1684. primary file. (See the next section of the documentation.) For example, if the
  1685. primary file is "C:\PAS\MYPROG.PAS", then "tpc %p%" would be treated as
  1686. equivalent to "tpc C:\PAS\MYPROG.PAS". Note that there may be more than one
  1687. instance of "%p%" in the command string. This feature makes it possible to
  1688. create a macro that executes a utility program and automatically passes it the
  1689. name of the primary file. For example, the macro "<ShF2><AltD>psa %p%<Enter>"
  1690. would save all modified files and then execute the PSA program from Turbo
  1691. Analyst, passing it the name of the primary file as a parameter.
  1692.  
  1693. Log drive/path                                   <CtrlJ><D>, <AltP>
  1694. Allows you to change the active drive and directory. You may enter a drive and
  1695. path, or you can specify a "file mask" and choose a new path from a directory
  1696. listing. For example, entering
  1697.  
  1698.      C:\*.*
  1699.  
  1700. would show you a list of all the subdirectories that branch out of the root
  1701. directory on drive C. When the name of the directory you want is displayed at
  1702. the top of the window, press <Esc> to make it the current directory.
  1703.  
  1704. Abort                                            <CtrlU>
  1705. Used to halt an operation in progress. The keyboard buffer is checked
  1706. regularly to see if the abort command has been issued; if it has, the buffer
  1707. is emptied and the operation is stopped.
  1708.  
  1709. Load help file                                   <F1>
  1710. This command tells TPE to load the help file (TPE.HLP) created by TINSTALL. If
  1711. the file is found on the support path, and there are fewer than 8 windows
  1712. open, TPE will open a new window, load TPE.HLP into it, and then zoom the
  1713. window. There is nothing special about the help file. It is an ordinary ASCII
  1714. text file, and you may do anything with it that you could do with any other
  1715. file (perform searches, edit it, etc.).
  1716.  
  1717. Display user screen                              <AltF5>
  1718. This command displays the contents of "the user screen"--the screen that was
  1719. active when TPE first started. If any other programs have been executed while
  1720. within TPE, the output of those programs can be viewed using this command.
  1721. Press any key to return to the TPE screen.
  1722.  
  1723. Commands for Executing a Program
  1724. ------------------------------------------------------------------------------
  1725.  
  1726. Set primary file                                 <AltC><AltP>
  1727. This command lets you specify the name of the "primary file," usually the main
  1728. source file for the program you are working on in the editor.
  1729.  
  1730. Reset primary file                               <AltC><AltR>
  1731. This command makes the file in the current window the primary file.
  1732.  
  1733. Execute primary file                             <CtrlF9>, <AltR>
  1734. This command executes the program corresponding to the primary file. When
  1735. searching for the program to be executed, TPE will apply the default extension
  1736. for executables to the name of the primary file (see the Set extension for
  1737. executables command). It will look for the file first in the current directory
  1738. and then on the DOS path. If it is unable to locate the program, you will be
  1739. asked to enter its name. If the Confirmation of parameters option is On, as it
  1740. is by default, you will be given an opportunity to edit the command line to be
  1741. passed to the program before it is executed. (The state of this option may be
  1742. changed using the Toggle confirmation of parameters command.)
  1743.  
  1744. Set extension for executables                    <AltC><AltE>
  1745. Lets you specify the default extension to be applied to the name of an
  1746. executable program. The default setting of "EXE" should be left alone unless
  1747. you are compiling/running/debugging a program that compiles to a COM file.
  1748.  
  1749. Set default parameters                           <AltC><AltS>
  1750. Lets you specify a list of parameters to be passed to a program when the
  1751. Execute primary file or Debug primary file commands are issued.
  1752.  
  1753. Toggle confirmation of parameters                <AltC><AltT>
  1754. This command toggles the option that determines whether or not you will be
  1755. asked to confirm the command line to be passed to a program being executed.
  1756. This option is On by default, unless you have changed the default setting with
  1757. TINSTALL. Note that this setting also applies to the compiler, assembler, and
  1758. debugger.
  1759.  
  1760.  
  1761. Commands for Compiling Programs
  1762. ------------------------------------------------------------------------------
  1763.  
  1764. Select compiler                                  <ShF5>
  1765. This command allows you to change the current compiler, assuming that you have
  1766. configured TPE for use with multiple compilers. The abbreviation for the
  1767. currently selected compiler will appear on the status lines for all visible
  1768. windows. Note that, unlike TINSTALL, TPE will not allow you to select a given
  1769. compiler unless it has a 1- to 4-character abbreviation.
  1770.  
  1771. Compile w/ primary options                       <F9>
  1772. This command compiles the primary file using the current compiler and its
  1773. primary compiler options. Normally this command is used to compile a program
  1774. *without* debug information. If the Confirmation of parameters option is On,
  1775. as it is by default, you will be given an opportunity to edit the command line
  1776. to be passed to the compiler before it is executed.
  1777.  
  1778. Compile w/ secondary options                     <AltF9>
  1779. This command compiles the primary file using the current compiler and its
  1780. secondary compiler options. Normally this command is used to compile a program
  1781. *with* debug information, in preparation for running it in the debugger. If
  1782. the Confirmation of parameters option is On, as it is by default, you will be
  1783. given an opportunity to edit the command line to be passed to the compiler
  1784. before it is executed.
  1785.  
  1786. Set path to compiler                             <AltC><AltN>
  1787. Lets you specify the complete pathname of the current compiler. Note that TPE
  1788. will automatically use the first four letters of the compiler's name as its
  1789. abbreviation. For example, if you set the path to the current compiler to
  1790. 'C:\BC\BIN\BCCX.EXE', TPE will set the compiler's abbreviation to 'BCCX'.
  1791.  
  1792. Set primary compiler options                     <AltC><AltO>
  1793. Lets you specify the command line options to be passed to the current compiler
  1794. when you issue the Compile w/ primary options command.
  1795.  
  1796. Set secondary compiler options                   <AltC><Alt2>
  1797. Lets you specify the command line options to be passed to the current compiler
  1798. when you issue the Compile w/ secondary options command.
  1799.  
  1800.  
  1801. Commands for Assembling Programs
  1802. ------------------------------------------------------------------------------
  1803.  
  1804. Assemble file                                    <AltA>
  1805. This command assembles either the file in the current window (default) or the
  1806. primary file, depending on how TPE is configured. If the Confirmation of
  1807. parameters option is On, as it is by default, you will be given an opportunity
  1808. to edit the command line to be passed to the assembler before it is executed.
  1809.  
  1810. Set path to assembler                            <AltC><AltA>
  1811. Lets you specify the complete pathname of the assembler.
  1812.  
  1813. Set assembler options                            <AltC><AltC>
  1814. Lets you specify the command line options to be passed to the assembler when
  1815. you issue the Assemble file command.
  1816.  
  1817.  
  1818. Commands for Debugging Programs
  1819. ------------------------------------------------------------------------------
  1820.  
  1821. Debug primary file                               <ShF9>
  1822. This command invokes the debugger, passing it any command-line options
  1823. specified with the Set debugger options command, followed by the name of the
  1824. primary file (after applying the default extension for executables to the
  1825. filename), plus any command line options you have specified with the Set
  1826. default parameters command. If the Confirmation of parameters option is On, as
  1827. it is by default, you will be given an opportunity to edit the command line to
  1828. be passed to the debugger before it is executed.
  1829.  
  1830. Set path to debugger                             <AltC><AltD>
  1831. Lets you specify the complete pathname of the debugger.
  1832.  
  1833. Set debugger options                             <AltC><AltG>
  1834. Lets you specify the command line options to be passed to the debugger when
  1835. you issue the Debug primary file command.
  1836.  
  1837.  
  1838. The Standard Macro File: TPE.MAC
  1839. ------------------------------------------------------------------------------
  1840.  
  1841. When TPE first starts, it looks for a macro file called TPE.MAC. It looks for
  1842. this file first in the current directory and then in TPE's support path
  1843. directory (set with TINSTALL). In the typical case, you will have only one
  1844. file called TPE.MAC, located in your support path. However, if you wish you
  1845. may have multiple files of that name for use on different projects. Just keep
  1846. in mind that TPE will look only in the current directory for a
  1847. project-specific macro file.
  1848.  
  1849. In any case, if a file called TPE.MAC is found, the macros are loaded and
  1850. effectively become part of the TPE command set. We have provided a file by
  1851. this name containing the macros we routinely use. You may edit these macros,
  1852. add new ones, or replace the file entirely.
  1853.  
  1854. The standard macros in TPE.MAC are as follows:
  1855.  
  1856. 0 Scrap
  1857.     This macro is reserved for recording purposes, and is never saved by the
  1858.     Write macro file command. Hence it is always empty when TPE starts.
  1859.  
  1860. 1 Destructive unindent
  1861.     This macro deletes two characters at the beginning of each line in the
  1862.     currently marked block.
  1863.  
  1864. 2 Destructive unindent one
  1865.     This macro is chained to by macro 1. It deletes two characters at the
  1866.     beginning of each line in the currently marked block, starting at the
  1867.     current line.
  1868.  
  1869. 3 Procedure shell
  1870.     This macro constructs a "shell" for a procedure:
  1871.  
  1872.        procedure ;
  1873.          {-}
  1874.        begin
  1875.        end;
  1876.  
  1877.     Like all the "shell" macros, it forces insert and autoindent modes on.
  1878.  
  1879. 4 Function shell
  1880.     Constructs a "shell" for a function:
  1881.  
  1882.        function :;
  1883.          {-}
  1884.        begin
  1885.        end;
  1886.  
  1887. 5 Program shell
  1888.     Constructs a "shell" for a program:
  1889.  
  1890.        program ;
  1891.          {-}
  1892.        uses ;
  1893.        type
  1894.        const
  1895.        var
  1896.        begin
  1897.        end.
  1898.  
  1899. 6 Unused
  1900.  
  1901. 7 Unit shell
  1902.     Constructs a "shell" for a unit:
  1903.  
  1904.        unit ;
  1905.          {-}
  1906.        interface
  1907.        uses ;
  1908.        implementation
  1909.        {begin}
  1910.        end.
  1911.  
  1912. 8 Indent marked block
  1913.     Simply executes the indent marked block command (<CtrlK><CtrlI>). A
  1914.     holdover from the days before there was such a command.
  1915.  
  1916. 9 Unindent marked block
  1917.     Executes the unindent marked block command (<CtrlK><CtrlU>). Another
  1918.     holdover.
  1919.  
  1920. Even if you don't have any use for the macros themselves, you will probably
  1921. want to study them when you start writing your own.
  1922.  
  1923.  
  1924. TPE's Virtual Memory Manager
  1925. ------------------------------------------------------------------------------
  1926.  
  1927. TPE uses a virtual memory manager that allows it to store text being edited in
  1928. "virtual memory," which can be either RAM, EMS, XMS, or disk. By default, TPE
  1929. uses normal RAM, but you can select one of the other sources of memory either
  1930. by changing the default setting with TINSTALL or by passing the appropriate
  1931. command line parameter to TPE when you go to run it: /E for EMS, /X for XMS,
  1932. /D for disk, or /N for normal RAM. If the desired source of virtual memory is
  1933. not available, or is too limited to be of use, TPE will display an error
  1934. message when it starts and use normal RAM instead.
  1935.  
  1936. Note that TPE does not store all its data in virtual memory; many things are
  1937. always stored in normal RAM. In particular, TPE allocates a single 16-byte
  1938. data structure in RAM for each line in a given file. In addition, when using
  1939. either XMS or disk for virtual memory, TPE also allocates roughly one third of
  1940. available RAM for buffering data stored in virtual memory. Given 600K of
  1941. available RAM, TPE will therefore be able to edit a file of about 27,000 lines
  1942. if using EMS, or 18,000 lines if using XMS or disk. To see how much RAM and
  1943. virtual memory is still available, use the Show system info command
  1944. (<CtrlJ><V> or <AltI>). The Show available memory command (<CtrlJ><R> or
  1945. <AltM>) displays only the amount of virtual memory remaining.
  1946.  
  1947. When TPE runs out of memory, you'll see one of two error messages. If it has
  1948. exhausted the supply of normal RAM, you'll see "Insufficient memory." If it
  1949. runs out of virtual memory, you'll see "Insufficient virtual memory." Please
  1950. keep this distinction in mind. The fact that you have lots of virtual memory
  1951. available doesn't mean that you won't be seeing an "Insufficient memory" error
  1952. message.
  1953.  
  1954. There are two other error messages that you might see in this connection. The
  1955. first is simply a warning message: "Warning! Limited RAM available". This
  1956. message will appear only when EMS, XMS, or disk is being used for virtual
  1957. memory. What it means is that the virtual heap is badly fragmented, and that
  1958. TPE is dangerously close to not having enough memory (RAM) reserved to keep
  1959. track of all the blocks of available virtual memory. If you see this warning,
  1960. the best thing to do is to save your work, exit from TPE, and reload TPE with
  1961. the /A option.
  1962.  
  1963. The second error message is one we hope you'll never see: "Critical error nnn.
  1964. Data may be lost." What this means is that the virtual memory manager has
  1965. encountered an unrecoverable error, and you need to exit immediately. If the
  1966. error number ("nnn") is 204, you're in good shape. That simply means that the
  1967. virtual heap is so badly fragmented that TPE can no longer keep track of all
  1968. the free memory blocks. No data has been lost, but you should save all your
  1969. work and exit immediately. You shouldn't see this message unless you've
  1970. previously seen the warning message described above.
  1971.  
  1972. Any other critical error message is very bad news indeed. It means that an
  1973. I/O error occurred while trying to access the source of virtual memory (a disk
  1974. read error, for example). In all likelihood, at least some of your data has
  1975. been lost. You can try saving your work before exiting, but very likely the
  1976. file will contain garbage or be incomplete.
  1977.  
  1978.  
  1979. Copyright and License Information
  1980. ------------------------------------------------------------------------------
  1981.  
  1982. TPE is copyright (c) 1990-1991 by TurboPower Software. All Rights Reserved.
  1983.  
  1984. Although TPE is copyrighted software, license is hereby granted to distribute
  1985. the program for personal, non-commercial use. You may use the program
  1986. yourself, give it to your friends or co-workers, or distribute it for a
  1987. cost-based fee ($20 or less) as part of a user's group or bulletin board
  1988. service.
  1989.  
  1990. TPE is not shareware: we're not asking for a donation. However, if you request
  1991. that we send you a new version, we'll ask for $20 to cover our time and costs.
  1992. You will receive only a disk containing the latest version of the program. You
  1993. will not receive any printed documentation. The only "manual" for TPE is this
  1994. DOC file.
  1995.  
  1996. Alternatively, the current version of the program may be downloaded from
  1997. our data library on CompuServe, LIB 6 of the PCVENB forum. The name of the
  1998. file to download is TPE.LZH.
  1999.  
  2000. Since TPE is neither commercial software nor shareware, and we are not
  2001. attempting to make any profit from it, we would ask that you please restrain
  2002. your natural urge to suggest enhancements to it. Responding to such requests
  2003. can take lots of time, time that we ought to be spending developing new
  2004. products, enhancing existing ones, and supporting our paying customers. Your
  2005. consideration will be much appreciated.
  2006.  
  2007. On the other hand, please feel free to contact us if you encounter a problem
  2008. with the program. We depend heavily on this program ourselves, and we have a
  2009. vested interest in insuring that it works properly. If you encounter a problem
  2010. with TPE, you may contact Brian Foley at:
  2011.  
  2012.      TurboPower Software
  2013.      P.O. Box 49009
  2014.      Colorado Springs, CO
  2015.      80949-9009
  2016.  
  2017. You can also leave messages in section 6 of the PCVENB forum on CompuServe,
  2018. addressed to Brian Foley [76317,3247].
  2019.