home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 103.lha / DME_1.29 / dme.doc < prev    next >
Text File  |  1980-07-10  |  37KB  |  841 lines

  1.  
  2. DME.DOC                 DME version 1.29                Matthew Dillon
  3.                           January 1988
  4.  
  5. DME V1.29 (C)CopyRight 1987, Matthew Dillon.  All Rights Reserved. This
  6. software may be distributed for non-profit only.  This software is NOT
  7. shareware.
  8.  
  9.     Matthew Dillon
  10.     891 Regal Rd
  11.     Berkeley, Ca. 94708
  12.  
  13.     Source is avalable:
  14.  
  15.         (1) By anonymous FTP to UCBVAX.BERKELEY.EDU (ARPANET)
  16.         (2) By regular mail (send a disk)
  17.         (3) By Electronic mail:
  18.             ARPANET:    dillon@ucbvax.berkeley.edu
  19.             USENET:     ...!ihnp4!ucbvax!dillon
  20.  
  21.     Donations welcome but not solicited (I ain't a starving artist).
  22.  
  23.     NOTE! Major Changes this release:  You can now copy/move between
  24.     windows.  MENU commands added
  25.  
  26.     NOTE! Major Changes last release:  You can now use open and close parenthesis
  27.     rather than open and close single quotes () vs `' to surround arguments.
  28.     Thus you can do: (') or `(', and foreign keyboards which do not have
  29.     `' can use parenthesis.
  30.  
  31.     icon by Bryce Nesbitt
  32.  
  33. ---------------------------------------------------------------------------
  34.  
  35. I   Overview
  36. II  Keymapping          key and mouse mapping
  37. III Command Sequences   DME commands
  38. IV  File Particulars    notes on loading and saving files,
  39. V   Workbench Support
  40. VI  Revision Summary    revision numbering, changes made, etc...
  41. VII Compiling           compiling instructions
  42.  
  43.                                     I
  44.                                  OVERVIEW
  45.  
  46. See REVISIONS section for revisions.  DME is an editor designed mainly for
  47. programmers.  Although it is not a word processor, it does include many
  48. word processing features such as Word-Wrap and automatic paragraph
  49. formatting.  Here is a quick 'features' list:
  50.  
  51.         -control language based on a rich command set accessed manually
  52.          or via arbitrary mapping of keys.  (Every key may be mapped to 128
  53.          different things via qualifier and mouse keys)
  54.  
  55.         -fast visual response (it scrolls quickly)... even faster when
  56.          BlitzFonts or similar text speedup utilities are installed.
  57.  
  58.         -title-line statistics showing your current position in the file,
  59.          file name, whether the file has been modified or not, etc...
  60.  
  61.         -Multiple Windows, ability to iconify windows
  62.  
  63.         -Word Wrap and automatic paragraph formatting.
  64.  
  65.         -ability to map any KEY or MOUSE BUTTON combination.
  66.  
  67. DME has been designed to allow easy expansion, and I intend to make many
  68. future improvments.  It has not been designed for user friendliness, but is
  69. straight forward if you read this document [care]fully.
  70.  
  71. DME can take any number of arguments.  Any argument without a '-' in front
  72. of it is considered to be a file.   Normally, DME will automatically SOURCE
  73. two script files, S:.EDRC, and the .EDRC in your current directory. These
  74. files do not have to exist.  These script files usually contain mappings
  75. and do things (for example, turn on savetabs).
  76.  
  77.     FLAGS:
  78.             -ffilename      -source this script file instead of .EDRC
  79.  
  80.             -b              -normally when multiple files are specified,
  81.                              DME opens them with small windows.  This opens
  82.                              them with normal sized windows.
  83.  
  84.             -tN     -Open the window on scan line N
  85.             -lN     -Open the window offset N scan columns
  86.             -wN     -Make the window N pixels wide
  87.             -hN     -Make the window N pixels high
  88.  
  89.  
  90.  
  91.                                     II
  92.                                  KEYMAPPING
  93.  
  94. MOUSE BUTTONS:
  95.  
  96.     The mouse buttons and combinations thereof may now be mapped.  The
  97.     default mappings for the mouse buttons are as follows:
  98.  
  99.     Left-button:    Move cursor to current mouse position
  100.     Right-button:   Iconify window
  101.     Left-button held down while moving mouse tracks the cursor
  102.  
  103.     The iconification features:
  104.         -Remembers original window size and placement
  105.         -Remembers placement of iconified window when you re-iconify later.
  106.  
  107.     Currently, you will crash the machine if you run out of memory and DME
  108.     is unable to open the icon window or original window, so be careful.
  109.  
  110.     see below for mapping the mouse buttons and mouse movement.
  111.  
  112.  
  113. KEYBOARD:
  114.  
  115. The rest of the Functional interface for DME is based on key/mouse mappings
  116. and a rich command set.  Unlike other text editors, any non-qualifier key
  117. in DME may have any meaning whatsoever.  It just so happens that the
  118. default keymappings assign such things as the `return' key to the RETURN
  119. function, the `up' key to the UP function, etc...  Keys are named by their
  120. keycap labels with the following exceptions:
  121.  
  122.     the name for Back-Space is  BS
  123.     the name for numeric keypad keys are prepended with an NK, except for
  124.     the Enter key which is named 'ENTER'.
  125.     The four cursor control keys are labeled UP, DOWN, LEFT, and RIGHT
  126.     The three mouse buttons are labeled RMB, MMB, and LMB.
  127.  
  128. NOTES:
  129.        The normal Amiga mouse has only two buttons, the Left and the Right
  130.        mouse buttons (LMB, RMB).  A properly installed three-button mouse
  131.        is also supported.
  132.  
  133.        You must type commands in lower-case, except for text, which can be
  134.        either lower or upper case, and for upper-case alpha keys when
  135.        specifying keymaps (i.e.  A and s-a are the same key).  The
  136.        exception is the AMIGA qualifier key, which uses 'A' instead of
  137.        'a'(Alt).
  138.  
  139.        Each key may be qualified with any combination of CTRL, ALT, SHIFT,
  140.        AMIGA, or any of the MOUSE buttons.  With 6 qualifiers (7 if your
  141.        mouse has a middle button), you can assign up to 64 (128) different
  142.        maps to each physical key on the keyboard.
  143.  
  144.        The CAPS-LOCK, when lit, is equivalent to SHIFT only for Alpha keys.
  145.  
  146.        The AMIGA-ALT (aA) combination isn't very usable since Intuition
  147.        uses the sequence to duplicate a Mouse SELECT.  Other AMIGA
  148.        sequences are used by intuition for mouse movement and other things.
  149.        Some other qualifier combinations may not be usable due to other
  150.        special sequences.
  151.  
  152.        Some keys must be mapped by their lower-case keycap.  That is, to
  153.        map the '>' key (USA keyboard), you specify shift dot (s-.)
  154.  
  155.  
  156.     ***EXAMPLES:***
  157.  
  158.     tab tab
  159.     a-a ALT a
  160.     A-a AMIGA a
  161.     sA-a        SHIFT AMIGA a
  162.     s-tab       SHIFT tab
  163.     c-tab       CTRL tab
  164.     ac-?        ALT-CTRL ?
  165.     s-f5        SHIFT F5
  166.     nk0 Numeric Keypad 0
  167.     cs-nk0      CTRL SHIFT Numeric Keypad 0
  168.     L-lmb       Left Mouse button pressed
  169.     L-mmove     Mouse moved while left mouse button held down
  170.     LR-lmb      left mouse button hit while right mouse button held down
  171.     s-.         shift . ('>' for USA keyboards)
  172.  
  173.     ***************
  174.  
  175. MAPPING MOUSE BUTTONS
  176.  
  177.     Mouse buttons serve both as QUALIFIERS and as KEYS.  Thus, you can map
  178.     both normal keystrokes which require a mouse button to be held down:
  179.  
  180.         map L-a ``left button and an a''
  181.  
  182.     as well as the mouse keys themselves:
  183.  
  184.         map L-lmb   ``left mouse key''
  185.  
  186.     note that you had to specify the left mouse button down qualifier L as
  187.     well as the left mouse button LMB.
  188.  
  189.     If you map the left mouse button, and also map a sequence such as left
  190.     mouse button + a:
  191.  
  192.         map L-lmb   tomouse
  193.         map L-a     ``hello''
  194.  
  195.     Note that the first mapping will always get executed even if you
  196.     intended L-a (that is, BOTH mappings would get executed).  In order
  197.     to avoid confusion you might want to UNMAP the system default mapping
  198.     for the right mouse button (mapped to ICONIFY) if you wish to apply
  199.     combinations to the right mouse button.
  200.  
  201.     MOUSE MOVEMENT is mapped with one or more mouse qualifiers (L, R, M),
  202.     plus 'MMOVE' for the key.  That is:
  203.  
  204.         map LR-mmove ``moving the mouse with both buttons held down''
  205.  
  206.     Or how bout capping the characters under the mouse while moving the
  207.     mouse?
  208.  
  209.         map LR-mmove `tomouse if cl `tlate -32''
  210.  
  211.  
  212.  
  213. DEFAULT KEYMAPPINGS:
  214.  
  215.     All Printable Ascii keys mapped to their ascii equivalent. BS, DEL, UP,
  216.     DOWN, LEFT, RIGHT, TAB, S-TAB, and ENTER are mapped properly.  These are
  217.     the default system keymappings.
  218.  
  219.  
  220.     map `a-c'       `bcopy'
  221.     map `a-d'       `bdelete'
  222.     map `a-down'    `scrolldown'
  223.     map `a-l'       `while cu `tlate +32 right''
  224.     map `a-m'       `bmove'
  225.     map `a-r'       `nextr'
  226.     map `a-s'       `bsource'
  227.     map `a-u'       `while cl `tlate -32 right''
  228.     map `a-up'      `scrollup'
  229.     map `bs'        `bs'
  230.     map `c-/'       `escimm `find ''
  231.     map `c-]'       `ref'
  232.     map `c-1'       `goto block'
  233.     map `c-b'       `block'
  234.     map `c-c'       `'
  235.     map `c-del'     `remeol'
  236.     map `c-down'    `pagedown'
  237.     map `c-esc'     `recall'
  238.     map `c-f'       `reformat'
  239.     map `c-g'       `escimm `goto ''
  240.     map `c-i'       `insertmode on'
  241.     map `c-j'       `join'
  242.     map `c-l'       `wleft'
  243.     map `c-n'       `next'
  244.     map `c-o'       `insertmode off'
  245.     map `c-p'       `prev'
  246.     map `c-q'       `quit'
  247.     map `c-r'       `wright'
  248.     map `c-s'       `split first down'
  249.     map `c-u'       `unblock'
  250.     map `c-up'      `pageup'
  251.     map `c-w'       `wordwrap toggle'
  252.     map `del'       `del'
  253.     map `down'      `down'
  254.     map `enter'     `return'
  255.     map `esc'       `esc'
  256.     map `f1'        `escimm `insfile ''
  257.     map `f10'       `saveold quit'
  258.     map `f2'        `escimm `newfile ''
  259.     map `f3'        `escimm `newwindow newfile ''
  260.     map `f6'        `saveold iconify'
  261.     map `f7'        `escimm `bsave ''
  262.     map `f8'        `saveold escimm `newfile ''
  263.     map `f9'        `saveold'
  264.     map `L-lmb'     `tomouse'
  265.     map `L-mmo'     `tomouse'
  266.     map `left'      `left'
  267.     map `R-rmb'     `iconify'
  268.     map `return'    `return insline up firstnb down'
  269.     map `right'     `right'
  270.     map `s- '       `` ''
  271.     map `s-del'     `deline'
  272.     map `s-down'    `bottom'
  273.     map `s-left'    `first'
  274.     map `s-right'   `last'
  275.     map `s-tab'     `backtab'
  276.     map `s-up'      `top'
  277.     map `sa-s'      `unblock block block bsource'
  278.     map `tab'       `tab'
  279.     map `up'        `up'
  280.  
  281.  
  282.  
  283.                                     III
  284.                              COMMAND SEQUENCES
  285.  
  286. DME has a rich command set which allows you to embed commands within
  287. commands, or specify multiple commands in a row.  A command consists of a
  288. KEYWORD followed by a FIXED number of arguments (0, 1, 2...).  The argument
  289. delimeter in DME is a SPACE.  Therefore, to embed strings containing spaces
  290. as a single argument, you must surround the string with `string'
  291. (backsinglequote-string-singlequote).  TEXT to be written as if typed is
  292. also specified via a string in backquote-quotes.  For example:
  293.  
  294.     right right `hello' right right `hello' enter down
  295.     map f4 `right right' map f5 `left left'
  296.     map f4 ``hello''
  297.  
  298. Reiterating (because this is important!)... If a command expects ONE
  299. argument, then it really does expect a single argument, and any remaining
  300. arguments are thought to be the next command... so:
  301.  
  302.     map f4 right
  303.                                     -right is only one word, so no need
  304.                                      for `'.
  305.     map f4 `right right'
  306.                                     -we want to map f4 to two rights... we
  307.                                      need the `' or the second right will
  308.                                      not be part of the map.
  309.  
  310.     map c-del `repeat cright del'
  311.                                     -this is already implimented as REMEOL,
  312.                                      but shown here for clarity.
  313.  
  314. Some arguments will eventually be fed through the command interpreter more
  315. than once.  The MAP command is a good example.  When you execute a MAP
  316. command, the first run through the command interpreter installs the map
  317. string minus a set of quotes.  So, if you want to specify text, you must
  318. enclose the text in two sets of ``text'' because the map string gets passed
  319. through the command interpreter again when you hit the mapped key.  Here
  320. are some more complex examples:
  321.  
  322.     map f4 `right right `hello' left left'      *RIGHT*
  323.     map f4 right right hello left left          *WRONG*
  324.  
  325.     map f4 `map f4 ``hello'''
  326.                                     -the first time you hit F4, it's command
  327.                                      is to re-map itself to the TEXT `hello'.
  328.                                      (gads!).
  329.  
  330.     map c-i `repeat tr `` '''
  331.                                     -example of how to embed a space in a
  332.                                      map and repeat (goes through command
  333.                                      interpreter three times!).
  334.  
  335.  
  336. An easy way to fool around executing commands or making maps is either to
  337. use the ESC key (which enters command mode), or  a-S (alt-shift-s), which
  338. EXECUTES the current DME line that the cursor is on.... so you can use DME
  339. to edit and test your new keymappings.
  340.  
  341.  
  342.     COMMAND LIST
  343.  
  344.     `text'          -enter text as if typed.
  345.     key             -execute a keymap as a macro (example:  c-a)
  346.     header-item     -execute a menu item as a macro (example: Project-Save)
  347.                      (case independant)
  348.     ARPLOAD         -NEWFILE filerequestor only if ARP.LIBRARY installed
  349.     ARPSAVE         -SAVEAS  filerequestor only if ARP.LIBRARY installed
  350.     BACK            -same as BS
  351.     BACKTAB         -backward tab
  352.     BCOPY           -copy block before cursor line
  353.     BDELETE         -delete the block
  354.     BLOCK           -Set start or end of block
  355.     BMOVE           -move block before cursor line
  356.     BOTTOM          -Move to Bottom of File
  357.     BS              -backspace, (delete char to left of cursor)
  358.     BSAVE file      -save the block to a file
  359.     BSOURCE         -source current text block as if it were a script file
  360.     CHFILENAME name -change the name of the working file
  361.     DEL             -delete, (deletes char under cursor)
  362.     DELINE          -delete line
  363.     DOWN            -cursor down
  364.     DOWNADD         -cursor down.  If at bottom of text, add a line.
  365.     ESC             -toggle manual command entry mode
  366.     ESCIMM arg      -go into command entry mode prompting with a
  367.                      predefined string.
  368.     EXECUTE comm    -Execute a CLI command
  369.     FIND string     -SET the search pattern and do a NEXT
  370.     FINDR s1 s2     -Set find and replace patterns and do one find/rep.
  371.     FINDSTR string  -SET the search string pattern
  372.     FIRST           -move to column 1
  373.     FIRSTNB         -Move to first non-blank in line.
  374.     GOTO BLOCK      -Goto the beginning of the marked block.
  375.     GOTO START      -same as GOTO BLOCK.  undefined if no block
  376.     GOTO END        -goes to the END of the marked block.  undef. if no blk.
  377.     GOTO [+/-]N     -Goto an absolute or relative line number
  378.     HEIGHT N        -set height in PIXELS for any new windows
  379.     ICONIFY         -iconify the window
  380.     IF cnd act      -IF/WHILE/IFELSE.. SEE BELOW
  381.     IFELSE cnd ifact elseact
  382.     INSERTMODE what -set INSERTMODE.  what = on, off, or toggle
  383.     INSFILE name    -insert a file into the current text.
  384.     INSLINE         -insert line
  385.     JOIN            -join next line to line at cursor
  386.     LAST            -move one beyond the last non-space in a line.
  387.     LEFT            -cursor left
  388.     LEFTEDGE N      -set leftedge on the screen in PIXELS for any new window
  389.     MAP key map     -map a key to a keymap
  390.     MARGIN N        -set WordWrap and paragraph formatting margin
  391.                      (related to WORDWRAP and REFORMAT)
  392.     MENUADD hdr item cmd    -add menu item
  393.     MENUDEL hdr item        -delete menu item
  394.     MENUDELHDR hdr          -delete menu header
  395.     MENUCLEAR               -delete entire menu
  396.     MENUON                  -enable menus  (multiple calls are stacked)
  397.     MENUOFF                 -disable menus (multiple calls are stacked)
  398.     NEWFILE name    -replace current text with new file
  399.     NEWWINDOW       -open newwindow
  400.     NEXT            -find next occurance of search pattern
  401.     NEXTR           -find next occurance and replace
  402.     PAGEDOWN        -pagedown a partial page (see PAGESET)
  403.     PAGESET n       -n PERCENT (0 to 100). page step size relative to the
  404.                      current number of rows in the window.
  405.     PAGEUP          -pageup a partial page (see PAGESET)
  406.     PREV            -find previous occurance of search pattern
  407.     PREVR           -find previous occurance and replace
  408.     QUIT            -quit
  409.     RECALL          -recall most recently entered command.  Must be used
  410.                      from a keymap (c-esc).
  411.     REF             -reference string under cursor (see below)
  412.     REFORMAT        -reformat paragraph using the margin.
  413.     REMEOL          -Remove text under and beyond the cursor.
  414.     REPEAT cnt comm -SEE BELOW
  415.     REPSTR string   -SET the replace string pattern
  416.     RESETTOGGLE N   -clear toggle array entry N(0..31)
  417.     RESIZE cols rows-Resize current window. E.G:  `resize 70 23'
  418.     RETURN          -same as `FIRST DOWNADD'
  419.     RIGHT           -cursor right
  420.     SAVEAS file     -save current text under a different name (title
  421.                      line name does not change)
  422.     SAVEMAP file    -save user keymappings
  423.     SAVEOLD         -save current text under current name
  424.     SA,M*SP( fZ6e   K>x{a a Z=Y~{ppings, including system keymaps
  425.     SAVETABS on/off -Optimize file saves by crunching spaces to tabs.
  426.                      The default is OFF.
  427.     SCANF ctlstr    -scan the string at the current text position (C scanf)
  428.                      example:   `scanf %s'          SEE BELOW
  429.     SCREENBOTTOM    -Move cursor to the bottom of the screen.
  430.     SCREENTOP       -Move cursor to the top of the screen
  431.     SCROLLUP        -Scroll up without moving cursor
  432.     SCROLLDOWN      -Scroll down without moving cursor
  433.     SETTOGGLE N     -set toggle array entry N  (0..255)
  434.     SOURCE file     -source a script file. '#' in first column for comment
  435.     SPLIT           -Split line at cursor
  436.     TAB             -forward tab
  437.     TABSTOP N       -Set tab stops every N.  does not effect text load
  438.     TLATE [+/-]N    -translate character by +N or -N, or set character
  439.                      to exactly N if no + or -. (e.g. TLATE +65 TLATE 3)
  440.     TOGGLE N        -flip toggle array entry N (0..255)  (See IF)
  441.     TOMOUSE         -moves cursor to mouse position
  442.     TOP             -Move to Top of File
  443.     TOPEDGE N       -set topedge in the screen in PIXELS for any new window
  444.     UNBLOCK         -clear the block markers for the current window
  445.     UNMAP key       -unmap a key
  446.     UP              -cursor up
  447.     WHILE cnd act   -(see below)
  448.     WIDTH N         -set width in PIXELS for any new window
  449.     WLEFT           -move to beginning of previous word.  If in the
  450.                      middle of a word, move to beginning of current word.
  451.     WORDWRAP on/off/toggle
  452.                     -Word Wrap mode (related to MARGIN)
  453.     WRIGHT          -move to beginning of next word
  454.  
  455.  
  456.  
  457.     -------------    More Info on Complicated Commands  -----------------
  458.  
  459.     MENUOFF/ON      -This command will enable/disable menus.  Users
  460.                      who have a whole bunch of MENUADD commands in
  461.                      their .EDRC should note that disabling menus at
  462.                      the beginning will speed up the MENUADD commands.
  463.                      Then reenable menus at the end.  These calls are
  464.                      stackable in that if you call MENUOFF, say, twice,
  465.                      it will take two MENUON commands to restore
  466.                      menus.  The reverse is not true.
  467.  
  468.     REF     (c-])   -(1.28d and beyond).  This is a very powerful new
  469.                      command that allows you to bring up a reference to
  470.                      a keyword with a single keystroke.  This is useful for
  471.                      programmers who have on-line documentation or fully
  472.                      commented include files.  DME opens a window just big
  473.                      enough to fit the reference.
  474.  
  475.                      The reference keyword is the alpha-numeric string
  476.                      currently under the cursor.  REF will attempt to find
  477.                      a match in the file DME.REFS, S:DME.REFS,
  478.                      DF0:S/DME.REFS ... DF3:S/DME.REFS.  This file must be
  479.                      built by the user.  Each line has the following format:
  480.  
  481.                      `keyword' `#lines' `file' `search string in file'
  482.                                             OR
  483.                      `keyword' `endstring' `file' `search string in file'
  484.  
  485.                      Surrounding the keywords with `' or () is optional if
  486.                      the keyword does not contain spaces.
  487.  
  488.                         keyword     -keyword under cursor
  489.                         #lines      -number of lines to include from
  490.                                      specified file
  491.                         file        -the file containing the reference
  492.                                      material
  493.                         searchstr   -search string in file that indicates
  494.                                      the beginning of the reference
  495.                         endstring   -alternately, the #lines can be a string,
  496.                                      in which case a match indicates the end
  497.                                      of the reference in the file.
  498.  
  499.                      Upon finding a successful keyword match the specified
  500.                      file is openned and the seach string searched for.  If
  501.                      found, the indicated number of lines (or until a match
  502.                      with the endstring) is placed in a temporary file and
  503.                      a new DME window brought up.  The temporary file is
  504.                      then deleted.
  505.  
  506.                      When looking for matches, the compare is anchored at
  507.                      the beginning of each line in the file.  Thus, any
  508.                      spaces in front of the string in the file must be
  509.                      duplicated.
  510.  
  511.                      T: must be assigned to a temporary directory, usually
  512.                      RAM:   See the included example DME.REFS file.  The
  513.                      most common things referenced are the autodocs and
  514.                      commented include files.
  515.  
  516.                      Some modification of the included DME.REFS.* files may
  517.                      be required due to differences in include file and
  518.                      autodoc format.
  519.  
  520.                      NOTE!  Since DME searches DF0:..DF3: and other standard
  521.                      places automatically for the reference file, one
  522.                      usually bundles the reference file in the S directory
  523.                      of the floppy containing the reference material, making
  524.                      for clean bookeeping.
  525.  
  526.     SCANF ctlstr    -This is equivalent to the C scanf() function with the
  527.                      restriction that only one conversion is allowed, that
  528.                      conversion being a string.  Thus:
  529.  
  530.                      scanf %s       will place the string under the
  531.                                     cursor in the variable $scanf
  532.  
  533.                      scanf %4s      The first four chars of the string.
  534.  
  535.                      scanf %[0123456789]
  536.                                     will scan the string while it contains
  537.                                     specified chars (e.g. scan a number)
  538.  
  539.                      scanf %[~,]    will scan the string until it finds
  540.                                     a ','.
  541.  
  542.                     The variable $scanf may be used as an argument in any
  543.                     command.  Example:  `insfile $scanf'
  544.  
  545.  
  546.     REPEAT N arg    -Repeat `arg' N times.  Apart from being a number, N
  547.                      can also be one of:
  548.  
  549.                         line    Current line # (lines begin at 1)
  550.                         lbot    #lines to the bottom, including current line
  551.                         cleft   column # (cols begin at 0)
  552.                         cright  #chars to eol, including current char under cursor
  553.                         tr      #char positions to next tab
  554.                         tl      #char positions to next back tab
  555.  
  556.                     Certain commands can abort a REPEAT loop.
  557.                     Specifically, any FIND[R], NEXT[R], or PREV[R] in which
  558.                     the search string is NOT found will abort a REPEAT.
  559.                     Most operations which can go out of bounds, such as
  560.                     UP, LEFT, RIGHT, DOWN, also abort a repeat.
  561.  
  562.                     Specifying -1 as N causes REPEAT to go on forever
  563.                     (well, actually, 0xFFFFFFFF times) or until an abort.
  564.  
  565.     IF [!]condition arg
  566.     WHILE [!]condition arg
  567.     IFELSE [!]condition arg else arg
  568.  
  569.             If the specified condition is true, execute the argument.  For
  570.             WHILE, the argument is executed until the condition is false
  571.             (be careful!).
  572.  
  573.             the optional '!' inverts the logic.
  574.  
  575.             Conditions:
  576.  
  577.  
  578.             #       if toggle entry # is SET.  there are 256 toggles (0..255)
  579.             t       if On line 1
  580.             b       if On last line
  581.             l       if At column 0
  582.             r       if At end of line (spaces below and beyond)
  583.             m       if Text has been modified
  584.             i       if in insert mode
  585.             x[<=>]# if column position (starts at 1) is (any OR combo of
  586.                     <, =, or >) than some number.  Example:   x<=20
  587.             y[<=>]# if Line number (starts at 1) is (same as for x)
  588.             cl      character under cursor is lower case alpha
  589.             cu      character under cursor is upper case alpha
  590.             ca      character under cursor is alpha-numeric
  591.             cn      character under cursor is numeric
  592.             c[<=>]# character under cursor is ascii code # (# in decimal)
  593.                     optional conditionals as in 'x' and 'y'.
  594.             cb      cursor within a block
  595.  
  596.         Example: simulating an insert mode toggle: ALT-i (not CTL-i)
  597.  
  598.     map a-i `ifelse 0 `toggle 0 insertmode OFF' `toggle 0 insertmode ON''
  599.  
  600.         Example: while lower case, map to upper case and move right.
  601.  
  602.     map c-U `while cl `tlate -32 right''
  603.  
  604.         Example: Search/Replace all of text.
  605.  
  606.     map c-R `escimm `findstr ' escimm `repstr ' repeat -1 nextr'
  607.  
  608.      if c<32 ``char under cursor is smaller than 32''
  609.      if c<>32 ``char under cursor is not equal to 32''
  610.      while !b down
  611.  
  612.  
  613.                                     IV
  614.                              FILE PARTICULARS
  615.  
  616. No Matter what you set internal tabs to, tabs in disk files will be 8.
  617. This allows you to use your favorite tabs stops (mine are 4) and still
  618. have your disk files compatible with TYPE, a printer, etc...  DME by
  619. default doesn't bother to optimize when writing out files and simply uses
  620. spaces. If you `SAVETABS on' before saving (or in your S:.EDRC, etc...),
  621. DME will attempt to optimize the file by placing TABS in appropriate
  622. places.  DME will not place any TABS after the first single, back, or
  623. double quote is encountered in a line.  If this does not cover every
  624. situation in your particular application that you want to be *sure* no tabs
  625. will occur in sensitive sections, then you should not use `SAVETABS on'.
  626.  
  627. It should be noted that since DME removes spaces at the end of the line,
  628. editing UUENCODED ascii files will not work for uuencoded lines which end
  629. with a space.  The nominal fix is to add an extra character after each
  630. uuencoded line (anything) in the proper column, which is ignored by the
  631. UUDECODE program.
  632.  
  633. The command to save the current document under the default name is SAVEOLD,
  634. *not* SAVE.  SAVE is not a valid command.  This is to prevent people who
  635. have not read the documentation from assuming 'save' takes an argument (and
  636. screwing up their work).  SAVEOLD does NOT take an argument, SAVEAS does.
  637.  
  638. SAVEOLD/SAVEAS do not automatically backup the destination file.  If you
  639. are working in an enviroment where you are worried about ensuring a viable
  640. copy can be recovered if your Amiga crashes in the middle of the save, you
  641. can write a macro to save the file into two places.  Usually, people backup
  642. their working disks so this is not neccesary.
  643.  
  644. Workbench Support:  If DME is run from the workbench, it will automatically
  645. construct an icon file when you save a document.  If run from a CLI, no
  646. icon file is generated.
  647.  
  648.                                     V
  649.                               WORKBENCH SUPPORT
  650.  
  651. DME V1.26 and beyond support the workbench in the following way:  (1) you
  652. can click on the DME icon to bring up DME with the file "unnamed".  (2) you
  653. can select one or more standard ascii documents which have DME as the
  654. default tool.  If DME has no knowlege of a text icon, it uses its own.
  655. Command line arguments are passed to DME via the tooltypes entries for
  656. DME's application icon or via individual document icons.  The following
  657. format is used:  (This is a hack, no?)
  658.  
  659.     ARG=flag
  660.  
  661.     See the OVERVIEW section for allowed flags.  Only one argument per line
  662.     is allowed (sorry).  The tooltypes for the application icon are
  663.     processed first, then the tooltypes for each document icon are
  664.     processed before each file is loaded.
  665.  
  666.     ARG= -t10
  667.     ARG= -l10
  668.  
  669.                                     VI
  670.                               REVISION SUMMARY
  671.  
  672. V1.29  RELEASE
  673.  
  674.     -Foreign keyboards supported better.
  675.     -Iconify window is activated rather than not activated.
  676.     -can keymap keys which normally produce nothing.
  677.     -blocks are displayed in a different color
  678.     -can now move/copy across windows
  679.     -can now resize window while file loading
  680.     -new commands ARPLOAD ARPSAVE   (uses ARP filerequestor if arp.library)
  681.      MENUADD MENUDEL MENUDELHDR MENUCLEAR MENUOFF MENUON
  682.  
  683.     minor bugs fixed, major remodeling of the source (this is what I
  684.     use my vacation for!)
  685.  
  686.     menus:  the right mouse button may be mapped only if there is no
  687.     menu, Else is used as the menu selector.  NOTE! It is much faster
  688.     to surround a set of MENUADD commands in a source file with
  689.     MENUOFF at the beginning and MENUON at the end.  You can also specify
  690.     menu items as macros in other commands (example: project-save)
  691.  
  692. V1.28h SMALL RELEASE    references work better
  693.  
  694. V1.28g SMALL RELEASE    Fixed NK0 bug in 1.28f plus keymap problems in 1.28f
  695.  
  696. V1.28f RELEASE
  697.     Fixed macro bug created in 1.28e... could not specify macros on the
  698.     command line.
  699.  
  700. V1.28e INTERNAL/BETA
  701.     New Commands:   REF     (c-])   -cross reference the word under the
  702.                                      cursor and bring up a new window
  703.                                      containing a description for that
  704.                                      word.  See docs above.
  705.  
  706.     -The keymapping has been fixed and should now work on any foreign
  707.      keyboard.
  708.     -MAJOR ADDITION:  () may be used instead of `' to enclose commands.
  709.      One can enclose the other ... that is, to get the "'" character you
  710.      can say (this is a charlie's day).
  711.  
  712. V1.28c RELEASE
  713.     New Commands:   CHFILENAME      -change default filename for a window
  714.                     RECALL  (c-esc) -recall command line (e.g. you make a
  715.                                      mistake).  Must be used from a keymap,
  716.                                      default is c-esc.
  717.  
  718.                     SCANF           -C scanf (single string only).  Extract
  719.                                      strings from the text for use in any
  720.                                      arbitrary command.
  721.  
  722.     Command Parser: $scanf          -as an argument by itself is recognized
  723.                                      to be the extracted string from scanf.
  724.                                      Currently, the variable name (after
  725.                                      the dollar) can be anything since only
  726.                                      one variable exists, but use '$scanf'
  727.                                      for future compatibility.
  728.  
  729.     -Many Bug fixes (mainly benign bugs)
  730.     -^C (CONTROL C) now recognized when typed in a window.  c-c is mapped
  731.      to `' (no action).
  732.     -Please look at the revised default keymappings listed in these docs.
  733.  
  734.  
  735. V1.28 LIMITED RELEASE
  736.     New Commands :  SCROLLUP    (a-up)
  737.                     SCROLLDOWN  (a-down)
  738.     Modified Cmds:  ESCIMM
  739.         The execution of commands specified by an ESCIMM is blocked until
  740.         the user hits return on the ESCIMM command line.
  741.  
  742.                     BCOPY
  743.         No longer unblocks the block.
  744.  
  745.     -Title bar status line no longer blinks when it changes
  746.     -Key releases no longer effect operation
  747. V1.27 RELEASE
  748.     -macros run about 20% faster due to hashing of the command table
  749.     -Maximum # of toggles raised to 256 (see IF/WHILE)
  750.     -small fixes to the code (nothing major)
  751.     -child windows inherit tab stops, insert mode, and wordwrap mode
  752.     -MOUSE BUTTONS AND MOVEMENT CAN NOW BE MAPPED
  753.     -New Commands: ICONIFY      (used to be hardwired.  Is now a command)
  754.     -Extended Commands: GOTO    (GOTO END of block)
  755. V1.26 Beta, minimal Release
  756.     -Workbench support
  757.     -New Command:   EXECUTE
  758. V1.25 RELEASE
  759.     -BSAVE does NOT UNBLOCK after saving (switch in functionality yet again)
  760.     -various bugs fixed (IF, tabs on file save)
  761.     -New Commands: MARGIN, REFORMAT, WORDWRAP, RESIZE,
  762.                    TOPEDGE, LEFTEDGE, WIDTH, HEIGHT
  763.     -Command line options added for setting the window size and an optional
  764.      specified script file (when specified, local .EDRC not sourced).
  765.  
  766.     -Enhanced Commands: IF  ..more control with conditions, addition of
  767.                               a couple more specifications.
  768.                        JOIN .. functionality slightly changed
  769.     -keymaps may now be used as macros in other commands. (macros)
  770.     -New keymaps added to the default set.
  771.     -Mouse movement cleaned up a little.
  772.  
  773. V1.24 Internal
  774.  
  775. V1.23 RELEASE
  776.     -S:.EDRC now sourced instead of C:.EDRC
  777.     -User keymappings now work in COMMAND mode (when you hit ESC).
  778.     -You can now map the Amiga keys ('A' for Amiga, since 'a' is alt).
  779.     -Enhanced Commands: IF/IFELSE/WHILE (optional '!' in front of cond)
  780.                         new condition 'cb' 'character in selected block'
  781.                         GOTO (can now say `goto block')
  782.     -NewCommands:    PAGESET SAVETABS
  783.     -Writing TABS (always 8) out to disk to save space now supported.
  784.  
  785. V1.22 RELEASE (BUF FIXES FROM 1.20)
  786.     -'newfile' fixed
  787. V1.21 RELEASE (BUG FIXES FROM 1.20)
  788.     -iconify and window handling fixed
  789.     -left mouse button now tracks the mouse.
  790. V1.20 RELEASE
  791.     -bug fixes: bsave now unmarks the block, bdelete now sets 'modified' flag.
  792.             (other small fixes).
  793.     -enhancements: overwrite mode status indicator, find, find-replace now
  794.             completely implemented (yahhoo!!!)
  795.     -changed commands:  FIND NEXT PREV: no longer loop back to the top of
  796.             file or top->bottom in the case of PREV.  DELINE will now delete
  797.             text on the line if there is only one line of text.
  798.     -enhanced commands: GOTO REPEAT
  799.     -new commands: SAVEMAP SAVESMAP TOGGLE SETTOGGLE RESETTOGGLE TLATE
  800.                    IF IFELSE WHILE BSOURCE
  801.                    FINDSTR REPSTR FINDR NEXTR PREVR
  802.                    NEWWINDOW
  803.     -new keymappings: (see a-s, a-S, f3)
  804.     -window iconification with mouse menu button.
  805.  
  806.  
  807. V1.12 RELEASE
  808.     -cursor is now pen #3 rather than #1.
  809.     -changeover to AZTEC C, smaller executable.
  810.     -now maps shift space to a space.
  811.     -new commands: REMEOL, WLEFT, WRIGHT
  812.     -display bug fixes (SPLIT)
  813.     -FIND/PREV/NEXT will now abort a REPEAT if string not found.
  814.  
  815. V1.11 RELEASE NOTES
  816.     -Bug fixes (mainly graphical mistakes).
  817.     -User keymappings are disabled in command mode (so you can unmap
  818.       single ascii characters you may have mapped).
  819.     -Illegal key combinations no longer give garbage (e.g. ALT-CURSOR-DOWN)
  820.       you can, of course, still map them to anything you wish.
  821.     -Save now checks for error conditions on write.
  822.     -Uses Default Console Keymap (i.e. no longer assumes USA)... but there
  823.       *is* some stangeness.
  824.  
  825. V1.00 RELEASE NOTES
  826.     -has find, but no replace function
  827.     -assumes USA keyboard                   (fixed 1.11)
  828.     -disk files written out use spaces instead of tabs&spaces
  829.  
  830.  
  831.                                     VII
  832.                                 COMPILING
  833.  
  834. DME compiles only under AZTEC.  You must compile with the 32 bit int
  835. option, but may use the small code/data model.  A support lib which I have
  836. created (SUP32.LIB) is also required.  I use a precompiled symbol file
  837. containing ALL the AMIGA includes (but not any Aztec standard includes).
  838.  
  839.  
  840.  
  841.