;
                        Z-System Display Editor vs 1.0

                         Copyright 1989 Carson Wilson   

            General Information               Command Descriptions   
      A-   Disk Space                 J-   Auto Indent, Block Cmds    
      B-   Error Messages                  Cursor Movement, Deleting  
      C-   File Modes                      Disk Opns, File Cmds       
      D-   Hyphenation                     Find/Replace, Header       
      E-   Interruption                    Information, Insert Mode   
      F-   Prompts                         Line Spacing, Margins      
      G-   Wordstar Compatibilty                                       
                                      K-   Pagination, Place Markers  
      H-   Macros                          Printer Codes, Printing    
                                           Ruler Line, Tabs           
            Program Development            Undelete, Upr/Lwr Case     
      I-   Improvements over VDE           Window and Screen          
           History                         Wordwrap, Reformat         
:a


Disk Space:

  ZDE isn't disk-bound; if you run out of disk space,  just  insert
      another  disk  (always  keep  a blank FORMATTED disk around).
      Alternatively, you can use the ESC-F and  ESC-E  commands  to
      purge unneeded files.  [If you have small disks, you can also
      install ZDE not to preserve BAK files.]

      Let ZDE's filesize limits encourage you to break work up into
      files  of  50K  or less; larger files make inefficient use of
      floppy disks.
:b              


Error Messages:

  Press ESC or Space to continue.  "Error" alone means the command  used
  just won't work in this situation.  (Example: a block command was used
  with no block marked.)  More specific errors are:

      "Out of Memory" - the file, block, or key string won't fit in RAM.

        "Invalid Key" - an illegal command key sequence was pressed.

          "I/O Error" - file not found, disk full, invalid drive, etc.

    "Cannot Reformat" - word too long, or margins invalid.

          "Not Found" - the object of a search was not found.

       "Syntax Error" - a macro programming command was misused.
:c


