home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 21 / CD_ASCQ_21_040595.iso / dos / prg / c / freedos3 / source / ters151f / terse.doc < prev    next >
Text File  |  1994-02-08  |  39KB  |  894 lines

  1.                                 "You can never be too rich, too thin, or
  2.                                     have too much RAM and Disk  storage."
  3.  
  4.                                       Ancient American proverb, ca. 1980
  5.                                         (As quoted by the QEDIT manual.)
  6.  
  7.          /--------------------\
  8.          | TERSE Version 1.5  |
  9.          \--------------------/
  10.  
  11.           Tiny ``BRIEF''-like editor by
  12.           Joseph (Yossi) Gil.
  13.  
  14. TERSE is a tiny (only 4096 bytes) but amazingly powerful full-screen
  15. editor for files of up to 64K in length.  TERSE runs on all PC compatible
  16. machines.  Its command keys are very similar to those of the famous
  17. BRIEF editor (by UnderWare Inc.).  TERSE can edit both UNIX and MS-DOS
  18. style text files as well as binary files.  No hacker's disk is complete
  19. without it.  No disk, be it hard or floppy, is too full to include it.
  20.  
  21. TERSE is free (but copyrighted) to private users.  If you are a private
  22. user who uses TERSE "for pleasure", you are not required to register.
  23. However, if you use TERSE for any commercial application, i.e., in
  24. your company, at work, etc., or make money from selling software or
  25. distributing shareware, you are *required* to register your copy of TERSE.
  26. Registration cost is only $15 and buys you a personalized version, and
  27. grant your institution a site license.  Yes, this is correct, the whole
  28. site such as a university with all its PCs, need only register once.
  29. For an additional payment of only $5, you get the source code of TERSE.
  30.  
  31.  
  32. Highlights
  33. ==========
  34.  
  35.  o  Very small: fits in 4096 bytes = 4 clusters on 5.25"/3.5" floppies.
  36.  o  Minimal free memory requirements: 137KB.
  37.  o  Uses current screen size, including the most common 80x25 screen
  38.     dimensions but also unusual sizes such as 40x16, 40x25, 40x40,
  39.     40x50, 132x25, 132x43, 96x33, 80x30, 80x33, etc.
  40.  o  Fully DESQview (version 2.0 and above) aware.
  41.  o  Edit binary files. TERSE is ideal for a quick and dirty job
  42.     of editing and patching strings in small programs. 
  43.  o  Supports editing of UNIX style files (lines terminated with '\n').
  44.  o  Supports both '/' and '\' as directory separator.
  45.  o  Edit lines of unlimited length (limited only by file size).
  46.  o  Automatic unlimited horizontal scrolling.
  47.  o  BRIEF-like keyboard configuration.
  48.  o  Support for TABS, and configurable tab positions.
  49.  o  Prevents snow when run on a CGA screen.
  50.  o  CUT, COPY and PASTE
  51.  o  SEARCH, SEARCH again, and TRANSLATE commands.
  52.  o  Safe: confirm exits when text is not saved.
  53.  o  Edit files whose name contains spaces and other weird names.
  54.  o  Extended version (the SLIM editor) of size ~5k with many more
  55.     features, including support (via external filters) for word count, 
  56.     sorting, charcter codes translations, quoting, tab expansion and
  57.     unexapnsion, and other complex editing tasks.
  58.  o  Status line indicating: current column, current line, horizontal
  59.     scrolling, total number of lines, file name, modified status,
  60.     insert/overwrite status, the current offset in file and total file size 
  61.     in bytes are dispalyed in the status line. The extended version 
  62.     also displays the HeX value of the current char.
  63.  
  64.  
  65. Requirements
  66. =============
  67.  
  68.  o  PC-DOS/MS-DOS version 2.0 or higher
  69.  o  137KB free memory
  70.  o  64KB free disk space
  71.  
  72.  
  73.  
  74.  
  75. Problems, Questions, Suggestions?
  76. =================================
  77.  
  78. Please do not hesitate to communicate all your thoughts and comments.
  79. I answer all my E-mail usually in less than 24 hours.  If you do not
  80. get a response within a reasonable time, it is probably because I didn't
  81. get your message, or because I wasn't able to reply.  Kindly try sending
  82. again using another route, and include more alternate return paths.
  83.  
  84. Any comments you may care to make are valuable to me.  The editors and
  85. the included software would not have been what they are today without
  86. all of the generous aid users provided: requests, complaints, thoughts
  87. and even gripe are always welcomed.
  88.  
  89.  
  90. Compatibility
  91. =============
  92.  
  93. TERSE uses only pure 8088 instructions and assumes the bare minimum
  94. of the underlying operating system.  It should run on your good
  95. old original 4Mhz IBM-PC running under DOS 2.0 as well as on a fast
  96. 80486 50Mhz machines running DR DOS 6.0 + 4DOS 4.0, or OS/2 in DOS
  97. compatibility mode.  More than once during the development, I had a
  98. chance to save a few bytes by using a more advanced instruction, or
  99. by assuming a more advanced operating system version.  I managed to
  100. resist this temptation.  Other than that every dirty assembly trick I
  101. could think of was used.  It is conceivable that some of the tricks
  102. could prevent TERSE from running on some DOS-like environments and
  103. simulators, although I don't know of any concrete example.
  104.  
  105.  
  106. UNIX style files
  107. ================
  108.  
  109. TERSE edits UNIX style files directly.  That is, TERSE uses
  110. both '\n' (aka LF, aka Line-Feed) and a '\r\n' (aka CRLF, aka
  111. Carriage-return + Line-feed) combo for line ends.  Hitting ENTER
  112. puts '\r\n' into the file, and Ctrl-ENTER puts '\n'.  (Configuration 
  113. utilities allow swapping these 2 keys.)  Thus, you can transfer UNIX 
  114. text files to your PC, edit them on the PC, and then transfer them 
  115. back without need for file conversion.
  116.  
  117.  
  118. Binary files editing
  119. ====================
  120.  
  121. TERSE can edit binary files as well.  To aid in this task, the
  122. status line displays the file size in bytes and the current offset
  123. in bytes in the file. The status line of the SLIM editor displays
  124. the hexadecimal value of the current char.  (This feature may be
  125. added in the future, space permitting to TERSE.)  A difficulty in
  126. editing binary files is that the following characters: space (ASCII 32), 
  127. Null (ASCII 0), and Meta-Del (ASCII 255) all look the same.  If you have
  128. an EGA or VGA screen you may want to use the font loaders WITHFONT or 
  129. LOADFONT together with the binary editing font and circumvent
  130. this difficulty.
  131.  
  132.  
  133. Configuration Utilities
  134. =======================
  135.  
  136. The configuration utilities allow you to: swap the Enter and
  137. Ctrl-Enter keys, change the tab size to 2/4/8/16 (I personally prefer
  138. tabs set every 4 characters), and modify the key assignments (with
  139. some minor restrictions).  In addition, you can eliminate the snow
  140. check done automatically on CGA screens, and you get better support
  141. (as described above) for editing binary files on EGA/VGA screens.
  142.  
  143.  
  144. Future
  145. ======
  146.  
  147. The main constraint in adding features to TERSE is that its total
  148. size must be exactly 4096 bytes.  All additions are dependent on my
  149. ability to squeeze the current code further.  I usually work several
  150. hours, and sometimes days, for each byte squeezed.  And this task is
  151. getting harder and harder all the time.  (A few versions had a slack
  152. of very few bytes.  In these versions, a few dummy bytes were appended
  153. to the program to keep its size 4096 bytes exactly.)
  154.  
  155. I have several other possible directions for the development of TERSE.
  156. These directions are: ``the TERSE family'' and ``the TERSE library''.
  157. I am looking forward to hearing from _you_, the user, about what you
  158. think of these ideas.
  159.  
  160. The TERSE library is an object code library which could be invoked
  161. from a C program. The members of the TERSE family are:
  162.  
  163.     LEAN    A 3K file viewer.  This is basically TERSE without the
  164.             editing code.  Naturally, LEAN could never compete with the
  165.             excellent LIST utility of Vernon D. Buerg, and other
  166.             fine tiny file-listers.
  167.  
  168.     SLIM    An extended  TERSE version (at the 5K level) with some extra
  169.             features.  Some features for which I have received requests
  170.             and which have not yet been implemented are:
  171.  
  172.             o  Backward search.
  173.             o  Edit next file in command line.
  174.  
  175.  
  176. Files
  177. =====
  178.  
  179. TERSE is distributed in two forms: the full distribution and an
  180. abridged version.  The full distribution consists of all the files
  181. listed in the file 00-files.lst. Here is some more information on 
  182. some of the files. (files marked with * are missing in the 
  183. abridged version.)
  184.  
  185.  
  186. T.COM           The actual TERSE editor program.  No other files are
  187.                 necessary for proper operation of TERSE.
  188.  
  189. VER-HIST.DOC    Versions history.
  190.  
  191. DISCLAIM.DOC    Disclaimer of warranties.
  192.  
  193. TERSE.DOC       This file.  The documentation for the program. All the
  194.                 above .DOC files may be printed by:
  195.  
  196. PRINTDOC.BAT    A  batch file for printing the documentation of TERSE.
  197.  
  198. _DESC.BTM       A 4dos batch file for creating file name description
  199.                 for the above files.
  200.  
  201. L.COM*          A pre-release of the LEAN file lister.
  202.  
  203. S.COM*          A pre-release of the SLIM editor, an extended version of
  204.                 TERSE.
  205.  
  206. H.COM*          A pre-release of SLIM built especially for the HP 95lx
  207.                 palmtop computer.  You can use the configuration
  208.                 utilities to limit the file size to 32KB, thus reducing
  209.                 the memory requirements.  The help screen is minimized to
  210.                 16x40 chars.  The program has special code for detecting
  211.                 the  HP9LX,  and if one is detected, only the top left
  212.                 16x40 part of the virtual screen is used.
  213.  
  214. TCONFIG.COM*    Configuration program for T.COM.
  215.  
  216. SCONFIG.COM*    Configuration program for S.COM.
  217.  
  218. LCONFIG.COM*    Configuration program for L.COM.
  219.  
  220. HCONFIG.COM*    Configuration program for H.COM.
  221.  
  222. TKEYS.COM*      Keyboard configuration program for T.COM.
  223.  
  224. SKEYS.COM*      Keyboard configuration program for S.COM.
  225.  
  226. HKEYS.COM*      Keyboard configuration program for H.COM.
  227.  
  228. MXIFY.COM*      A pre-release of a program which gives TERSE and its
  229.                 partners an EMACS style. Usage is:
  230.  
  231.                     MXIFY T filename
  232.  
  233. TT.BAT*         Call terse on multiple files/wildecards
  234.  
  235.  
  236. TTALIAS.BTM*    Demo: make 4DOS aliases for terse
  237.  
  238.  
  239.  
  240.  
  241.  
  242. How to obtain TERSE
  243. ===================
  244.  
  245. TERSE is available from Simtel, Garbo, Wustl, their mirrors and from
  246. other fine ftp archive sites.  Some of these sites have mail-servers
  247. for those who do not have access to ftp.  Some of these sites carry
  248. only the abridged distribution.
  249.  
  250. In addition, the latest version of TERSE is regularly deposited in
  251.  
  252.     wuarchive.wustl.edu: /pub/MSDOS_UPLOADS/trsXXX[af].zip
  253.  
  254. Where XXX denotes the three digit version number. For example,
  255. the full distribution of version 1.50 should be in a file named
  256. ters150f.zip.
  257.  
  258. If you are experiencing problems downloading these files (cs.ubc.ca is
  259. picky for no real reason sometimes), or if you don't have FTP access,
  260. please drop me a line and I will e-mail to you whichever distribution
  261. you are interested in.  The full distribution is sent out in several parts 
  262. of about 1000 uuencoded lines each.  The abridged distribution (basically
  263. just the TERSE editor and the manual) goes in one part of about 600
  264. uuencoded lines.  
  265.  
  266.  
  267. License (copying policy)
  268. ========================
  269.  
  270. The following policy is intended to promote free private use and
  271. distribution, and to collect money from those who can afford to pay
  272. for this software.  In particular, those institutions which make money
  273. from private users are requested to pass on part of their income to
  274. whoever is responsible for generating it.
  275.  
  276. PRIVATE USERS:  You are free to use, copy and distribute TERSE for
  277. noncommercial private use provided that:
  278.  
  279.    A) No fee is charged for use, copying or distribution.
  280.  
  281.    B) It is not modified in any way.
  282.  
  283.    C) It is distributed as a package.  All files in this package must be
  284.    included, none should be added, and none should be changed.
  285.  
  286. Thus if you are a private user, you can *use* TERSE freely, and you
  287. are under no obligation to register.  (The only restriction is on its
  288. further distribution.)
  289.  
  290.  
  291.  
  292. Registration (Private users)
  293. ============================
  294.  
  295. If you find TERSE a useful, easy, and nifty editor please show your
  296. appreciation:-
  297.  
  298.       Send the author the $15 US dollars registration fee.
  299.       Upon receiving your payment, I will send you
  300.       TERSE, the configuration utilities and, if you wish, a per-
  301.       sonalized version, and the author will do his best to update
  302.       them as soon as a new version comes out.
  303.  
  304.       Please, do register if you can afford it, and if you would
  305.       like to support financially the production of this high quality
  306.       software.
  307.  
  308.  
  309. NON_PRIVATE USE:  Institutions and companies MUST register this package
  310. after an evaluation period of 21 days.  Registration of one copy per
  311. company site is sufficient.
  312.  
  313. NON-PRIVATE DISTRIBUTION (Shareware distributors):  You may distribute
  314. this package as long as no more than a nominal fee (up to $10) per
  315. disk is collected per disk.
  316.  
  317. NON-FEE DISTRIBUTION: Simtel/ Garbo/ other FTP collections: Obviously,
  318. you may store this package and offer it to your users free of any
  319. restrictions.
  320.  
  321.  
  322. Author's Address
  323. ================
  324. E-mail: (try addresses in this order)
  325.  
  326.     yogi@cs.technion.ac.il  (Technion -- Israel's institute of technology, 
  327.                              Haifa, Israel),
  328.     yogi@umiacs.umd.edu     (University of Maryland, Maryland, USA)
  329.     yogi@cs.ubc.ca          (University of British Columbia, Vancouver, 
  330.                              British Columbia, Canada),
  331.  
  332. Permanent mailing address  is:
  333.     Joseph  Gil,
  334.     P.O. Box 3148,
  335.     Jerusalem,
  336.     Israel.
  337.  
  338. Hebrew mailing address (you cannot read the following unless your
  339. screen adapter can display Hebrew characters):
  340.                                                              îëé ëæàë
  341.                                                             3148 .â.Ü
  342.                                                               ìëîÖàÿë
  343.  
  344.  
  345. Genealogy
  346. =========
  347.  
  348. TERSE is an exercise of editor writing inspired by TED, the famous
  349. Tiny EDitor (written by Tom Kihlken and published November 1988 in PC
  350. Magazine, Copyright 1988 Ziff Communications Co.).  Some features of
  351. TERSE are borrowed from the fine descendants of TED called TEDPLUS
  352. (apparently also written by Tom Kihlken in November 1988) and TED2
  353. (written by James E. Galbraith, 1201 Chase St., Novato CA, 94945, USA).
  354.  
  355. There is not a single piece of code in TERSE which is the same as in
  356. TED, TEDPLUS or TED2.  TERSE represents almost three years of work on
  357. space optimization of the code, and on added functionality.  Some of the
  358. newly added features include help screen, unlimited line length, space
  359. optimization of the code, and on added functionality.  Some of the newly
  360. added features include the help screen, unlimited line length, status
  361. line, smooth horizontal scrolling, previous and next word, UNIX files
  362. editing, search and replace, safety features and support for insertion
  363. of all 256 characters of the IBM-PC extended ASCII set (including <Nul>,
  364. <BS>, <CR>, and <LF>).  Some old features include scrolling, cut, copy,
  365. paste, and printing operations.
  366.  
  367. Some of the documentation for TERSE is based on the documentation
  368. provided with TED2.  See the article "The tiniest editor you'll ever
  369. need" by Tom Kihlken, in the November 15, 1988 issue of PC Magazine
  370. for further details concerning TED. TED, TEDPLUS and TED2 are
  371. available from SIMTEL20:
  372.  
  373.     TED         PD1:<MSDOS.PCMAG>VOL7N19.ARC
  374.     TEDPLUS     PD1:<MSDOS.EDITOR>TEDPLUS.ARC
  375.     TED2        PD1:<MSDOS.EDITOR>TED2.ZIP
  376.  
  377. TERSE is not related in any way to TED3.
  378.  
  379.  
  380.  
  381. DESCRIPTION
  382. ===========
  383.  
  384. Synopsis
  385.                                t [filename]
  386.  
  387. To invoke  TERSE, just type  "T" from the  DOS command line,  optionally
  388. followed by a filename.
  389.  
  390. File
  391. ----
  392. TERSE opens and reads a file whose name (and path, if required) is
  393. initially supplied on the command line.  If no file name is provided,
  394. TERSE opens a new file.  A name may be supplied later during the
  395. editing session using the "Output" command invoked by <Alt-O>.
  396. TERSE expects a legal DOS filename, which may include a path name.
  397. TERSE can also edit files whose names contain spaces.  These names
  398. are legal, although most DOS commands cannot manipulate them.
  399.  
  400. While editing, you can save your work by pressing <Alt-W>.  Upon save, 
  401. the original of the modified file is saved with the extension .BAK. 
  402. To exit the editor and save your work press <Alt-X>.  
  403.  
  404. To exit the editor without saving changes made to the file press 
  405. <Alt-Q>. Hitting <Alt-Q> causes the TERSE to exit immediately
  406. if the file was not modified since last saved. Otherwise, TERSE
  407. presents the following prompt:
  408.  
  409.     Lose changes (Y/N)?_
  410.  
  411. Hit 'Y' only if you are certain that you don't want recent changes to
  412. be saved.
  413.  
  414.  
  415. Basic Editing
  416. -------------
  417. A help screen is available upon pressing <F1> or <Alt-H>.  When the help
  418. screen is displayed, pressing any key returns you to the text.
  419.  
  420. In TERSE, the cursor movement keys (Left, Right, Up, Down, PgUp, PgDn,
  421. etc.) allow you to move around in the text.  Text is entered in insert
  422. mode by default.  Text can be deleted using the <Del> and <BackSpace>
  423. keys.
  424.  
  425. Pressing the <Alt-I> key will toggle between Insert and Overstrike mode.
  426. The Insert/Overwrite state is displayed by an 'Ins' or 'Ovr' in the
  427. status line.
  428.  
  429. Text can be deleted using the <Del> and <BackSpace> keys.
  430.  
  431. The <Alt-U> key restores up to 255 characters deleted by the <Del> key or
  432. overwritten while in the Overwrite mode.  The <Alt-U> key only restores
  433. the last character deleted with the <Backspace> key.
  434.  
  435. TERSE text buffer is limited to 65535 characters.  An attempt to extend
  436. the buffer beyond that results in a short beep.
  437.  
  438.  
  439. Lines
  440. -----
  441. Lines may be of any length.  TERSE recognizes both the UNIX and DOS
  442. conventions for line termination, i.e., both the <CR><LF> pair and a
  443. single <LF> denote end of line.  Off screen characters may be viewed by
  444. moving the cursor toward them.  Lines may be broken by pressing <Enter>
  445. (insert <CR><LF> pair) or <Ctrl Enter> (insert <LF> character) at
  446. any point, in either Insert or Overstrike mode.  Lines may be joined
  447. by pressing <Del> at the line end or <Backspace> at the beginning.
  448. Pressing <Alt-D> deletes the entire line and closes the gap.  Pressing
  449. <Alt-K> deletes from the cursor position to the end of the present
  450. line.  Pressing <Alt-G> restores the most recent line deletion.
  451. The line delete buffer remains intact until another line is deleted.
  452. The line delete buffer has room for 255 characters.
  453.  
  454. Block
  455. -----
  456. A Block is some portion of the text file which has been specifically
  457. delineated for later manipulation.  One end of a "block" of text is
  458. defined by hitting <Alt-A> key (anchor drop/raise).  The other end of
  459. the block is where the cursor is located.  Move the cursor with the
  460. cursor control keys to the block end.  As you move the cursor, note
  461. that the blocked area is shown in reverse video.  The <Alt-A> is a
  462. toggle key, so hitting it again raises the anchor dropped at the
  463. block end, and thus cancel the blocking operation.
  464.  
  465. Pressing the <Keypad-> key (keypad grey minus key) removes the block
  466. to a paste buffer; this operation is known as "Cut". The <Keypad+>
  467. key (keypad grey plus) copies the block to the paste buffer without
  468. removing it from the text; this operation is known as "Copy". The <Ins>
  469. key copies the text stored in the paste buffer at any point where the
  470. cursor is located; this operation is known a "Paste". The paste buffer
  471. remains intact until another section is marked and cut or copied.
  472. The paste buffer has room for 64K bytes.
  473.  
  474. When a block is marked, pressing <Alt-P> prints the marked text (directly
  475. from the file buffer).  After the print, the block remains marked.
  476.  
  477.  
  478. Search and Replace
  479. ------------------
  480. TERSE has a string "Search" and "Next" functions.  When the <Alt-S>
  481. key is pressed, the prompt "Search for: " appears on the bottom line.
  482. Enter the desired text string and press the <ENTER> key.  If the
  483. string is found, it appears blinking in inverse video on the screen.
  484. The blinking inverse video is extinguished when any key is pressed.
  485. If the string is not found in the area following the cursor, a short
  486. beep sounds. To search for the next occurrence of the string,
  487. press <Alt-N>.  TERSE cannot search backward, and it doesn't recognize
  488. regular expressions.
  489.  
  490. TERSE also has a "Translate" function which is invoked by pressing
  491. the <Alt-T> key.  You are prompted for the string to search for,
  492. and then for the replacement string.  The "translate" function is
  493. best explained by an example.  To change all occurrences of the simple
  494. "wrong" in your file into something more institutionally acceptable,
  495. you would move to the beginning of the file (Press <Ctrl-PgUp>) and
  496. then press <Alt-T>.  TERSE erases the status line (the last screen
  497. line) and displays in its place a prompt:
  498.  
  499.             Search for: _
  500.  
  501. (The underscore in the above indicates the cursor position).  Type in
  502. the word: "wrong".  The <BackSpace> key can be used for erasing the
  503. previous character.  The last line should now read:
  504.  
  505.             Search for: wrong_
  506.  
  507. Hit <Enter>.  (Hitting <ESC> at this stage ends the translate 
  508. operation.) TERSE now prompts you for the replacement string in the
  509. last screen line:
  510.  
  511.             Replace with: _
  512.  
  513. Type in, say, "policy directive inconsistent".  (You can use up to 30 
  514. characters.)  The last screen line now reads:
  515.  
  516.             Replace with: policy directive inconsistent_
  517.  
  518. Hit <Enter>. (Again, hitting <ESC> at this stage ends the translate 
  519. operation.)  TERSE searches for the first occurrence of "wrong" in your
  520. file, moves the cursor to this point, displays "wrong" in blinking
  521. inverse video, and then prompts you in the last screen line:
  522.  
  523.             Replace with: policy directive inconsistent [Yes/No/All]?
  524.  
  525. Your response could be to hit 'Y' or 'y', which means Yes, make this 
  526. replacement; or 'N' or 'n' which means No, do not make this replacement. 
  527. In both cases, TERSE continues by moving to the next occurrence of the 
  528. string "wrong" and prompts you again. You may also answer the prompt by 
  529. hitting <Esc>, which aborts the translate operation. If you wish to 
  530. replace unconditionally all occurrences of the string "wrong" with "policy 
  531. directive inconsistent" (be warned that it may take a considerable time 
  532. for a long file), respond with 'A' or 'a'. TERSE marches through the 
  533. file and makes these replacements for you. 
  534.  
  535. Search and Search - Replace are by default case insensitive.  This means
  536. that the search catches all of the following strings: wrong, Wrong, WRONG
  537. wrOng, etc.  Pressing <Alt-C> changes both Search and Search - Replace
  538. to be case sensitive. Pressing <Alt-C> again returns you to the case
  539. insensitive Search and Search - Replace.  Note that a short message
  540. appears in the status line whenever case sensitivity is toggled.  This
  541. message is erased, and the normal status line reappears, when you go on
  542. with your work.
  543.  
  544.  
  545. Character Set and Binary file editing
  546. --------------------------------------
  547. Any of the characters in the IBM extended ASCII set can be entered
  548. and manipulated by TERSE.  To enter control characters (ASCII 00-31
  549. and 127), use <Ctrl-@>, <Ctrl-A>, ... , <Ctrl-Z>, <Ctrl-[>, <Ctrl-\>,
  550. <Ctrl-]>, <Ctrl-^>, <Ctrl-_> and <Ctrl-Backspace>.  A more general
  551. method is to press the Alt key and, without releasing it, type a
  552. character ASCII decimal value on the numeric keypad.  The PC-BIOS
  553. does not support entry of the <Nul> character (00h) in this fashion.
  554. Instead, you may enter the <Nul> character by hitting the <Ctrl @> key.
  555.  
  556. The ASCII Backspace (BS) code can be entered as <Ctrl-H>, and the
  557. <Backspace> key deletes the character to the left of the cursor.
  558. Similarly, ASCII Carriage-Return (CR) and Line-Feed (LF) character
  559. codes can be entered directly as <Ctrl-M> and <Ctrl-J>.  TERSE
  560. interprets the <LF> character as an end-of-line.  A <CR> is considered
  561. an ordinary text character except when it is immediately preceded by
  562. a <LF>, in which case it is considered part of the end-of-line marker.
  563. If <CR><LF> are entered together, or ever become adjacent, they cannot
  564. be separated.  The <Enter> key inserts an end-of-line marker <CR><LF>.
  565.  
  566. TERSE does not use the CP/M style End-of-file marker, <Ctrl-Z>, to
  567. indicate the last character in a text file.  If a <Ctrl-Z> character
  568. appears in the file, it is shown as is.
  569.  
  570. The Screen
  571. -----------
  572. TERSE configures itself to the display adapter in use, and supports
  573. text modes other than the standard 80 columns by 25 rows, e.g., EGA
  574. 43 lines and CGA 40 columns mode.  <PgUp> and <PgDn> scroll the file
  575. by the number of rows displayed.  TERSE does not work properly if the
  576. screen is initially in a graphics mode.
  577.  
  578. TERSE does not alter screen attributes or colors.  Inverse video is used
  579. in the status line and to indicate a MARKed block.  TERSE uses blinking
  580. inverse video to indicate that the search string has been found.
  581. It automatically handles "de-snow" on a CGA display.
  582.  
  583. Because TERSE makes BIOS calls and writes directly to the screen
  584. buffer, it would probably not work properly on MS-DOS computers that
  585. are not sufficiently IBM-PC compatible.
  586.  
  587. The Status Line
  588. ---------------
  589. At the bottom of the editing screen is the Status Line.  The Status
  590. Line constantly displays information regarding the file you are
  591. currently editing.  The Status Line is shown below with a description
  592. of the information displayed.
  593.  
  594. +--------------------------------------------------------------------------+
  595. :F1 Help | Line 137  Col 25    =282  +0  @893  #10324 Ins letter.doc*      :
  596. +---+----------+--------+-------+-----+---+------+-----+-----+------+------+
  597.     :          :        :       :     :   :      :     :     : File modified
  598.     :          :        :       :     :   :      :     :     : since last
  599.     :          :  The current   :     :   :      :     :     : written
  600.     :          :  cursor column :     :   :      :     :     :
  601.     :          :  number        :     :   :      :     : The name of file
  602.     :          :                :     :   :      :     : you are editing
  603.     :     The current           :     :   :      :     :
  604.     :     cursor line           :     :   :      :     +Insert mode is ON
  605.     :     number                :     :   :      :
  606.     :                           :     :   :      +File length in characters
  607.  A reminder that                :     :   :
  608.  Help screen is                 :     :   +Current offset in file
  609.  available upon                 :     :
  610.  pressing the                   :     +The number of columns scrolled off
  611.  <F1> key                       :       to the left of the screen
  612.                                 :
  613.                                 +The total number of lines in the file
  614.  
  615.  
  616. ┌──────────────────────────────────────────────────────────────────────────────┐
  617. │F1 Help | Line 137   Col 25    =282  +0    @893   #10324 Ins letter.doc*      │
  618. └───┬──────────┬─────────┬───────┬─────┬─────┬───────┬─────┬─────┬──────┬──────┘
  619.     │          │         │       │     │     │       │     │     │ File modified
  620.     │          │         │       │     │     │       │     │     │ since last
  621.     │          │   The current   │     │     │       │     │     │ written
  622.     │          │   cursor column │     │     │       │     │     │
  623.     │          │   number        │     │     │       │     │ The name of file
  624.     │          │                 │     │     │       │     │ you are editing
  625.     │     The current            │     │     │       │     │
  626.     │     cursor line            │     │     │       │     └Insert mode is ON
  627.     │     number                 │     │     │       │
  628.     │                            │     │     │       └File length in characters
  629.  A reminder that                 │     │     │
  630.  Help screen is                  │     │     └Current offset in file
  631.  available upon                  │     │
  632.  pressing the                    │     └The number of columns scrolled off to
  633.  <F1> key                        │       to the left of the screen
  634.                                  │
  635.                                  └The total number of lines in the file
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642. ADVANCED FEATURES
  643. =================
  644.  
  645.  
  646. Word wrap
  647. ---------
  648. SLIM can do automatic word wrap as you type.  Upon pressing <Alt-M>,
  649. SLIM prompts you for a right margin:
  650.  
  651.       Margin:_ 
  652.  
  653. Type in your preferred right margin setting (72 is pretty common and
  654. useful selection).  If a right margin is set, then whenever you finish
  655. typing a word (i.e., when you hit a <Space> or <Tab> key) SLIM checks
  656. if this margin was exceeded, and if so, the last word typed is wrapped
  657. to the next line.
  658.  
  659. If the right margin is set to 0, then word wrapping is disabled will
  660. occur.  By default, the right margin is 0. This default can be changed 
  661. with the SCONFIG configuration program.
  662.  
  663.  
  664. Swap Cursor and Mark
  665. --------------------
  666. An easy way to go to the begining or the end of a marked block the "Swap
  667. Cursor and Mark" command.  Upon pressing <Shift-Tab>, the cursor position
  668. is swapped with mark position.
  669.  
  670.  
  671. Exchange Marked Block with Paste Buffer
  672. ---------------------------------------
  673. Many users are familiar with the CUT/COPY/PASTE paradigm for manipulating
  674. chunks of texts.  In TERSE you block a piece of text by dropping a mark
  675. (<Alt-A> key) at its beginning and then moving the cursor to its end.
  676. You can then COPY (keypad +> key) the blocked text to a paste buffer,
  677. or CUT (<Keypad+> key) it to the paste buffer.  Later, you can move to
  678. a different location and PASTE the text, i.e., insert the text in the
  679. paste buffer.
  680.  
  681. SLIM adds to these three basic operations yet another one: "Exchange
  682. Marked Block with Paste Buffer", or for short EXCHANGE.  By default, this
  683. command is bound to <Keypad*> key (keypad grey asterisk).  Upon pressing
  684. this key, the contents of the currently marked block is exchanged with
  685. the current contents of the paste buffer.  Hitting <Keypad*> again
  686. effectively undoes this operation.
  687.  
  688. The EXCHANGE operation should come in handy in situations where you
  689. need to shuffle a lot text around.  An important application of this
  690. operation is discussed next.
  691.  
  692.  
  693. Pump Block Through Filter
  694. -------------------------
  695. The term "filter" is borrowed from UNIX.  It refers to a program, which
  696. takes input from the standard input, processes it, and then produces
  697. output to the standard output.  Several filters are supplied with a
  698. separate filters archive.  For example, the WC filter produces to the
  699. standard ouptut a count of the number of lines, words and characters
  700. in the standard input.
  701.  
  702. The "pump block through filter" command, by default bound to the
  703. <Alt-F> key, runs a filter while supplying the currently marked block
  704. as input to the block and capturing the filter's output.  When the
  705. filter finishes, its output will show as the currently marked block.
  706. The previous contents of the marked block are moved to the paste buffer.
  707. By pressing <Keypad*> you can exchange the contents of the block and of
  708. the paste buffer, effectively undoing the filter operation.
  709.  
  710. Thus, to count the number of words in a document, follow these
  711. easy steps:
  712.  
  713.       1. Hit <Ctrl-PgUp> to move to the top of the file.
  714.       2. Hit <Alt-A> to drop an anchor.
  715.       3. Hit <Ctrl-PgDn> to go to the end of the file. The whole
  716.          file should be marked now.
  717.       4. Hit <Alt-F> to invoke the "pump block through filter" command.
  718.          Upon doing so, SLIM prompts you for the name of the filter
  719.  
  720.              Filter: _
  721.  
  722.       5. Type in 'wc -w' and hit <Enter>. (The -w flag tells WC.COM
  723.          to produce word count only)
  724.       6. The number of words in the document now shows, while the document
  725.          itself is erased.
  726.       7. Hit <Keypad*> to restore the documents contents, and erase the
  727.          word count. Later you can hit <Ins> to paste the word count
  728.          wherever you may need it.
  729.  
  730. I distribute separately an archive of many filters, including NFMT
  731. filter, which reformats text using smart line breaking algorithm.  All
  732. of TERSE documentation was formatted using this filter.  To reformat
  733. a piece of text, I simply mark it (usually the whole paragraph),
  734. and invoke the nfmt filter.  Some other filter included with that
  735. archive are the DOS equivalents of the some famous UNIX filters:
  736. EXPAND, UNEXPAND, UUDECODE, and CAT.  The QUOTE filter is useful in
  737. composing e-mail messages.  The ROT13 filter allows you to decrypt
  738. and encrypt spoilers etc.
  739.  
  740. Many more new features can be easily added to SLIM by virtue of this
  741. command.  A few examples are: date and time stamping, sorting, column
  742. summation, character sets conversions, directory contents listings
  743. etc.  Sophisticated users should probably get copy of a DOS port of
  744. the famous UNIX 'sed' and 'awk' filters, and harness their power to
  745. enhance SLIM.
  746.  
  747. The "pump block thru filter" command does not use temporary files,
  748. and can be run with even when the disk is full.  Programmers may enjoy
  749. contemplating how this little wonder was implemented.  (If you really
  750. cannot figure this out, write to me and ask for a clue...)
  751.  
  752. The "pump block thru filter" command does captures also the standard
  753. error of the executed filter.  You can thus run your favourite compiler
  754. from within SLIM.
  755.  
  756. Go to Line
  757. ----------
  758. If you use the "pump block thru filter" to invoke a compiler, you may
  759. find it useful to be able to find a line by its number.  To invoke the
  760. "go to line" command press <Alt-G>.  Upond doing so, SLIM presents the
  761. following prompt:
  762.  
  763.     Go to line: _
  764.  
  765. Type in the desired line number and hit <Enter>. 
  766.  
  767.  
  768. KEYBOARD SUMMARY
  769. =================
  770. The following is a description of all TERSE commands and their key
  771. binding.  To get a help screen with keyboard usage summary, hit <F1> or
  772. <Alt-H>.
  773.  
  774. Cursor movements
  775. -----------------
  776.  <Left Arrow>            Moves cursor left one column
  777.  <Right Arrow>           Moves cursor right one column
  778.  <Ctrl Left Arrow>       Moves cursor to the beginning of the next word.
  779.  <Ctrl Right Arrow>      Moves cursor to the beginning of previous word.
  780.  <Home>                  Moves cursor to start of line
  781.  <End>                   Moves cursor to end of line
  782.  <Up Arrow>              Moves cursor up one row
  783.  <Down Arrow>            Moves cursor down one row
  784.  <PgUp>                  Moves text window up one page
  785.  <PgDn>                  Moves text window down one page
  786.  <Ctrl PgUp>             Moves cursor to top of file
  787.  <Ctrl PgDn>             Moves cursor to bottom of file
  788.  
  789. Basic editing operations
  790. ------------------------
  791.  Any keyboard char       Insert/Overwrite character into file
  792.  <Tab>                   Insert tab character
  793.  <Enter>                 Start new line, add <CR><LF> pair to file.
  794.  <Backspace>             Delete character to left of cursor
  795.  <Del>                   Delete character under cursor (to right)
  796.  <Alt-U>                 Undo recent <Del> operation/Overwritten
  797.                          characters.
  798.  <Alt-I>                 Toggle between Insert/Overwrite mode (Ins/Ovr)
  799.  <Alt-K>                 Delete to end of line
  800.  <Alt-D>                 Delete current line
  801.  <Alt-Y>                 Restore deleted line (up to 255 characters)
  802.  
  803. Block Operations
  804. ----------------
  805.  <Alt-A>                 drop/raise Anchor.  Block is between anchor and
  806.                          cursor.
  807.  <Keypad-Plus>           Copy block to clipboard buffer
  808.  <Keypad-Minus>          Delete block to clipboard buffer
  809.  <Ins>                   Paste from clipboard buffer
  810.  <Alt-P>                 Print block.
  811.  
  812. Search
  813. ------
  814.  <Alt-S>                 Search for string
  815.  <Alt-C>                 Toggle search case sensitivity.
  816.  <Alt-N>                 Find next occurrence of string
  817.  <Alt-T>                 Search and Translate
  818.  
  819. File Operations
  820. ---------------
  821.  <Alt-Q>                 Quit edit: no-save exit (asks for confirmation)
  822.  <Alt-X>                 eXit and save: same as Quit if file name is unknown
  823.  <Alt-O>                 Change output file name.  Supply name if not given.
  824.  <Alt-W>                 Write  the  current  buffer  into  its  file  (if
  825.                          filename known)
  826.  <Alt-R>                 (in SLIM only) Read a file to buffer.
  827.  <Alt-E>                 (in SLIM only) Edit another file.
  828.  
  829. Scrolling
  830. ---------
  831.  <Alt-->                 Scroll window horizontally to the left
  832.  <Alt-+>                 Scroll window horizontally to the right
  833.  <Ctrl Home>             Scroll window up
  834.  <Ctrl End>              Scroll window down
  835.  
  836. Misc
  837. ----
  838.   <Alt-I>                Insert/Overwrite toggle.
  839.   <Alt-Z>                Push to dos.
  840.   F1                     Display the help screen.
  841.   <Alt-H>                Display the help screen.
  842.   <Alt-M>                (in SLIM only) Set right margin for word wrap.
  843.   <Alt-G>                (in SLIM only) Goto line.
  844.  
  845. Entering Special Characters
  846. ---------------------------
  847.  <Ctrl @>                Enter the [NUL] character
  848.  <Ctrl A>                Enter the [SOH] character
  849.  ...                     All ctrl characters can be inserted this way
  850.  ...                     Special control characters are described  below
  851.  <Ctrl C>                Enter the [ETX] character  (DOS abort disabled)
  852.  ...                     ...
  853.  <Ctrl H>                Enter the [BS] character
  854.  <Ctrl I>                Enter the [TAB] character
  855.  <Ctrl J>                Enter the [LF] character
  856.  ...                     ...
  857.  <Ctrl M>                Enter the [CR] character
  858.  ...                     ...
  859.  <Ctrl Z>                Enter the [SUB] character (No CP/M style EOF)
  860.  <Ctrl [>                Enter the [ESC] character
  861.  <Esc>                   Enter the [ESC] character
  862.  <Ctrl \>                Enter the [FS] character
  863.  <Ctrl ]>                Enter the [GS] character
  864.  <Ctrl ^>                Enter the [RS] character
  865.  <Ctrl _>                Enter the [US] character
  866.  <Ctrl Backspace>        Enter the [DEL] character
  867.  
  868.  
  869.  
  870. KNOWN BUGS AND FUTURE DIRECTIONS
  871. =================================
  872.     o     Horizontal scrolling does not move the cursor position, so by
  873.           pressing <Alt-+> and <Alt--> you can scroll to the right
  874.           or to the left but only to the extent which leaves
  875.           the current cursor position visible.  For example when the
  876.           cursor is in the left most column, no horizontal scrolling
  877.           is possible.  There are no plans for modifying this behavior
  878.           as the author feels that it is very reasonable.  Strong user
  879.           pressure may change this.
  880.  
  881.     o     <Alt-U> only restores the last character erased by
  882.           <Backspace>.  (Future plan is to push deleted characters (by
  883.           <DEL>, <Backspace> and overwritten characters) to a stack.
  884.           The stack will have limited depth, and as characters
  885.           are pushed in, old characters stored deeply in the stack
  886.           disappear.  The <Alt-U> will pop characters from the stack
  887.           and insert/append them.)
  888.  
  889.     o     Editing can get extremely slow if lines are excessively long.
  890.           Lines longer than 20,000 characters cause a noticeable
  891.           delay after every editing operation on these lines.
  892.  
  893.  
  894.