home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR8 / TDE32.ZIP / TDE.DOC < prev    next >
Text File  |  1993-11-13  |  75KB  |  1,639 lines

  1.  
  2.                      TDE, the Thomson-Davis Editor
  3.                               Version 3.2
  4.                            November 13, 1993
  5.                               Frank Davis
  6.  
  7.  
  8. Description:
  9.  
  10.   TDE is a simple, public domain, multi-file/multi-window binary and text
  11.   file editor written for IBM PCs and close compatibles running either
  12.   MSDOS or Linux.  TDE is suitable for editing batch files, binary files,
  13.   text files, and various computer language source code files.  The only
  14.   limit on the number and size of files that TDE can handle is the amount
  15.   of conventional memory.  Likewise, the only limit on the number of windows
  16.   is the amount of conventional memory.  There is no preset maximum number
  17.   of files or windows that may be open at any one time.
  18.  
  19.  
  20. Introduction:
  21.  
  22.   I work with data files, computer source code, and various text files quite
  23.   a bit.  Most of the features in TDE are related, in some way, to handling
  24.   those types of files.  The various window and cursor commands in TDE are
  25.   really nice for comparing and editing source code or output files.  A
  26.   good collection of block commands is available for use on source code
  27.   and formatted data files.  For what little word processing I do, TDE has
  28.   a few simple commands for formatting text and paragraphs.  In short, TDE
  29.   contains most of the features that I use most of the time in an easy to
  30.   use, easy to remember, and easy to configure editor.  I hope you find
  31.   TDE as easy to use for most of your routine editing as me.
  32.  
  33.  
  34. Usage:
  35.  
  36.   At the command line type:
  37.  
  38.         tde [ [-f search_pattern] file name(s)]
  39.  
  40.         tde [ [-g regular_expression] file name(s)]
  41.  
  42.         tde [ [-b] file name]
  43.  
  44.   For example:
  45.  
  46.         tde
  47.         tde foo.bar
  48.         tde c:\c70\TDE\main.c
  49.         tde *.c  \qc25\TDE\*.h
  50.         tde foo.bar  foobar  f*  foo.*  f??b??
  51.  
  52.       * * *  to search files for a pattern or reg ex and load matches  * * *
  53.  
  54.         tde  -f  find_me_load_me  foo.*
  55.         tde  -f  find_me_load_me  foo.*  *.bar
  56.  
  57.         tde  -g  "this|that"      foo.*      <=== finds "this" or "that"
  58.         tde  -g  [a-zA-Z0-9_]+\(  foo.bar    <=== finds C functions
  59.  
  60.         Note: If the '|' symbol is needed in a regular expression on
  61.               the command line, the search string needs to be enclosed
  62.               in quotes, or the MSDOS command interpreter will interpret '|'
  63.               as the pipe operator rather than the 'or' symbol.
  64.  
  65.       * * * to edit binary files * * *
  66.  
  67.         tde -b tde.exe
  68.         tde -b80 tde.exe
  69.  
  70.  
  71.   If you don't enter a file name on the command line, TDE will prompt you
  72.   for a file name.  If the file does not exist, TDE starts out with an
  73.   empty file with the file name you just entered.  Or, pressing <Enter>
  74.   twice will pop-up a directory list.
  75.  
  76.  
  77. What's new:
  78.  
  79.                       New features in TDE 3.2 include:
  80.  
  81.         Pop-up pull-down command menu   =  Control \
  82.         More Language support, thanks to Byrial Jensen, byrial@daimi.aau.dk
  83.         Ported TDE to Linux (POSIX, SVR4, BSD4.3+?, FIPS 151-1, etc...)
  84.         Fixed a stupid mistake in the 3.1 config utility.
  85.         Linux FAQs and HOWTOs
  86.  
  87.  
  88.   Even though I wrote TDE, I can't remember what half the function keys do.
  89.   The new simple pop-up pull-down command menu is handy for running commands
  90.   that are seldom used.  Also, dumb UNIX terminals don't have a lot of extra
  91.   function and cursor control keys.  The pop-up pull-down command menu is
  92.   really handy on dumb UNIX terminals.  Press Ctrl \ to access most of the
  93.   commands in TDE.  The only keys that really need to be remembered are the
  94.   mark line, box, and stream blocks keys.  Incidentally, when I added the
  95.   auto-CRLF/LF detect in TDE 2.2, seemlessly editing either DOS or UNIX
  96.   files was the intended goal.  The auto-CRLF/LF detect and the CRLF/LF
  97.   toggle is very convenient for working on text files in either DOS or UNIX.
  98.  
  99.   Byrial Jensen, byrial@daimi.aau.dk, contributed several functions that are
  100.   useful with non-English languages.  DOS filenames can contain extended
  101.   ASCII characters.  Now, the dirlist function in TDE sorts filenames
  102.   according to the sort order array, which can be customized to your favorite
  103.   alphabet.  Other things were changed for more easier non-English language
  104.   support: predefined regular expression macros may be redefined, I think
  105.   all editor prompts were gathered into prompts.h, response letters were
  106.   gathered into letters.h, and the window letters can be changed to follow a
  107.   non-English alphabet.  Byrial contributed two new functions that look at
  108.   the Caps Lock key.  Here's Byrial's description:
  109.  
  110.      2 new editor functions in TDE:
  111.  
  112.      IfCapsLock:
  113.  
  114.      When NOT playing back a macro, this function does absolutely nothing.
  115.      If executed from a macro, the next key recorded in the macro will only
  116.      be executed if Caps Lock is active, and else be dropped.
  117.      The function is mapped to key combination Ctrl-grey /
  118.  
  119.      IfNotCapsLock:
  120.  
  121.      When NOT playing back a macro, this function does absolutely nothing.
  122.      If executed from a macro, the next key recorded in the macro will only
  123.      be executed if Caps Lock is NOT active, and else be dropped.
  124.      The function is mapped to key combination Ctrl-grey *
  125.  
  126.      These functions are useful when assigning macroes for non-english letters
  127.      to ALT-letter and ALT-SHIFT-letter key pairs. E.g. one could define:
  128.         To ALT-G:       IfCapsLock C-circumflex IfNotCapsLock c-circumflex
  129.         To SHIFT-ALT-G: IfCapsLock c-circumflex IfNotCapsLock C-circumflex
  130.      if one use a character set with c-circumflex in both cases.
  131.  
  132.  
  133.   When UNIX programmers port their utilities to MSDOS, they try to make
  134.   MSDOS have the look-and-feel of UNIX.  Not to be out done when I ported
  135.   TDE from MSDOS to UNIX, I tried to make UNIX have the look-and-feel of
  136.   MSDOS:  1) the curses function keys were mapped back to their "natural"
  137.   MSDOS PC position, and 2) a 128 element array simulates the top half of
  138.   the standard PC MSDOS video attributes (video attributes 128-255 are the
  139.   annoying blinking attributes.)  After about fifteen minutes of programming
  140.   in the UNIX environment, I suggest changing the UNIX motto from:
  141.  
  142.                          Build on the work of others.
  143.  
  144.                                      to:
  145.  
  146.                       Perpetuate someone else's mistakes.
  147.  
  148.  
  149.   UNIX on a PC is an alternative to MSDOS, Windows, or OS/2.  Several free
  150.   unices are available for 386 or better PCs.  Linux, written by Linus
  151.   Torvalds (torvalds@krunna.helsinki.fi) at Helsinki, Finland, is a free,
  152.   copyleft UNIX that follows the POSIX standard quite closely.  Most of the
  153.   GNU utilities have been ported to Linux.  A free X Window port is also
  154.   available.  Performance on a typical 486/66 (or Pentium(tm)?) PC with a
  155.   good video card running Linux and XFree86 2.0 is comparable to or better
  156.   than your average UNIX workstation.
  157.  
  158.   Linux runs on most PCs.  Even if you don't have any plans to use Linux,
  159.   it is a good quality control test.  Linux is more demanding than MSDOS
  160.   and PCs with a sloppy design or inferior components may have trouble
  161.   running Linux.  Several of the Linux FAQs are included with TDE to give
  162.   you more info on what, where, and how.
  163.  
  164.   Neither Print Block nor signals work in Linux.  At this time the config
  165.   utility does not work under Linux, either.  Customizing the color or key
  166.   assignments requires compiling a new executable.  Depending on the colors,
  167.   ncurses does bizarre things to the screen.  After pressing F1 for help,
  168.   you may have to redraw the screen to get the right colors (and sometimes
  169.   that doesn't work.)  Another annoying problem in Linux or ncurses or
  170.   termcap or terminfo or SLS is the lack of support for the F11, F12, End,
  171.   and Insert keys.  I haven't found any portable way to make those keys
  172.   return anything except escape codes or '~'.
  173.  
  174.  
  175.  
  176.                       New features in TDE 3.1 include:
  177.  
  178.  
  179.                   FindRegX meta characters:
  180.                       <     = Empty string at beginning of word
  181.                       >     = Empty string at end of word
  182.  
  183.  
  184.   I use the regular expression search much more often than I first
  185.   anticipated.  A couple of features missing in the original implementa-
  186.   tion are the beginning of word and end of word metacharacters.  These
  187.   metacharacters really come in handy for culling prefixes and suffixes
  188.   from the search.  Here's our new reg ex table:
  189.  
  190.  
  191.                    Regular Expression operator precedence:
  192.                    (based on the table in Dr. Aho's book)
  193.  
  194.           ┌──────────────────────────────────────────────────────┐
  195.           │   c = char    x = string    r,s = regular expression │
  196.           ├─────────┬──────────────────────────────┬─────────────┤
  197.           │  c      │  any non-operator character  │  Felis      │
  198.           │  \c     │  c literally and C escapes   │  catus\.    │
  199.           │  \:c    │  predefined macro:           │  \:c*(ie|ei)│
  200.           │         │     \:a  - alphanumeric      │             │
  201.           │         │     \:b  - white space       │             │
  202.           │         │     \:c  - alphabetic        │             │
  203.           │         │     \:d  - decimal           │             │
  204.           │         │     \:h  - hex               │             │
  205.           │         │     \:l  - lower alpha       │             │
  206.           │         │     \:u  - upper alpha       │             │
  207.           │  .      │  any character but newline   │  c.t        │
  208.           │  <      │  beginning of word           │  <cat       │
  209.           │  >      │  end of word                 │  <cat>      │
  210.           │  ^      │  beginning of line           │  ^cat>      │
  211.           │  $      │  end of line                 │  cat$       │
  212.           │  [x]    │  any character in x          │  [a-z0-9]   │
  213.           │  [^x]   │  any character not in x      │  [^AEIOU]   │
  214.           │  r*     │  zero or more r's            │  ca*t       │
  215.           │  r+     │  one or more r's             │  ca[b-t]+   │
  216.           │  r?     │  zero or one r               │  c.?t       │
  217.           │  rs     │  r followed by s             │  ^$         │
  218.           │  r|s    │  either r or s               │  kitty|cat  │
  219.           │  (r)    │  r                           │  (c)?(a+)t  │
  220.           └─────────┴──────────────────────────────┴─────────────┘
  221.  
  222.  
  223.  
  224.  
  225.                       New features in TDE 3.0 include:
  226.  
  227.                   FindRegX                 = #F7
  228.                   RepeatFindRegX           = F7
  229.                   RepeatFindRegXBackward   = @F7
  230.                   DefineRegXGrep           = ^F12
  231.                   Renamed the SearchAndSeize functions to Grep
  232.  
  233.  
  234.   The main feature in this version of TDE is a regular expression search
  235.   function.  I don't need regular expressions very often, but they do come
  236.   in handy.  For instance, our mainframe has a "compare" and a "compair"
  237.   function.  After years of using those functions, I have forgotten which
  238.   is the correct spelling.  With a regular expression function, I can
  239.   search for "comp(are|air)".  The '|' symbol, which is the or operator,
  240.   is very useful for finding several different or similar patterns at once.
  241.   Recently, I needed to delete all blank lines in a data file.  With a simple
  242.   macro, a regular expression search really simplified the job.
  243.  
  244.   Unfortunately, the regular expression search function can be very slow --
  245.   the worst case is really bad.  Searching for .*abc can take several minutes
  246.   in a small file (on a 486/33).  Press Control-Break to break-out of a long
  247.   running reg ex find.  In all actuallity, I never need to search for worst
  248.   case patterns.
  249.  
  250.  
  251.           Here's the macro I used to delete all blank lines in a file:
  252.  
  253.         Shift-F7  = FindRegX  (find a blank line before recording the macro)
  254.                     ^$
  255.  
  256.         Alt-F3    = turn macro record on
  257.         Alt-5     = assign macro to Alt-5
  258.         F7        = RepeatFindRegX - next blank line
  259.         Alt-D     = delete line
  260.         Up        = move cursor up a line (just in case current line is blank)
  261.         Alt-5     = call the macro we just recorded
  262.         Alt-F3    = turn macro record off
  263.  
  264.         Press Alt-5 to delete all blank lines.
  265.  
  266.  
  267.   The SearchAndSeize function was renamed to Grep.  I didn't want to call
  268.   the old function Grep, because that implies the ability to search for
  269.   regular expressions.  Now, there is a choice between a very fast, but
  270.   limited, DefineGrep or a slow, but very flexible, DefineRegXGrep for
  271.   grepping around.
  272.  
  273.  
  274.   TDE only checks for valid syntax in a regular expression, which basically
  275.   means that parens and brackets are balanced and that consecutive operators
  276.   '*', '+', '?', and '|' are not allowed.  For example, either ^$ or $^ will
  277.   find blank lines.  TDE does not check for regular expressions that create
  278.   null loops in the pattern matching machine.  If TDE can compile a regular
  279.   expression, TDE will try to find it.  Here are some examples of good and
  280.   bad regular expressions in TDE:
  281.  
  282.             will find (good):             chokes on null loops (bad):
  283.  
  284.                 (a|b)*                            (a*|b)*
  285.                 a*(ba*)*                          (a*b*)*
  286.                 (a*b)*                            (a*b*)+
  287.                 (a+)*                             (a*)+
  288.                 a*|b                              (a?)*
  289.  
  290.   TDE will correctly compile all of the above regular expressions, but it
  291.   just can't find the "bad" regular expressions.  If TDE does choke on
  292.   null loops, a harmless "nfa choked" message is displayed in the status bar
  293.   at the bottom of the screen.  TDE never tries to predict whether a given
  294.   regular expression will produce null loops.
  295.  
  296.   Null loops are created when a regular expression has zero or more occur-
  297.   rences of zero or more occurrences, e.g. (a*)*.  The nondeterministic
  298.   finite-state pattern matching machine in TDE will choke trying to find
  299.   an infinite number of zero occurrences of 'a'.
  300.  
  301.  
  302.  
  303.                       New features in TDE 2.2 include:
  304.  
  305.         Dirty Line color        = Config file
  306.         NextDirtyLine           = @F5
  307.         PrevDirtyLine           = @F6
  308.         Right margin justify    = ^F7
  309.         Stable Quicksort        = replaced the old insertion sort
  310.         Customize overscan      = config utility
  311.         Put support for two-key combo's back in, e.g. ^KQ
  312.         Edit text and binary files
  313.         + Source code may now be compiled w/ MSC 7.0, QuickC 2.51, and BC 3.1
  314.         + Make file supports MSC 7.0, QuickC 2.5, and BC 3.1
  315.         + autoload <LF>, <CRLF>, and some BIN (binary) files
  316.         + added signatures to structures changed by the config utility
  317.         + assertions in source code to find my many design flaws,
  318.             programming mistakes, and logic errors
  319.  
  320.  
  321.   In this version, the big text buffer was replaced by a double linked
  322.   list.  In general, many functions are faster.  However, this version
  323.   will not handle files quite as large as previous versions.  On the
  324.   other hand, this version will edit binary files.  I think just about
  325.   any ASCII or Extended ASCII character may be edited in any file.  Also
  326.   notice in the file header that the offset is displayed for files
  327.   opened in binary mode.
  328.  
  329.   When I added support for binary files, I wanted the ability to edit
  330.   some of the files produced by our lab equipment.  The data collectors
  331.   dump data in a fixed record size.  The record size varies among the
  332.   machines, so TDE needs to handle various fixed record formats.  The
  333.   default record length for binary files is 64.  The default record
  334.   size may be overridden on the command line with the /b switch.  Just
  335.   add the size of the desired fixed length record to the /b, e.g.
  336.  
  337.                            tde -b128 nmr.dat
  338.                            tde -b80  hplc.dat
  339.                            tde -b54  rs232.dat
  340.  
  341.   Now, whenever a line is changed, the line changes color.  The dirty
  342.   line color can be set in the config utility.  Incidentally, the dirty
  343.   line color can be set to the same color as regular text, which effectively
  344.   turns off this feature.  After using this feature for a while, I really
  345.   needed another function to move the cursor to dirty lines.  During the
  346.   day, I get interrupted quite a bit and forget what I just changed.  The
  347.   NextDirtyLine and PrevDirtyLine functions are really useful for finding
  348.   the changes I made.  Other times, I forget what I just did.  Often, I
  349.   forget what I just did five minutes ago.  I vaguely remember changing
  350.   something, but I can't remember what or where.  The NextDirtyLine and
  351.   PrevDirtyLine functions come in handy for those with bad memories, like
  352.   me.
  353.  
  354.   A minor feature was added to the word processing functions:  right margin
  355.   justification.  The SetRightMargin function asks whether or not to
  356.   justify the right margin.  In the ruler, a '<' indicates the right margin
  357.   is jagged and a '├' indicates the right margin is smooth.
  358.  
  359.   The simple insertion sort was replaced by the much faster Quicksort.  The
  360.   SortBoxBlock function works the same -- just faster.  Computer science
  361.   types seem to have a fixation on sorting and searching.
  362.  
  363.   In the DTE 5.1 editor, Doug supported the WordStar/Turbo X command
  364.   convention.  TDE now supports two-key commands in a generic way.  The first
  365.   key must be a recognized function key and the second key can be anything,
  366.   even a repeat of the first key.  The one restriction with two-key commands
  367.   is that macros cannot be assigned to two-key combo's.
  368.  
  369.   Now that I own both Microsoft C 7.0 and Borland C 3.1, the source was
  370.   changed so both compilers can compile TDE.
  371.  
  372.  
  373.                      New features in TDE 2.1 include:
  374.  
  375.         SetLtabs                = ^Tab
  376.         SetPtabs                = ^Tab, prompts for both Ltabs and Ptabs
  377.         BlockCompressTabs       = #@C
  378.         BlockIndentTabs         = #@I
  379.         ToggleTabInflate        = #@T
  380.         DefineDiff              = #F11
  381.         RepeatDiff              = F11
  382.         -f pattern files        = command line option to define grep
  383.         DefineGrep              = #F12
  384.         RepeatGrep              = F12
  385.         SwapBlock               = #@S
  386.         Sort sequence           = Config file
  387.  
  388.  
  389.                              Renamed functions:
  390.  
  391.         ReplaceString           == ReplaceForward || ReplaceBackward
  392.         PanUp                   == FixedScrollUP
  393.         PanDown                 == FixedScrollDn
  394.         PanLeft                 == ScrollLeft
  395.         PanRight                == ScrollRight
  396.  
  397.  
  398.  
  399.   At work, we may have several versions of one program.  For me, I find it
  400.   hard to remember which changes were made to which source files.  There
  401.   are several diff utilities that can point out differences, but I
  402.   probably need the edit those differences anyway.  The diff options I
  403.   find most useful are: setting the diff start, ignore leading space,
  404.   ignore all space, ignore blank lines, and ignore end of line.  The new
  405.   diff function in TDE prompts for the windows and the starting diff
  406.   options.  Once the diff is defined, press the RepeatDiff key at any time
  407.   to find the next diff.  With cursor sync turned on, it's easy to move
  408.   the cursors to begin the next diff.  Any two visible windows may be
  409.   diffed.  You may even diff windows in the same file, which is really
  410.   nice for comparing similar functions, data, or text in separate areas of
  411.   a file.
  412.  
  413.   Sort sequences were added for non-English languages: English, Esperanto,
  414.   Finnish, French, German, and Swedish.  You may customize the sort
  415.   sequence in tde.cfg.  This function is based on a program by Pierre
  416.   Jelenc, pcj1@columbia.edu.  Pierre's sort program will handle a much
  417.   wider range of alphabets and languages than TDE.
  418.  
  419.   The new SwapBlock function works only with BOX blocks.  Every once in a
  420.   while, I need to swap rows of numbers or areas of text.  The width of
  421.   the swap area assumed to be the width of the BOX.
  422.  
  423.  
  424.                    New features in TDE 2.0e include:
  425.  
  426.                       BlockRot13           = #@<
  427.                       BlockFixUUE          = #@>
  428.                       BlockEmailReply      = #@?
  429.  
  430.   ROT13 is an informal, voluntary standard used on the networks to send
  431.   text that some may consider inappropriate.  ROT13 is a convenient way
  432.   that allows one to choose whether or not to read the material.  To read
  433.   the material, one has to make a conscious and deliberate effort to
  434.   convert the text into a readable form.  ROT13 is also used to hide
  435.   answers to questions, puzzles, etc...  BlockRot13 alternately converts
  436.   ROT13 alpha characters into normal text and hides normal alpha
  437.   characters in ROT13.
  438.  
  439.   The most common default for sending large binary files across network
  440.   nodes and gateways uses UUencoding; however, some characters in the
  441.   UUencode set do not make the trip correctly.  On IBM mainframes, the
  442.   EBCDIC to ASCII translation don't do right.  Although I don't fully
  443.   understand why, but, three characters need to be fixed when receiving
  444.   text e-mail files, which include UUencoded files, from IBM mainframes.
  445.   BlockFixUUE will fix the three characters in a marked block.  The three
  446.   characters that need to be fixed in text (as opposed to binary) e-mail
  447.   files received from IBM mainframes are:
  448.  
  449.                   Hex               Decimal             ASCII
  450.  
  451.        1)     5d  ==>  7c         93  ==>  124        ]  ==>  |
  452.        2)     d5  ==>  5b        223  ==>   91        ╒  ==>  [
  453.        3)     e5  ==>  5d        229  ==>   93        σ  ==>  ]
  454.  
  455.  
  456.   When sending a reply to an e-mail, it is customary to prepend any lines
  457.   from the original e-mail with the ">" character.  BlockEmailReply
  458.   prepends "> " to the original line in an e-mail and prepends ">" to all
  459.   replies to replies in a LINE block.
  460.  
  461.  
  462.  
  463.                    New features in TDE 2.0 include :
  464.  
  465.          DateTimeStamp                           = ^2 or Control-@ sign
  466.          SortBoxBlock, ascending or descending   = @S
  467.          ToggleSmartTabs                         = @Tab
  468.          Dynamic left margin for writers         = @V
  469.          Pause, useful with macros               = ^P
  470.          Recursive macros
  471.          Support for Control-Break to stop recursive macros,
  472.               sorting, search/replacing, some block operations,
  473.               formatting text or paragraph, and printing.
  474.          Support for lines as long as 1040 characters.
  475.          Improved undo buffer management.  There is now room for
  476.               the last 10 by 1040  or  130 by 80 deleted lines.
  477.          Gathered all prompts into one header file to aid translation
  478.               of prompts and documentation into other languages.
  479.          Configuration file, option 6 in tdecfg.exe.
  480.  
  481.  
  482.   The date-time stamp was added to TDE because some users talk with field
  483.   units over the phone and the event needs to be date and time stamped.
  484.   Users may customize the date to local preferences, eg MM-DD-YY or
  485.   DD-MM-YY.  The time stamp may use either 12 hour or 24 hour form.
  486.  
  487.   Every once in a while, I need to sort data, names, etc..., in some of my
  488.   files.  The SortBoxBlock function was added to sort lines according to
  489.   the keys in a box block.  The keys may be sorted ascending or
  490.   descending, while the IGNORE/MATCH toggle determines whether case is
  491.   significant.  To sort multiple columns, start the sort with the least
  492.   significant key first.
  493.  
  494.   I also wrote a handler for the Control-Break interrupt, 0x1B.  On IBM
  495.   compatible PCs, the Control-Break key generates an interrupt via
  496.   hardware.  By writing a Control-Break interrupt handler, a user can
  497.   immediately gain control of a run-a-way recursive macro, printing job,
  498.   most box block operations, expanding tabs, trimming space from line
  499.   blocks, formatting a paragraph or text, search/replace, or a sort
  500.   operation.  Although one may trap Control-C, which is a software
  501.   generated interrupt, there is no telling when the operating system will
  502.   turn control over to a Control-C handler.  One may gain immediate
  503.   control with the Control-Break key, however.
  504.  
  505.   The undo-buffer space and management was greatly enhanced.  There is now
  506.   room for over 200 deleted lines in the buffer.  Users may now get back
  507.   entire functions that may have been deleted.
  508.  
  509.   All of the prompts in TDE were gathered into one header file to aid the
  510.   translation of documentation as well as the user prompts into other
  511.   languages.  Pierre Jelenc, pcj1@columbia.edu and a member of the Foreign
  512.   Language Education Forum (FLEFO) on CompuServe, has translated the
  513.   documentation and has created configuration files for several languages.
  514.   If you need a non-English version of TDE, contact Pierre to find out if
  515.   he has a version of TDE for you.
  516.  
  517.   A configuration file was added so that users may define all function
  518.   keys, modes, and colors from a configuration file.  Users may also
  519.   define macros in the configuration file.  Those who need to assign ASCII
  520.   and Extended ASCII character to unused function keys will find this
  521.   extremely useful.  Some alphabets need letters with all kinds of accent
  522.   marks.
  523.  
  524.  
  525.                    New features in TDE 1.5 include :
  526.  
  527.                     Ruler                     = @R
  528.                     Block trim trailing       = @T
  529.                     User defined macros:
  530.                        Record macro           = @F3
  531.                        Save macros to file    = #F1
  532.                        Load macros from file  = #F3
  533.                        Clear macro buffer     = ^ESC
  534.                     Critical error handler
  535.  
  536.   If by accident you forget to put a diskette in a floppy drive and try to
  537.   save a file or if you forget to turn on the printer before printing a
  538.   block or file, a critical error occurs.  That kind of error is the
  539.   infamous Abort, Retry, Ignore thing.  A routine was written to give some
  540.   information on the kind and the location of those errors when they
  541.   occur.  The TDE critical error handler gives you all kinds of info and
  542.   then prompts you for a response.  The timeout for critical errors varies
  543.   quite a bit.  Some timeouts may take a couple of minutes.
  544.  
  545.   When I "work" at the USDA, I often need to create or massage formatted
  546.   data files.  Also, a lot of engineers and scientists at the USDA program
  547.   in FORTRAN and the source code needs to be in a certain format.  When
  548.   working with those types of files, it is really useful to have a ruler
  549.   that explicitly shows which column the cursor is in.  The new ruler in
  550.   TDE shows margins, column numbers, and a column pointer.
  551.  
  552.  
  553.  
  554.                    New features in TDE 1.4 include :
  555.  
  556.               Split screen vertically            = F8
  557.               Number box block                   = Alt+N
  558.               Directory list                     = Alt+F1
  559.  
  560.   Also added in tdecfg was a choice of cursor styles and a switch for .bak
  561.   files.  Both of those options are in the mode section of tdecfg.
  562.  
  563.  
  564.  
  565.  
  566. Editor fields and information lines:
  567.  
  568.  
  569.                                Sample TDE screen
  570.  
  571.  
  572.          ┌─── File number - each window opened to same file has same number
  573.          │ ┌─── Window letter
  574.          │ │
  575.          │ │    ┌─── Dirty file indicator - asterisk
  576.          │ │    │ ┌─── File name
  577.          │ │    │ │                    ┌──── File attributes
  578.          │ │    │ │                    │    ┌──── Total number of lines in file
  579.          │ │    │ │                    │    │    ┌─── CR, CRLF, BIN mode
  580.          │ │    │ │                    │    │    │             ┌─── line:column
  581.                                                         
  582.       ┌──────────────────────────────────────────────────────────────┐
  583.       │    The first line on the screen contains file information    │
  584.       ├──────────────────────────────────────────────────────────────┤
  585.       │........1.....     Optional ruler line    ......7........8│
  586.       ├──────────────────────────────────────────────────────────────┤
  587.       │                                                              │
  588.       │                                                              │
  589.       │                          File area                           │
  590.       │                                                              │
  591.       │                                                              │
  592.       │                                                              │
  593.       ├──────────────────────────────────────────────────────────────┤
  594.       │                 Editor modes and information                 │
  595.       └──────────────────────────────────────────────────────────────┘
  596.                                                          Insert
  597.         │   │    │    │    │    │    │     │     │   │  │    │     └─ Overwrite
  598.         │   │    │    │    │    │    │     │     │   │  │    └───── ^Z at eof?
  599.         │   │    │    │    │    │    │     │     │   │  └───── trim trailing
  600.         │   │    │    │    │    │    │     │     │   │   space at eol, T = TRUE
  601.         │   │    │    │    │    │    │     │     │   │
  602.         │   │    │    │    │    │    │     │     │   └─── character under cursor
  603.         │   │    │    │    │    │    │     │     └───── CRLF or LF at eol?
  604.         │   │    │    │    │    │    │     └───── word wrap indicator
  605.         │   │    │    │    │    │    └───── Sync cursor in all windows?
  606.         │   │    │    │    │    └───── Ignore / Match search case?
  607.         │   │    │    │    └───── Indent mode?
  608.         │   │    │    └───── Tab modes = Smart/Fixed, In/Deflate, and ptabs
  609.         │   │    └───── Available memory for editing files
  610.         │   └───── Total number of windows, including hidden windows
  611.         └───── Total number of open files
  612.  
  613.  
  614.  
  615. Multiple keys:
  616.  
  617.   I use the following abbreviated key definitions throughout this file:
  618.  
  619.                 ^ = Control       # = Shift       @ = Alt
  620.  
  621.   For example, ^F5 means press and hold the Control key and then press F5
  622.   while holding down the Control key.
  623.  
  624.  
  625. Cursor movement:
  626.  
  627.                             101 Keyboard overview
  628.  
  629.             Cursor keys                               Keypad keys
  630.         ┌─────┬─────┬─────┐                ┌───────┬───────┬───────┬───────┐
  631.         │ Ins │Home │PgUp │                │NumLock│Grey / │Grey * │Grey - │
  632.         ├─────┼─────┼─────┤                ├───────┼───────┼───────┼───────┤
  633.         │ Del │ End │PgDn │                │ Home  │  Up   │ Pg Up │ Grey  │
  634.         └─────┴─────┴─────┘                ├───────┼───────┼───────┤   +   │
  635.                                            │ Left  │Center │ Right │       │
  636.               ┌─────┐                      ├───────┼───────┼───────┼───────┤
  637.               │ Up  │                      │  End  │ Down  │ Pg Dn │ Grey  │
  638.         ┌─────┼─────┼─────┐                ├───────┴───────┼───────┤       │
  639.         │Left │Down │Right│                │     Ins       │  Del  │ Enter │
  640.         └─────┴─────┴─────┘                └───────────────┴───────┴───────┘
  641.  
  642.                                                           
  643.     If you like using these grey                   With Num Lock off,
  644.      cursor keys, these function               you can probably guess most
  645.       assignments are for you.                of these function assignments.
  646.  
  647.           Grey cursor keys                            Keypad keys
  648.  
  649.  Up     - move cursor up                    Home   - toggle col 1 & beg of line
  650.  Down   - move cursor down                 ^Home   - first line in window
  651.  Left   - move cursor left                  Pg Up  - page up
  652.  Right  - move cursor right                ^Pg Up  - goto first page in file
  653. ^Up     - scroll cursor up                  Center - move to center of window
  654. ^Down   - scroll cursor down               ^Center - line to center of window
  655. ^Left   - cursor to previous word           End    - last character in line
  656. ^Right  - cursor to next word              ^End    - last line in window
  657. @Up     - pan up                            Pg Dn  - page down
  658. @Down   - pan down                         ^Pg Dn  - goto last page in file
  659. @Left   - pan left                          Ins    - toggle insert mode
  660. @Right  - pan right                         Del    - delete character
  661. @PgUp   - horizontal page left             ^Del    - stream delete character
  662. @PgDn   - horizontal page right             Grey - - scroll screen up
  663. ^#Left  - pan left                          Grey + - scroll screen down
  664. ^#Right - pan right                        ^Grey - - pan up
  665.                                            ^Grey + - pan down
  666.                                              Enter - Insert line and move down
  667.                                             #Enter - 1st char in next line
  668.                                             ^Enter - column 1 in next line
  669.  
  670.  
  671. Function Keys:
  672.  
  673.   I tried to use some logical order when I assigned functions to the
  674.   function keys.  I use a 101 keyboard most of the time, so it should be
  675.   easy to see the logical function grouping with it.  The function keys
  676.   on a 101 keyboard are placed along the top of the keyboard.  Functions
  677.   are arranged as follows:
  678.  
  679.  
  680.         Help    File              Find/Replace            Window
  681.               Functions              &  Diff             Commands
  682.          F1  F2  F3  F4          F5  F6  F7  F8          F9  F10  F11  F12
  683.  
  684.  
  685.    F1 = Instantaneous Help
  686.  
  687.   @F1 = Directory List
  688.         List the contents of a directory or matching files.  At the
  689.         prompt, press enter to list all files in the current directory or
  690.         enter any valid subdirectory name, file name, or wild card
  691.         characters.  You don't have to put a *.* at the end of a
  692.         subdirectory name; the directory list function adds those wild
  693.         card characters to subdirectory names as a default.  A '\' is
  694.         added to the end of subdirectory names in the file list.  To list
  695.         files in other directories, just move the cursor to the desired
  696.         subdirectory name and press enter.  When you see ..\ in the
  697.         directory list, the double periods represent the parent of the
  698.         current directory.  The .\ represents the current directory.  You
  699.         may move up and down the directory tree by selecting the parent or
  700.         childrens of the current directory.
  701.  
  702.  
  703. File Functions:
  704.  
  705.    F2 = Save file
  706.         Saves all changes made to file.  Existing file is overwritten by
  707.         the new file.  It does not prompt for a new file name -
  708.         automatically assumes you want to overwrite the old file.
  709.  
  710.    F3 = Quit file
  711.         Abandons any changes made in the file and closes or kicks the file
  712.         out of the current window.  If you are editing multiple files or
  713.         have multiple windows, TDE searches for any invisible files to
  714.         display in the current window.  If no invisible windows are found,
  715.         TDE combines windows.  If this is the only file being edited, F3
  716.         quits TDE.  If you made any changes to the file, it asks you if
  717.         you want to abandon them.  You can create an invisible window when
  718.         you load in a file over the current file.  Nothing happens to the
  719.         invisible file or window - you just can't see it.
  720.  
  721.         When I added vertical windows, this routine became a LOT more
  722.         complicated.  To keep things reasonably sane, let's only close
  723.         windows that have three common edges, eg.
  724.  
  725.                         ┌──────┬──────────┐
  726.                         │      │    no    │
  727.                         │      ├─────┬────┤
  728.                         │      │yes1 │yes1│
  729.                         │  no  ├─────┴────┤
  730.                         │      │   yes2   │
  731.                         │      ├──────────┤
  732.                         │      │   yes2   │
  733.                         └──────┴──────────┘
  734.  
  735.         Windows with 'no' cannot be closed.  Windows with 'yes' can be
  736.         combined with windows that have the same yes number.
  737.  
  738.  
  739.    F4 = File (save and quit)
  740.         This function is a combination of Save and Quit (F2 & F3 above).
  741.  
  742.    #F2 = Save as
  743.         If you don't want to overwrite the original file but you want to
  744.         save the contents of the current file, you may save the file under
  745.         a different file name.  This function prompts you for a file name
  746.         to save the changes (press escape to abort).
  747.  
  748.    #F4 = Edit new file
  749.         To bring another file into the editor, use this function.  It
  750.         loads the file into the current window and previous window becomes
  751.         invisible.  You can even load several copies of the same file.  I
  752.         like this because I often need to refer back to the original
  753.         unchanged file on disk.  When I make a booboo in a file, which is
  754.         quite often, I don't necessarily want to quit and start over; I
  755.         just want to get back the part that I messed up.  It is really
  756.         easy to mark the original text in a block and copy it to the place
  757.         where I made a booboo.  Each time a file is loaded into TDE, it is
  758.         treated as a different file.
  759.  
  760.    @F2 = Set file attributes
  761.         Change the attributes of a file.  Attributes are:  A = Archive,
  762.         S = System, H = Hidden, R = Read-Only.  You can change the
  763.         attributes of a file so that read-only files can be edited.  To
  764.         edit a read-only file:  1) edit the file, 2) change the file
  765.         attributes to archive, 3) save the changes made in the file, 4)
  766.         change the file attributes back to read-only.
  767.  
  768.    @F4 = Edit next file
  769.         If you type multiple file names or type wildcard characters on the
  770.         command line, press this key to bring in the next file or the next
  771.         matching file into the editor.
  772.  
  773.    -f pattern file(s)         (Command line DefineGrep)
  774.    -g pattern file(s)         (Command line DefineRegXGrep)
  775.        or
  776.    ^F12 = DefineRegXGrep
  777.    #F12 = DefineGrep
  778.         Grep will search files for a pattern and only load those files that
  779.         contain pattern.  The command line Define Grep works a little
  780.         differently than the function key Grep.  On the command line, spaces
  781.         are interpreted by DOS as delimiters.  Therefore, the search pattern
  782.         on the command line can not have any embedded spaces.  On the other
  783.         hand, the Fkey Grep search pattern may contain most any character.
  784.  
  785.         Defining Grep also defines the search pattern.  When a file is
  786.         loaded, press RepeatFind to go to the next occurrence of pattern.
  787.         There are actually two find structures - one for the standard
  788.         search function and one for Grep.   Defining Grep also defines
  789.         the search function.  However, redefining the standard search
  790.         structure has no effect on the Grep pattern.  The Grep pattern
  791.         remains defined until another Grep redefines it.
  792.  
  793.     F12 = RepeatGrep
  794.         After Grep has been defined, press this key to search the next file
  795.         for pattern.
  796.  
  797.  
  798. Macros:
  799.  
  800.    @F3 = Macro record
  801.         This key toggles macro record off and on.  A flashing "Recording"
  802.         is displayed in the lite bar, so it shouldn't be too difficult to
  803.         tell when record is on.  This function assigns a keystroke or a
  804.         series of keystrokes to an unused function key.  Keystrokes are
  805.         played back for some prompts.  Prompts that require the user to
  806.         input a name or pattern are played back.  Prompts that require the
  807.         user to enter a choice, "Overwrite existing file (y/n)?" for
  808.         example, are not played back.
  809.  
  810.         There is room for 1024 keystrokes in the macro buffer.  There are
  811.         no restrictions on the length of a single macro.  If you want, you
  812.         may define one macro that contains 1024 keystrokes.  When TDE
  813.         terminates, all macros definitions disappear.  Macro definitions
  814.         are temporary.  If you want to reuse macros that are defined
  815.         during an editing session, they need to be saved before you exit
  816.         TDE.
  817.  
  818.                              Recursive Macros
  819.  
  820.         "Recursive" macros are supported.  Only one level of recursion is
  821.         supported in TDE.  Here's a simple example of a recursive macro:
  822.  
  823.                         Alt-F3    = turn macro record on
  824.                         Alt-5     = assign the recording to Alt-5
  825.                         Down      = move cursor down a line
  826.                         Alt-5     = call the macro we just defined
  827.                         Alt-F3    = turn macro record off
  828.  
  829.         Enter this macro and press Alt-5 to see what a recursive macro
  830.         does.  Recursive macros repeatedly execute themselves until an
  831.         error condition occurs, which usually happens when the end of file
  832.         is reached.  I often use recursive macros to delete certain lines
  833.         in a file or to rearrange the fields of a formatted data file.
  834.  
  835.         Each editor function in TDE returns a code to the macro processor
  836.         that indicates whether or not an error occurred.  Here are some
  837.         conditions that generate an error:  attempting to move the cursor
  838.         past the end of file or behind the start of the file, trying to
  839.         add too many characters in a line, attempting block operations
  840.         with no marked block, etc...
  841.  
  842.         One interesting phenomenon about recursive macros is that a macro
  843.         can be defined that never terminates.  The simplest
  844.         non-terminating macro definition in TDE is:
  845.  
  846.                   Alt-F3  = turn macro record on
  847.                   Alt-7   = assign the recording to Alt-7
  848.                   Alt-7   = call the macro we just defined
  849.                   Alt-F3  = turn macro record off
  850.  
  851.         This a+7 macro carries out no instructions.  The only thing this
  852.         macro does is call itself.  In a perfect world, this macro will
  853.         execute forever.  There are lots of ways to create non-terminating
  854.         recursive macros.  Be creative and try creating a few non-
  855.         terminating recursive macros yourself.  With several different
  856.         sizes and shapes of horizontal and vertical windows on the screen
  857.         and with cursor sync toggled on, you can create some really neat
  858.         macros using cursor movement keys.  If you get tired of waiting
  859.         for forever, just press Control-Break to stop any macro.
  860.  
  861.                       A Really Neat Recursive Macro
  862.  
  863.         Here's a really neat recursive macro that you might try with
  864.         cursor sync turned off.  Edit a fairly large file, one with at
  865.         least a 1000 lines, and move the cursor to line 500 or the half
  866.         way point.  Then, split the screen into several vertical windows
  867.         with about 15 columns in each window , e.g.:
  868.  
  869.                 ┌───────┬───────┬────────┬───────┬───────┐
  870.                 │       │       │        │       │       │
  871.                 │       │       │        │       │       │
  872.                 │       │       │        │       │       │
  873.                 │       │       │ start  │       │       │
  874.                 │       │       │        │       │       │
  875.                 │       │       │        │       │       │
  876.                 │       │       │        │       │       │
  877.                 └───────┴───────┴────────┴───────┴───────┘
  878.  
  879.         With cursor sync turned off and macro record turned on, define a
  880.         macro that 1) moves the cursor down in one window, 2) goes to the
  881.         next window and moves the cursor up, 3) goes to the next window
  882.         and moves the cursor down, 4) when the cursor finally makes it
  883.         back to the starting window, make the macro recursive.  Suppose
  884.         the cursor is in the window labeled "start" in the sample screen
  885.         above.  Here's the way the keystrokes in this macro would be
  886.         recorded:
  887.  
  888.  
  889.                 Alt-F3    = turn macro record on
  890.                 Alt-8     = assign this macro to Alt-8
  891.                 Down      = move cursor down in "start" window
  892.                 F10       = next window
  893.                 Up        = move cursor up
  894.                 F10       = next window
  895.                 Down      = move cursor down
  896.                 F10       = next window
  897.                 Down      = move cursor down
  898.                 F10       = next window
  899.                 Up        = move cursor up
  900.                 F10       = next window - cursor is now in "start"
  901.                 Alt-8     = call the macro just defined. it's now recursive.
  902.                 Alt-F3    = turn macro record off
  903.  
  904.         Press Alt-8 and watch a really neat recursive macro.
  905.  
  906.  
  907.    #F1 = Save macro file
  908.         Saves all macro definitions to a file.  TDE prompts for the macro
  909.         file name.
  910.  
  911.    #F3 = Load macro file
  912.         Prompts for a search pattern or file name.  I can never remember
  913.         macro file or path names, so this function uses a file pick list.
  914.  
  915.    ^ESC = Clear macros
  916.         Resets or clears all macros.
  917.  
  918.    ^P  = Pause
  919.         When this function is part of a macro, press any key to continue
  920.         the macro or press ESC to halt or break the macro.
  921.  
  922.  
  923. Find and Search/Replace:
  924.  
  925.    TDE uses the Boyer-Moore search algorithm for finding strings.  Typically,
  926.    the longer the search pattern the faster the search.  So, if you want to
  927.    speed up searches, try searching for longer patterns, e.g. phrases.
  928.  
  929.    ^F5 = Toggle search case
  930.         You can toggle the case of the search flag at any time, even
  931.         after you define the search pattern.
  932.  
  933.    #F5 = find forward
  934.         To define the search pattern, use this function.  It prompts you
  935.         for the search pattern.  The pattern is defined, across files,
  936.         until changed.
  937.  
  938.    #F6 = find backward
  939.         Same as find forward except search backward in file.
  940.  
  941.    F5 = Repeat find forward
  942.         Once the search pattern has been defined (Shift F5 or Shift F6),
  943.         you can press this key at any time in any file to find the next
  944.         occurrence of pattern.  I decided to use two sets of functions to
  945.         perform searches.  Once I found a pattern, I might do some editing
  946.         and then find the next occurrence.  I hate to define the search
  947.         pattern over and over or set the search direction over and over.
  948.         This function does a wrap search - when it reaches the eof it
  949.         starts over at the beginning of the file.
  950.  
  951.    F6 = Repeat find backward
  952.         Like repeat find forward, you can press this key at anytime once
  953.         the search pattern has been defined.
  954.  
  955.    Repeat find forward2
  956.         Like F5 except the cursor is not repositioned to the middle of the
  957.         screen.  This function is useful when working with data files.
  958.  
  959.    Repeat find backward2
  960.         Like F6 except the cursor is not repositioned to the middle of the
  961.         screen.
  962.  
  963.    #F8 = Replace String
  964.         This function prompts you for the search pattern and the
  965.         replacement text.  It also prompts for the replace direction.  If
  966.         you want to match the search case, remember to toggle the search
  967.         flag, which can be done at any time.  You can either do prompt or
  968.         no prompt replacing.   Regardless of prompt or no prompt
  969.         replacing, this function actually moves the cursor to the pattern
  970.         and displays it on the screen and replaces the text. If you are
  971.         using TDE on a slow machine, you can see the search/replace taking
  972.         place.  I implemented the function this way because I just like to
  973.         see what the search/replace function is doing.  Press
  974.         Control-Break to stop no prompt replacing.
  975.  
  976.    #F7  = FindRegX
  977.         Prompts for regular expression to find.  Press F1 for a help table.
  978.  
  979.    F7 = RepeatFindRegX
  980.         Once a regular expression is defined, find next regular expression.
  981.  
  982.    @F7 = RepeatFindRegXBackward
  983.         Once a regular expression is defined, find previous reg ex.
  984.  
  985.  
  986. Diff Functions:
  987.  
  988.    #F11 = DefineDiff
  989.         This function initializes diff.  It prompts for the window number
  990.         and letter to diff, ignore leading space, ignore all space, ignore
  991.         blank lines, ignore case, and ignore end of line.  Any two windows
  992.         may be diffed.  Diff only requires that the windows be visible.
  993.  
  994.                                Diff prompts
  995.  
  996.       DIFF:  Enter first window number and letter (e.g. 1a) :
  997.       DIFF:  Enter next window number and letter (e.g. 2a) :
  998.       DIFF:  Start diff at (B)eginning of file or (C)urrent position? (b/c)
  999.       DIFF:  Ignore leading spaces (y/n)?
  1000.       DIFF:  Ignore all space (y/n)?
  1001.       DIFF:  Ignore blank lines (y/n)?
  1002.       DIFF:  Ignore end of line (useful with reformatted paragraphs) (y/n)?
  1003.  
  1004.     F11 = RepeatDiff
  1005.         Once the diff has been defined, press RepeatDiff to find the next
  1006.         diff.
  1007.  
  1008.  
  1009. Window Functions:
  1010.  
  1011.    F8 = Split window vertically
  1012.         Splits the screen at the current cursor location.  The current
  1013.         file is displayed in multiple windows.  Changes to a file are
  1014.         echoed in all windows opened to the same copy of that file.  You
  1015.         can also see any marked blocks in the same copy of the file in
  1016.         different windows.  There has to be at least 15 columns in any
  1017.         window, so the number of visible windows is limited by the display
  1018.         screen.
  1019.  
  1020.    F9 = Split window horizontally
  1021.         Splits the screen at the current cursor location.  There has to be
  1022.         at least 1 text line in any window, so the number of visible
  1023.         windows is limited by the display screen.
  1024.  
  1025.    #F9 = Resize window
  1026.         Sometimes there is a need to concentrate on the contents of one
  1027.         window.  Use the up and down arrow keys to adjust the current
  1028.         window to desired size.  Changing the size of the top window is
  1029.         not allowed.
  1030.  
  1031.    ^F9 = Zoom window
  1032.         Makes the current window fill the whole screen.  All windows
  1033.         except the current window become invisible.
  1034.  
  1035.    F10 = Next window
  1036.         If more than one window is displayed, you can press one key to
  1037.         move to the next window.
  1038.  
  1039.    #F10 = Previous window
  1040.         Move to previous window - opposite of next window.
  1041.  
  1042.    ^F10 = Next Hidden Window
  1043.         Displays "hidden" or "invisible" windows in the same place as the
  1044.         current window.  The current window then becomes invisible.
  1045.  
  1046.  
  1047. Block Commands:
  1048.  
  1049.   Block operations can be done within or between files.  Operations on
  1050.   line blocks that move text are carried out on the line immediately
  1051.   below the cursor.  Operations on box or stream blocks that move text
  1052.   begin at the column of the cursor.  Press Control-Break to stop most Box
  1053.   operations.  Nearly all Line and Stream operations happen so fast that
  1054.   you can't stop them once they are started.
  1055.  
  1056.    @B - Mark Box Block
  1057.         This key is used to mark both the beginning and ending corner of
  1058.         a box block.
  1059.  
  1060.    @L - Mark Line Block
  1061.         This key is similar to the operation of the box block, but entire
  1062.         lines are marked.
  1063.  
  1064.    @X - Mark Stream Block
  1065.         All the text between the beginning and ending column, sorta like a
  1066.         stream of characters, is marked.  Useful with sentences.
  1067.  
  1068.    @U - Unmark Block
  1069.         If you make a booboo when marking blocks, press @U to unmark the
  1070.         block and start over.  After certain block operations, the block
  1071.         may remain marked.
  1072.  
  1073.    @G - Group Delete block
  1074.         Sorta self explanatory.  This function deletes the text in the
  1075.         marked block.
  1076.  
  1077.    @M - Move block
  1078.         Move the cursor to the desired location and press @M to move the
  1079.         marked block.  In line mode, the text is moved to the line
  1080.         immediately below the cursor.  In box and stream mode, the block
  1081.         is moved to the column of the cursor.
  1082.  
  1083.    @C - Copy block
  1084.         With line blocks, the block is copied to the line below the
  1085.         cursor.  With box and stream blocks, the block is copied
  1086.         beginning at the column of the cursor.  If you try to copy a
  1087.         Line block within itself, the block copy starts at the first
  1088.         line immediately after the marked block.
  1089.  
  1090.    @K - Kopy block
  1091.         Same as copy block except block stays marked.  It's sorta like a
  1092.         poor man's cut-and-paste buffer.
  1093.  
  1094.    @O - Overlay block
  1095.         You can only overlay Box blocks.  The original block stays marked
  1096.         after the operation.
  1097.  
  1098.    @F - Fill box block
  1099.         Fills the marked Box block with character.  This function is
  1100.         useful for filling in a column of periods for tables and such.
  1101.  
  1102.    @N - Number box block
  1103.         TDE prompts you for the starting number, the increment, and
  1104.         whether to left or right justify the numbers.  TDE only handles
  1105.         integers  -  no floating point numbers are allowed.  I felt that
  1106.         there were too many things involved in real numbers, eg. number
  1107.         of significant places to left of decimal, to right of decimal,
  1108.         exponents, engineering form, scientific form, etc....  If you
  1109.         want real numbers, just use a combination of the number box
  1110.         and fill box functions.  Use the fill box function to make a
  1111.         column of decimals and the number box function to number the left
  1112.         and right side of the decimal.
  1113.  
  1114.    @P - Print block
  1115.         Prints the block to the PRN device.  I haven't tried redirecting
  1116.         the PRN, but it should work.  This function prompts for block or
  1117.         file to print.  Press Control-Break to stop printing.
  1118.  
  1119.    @S - Sort box block
  1120.         Lines are sorted, ascending or descending, using the contents of
  1121.         the box block as the sort keys.  The Ignore/Match toggle
  1122.         determines whether case of the keys is significant.  To sort
  1123.         multiple columns, sort the least significant column first.  Press
  1124.         Control-Break to stop.
  1125.  
  1126.   #@S - Swap block
  1127.         Swap block only works with BOX blocks.  The area to be swapped
  1128.         is assumed to be the width of the BOX block.  Make sure the
  1129.         cursor is at the top left corner of the area to swap before
  1130.         swapping.
  1131.  
  1132.    @W - Write block to file
  1133.         Writes the marked block to a file.  TDE prompts for the file
  1134.         name.
  1135.  
  1136.    @E - Block expand tabs
  1137.         Expands the tabs in the marked block, which must be a LINE block,
  1138.         using the current tab setting.  Press Control-Break to stop.
  1139.  
  1140.    @T - Block trim trailing
  1141.         Trims trailing space, if any, at the end of each line in a LINE
  1142.         block.  Press Control-Break to stop.
  1143.  
  1144.    @< - Block upper case
  1145.         Convert all lower case characters in the block to upper case.
  1146.         Our old IBM mainframe line printers can only print upper case.
  1147.  
  1148.    @> - Block lower case
  1149.         Convert all upper case characters in the block to lower case.
  1150.  
  1151.    @? - Block strip high bit
  1152.         Strip the high bit off all characters in the block.  This function
  1153.         is useful when editing files produced by WordStar.
  1154.  
  1155.    #@< - BlockRot13
  1156.         Convert all alpha characters in a block using ROT13.
  1157.  
  1158.    #@> - BlockFixUUE
  1159.         Fixes the EBCDIC to ASCII problem with text e-mail.
  1160.  
  1161.    #@? - BlockEmailReply
  1162.         Prepends the customary "> " or ">" to e-mail replies to lines in a
  1163.         LINE block.
  1164.  
  1165.  
  1166. Word Processing Commands:
  1167.  
  1168.    @V - toggle word wrap
  1169.         Toggle word wrap between off, Fixed Wrap, and Dynamic Wrap.  In
  1170.         Fixed Wrap mode, the left margin is explicitly determined by the
  1171.         left margin setting.  In Dynamic Wrap mode, the left margin is
  1172.         determined by the indentation of the current line.  Writers may
  1173.         find the Dynamic Wrap mode easier to use.  If the cursor is
  1174.         somewhere in the line, words are pushed to the next line.
  1175.  
  1176.         In TDE, other than margins, word wrap and format paragraph or
  1177.         format text have nothing to do with each other.  Word wrap is
  1178.         used to push characters or the cursor to the next line when the
  1179.         right margin is violated.  Format paragraph and format text can
  1180.         be used at any time - they do not depend on the state of the
  1181.         WordWrap flag.
  1182.  
  1183.   ^F6 - Set Left margin
  1184.         May be set to any column equal to or greater than 1 and less than
  1185.         the right margin.
  1186.  
  1187.   ^F7 - Set Right margin
  1188.         May be set to any column greater than the left margin and less
  1189.         than the maximum line length or 1040.
  1190.  
  1191.   ^F8 - Set Paragraph margin
  1192.         The paragraph margin may be set to any column less than the right
  1193.         margin.
  1194.  
  1195.   format paragraph - not currently assigned to a key
  1196.         Text is formatted from the beginning of the paragraph according
  1197.         to the current left, right, and paragraph margins.  If the cursor
  1198.         is not on the beginning line of a paragraph, TDE searches for
  1199.         start of the paragraph and formatting starts there.  The entire
  1200.         paragraph is formatted according to the margins.
  1201.  
  1202.   ^B - Format Text
  1203.         Text is formatted from the cursor onward.  This function does not
  1204.         search for the beginning of the paragraph to start the format.
  1205.  
  1206.   @F8 - Left justify
  1207.         Beginning of current line is adjusted to start at left margin
  1208.  
  1209.   @F9 - Right justify
  1210.         End of current line is adjusted so it ends at the right margin
  1211.  
  1212.  @F10 - Center justify
  1213.         Current line is centered between the left and right margins.
  1214.  
  1215.  
  1216. Tabs:
  1217.  
  1218.    Tab
  1219.         If in insert mode, insert the appropriate number of spaces for a
  1220.         tab and move the cursor left.  If in overwrite mode, just move
  1221.         the cursor left w/o inserting text.
  1222.  
  1223.   #Tab
  1224.         Move cursor to previous tab.
  1225.  
  1226.   ^Tab
  1227.         Set ptabs and ltabs.
  1228.  
  1229.   @Tab
  1230.         Toggle smart tab mode.  Smart tab positions are determined by
  1231.         looking for the first, previous, non-blank line above the cursor
  1232.         and then positioning the cursor at the beginning of the next or
  1233.         previous word from the column of the cursor.  It's useful for
  1234.         building tables and formatted data files.
  1235.  
  1236.    #@T
  1237.         Toggle TabInflate mode.  In TabInflate mode, tabs are not
  1238.         physically expanded.  Tabs are filled with space to give the
  1239.         illusion of physical expansion.
  1240.  
  1241.  
  1242. Toggles:
  1243.  
  1244.    ^F1
  1245.         Toggle cursor sync.  Only cursor movement commands are synced.
  1246.         Commands that change text are not synced.
  1247.  
  1248.    ^F2
  1249.         Toggle eol display.  A special character is displayed in the
  1250.         column of the actual new line.
  1251.  
  1252.    ^F3
  1253.         Toggle writing <CR><LF>, <LF>, or nothing at end of line.  TDE
  1254.         will read a text file with lines that end in either method;
  1255.         however, you may want to write the file in a different method.
  1256.         I think *nix systems only want a <LF> of the end of line.
  1257.  
  1258.    ^F4
  1259.         Toggle trimming trailing space at the end of line.  A 'T' is
  1260.         displayed in the bottom right of the mode line to indicate
  1261.         trailing space is trimmed.
  1262.  
  1263.    ^F5 = Toggle search or sort case
  1264.         You can toggle the case flag at any time, even after you define
  1265.         the search pattern.
  1266.  
  1267.    Ins
  1268.         Toggle between insert and overwrite mode.
  1269.  
  1270.    @I
  1271.         Toggle between indent and no indent mode.  In indent mode, TDE
  1272.         searches for the first non-blank character on previous lines and
  1273.         places the cursor on that column when a carriage return is
  1274.         pressed.  When backspacing in indent mode, TDE lines up the
  1275.         indentation with the first non-blank character of the previous
  1276.         line(s).
  1277.  
  1278.    @R - Toggle ruler
  1279.         Toggle display of ruler in all visible windows.
  1280.  
  1281.    @V - toggle word wrap
  1282.         Toggle word wrap between Off, Fixed Wrap, and Dynamic Wrap.
  1283.  
  1284.    @Z
  1285.         Toggle writing Control Z at the end of file.  Some programs may
  1286.         misbehave if a Control Z is not at the end of the file.
  1287.  
  1288.  
  1289. Other keys:
  1290.  
  1291.    Enter
  1292.         Insert a newline at the cursor.  If the cursor is in the middle of
  1293.         a line, the line is split at the cursor.  Indentation is matched
  1294.         if the editor is in the Indent mode.
  1295.  
  1296.    #Enter
  1297.         Move the cursor down a line.  The cursor is placed on the first
  1298.         non-blank character in the next line.  No lines are added to the
  1299.         file.
  1300.  
  1301.    ^Enter
  1302.         Move the cursor down a line.  The cursor is placed on column 1 in
  1303.         the next line.  No lines are added to the file.
  1304.  
  1305.    Up (arrow)
  1306.         Move cursor up.
  1307.  
  1308.    Down (arrow)
  1309.         Move cursor down.
  1310.  
  1311.    Left (arrow)
  1312.         Move cursor left.
  1313.  
  1314.    Right (arrow)
  1315.         Move cursor right.
  1316.  
  1317.    Home
  1318.         Toggles between the first non-blank character and column zero.
  1319.  
  1320.    End
  1321.         Move cursor to the end of line character.
  1322.  
  1323.    Page Up
  1324.         Move cursor up one page.
  1325.  
  1326.    Page Down
  1327.         Move cursor down one page.
  1328.  
  1329.    ^Right
  1330.         Move cursor one word right.
  1331.  
  1332.    ^Left
  1333.         Move cursor one word left.
  1334.  
  1335.    ^#Right   (Control+Shift+Right)
  1336.         Pan the screen one character to the right.
  1337.  
  1338.    ^#Left    (Control+Shift+Left)
  1339.         Pan the screen one character to the left.
  1340.                                                 
  1341.    ^Home
  1342.         Move cursor to first line on screen.
  1343.  
  1344.    ^End
  1345.         Move cursor to last line on screen.
  1346.  
  1347.    ^Page Up
  1348.         Move cursor to first page in file.
  1349.  
  1350.    ^Page Down
  1351.         Move cursor to last page in file.
  1352.  
  1353.    Zip to line
  1354.         Move to line number.  TDE prompts for line number.  Press Escape
  1355.         to abort.
  1356.  
  1357.    Center
  1358.         The cursor is moved to the center of the current window.
  1359.  
  1360.   ^Center
  1361.         The line the cursor is on is moved to the center of the current
  1362.         window.
  1363.  
  1364.    Grey -  (on the key pad) or
  1365.    ^Down
  1366.         Scroll window up with cursor staying on same line in file.
  1367.  
  1368.    Grey +  (on the key pad) or
  1369.    ^Up
  1370.         Scroll window down with cursor staying on same line in file.
  1371.  
  1372.   @Grey Up (the arrow in the cursor/control cluster) or
  1373.   ^Grey -  (grey - on keypad)
  1374.         Cursor stays on same line of the screen as the file scrolls up.
  1375.  
  1376.   @Grey Down (the arrow in the cursor/control cluster) or
  1377.   ^Grey +  (grey + on keypad)
  1378.         Cursor stays on same line of the screen as the file scrolls down.
  1379.  
  1380.   @Grey PgUp
  1381.         Horizontal page left.
  1382.  
  1383.   @Grey PgDn
  1384.         Horizontal page right.
  1385.  
  1386.    ESC - undo line
  1387.         Get back the original unchanged line.  When cursor is moved off a
  1388.         line, all changes to the file are made and there is no way to get
  1389.         back the contents of a line.
  1390.  
  1391.    Del
  1392.         Delete the character, if any, under the cursor.
  1393.  
  1394.    ^Del
  1395.         Delete the characters in the file as if they were a stream.
  1396.         Lines will be joined at the cursor and eventually every
  1397.         character in the file may be deleted.
  1398.  
  1399.    Backspace
  1400.         Delete the character to the left of the cursor and move left.  If
  1401.         the cursor is on the first column of a line, the current line is
  1402.         joined with the line above.  If in indent mode and the cursor is
  1403.         on the first non-blank character, TDE matches the indentation of
  1404.         the previous line(s).
  1405.  
  1406.    @=
  1407.         Duplicates the current line.
  1408.  
  1409.    @-
  1410.         Deletes the text from the cursor to the end of line.
  1411.  
  1412.    ^Y
  1413.         Deletes current line, cursor does not move.
  1414.  
  1415.    @D
  1416.         Deletes current line, cursor does not move (exactly same as ^Y).
  1417.  
  1418.    @Y  or  ^U
  1419.         Undelete the most recently deleted line.  The undelete buffer has
  1420.         room for 200 lines of deleted text.  If more than 200 lines are
  1421.         deleted, the oldest line(s) are pushed out before the new one is
  1422.         added.  You may press ^U repeatedly to undelete all lines in the
  1423.         buffer.
  1424.  
  1425.         Deleted lines from line delete, delete to end of line, word
  1426.         delete, join line, and backspace are stored in the undelete
  1427.         buffer.
  1428.  
  1429.    @A
  1430.         Add a blank line below cursor.
  1431.  
  1432.    ^_  or Control underline
  1433.         Split line at column of cursor.  If in indent mode, the split line
  1434.         is autoindented.
  1435.  
  1436.    @J
  1437.         Join the current line with the line below.
  1438.  
  1439.    ^]
  1440.         Paren Balance.
  1441.  
  1442.    @1 - @3
  1443.         Set a file marker.  Each file may have up to 3 markers.
  1444.  
  1445.    #@1 - #@3    (Shift+Alt+1 thru Shift+Alt+3)
  1446.         Goto a previously defined file marker.
  1447.  
  1448.  
  1449.    ^@  (Control+At sign -- not Control+Alt.  Control+At sign is the first
  1450.           character in the ASCII character set, Control+2 on many keyboards)
  1451.         Writes the current system date and time at the column of the
  1452.         cursor.  Use tdecfg to set the desired year and time format.
  1453.  
  1454.    Control-Break
  1455.         In TDE, Control-Break will stop printing, sorting,
  1456.         search/replacing, and recursive macros.
  1457.  
  1458.  
  1459.  
  1460. WordStar style commands:
  1461.  
  1462.   A limited number of WordStar style commands are implemented in TDE.  I
  1463.   have no plans, whatsoever, to implement any additional WordStar style
  1464.   commands.  This implementation may not correspond exactly to the
  1465.   WordStar command convention.  WordStar is a trademark of WordStar
  1466.   International.
  1467.  
  1468.    ^A - word left
  1469.    ^B - format text
  1470.    ^C - screen down
  1471.    ^D - character right
  1472.    ^E - line up
  1473.    ^F - word right
  1474.    ^G - delete character
  1475.    ^H - backspace
  1476.    ^I - tab
  1477.    ^J - help
  1478.    ^K - n/a
  1479.    ^L - n/a
  1480.    ^M - return (carriage control, enter)
  1481.    ^N - add line below cursor
  1482.    ^O - n/a
  1483.    ^P - n/a
  1484.    ^Q - n/a
  1485.    ^R - page up
  1486.    ^S - character left
  1487.    ^T - word delete
  1488.    ^U - undelete line
  1489.    ^V - toggle insert mode
  1490.    ^W - scroll up line
  1491.    ^X - line down
  1492.    ^Y - delete line
  1493.    ^Z - scroll line down
  1494.    ^\ - redraw screen
  1495.  
  1496.  
  1497. Editor command summary:
  1498.  
  1499.    Function                      Description
  1500.  
  1501. Help                    Display instantaneous help screen
  1502. Rturn                   Insert newline and move down while matching indentation
  1503. NextLine                Move cursor to first character in next line
  1504. BegNextLine             Move cursor to first column in next line
  1505. LineDown                Move cursor down a line
  1506. LineUp                  Move cursor up a line
  1507. CharRight               Move cursor right one character
  1508. CharLeft                Move cursor left one character
  1509. PanRight                Pan screen one character right
  1510. PanLeft                 Pan screen one character left
  1511. WordRight               Move cursor to beginning of next word
  1512. WordLeft                Move cursor to beginning of previous word
  1513. ScreenDown              Page screen down
  1514. ScreenUp                Page screen up
  1515. EndOfFile               Move to the last page in a file
  1516. TopOfFile               Move to the first page in a file
  1517. BotOfScreen             Move cursor to bottom of current window
  1518. TopOfScreen             Move cursor to top of current window
  1519. EndOfLine               Move cursor to end of line
  1520. BegOfLine               Move cursor to first character in line or column 1
  1521. JumpToLine              Move cursor to line entered by user
  1522. CenterWindow            Move cursor to center of current window
  1523. CenterLine              Move current line and cursor to center of window
  1524. HorizontalScreenRight   Page screen right
  1525. HorizontalScreenLeft    Page screen left
  1526. ScrollDnLine            Scroll screen down 1 line and cursor moves with line
  1527. ScrollUpLine            Scroll screen up 1 line and cursor moves with line
  1528. PanUp                   Scroll screen up 1 line and cursor does not move
  1529. PanDn                   Scroll screen down 1 line and cursor does not move
  1530. ToggleOverWrite         Toggle insert/overwrite mode and cursor changes shape
  1531. ToggleSmartTabs         Toggle smart tab mode on/off
  1532. ToggleIndent            Toggle indent mode on/off
  1533. ToggleWordWrap          Toggle word wrap on/off
  1534. ToggleCRLF              Toggle CRLF/LF at eol when writing file to disk
  1535. ToggleTrailing          Toggle trim trailing space at eol
  1536. ToggleZ                 Toggle writing ^Z at eof
  1537. ToggleEol               Toggle display of eol character
  1538. ToggleSync              Toggle cursor sync
  1539. ToggleRuler             Toggle ruler display
  1540. ToggleTabInflate        Toggle expanding tabs in display
  1541. SetTabs                 Set file tabs
  1542. SetLeftMargin           Set left margin
  1543. SetRightMargin          Set right margin
  1544. SetParagraphMargin      Set paragraph margin
  1545. FormatParagraph         Format the entire paragraph according to margins
  1546. FormatText              Format from the cursor line to end of paragraph
  1547. LeftJustify             Left justify a line
  1548. RightJustify            Right justify a line
  1549. CenterJustify           Center justify a line
  1550. Tab                     Move cursor to next tab and add spaces if insert mode
  1551. BackTab                 Move cursor to previous tab and delete if insert mode
  1552. ParenBalance            Match (), {}, or [] under the cursor
  1553. BackSpace               Delete previous character
  1554. DeleteChar              Delete current character, but do not join lines
  1555. StreamDeleteChar        Delete current character and join lines if at eol
  1556. DeleteLine              Delete current line
  1557. DelEndOfLine            Delete from the cursor to the eol
  1558. WordDelete              Delete from the cursor to the end of word
  1559. AddLine                 Insert a blank line under the cursor
  1560. SplitLine               Split the current line at the cursor
  1561. JoinLine                Join next line with current line at the cursor
  1562. DuplicateLine           Duplicate the current line
  1563. AbortCommand            Abort editor functions
  1564. UndoLine                Get back the original contents of a line
  1565. UndoDelete              Get back up to the last 200 lines deleted text
  1566. ToggleSearchCase        Toggle match/ignore search case or sort case
  1567. FindForward             Prompt for pattern and search forward
  1568. FindBackward            Prompt for pattern and search backward
  1569. RepeatFindForward1      Repeat find forward and adjust cursor if needed
  1570. RepeatFindForward2      Repeat find forward and do not adjust cursor
  1571. RepeatFindBackward1     Repeat find backward and adjust cursor if needed
  1572. RepeatFindBackward2     Repeat find backward and do not adjust cursor
  1573. ReplaceString           Search and replace pattern forward/backward
  1574. DefineDiff              Define starting diff options
  1575. RepeatDiff              Find the next diff
  1576. MarkBox                 Mark start or end of a box block
  1577. MarkLine                Mark start or end of a line block
  1578. MarkStream              Mark start or end of a stream block
  1579. UnMarkBlock             Unmark a block
  1580. FillBlock               Fill a box block with prompted character
  1581. NumberBlock             Fill a box block with starting number using increment
  1582. CopyBlock               Copy a block to cursor and unmark block
  1583. KopyBlock               Copy a block to cursor and leave block marked
  1584. MoveBlock               Move a block to cursor and unmark block
  1585. OverlayBlock            Overlay a box block
  1586. DeleteBlock             Delete a block
  1587. SwapBlock               Swap contents of BOX block w/ cursor
  1588. BlockToFile             Write a marked block to a file
  1589. PrintBlock              Print a block or file
  1590. BlockExpandTabs         Expand tabs in marked LINE block using tab setting
  1591. BlockCompressTabs       Compress space to tabs in LINE block
  1592. BlockIndentTabs         Compress leading space to tabs in LINE block
  1593. BlockTrimTrailing       Trim trailing space from all lines in a line block
  1594. BlockUpperCase          Convert all lower case in block to upper case
  1595. BlockLowerCase          Convert all upper case in block to lower case
  1596. BlockRot13              Rotate alpha characters by 13
  1597. BlockFixUUE             Fix the ASCII-EBCDIC translation problem
  1598. BlockEmailReply         Prepend '>' to included mail blocks
  1599. BlockStripHiBit         Strip the high bit from all characters in block
  1600. SortBoxBlock            Sort line according to keys in box block
  1601. DateTimeStamp           Insert system time and date
  1602. EditFile                Editor prompts for file to edit
  1603. DirList                 List matching files in subdirectories
  1604. File                    Save file and quit window
  1605. Save                    Save file
  1606. SaveAs                  Save file under a new file name
  1607. SetFileAttributes       Set current file attributes
  1608. EditNextFile            Edit next file on command line
  1609. DefineGrep              Initial simple pattern and search files
  1610. RepeatGrep              Search and load next file that contains pattern
  1611. RedrawScreen            Redraw the screen
  1612. SizeWindow              Change size of current window
  1613. SplitHorizontal         Split current window horizontally
  1614. SplitVertical           Split current window vertically
  1615. NextWindow              Move to next window
  1616. PreviousWindow          Move to previous window
  1617. ZoomWindow              Make current window the maximum window size
  1618. NextHiddenWindow        Switch to next hidden window
  1619. SetMark1                Set a file marker
  1620. SetMark2
  1621. SetMark3
  1622. GotoMark1               Move cursor to previously defined marker
  1623. GotoMark2
  1624. GotoMark3
  1625. RecordMacro             Record keystrokes
  1626. PlayBack                Used in config file - play back keystrokes
  1627. SaveMacro               Save macro to a file
  1628. LoadMacro               Load macro from a file
  1629. ClearAllMacros          Clear the macro buffer
  1630. Pause                   Pause a macro
  1631. Quit                    Quit current window and file and abandon changes
  1632. NextDirtyLine           Move cursor to next dirty line, if it exists.
  1633. PrevDirtyLine           Move cursor to previous dirty line, if it exists.
  1634. FindRegX                Prompt for regular expression to find
  1635. RepeatFindRegX          Find next regular expression
  1636. RepeatFindRegXBackward  Find previous regular expression
  1637. DefineRegXGrep          Initialize grep function
  1638. PullDown                Pop-up Pull-down menu
  1639.