home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / tpe.zip / TPE.DOC < prev    next >
Text File  |  1990-03-15  |  73KB  |  1,582 lines

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