home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d168 / dillonstuff.lha / doc / dme.doc < prev    next >
Text File  |  1988-11-22  |  41KB  |  1,050 lines

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