home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 090.lha / DME_v1.28 / Dme.doc < prev    next >
Text File  |  1986-11-20  |  33KB  |  768 lines

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