File Modes:

  ZDE has three "file modes": "W"ordStar document, "A"SCII document, and
  "N"on-document.  The basic difference  concerns  the  format  of  disk
  files.

  "W" mode, ZDE reads and  writes WordStar-compatible  files.   ZDE
      can   edit   a  WordStar  document,  except  that  any  right
      justification will be lost.  WordStar can edit  any  ZDE  "W"
      file in Document mode.

  "A"
  "N" mode,  ZDE  reads  and  writes  text  as standard ASCII 7-bit
      characters, a universal  format  accepted  by  virtually  all
      software.  The only difference between "A" and "N" modes lies
      in the default settings on loading a new file.  Typically "A"
      mode   is   used  for  word  processing,  and  "N"  mode  for
      programming and other technical applications.



         DEFAULTS FOR:            Margins     Tabs    Hard CR disp.

      "A"SCII or "W"ordStar mode  ACTIVE    VARIABLE      [ON]
      "N"on-document              DISABLED    HARD        OFF

      The file mode option can be specified along with the filename
      at any ZDE file function prompt, allowing you to mix WordStar
      and ASCII disk files as needed.   You  can  also  change  the
      current  mode  with  the  ^KN function by entering a new mode
      (eg, "[W") with or without a filename.

      [ZDENSTAL allows you  to  select  a default file mode,  to be 
      used  when  no mode is specified  (originally  this  is "A").  
      Further,  you can specify two  filetype  masks  for automatic 
      mode selection  (eg, all "ASM" files as "N" mode) to override
      that default.]



      NOTE ON ASCII FILES - The "A"SCII-document file  format  used
      since  VDE  2.50,  to  allow accurate formatting and WordStar
      compatibility, distinguishes  between HARD  and SOFT CRs (see
      WORDWRAP).   Consequently,  if you edit an ASCII file created
      by other software (including earlier versions of VDE), it may
      appear  to  be  full  of  hard CRs, making text impossible to
      reformat.  There are two easy ways  to  solve  this  problem:
      first,  you can use ^QA to find "^M"s and selectively replace
      them with " ^M".  Alternatively,  the  following Macro  (best
      stored  as  a  Quiet macro Key) does a good job of "softening
      up" paragraphs for reformatting:

             ^QS,^X,ESC=_],ESC=CR],^S,^V_^V,^D,ESC![
:d


Hyphenation:  ^OH

      ZDE can't introduce hyphens, but it does  recognize  them  in
      the  text,  treating  them  as  a legitimate place to break a
      line.  (So if you have a long word close to the  margin,  you
      can insert a hyphen where you'd like the word to be broken.)

      Similarly,  ZDE  can't  unhyphenate.   If  it  is  trying  to
      reformat and finds a hyphen at the end of  a  line,  it  will
      pause to ask you what to do with it.  You will see the prompt
      "Chg?" in the header, and can:

        Press "Y" to remove the hyphen and space, joining the word;
              "N" to leave the hyphen, but still join the word;
            "ESC" to leave both the hyphen and the space alone.



      Typically you would choose "Y" for "soft"  hyphens  that  you
      introduced to break up a word ("intro-duction"); "N" for hard
      hyphens that are part of a word ("vis-a-vis"); and "ESC"  for
      punctuation (dashes -- etc).  After your choice, reformatting
      will proceed automatically.


      You can toggle hyphenation on and  off  with  ^OH.   If  off,
      hyphens  are  not  treated  differently  from  any other text
      character.  [The ^OH default can be changed with ZDENSTAL.]
:e


Interruption:

  If ZDE gets interrupted by a message from some  other  software  (BIOS
  error,  resident  utilities,  etc), it may lose control of the screen.
  The best way to restore it to normal is by blanking and restoring  the
  screen (^OZ,ESC).
:f


Prompts:

  First,  ZDE  has  several  simple  prompts requiring you to confirm an
  action by typing "Y" or "N":

       "Abandon changes?"   - warns the file you  want  to  Quit
                              has been changed.
  "Unchanged! save anyway?" - reminds  the  file  you want saved
                              isn't changed.
         "Delete original?" - do you want to delete block copied
                              from 2nd file.
                     "Chg?" - do  you  want   to   change   this
                              instance of a string?



    Then, there are a few special purpose prompts:

         "Repeat count:"    - enter  (optional  "Q"  and) repeat
                              count for Macro.
           "Key number:"    - enter  (optional  "N/Q"  and)  key
                              number for Key.
                   "Rdy"    - press  any  key to print next page
                              (ESC quits).

      Finally, there are a variety of prompts for either numeric or
      string  input,  like  "Column:"  or  "Find string:".  You are
      expected  to  type in  a string (up to 65  characters).   The 
      following control keys operate:

         Correct mistake:     BS (^H), ^S, or Del
         Erase entire entry:  ^X
         Abort operation:     ^U



      Note that to get any of these codes, or a CR, into the string
      itself, you must precede it with ^P (this includes ^P).

         Examples: to find a line beginning with a "*" (find
         "^M,*") type

                     ^QF,^P-CR,*,CR.

      Now  to  get  this into a Macro with ESC-M, you would have to
      type
                     ESC-M,^QF,^PP,^P-CR,*,^P-CR,CR.
:g


WordStar Compatibility:

  In most respects ZDE operates much like WordStar; one  big  difference
  is  the absence of a "No-File" menu.  You are always in edit mode; use
  ^KL to select a new file to edit.

  If the keys ^J,^K,^L are in use as CP/M arrow keys, you must use ZDE's
  original command set to substitute for them as follows:

                         Block prefix (^K-)... ESC-
                         Help menu (^J)....... ESC-H
                         Repeat find (^L)..... ^\

  If  these  keys  are  NOT  installed  as arrow keys, they retain their
  WordStar  functions.   Then,  of  course,  ZDE  lacks  some   WordStar
  commands,  and  has  some of its own.  Aside from these, there are the
  following differences in common commands:


        COMMON USE      WORDSTAR 4     ZDE             ZDE NOTES

    Hide block            ^KH          ^KU      Actually unmarks block.
    Erase disk file       ^KJ          ^KE
    Set Place Mark       ^K0..9        ^PZ      Not individually numbered.
    Go to Place Mark     ^Q0..9        ^QP      Cyclic.

      COMMON COMMAND    WORDSTAR 4 USE                 ZDE USE

           ^^           Soften hard CR          Transpose upper/lowercase
           ^KN          Column block mode       Rename current work
           ^OD          Display ^P codes        Display hard CRs
           ^OF          Ruler from text         Flush right
           ^OP          Preview mode            Page length
           ^QU          Repeat align            Repeat undelete

  Note that ZDE does not implement  WordStar  "dot  commands"  in  text,
  though in "W" mode it will avoid printing them.
:h


Macro Definitions:

  ESC-M - A "macro" is a string of  ZDE  commands  and  text  that,
      once  defined,  can be repeated automatically.  When you type
      ESC-M you will be  asked  for  the  string,  then  a  "Repeat
      count".  Usually you will simply type a number for the repeat
      count (0-9, or "*" for "indefinitely").   You  will  see  the
      results  as  the  macro executes, and you can abort it at any
      time by pressing ESC.

      (If you are sure you know what you're doing, you can speed up
      Macro  execution by specifying "Quiet" mode: press "Q" before
      the repeat count. Only the header  will  be  updated  as  the
      Macro runs.)



      Macros also stop any time an error occurs; the error  message
      will  be  visible,  and can be cleared by pressing ESC.  Many
      commands (like Find or Reformat)  are  designed  to  generate
      errors  at  the  end  of the file so that an indefinite ("*")
      Macro containing them  will  halt  there.   Other  indefinite
      Macros may need to be aborted manually.

      ZDE turns INSERT OFF before running a macro, so that the same
      key sequence will always have the same  effect.   The  INSERT
      status is restored when the macro terminates.

      In order to include any input line editing characters (BS, CR
      etc) in a macro, you must prefix them  with  ^P.   (NOTE:  To
      make  them easier to read and understand, Macro listings will
      be given here as they function, not as they are typed in.  ^P
      prefixes as needed are  NOT shown.  Keystrokes  are separated
      by dashes or commas for clarity, and "_"  means  a  space  or
      blank.) Here are some sample Macros:

         1.  View a file by scrolling slowly through it:

                             ESC-;,^C

         2.  Can you figure out what this one does?  (Answer: .elif
             eht  fo dne eht ta meht fo tsil a gnikam elif a fo tuo
             sesehtnerap ni stnemmoc ekat lliw tI)

             ^QR,^QF,(,CR,^G,^KB,^QF,),CR,^G,^KK,^QC,CR,^KV

      ZDE  Macros are very powerful tools, particularly given their
      programmability and storage on function keys.


Macro Keys:  ESC-#, ESC-0..9

      Up to  10 MACRO KEYS can  be stored (0..9),  by entering them 
      with the ESC-M command,  then using ESC-# to save them.  They
      can then be recalled  and used  simply by typing  ESC-number.
      Example: typing ESC-#-0 will store the last Macro used in the
      ESC-0 command,  so that it can  be recalled and reused at any 
      future time simply by typing ESC-0.

      Ordinarily, Macro Keys operate just like the original  Macro:
      asking for  a "Repeat count" when executed.  If  you  want to
      suppress  this prompt  (resulting in  a  "function key"  that  
      executes only once)  you can  type "N" (for No repeat) before
      storing the  key number.   Example:  ESC-#-N-0  makes ESC-0 a 
      no-repeat macro key.  If you also don't need to see the Macro
      work,  and want  to make it faster,  you can make it QUIET as 
      well by typing "Q" instead (for Quiet) before the key number.
      Example: ESC-#-Q-0 stores to Key 0 as a quiet  no-repeat  key
      sequence.



      If the Macro (ESC-M) string is empty, using ESC-# will delete
      a Macro Key.   Using  a defined  Key makes it  the last macro 
      used,  so that it  can  be  stored  again  in  another key if 
      desired).  Trying to use an undefined Key results in an error.

      There are 500 bytes total available for all 10  keys,  and  a
      128  byte  limit for any one Key.  (ZDE's own input line will
      only accept 65 bytes, but ZDENSTAL can handle up to the  full
      128.)

      USAGE  HINT:  If you want to re-use a macro without having to
      type it in again, use ESC-# to assign it to a key, then  call
      it up by number.



   Besides simply storing Macros, here are some useful function Keys:

   1.  Storing different sets of margins (eg. for quotes): for example,

                         ^OL,12,CR,^OR,66,CR

   2.  Typing any frequently repeated phrase;  "ESC-6" is much more convenient
       than "^PSWorld Wide Widgets Ltd. (N.A.)^PS".

   3.  Swap the two characters preceding the cursor:

                         ^S,^S,^G,^D,^U,^U,^D,^G 

   [ZDENSTAL allows you to install a default set of macro Keys.   Thus ZDE can
   be  customized  for  any task,  such  as  the  formatting  requirements  of 
   specialized writing or programming languages.]



Macro Programming:  ESC-0..9, ESC-!,=,~,+,; 

      ZDE  has several commands  which  function  only  in  a Macro 
      string, and give  you control over the execution of  a macro, 
      allowing real programming.

   ESC-0..9, when in a Macro,  function  simply  as  "labels"  0..9.
      They have no effect, but can be "jumped" to by other commands.

   ESC-! followed by  0..9 is a simple  "jump" instruction, causing
      macro execution to resume  with  the  command  following  the
      label  ESC-0..9.  Example:  ESC!2  jumps  to label 2.  As two
      special cases, ESC-![ jumps to the beginning  of  the  Macro,
      and ESC-!] jumps to the end (aborts).



   ESC-=
   ESC-~,  followed  by a character and then  a label 0..9 (or "[",
      "]"),  are conditional jumps:  they jump to that label or the 
      start or end of the  macro IF  the  character  at  the cursor 
      position  matches  (ESC-=)  or  doesn't   match  (ESC-~)  the
      character specified.  Example:  ESC~^M2 jumps to ESC-2 if the
      current character is NOT a CR.

  ESC-=
  ESC-~,  followed  by  a character and then ">" or "<", are search
      loops.  They will continue to move the cursor right (">")  or
      left  ("<")  as  long  as the character at the cursor matches
      (ESC-=) or doesn't  match  (ESC-~) the  specified  character.  
      Both search loops terminate automatically at the beginning or
      end of the file.  Example:  ESC=_> moves right as long as the
      current character is a space.



  ESC-+, followed by 0..9, is used to "chain" to another macro key,
      allowing you  to build macro strings  longer than the storage 
      limit of any one key.   It does  not "call" the key; there is 
      no returning.  Example: ESC+9 chains to Key 9.

  ESC-; (semicolon) gives a brief pause, presumably so the user can
      see what's happening on screen.

      Macro programs are stored just like any  other  macro  string
      (usually  with  "N"o  repeat  count).   If  you program in an
      endless loop, you will at some point have to abort with  ESC.
      Don't make macro programs "Q"uiet until you're sure they work.



      Example: here is a good macro program (best stored as a Quiet
      Key) to move the cursor to the start of the current sentence:

              ESC~.1, ^S, ESC1, ESC~.<, ESC2, ^D, ESC=_2, ESC=^M2

      You could write this out in programmer's pseudo-code as:

              If not "." goto label1
              Move left                 ; Move left if already on
                                        ;   period
     label1:  While not "." move Left   ; Move left to previous
                                        ;   period
     label2:  Move right                ; Now move back right
              If " " goto label2        ;   as long as you see a
                                        ;   space
              If "^M" goto label2       ; Or a Return
              (all done)
:i :zdedev
:j :zdecmd1
:k :zdecmd2