home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 171.lha / DME_v1.30 / dme.doc < prev    next >
Text File  |  1988-04-28  |  41KB  |  1,039 lines

  1.  
  2. DME.DOC         DME version 1.30C        Matthew Dillon
  3.               4 Sept 1988
  4.  
  5. DME V1.30C  (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.  
  362.     Other variables cause a search of three variable domains to find the
  363.     contents.  For example, if you give  $DMEFONT:
  364.  
  365.     (1) An Internal variable named DMEFONT is searched for.  Internal
  366.         variables are case sensitive.  (see SET, UNSET)
  367.  
  368.     (2) An Enviroment variable name DMEFONT is searched for.  Enviroment
  369.         variables are NOT case sensitive.  (see SETENV, UNSETENV).  The
  370.         1.3 ENV: is used.
  371.  
  372.     (3) A DME keymap or menu definition named DMEFONT is searched for.
  373.         This allows you to say something like $sa-tab to insert the
  374.         contents of the shift-alt-tab keymap.   (see MAP, UNMAP, and
  375.         MENU oriented commands).
  376.  
  377.     The reason for the other two forms of variable specifiction is to allow
  378.     one to access strangely named variables (with puncuation and other crap).
  379.  
  380.     SPECIAL NOTE:  What is wrong with this command?
  381.  
  382.     repeat 100 (first ($myvar))
  383.  
  384.     What is wrong is that $myvar is evaluated BEFORE the repeat is
  385.     executed.  myvar might contain characters that would confuse the
  386.     command specification when.  That is, if myvar contained a '(' you
  387.     could get something like:    repeat 100 (fist ((())  which is obviously
  388.     incorrect.    By using \ you can cause $myvar to be evaluated at
  389.     loop-execution time rather than before:
  390.  
  391.     repeat 100 (first (\$myvar))
  392.  
  393.     These kinds of problems can also occur when you do keymaps... you
  394.     probably do not want to evaluate the variable at keymap-entry time,
  395.     but rather would want the variable evaluated at keymap-execution time.
  396.  
  397.     On the otherhand, this is perfectly allowable:
  398.  
  399.     set x (tlate +1)
  400.     repeat 100 ($x)
  401.  
  402.     Which executes the command (tlate +1) 100 times... By NOT surrounding
  403.     the variable with parens (depends on the situation), the variable is
  404.     executed rather than inserted as text.
  405.  
  406.  
  407.                SPECIAL CHARACTERS
  408.  
  409.     ^ is used to introduce a control character.  For example, ^c would
  410.     embed a control-c.    You cannot embed c-@ (ascii code 0).
  411.  
  412.     backslash \ is used to override special meanings.  The next character
  413.     is overriden.
  414.  
  415.     map c-a ((^l))      -map control a to produce a control l
  416.     map c-a ((\\\^l))   -map control a to produce a "^l".  The first
  417.              \ overides the second, and the third overides
  418.              the ^.
  419.  
  420. COMMAND LIST:
  421.  
  422.     (text)          -enter text as if typed.
  423.     key         -execute a keymap as a macro (example:  c-a)
  424.     header-item     -execute a menu item as a macro (example: Project-Save)
  425.              (case independant)
  426.     ADDPATH path    -Add the specified symbolic directory to DME's special
  427.              search path (see REF and CTAGS).
  428.     ARPINSFILE        -INSFILE filerequestor, only if ARP.LIBRARY installed
  429.     ARPLOAD        -NEWFILE filerequestor, only if ARP.LIBRARY installed
  430.     ARPSAVE        -SAVEAS  filerequestor, only if ARP.LIBRARY installed
  431.     BACK        -same as BS
  432.     BACKTAB        -backward tab
  433.     BCOPY        -copy block before cursor line
  434.     BDELETE        -delete the block
  435.     BLOCK        -Set start or end of block
  436.     BMOVE        -move block before cursor line
  437.     BOTTOM        -Move to Bottom of File
  438.     BS            -backspace, (delete char to left of cursor)
  439.     BSAVE file        -save the block to a file
  440.     BSOURCE        -source current text block as if it were a script file
  441.     CHFILENAME name -change the name of the working file
  442.     CTAGS        -search for the tag under the cursor (see below)
  443.     DEL         -delete, (deletes char under cursor)
  444.     DELINE        -delete line
  445.     DOWN        -cursor down
  446.     DOWNADD        -cursor down.  If at bottom of text, add a line.
  447.     ESC         -toggle manual command entry mode
  448.     ESCIMM arg        -go into command entry mode prompting with a
  449.              predefined string.
  450.     EXECUTE comm    -Execute a CLI command
  451.     FIND string     -SET the search pattern and do a NEXT
  452.     FINDR s1 s2     -Set find and replace patterns and do one find/rep.
  453.     FINDSTR string  -SET the search string pattern
  454.     FIRST        -move to column 1
  455.     FIRSTNB        -Move to first non-blank in line.
  456.     GOTO BLOCK        -Goto the beginning of the marked block.
  457.     GOTO START        -same as GOTO BLOCK.  undefined if no block
  458.     GOTO END        -goes to the END of the marked block.  undef. if no blk.
  459.     GOTO [+/-]N     -Goto an absolute or relative line number
  460.     HEIGHT N        -set height in PIXELS for any new windows
  461.     ICONIFY        -iconify the window
  462.     IF cnd act        -IF/WHILE/IFELSE.. SEE BELOW
  463.     IFELSE cnd ifact elseact
  464.     IGNORECASE what -set case ignore for seaches.  what = on, off, or toggle
  465.     INSERTMODE what -set INSERTMODE.  what = on, off, or toggle
  466.     INSFILE name    -insert a file into the current text.
  467.     INSLINE        -insert line
  468.     JOIN        -join next line to line at cursor
  469.     LAST        -move one beyond the last non-space in a line.
  470.     LEFT        -cursor left
  471.     LEFTEDGE N        -set leftedge on the screen in PIXELS for any new window
  472.     MAP key map     -map a key to a keymap
  473.     MARGIN N        -set WordWrap and paragraph formatting margin
  474.              (related to WORDWRAP and REFORMAT)
  475.     MENUADD hdr item cmd    -add menu item
  476.     MENUDEL hdr item        -delete menu item
  477.     MENUDELHDR hdr        -delete menu header
  478.     MENUCLEAR            -delete entire menu
  479.     MENUON            -enable menus  (multiple calls are stacked)
  480.     MENUOFF            -disable menus (multiple calls are stacked)
  481.     NEWFILE name    -replace current text with new file
  482.     NEWWINDOW        -open newwindow
  483.     NEXT        -find next occurance of search pattern
  484.     NEXTR        -find next occurance and replace
  485.     NULL        -no operation
  486.     PAGEDOWN        -pagedown a partial page (see PAGESET)
  487.     PAGESET n        -n PERCENT (0 to 100). page step size relative to the
  488.              current number of rows in the window.
  489.     PAGEUP        -pageup a partial page (see PAGESET)
  490.     PING n        -set a text marker (0-9).
  491.     PONG n        -move to a previously set text marker (0-9)
  492.     PREV        -find previous occurance of search pattern
  493.     PREVR        -find previous occurance and replace
  494.     PUSHMARK        -push the currently marked block onto a stack and
  495.              unhighlight the block
  496.     POPMARK        -pop the block stack and highlight the popped block
  497.     PURGEMARK        -clear the mark stack
  498.     QUIT        -quit
  499.     RECALL        -recall most recently entered command.  Must be used
  500.              from a keymap (c-esc).
  501.     REF         -reference string under cursor (see below)
  502.     REFORMAT        -reformat paragraph using the margin.
  503.     REMEOL        -Remove text under and beyond the cursor.
  504.     REMPATH wild    -Remove one or more symbolic directorys from DME's
  505.              special path... a */? wildcard is acceptable.
  506.     REPEAT cnt comm -SEE BELOW
  507.     REPSTR string   -SET the replace string pattern
  508.     RESETTOGGLE N   -clear toggle array entry N(0..31)
  509.     RESIZE cols rows-Resize current window. E.G:  (resize 70 23)
  510.     RETURN        -same as (FIRST DOWNADD)
  511.     RIGHT        -cursor right
  512.     RX            -ARexx macro, no args   (RX macname)
  513.     RX1         -ARexx macro, one arg   (RX1 macname arg1)
  514.     RX2         -ARexx macro, two args  (RX2 macname arg1 arg2)
  515.     SAVEAS file     -save current text under a different name (title
  516.              line name does not change)
  517.     SAVEMAP file    -save user keymappings
  518.     SAVEOLD        -save current text under current name
  519.     SAVESMAP file   -save all keymappings, including system keymaps
  520.     SAVETABS on/off -Optimize file saves by crunching spaces to tabs.
  521.              The default is OFF.
  522.     SET var str     -create/modify an internal variable
  523.     SETENV var str  -create/modify an enviroment variable (1.3 ENV:)
  524.     SWAPMARK        -PUSHMARK, swap top two marks on stack, POPMARK
  525.     SCANF ctlstr    -scan the string at the current text position (C scanf)
  526.              example:    (scanf %s)          SEE BELOW
  527.     SCREENBOTTOM    -Move cursor to the bottom of the screen.
  528.     SCREENTOP        -Move cursor to the top of the screen
  529.     SCROLLUP        -Scroll up without moving cursor
  530.     SCROLLDOWN        -Scroll down without moving cursor
  531.     SETFONT font sz -Set the window's font.  ex:   (setfont topaz.font 11)
  532.     SETTOGGLE N     -set toggle array entry N  (0..255)
  533.     SOURCE file     -source a script file. '#' in first column for comment
  534.     SPLIT        -Split line at cursor
  535.     TAB         -forward tab
  536.     TABSTOP N        -Set tab stops every N.  does not effect text load
  537.     TLATE [+/-]N    -translate character by +N or -N, or set character
  538.              to exactly N if no + or -. (e.g. TLATE +65 TLATE 3)
  539.     TMPHEIGHT N     -set window height for next window only, pixels
  540.     TMPWIDTH  N     -set window width for next window only,  pixels
  541.     TOGGLE N        -flip toggle array entry N (0..255)  (See IF)
  542.     TOMOUSE        -moves cursor to mouse position
  543.     TOP         -Move to Top of File
  544.     TOPEDGE N        -set topedge in the screen in PIXELS for any new window
  545.     UNBLOCK        -clear the block markers for the current window
  546.     UNDO        -undo current line (must be mapped to a key to work)
  547.     UNMAP key        -unmap a key
  548.     UP            -cursor up
  549.     UNSET var        -delete an internal variable
  550.     UNSETENV var    -delete an enviroment variable
  551.     WHILE cnd act   -(see below)
  552.     WIDTH N        -set width in PIXELS for any new window
  553.     WLEFT        -move to beginning of previous word.  If in the
  554.              middle of a word, move to beginning of current word.
  555.     WORDWRAP on/off/toggle
  556.             -Word Wrap mode (related to MARGIN)
  557.     WRIGHT        -move to beginning of next word
  558.  
  559.  
  560.     -------------------------------------------------------------
  561.     -------------    More Info on Complicated Commands    -----------------
  562.     -------------------------------------------------------------
  563.  
  564.  
  565.     MENUOFF/ON        -This command will enable/disable menus.  Users
  566.              who have a whole bunch of MENUADD commands in
  567.              their .EDRC should note that disabling menus at
  568.              the beginning will speed up the MENUADD commands.
  569.              Then reenable menus at the end.  These calls are
  570.              stackable in that if you call MENUOFF, say, twice,
  571.              it will take two MENUON commands to restore
  572.              menus.  The reverse is not true.
  573.  
  574.     CTAGS   (c-[)   -(1.30B and beyond) Compatible with Aztec's CTAGS
  575.              program.  This command searches for the subroutine
  576.              name under the cursor in the associated tags file
  577.              ("tags" in the directory holding the file currently
  578.              being edited).  Also, the file "tags" in directories
  579.              specified by the special DME path (see ADDPATH and
  580.              REMPATH) will be searched.
  581.  
  582.              If the tag is found, it loads the file the subroutine
  583.              resides in if neccesary, then WindowToFront()'s the
  584.              window, ActivateWindow()s it, and GOTO's the line
  585.              where the subroutine starts.  The search within the
  586.              source file is anchored to the left column.  If the
  587.              file is already loaded, it is not reloaded.
  588.  
  589.              This enables a programmer to quickly trace subroutines
  590.              over an arbitrary number of files.
  591.  
  592.              The tags file contains one or more lines of the following
  593.              format:
  594.  
  595.              subroutine-name file-name /^search-pattern
  596.              (that's a slash and a carrot, then the pattern)
  597.  
  598.              -- EXAMPLE of 'TAGS' file:
  599.              setpen cmd1.c /^setpen(
  600.              do_up cmd1.c /^do_up(
  601.              --
  602.  
  603.             SPECIAL NOTE:  CTAGS will work even if you are not in
  604.             the directory containing the file.    You can thus place
  605.             a tags file in the directory containing the files it
  606.             references, and the filenames WITHIN the tags file need
  607.             not be a full path.
  608.  
  609.     REF     (c-])   -(1.28d and beyond).  This is a very powerful new
  610.              command that allows you to bring up a reference to
  611.              a keyword with a single keystroke.  This is useful for
  612.              programmers who have on-line documentation or fully
  613.              commented include files.  DME opens a window just big
  614.              enough to fit the reference.
  615.  
  616.              NOTE:  The new CTAGS command may be more suited to
  617.              your application.
  618.  
  619.              The reference keyword is the alpha-numeric string
  620.              currently under the cursor.  REF will search the
  621.              file DME.REFS in the directories listed by the
  622.              special DME path (see ADDPATH and REMPATH).  The
  623.              file must be built by the user and each line has the
  624.              following format:
  625.  
  626.              (keyword) (#lines) (file) (search string in file)
  627.                         OR
  628.              (keyword) (endstring) (file) (search string in file)
  629.  
  630.              Surrounding the keywords with `' or () is optional if
  631.              the keyword does not contain spaces.
  632.  
  633.             keyword     -keyword under cursor
  634.             #lines        -number of lines to include from
  635.                      specified file (just a number)
  636.             file        -the file containing the reference
  637.                      material
  638.             searchstr   -search string in file that indicates
  639.                      the beginning of the reference
  640.             endstring   -alternately, the #lines can be a string,
  641.                      in which case a match indicates the end
  642.                      of the reference in the file.
  643.  
  644.              Upon finding a successful keyword match the specified
  645.              file is openned and the seach string searched for.  If
  646.              found, the indicated number of lines (or until a match
  647.              with the endstring) is placed in a temporary file and
  648.              a new DME window brought up.  The temporary file is
  649.              then deleted.
  650.  
  651.              When looking for matches, the compare is anchored at
  652.              the beginning of each line in the file.  Thus, any
  653.              spaces in front of the string in the file must be
  654.              duplicated.
  655.  
  656.              T: must be assigned to a temporary directory, usually
  657.              RAM:   See the included example DME.REFS file.  The
  658.              most common things referenced are the autodocs and
  659.              commented include files.
  660.  
  661.              Some modification of the included DME.REFS.* files may
  662.              be required due to differences in include file and
  663.              autodoc format.
  664.  
  665.     SCANF ctlstr    -This is equivalent to the C scanf() function with the
  666.              restriction that only one conversion is allowed, that
  667.              conversion being a string.  Thus:
  668.  
  669.              scanf %s        will place the string under the
  670.                     cursor in the variable $scanf
  671.  
  672.              scanf %4s        The first four chars of the string.
  673.  
  674.              scanf %[0123456789]
  675.                     will scan the string while it contains
  676.                     specified chars (e.g. scan a number)
  677.  
  678.              scanf %[~,]    will scan the string until it finds
  679.                     a ','.
  680.  
  681.             The variable $scanf may be used as an argument in any
  682.             command.  Example:    (insfile $scanf).
  683.  
  684.             NOTE:  If using $scanf in a macro, you probably want
  685.             to precede it with a \ to prevent it from being
  686.             evaluated at macro-creation time.
  687.  
  688.  
  689.     REPEAT N arg    -Repeat (arg) N times.  Apart from being a number, N
  690.              can also be one of:
  691.  
  692.             line    Current line # (lines begin at 1)
  693.             lbot    #lines to the bottom, including current line
  694.             cleft    column # (cols begin at 0)
  695.             cright    #chars to eol, including current char under cursor
  696.             tr    #char positions to next tab
  697.             tl    #char positions to next back tab
  698.  
  699.             Certain commands can abort a REPEAT loop.
  700.             Specifically, any FIND[R], NEXT[R], or PREV[R] in which
  701.             the search string is NOT found will abort a REPEAT.
  702.             Most operations which can go out of bounds, such as
  703.             UP, LEFT, RIGHT, DOWN, also abort a repeat.
  704.  
  705.             Specifying -1 as N causes REPEAT to go on forever
  706.             (well, actually, 0xFFFFFFFF times) or until an abort.
  707.  
  708.     IF [!]condition arg
  709.     WHILE [!]condition arg
  710.     IFELSE [!]condition arg else arg
  711.  
  712.         If the specified condition is true, execute the argument.  For
  713.         WHILE, the argument is executed until the condition is false
  714.         (be careful!).
  715.  
  716.         the optional '!' inverts the logic.
  717.  
  718.         Conditions:
  719.  
  720.  
  721.         #        if toggle entry # is SET.  there are 256 toggles (0..255)
  722.         t        if On line 1
  723.         b        if On last line
  724.         l        if At column 0
  725.         r        if At end of line (spaces below and beyond)
  726.         m        if Text has been modified
  727.         i        if in insert mode
  728.         x[<=>]# if column position (starts at 1) is (any OR combo of
  729.             <, =, or >) than some number.  Example:   x<=20
  730.         y[<=>]# if Line number (starts at 1) is (same as for x)
  731.         cl        character under cursor is lower case alpha
  732.         cu        character under cursor is upper case alpha
  733.         ca        character under cursor is alpha-numeric
  734.         cn        character under cursor is numeric
  735.         c[<=>]# character under cursor is ascii code # (# in decimal)
  736.             optional conditionals as in 'x' and 'y'.
  737.         cb        cursor within a block
  738.  
  739.     Example: simulating an insert mode toggle: ALT-i (not CTL-i)
  740.  
  741.     map a-i (ifelse 0 (toggle 0 insertmode OFF) (toggle 0 insertmode ON))
  742.  
  743.     Example: while lower case, map to upper case and move right.
  744.  
  745.     map c-U (while cl (tlate -32 right))
  746.  
  747.     Example: Search/Replace all of text.
  748.  
  749.     map c-R (escimm (findstr ) escimm (repstr ) repeat -1 nextr)
  750.  
  751.      if c<32 ((char under cursor is smaller than 32))
  752.      if c<>32 ((char under cursor is not equal to 32))
  753.      while !b down
  754.  
  755.  
  756.                     IV
  757.                  FILE PARTICULARS
  758.  
  759. No Matter what you set internal tabs to, tabs in disk files will be 8.
  760. This allows you to use your favorite tabs stops (mine are 4) and still
  761. have your disk files compatible with TYPE, a printer, etc...  DME by
  762. default doesn't bother to optimize when writing out files and simply uses
  763. spaces. If you (SAVETABS on) before saving (or in your S:.EDRC, etc...),
  764. DME will attempt to optimize the file by placing TABS in appropriate
  765. places.  DME will not place any TABS after the first single, back, or
  766. double quote is encountered in a line.    If this does not cover every
  767. situation in your particular application that you want to be *sure* no tabs
  768. will occur in sensitive sections, then you should not use (SAVETABS on).
  769.  
  770. It should be noted that since DME removes spaces at the end of the line,
  771. editing UUENCODED ascii files will not work for uuencoded lines which end
  772. with a space.  The nominal fix is to add an extra character after each
  773. uuencoded line (anything) in the proper column, which is ignored by the
  774. UUDECODE program.
  775.  
  776. The command to save the current document under the default name is SAVEOLD,
  777. *not* SAVE.  SAVE is not a valid command.  This is to prevent people who
  778. have not read the documentation from assuming 'save' takes an argument (and
  779. screwing up their work).  SAVEOLD does NOT take an argument, SAVEAS does.
  780.  
  781. SAVEOLD/SAVEAS do not automatically backup the destination file.  If you
  782. are working in an enviroment where you are worried about ensuring a viable
  783. copy can be recovered if your Amiga crashes in the middle of the save, you
  784. can write a macro to save the file into two places.  Usually, people backup
  785. their working disks so this is not neccesary.
  786.  
  787. Workbench Support:  If DME is run from the workbench, it will automatically
  788. construct an icon file when you save a document.  If run from a CLI, no
  789. icon file is generated.
  790.  
  791.                     V
  792.                   WORKBENCH SUPPORT
  793.  
  794. DME V1.26 and beyond support the workbench in the following way:  (1) you
  795. can click on the DME icon to bring up DME with the file "unnamed".  (2) you
  796. can select one or more standard ascii documents which have DME as the
  797. default tool.  If DME has no knowlege of a text icon, it uses its own.
  798. Command line arguments are passed to DME via the tooltypes entries for
  799. DME's application icon or via individual document icons.  The following
  800. format is used:  (This is a hack, no?)
  801.  
  802.     ARG=flag
  803.  
  804.     See the OVERVIEW section for allowed flags.  Only one argument per line
  805.     is allowed (sorry).  The tooltypes for the application icon are
  806.     processed first, then the tooltypes for each document icon are
  807.     processed before each file is loaded.
  808.  
  809.     ARG= -t10
  810.     ARG= -l10
  811.  
  812.                     VI
  813.                   REVISION SUMMARY
  814.  
  815. V1.30C    RELEASE
  816.     -MAJOR!    Macros, Internal variables, and ENV: enviroment variables
  817.         may be specified with $varname, $(varname), or $`varname'.
  818.  
  819.     -New commands:  SET, SETENV, UNSET, UNSETENV    (variable support)
  820.  
  821.     -REFS window bug fixed (made window slightly too small).
  822.     -SAVE[S]MAP bug fixed for space mappings
  823.     -CTAGS doesn't modify the window title if the window is iconified
  824.      (allows you to make the following map: map <somemap> (iconify ctags)
  825.  
  826.  
  827. V1.30B    Limited release
  828.     -Kim fixed a bug in splitpath
  829.     -added CTAGS command... support for Aztec's CTAGS program
  830.     -added ADDPATH command... special directory paths for DME
  831.     -added REMPATH
  832.  
  833.     REFS no longer searches fixed directories, but looks at the
  834.     ADDPATH directories.  CTAGS also looks at the ADDPATH
  835.     directories.  CTAGS supports arbitrary directory specifications
  836.     and is intelligent about where to look for the TAGS file.
  837.  
  838.  
  839. V1.30    RELEASE
  840.     -a couple small bugs fixed
  841.     -fixed text bug that sometimes overwrites the right border
  842.     -added new commands
  843.     SETFONT     (for all of text, static fonts only)
  844.     IGNORECASE  (for searches)
  845.     -added new commands (AREXX support, Kim DeVaughn)
  846.     RX, RX1, RX2
  847.     -added new commands (by Kevin Speghetti)
  848.     PUSHMARK, POPMARK, SWAPMARK, PURGEMARK        block marker stack
  849.     PING, PONG                    text markers (0-9)
  850.  
  851.     note: block marks on the stack, ping and pong, do not track text
  852.     changes (bug).
  853.  
  854.     -Many commands will now work while the text window is iconified
  855.      without having to uniconify it.
  856.  
  857. V1.29E
  858.     -Fixed low memory bug in do_bomve() again.
  859.     -Fixed arp file requestor problems.
  860.     -added ARPINSFILE command.
  861. V1.29D
  862.     -Fixed low memory bug in do_bmove()...
  863. V1.29C
  864.     -highlighted icon window if file modified
  865. V1.29B
  866.     -INLINE FILENAME:
  867.      added $filename variable.    $scanf and $filename can now be embedded
  868.      anywhere on the command line.
  869.     - ^x added (control-character), so you do not have to embed actual
  870.      control characters in your macros.
  871.     - \ overide added (\^x) produces "^x" instead of control-x, etc...
  872.  
  873. V1.29  RELEASE
  874.  
  875.     -Foreign keyboards supported better.
  876.     -Iconify window is activated rather than not activated.
  877.     -can keymap keys which normally produce nothing.
  878.     -blocks are displayed in a different color
  879.     -can now move/copy across windows
  880.     -can now resize window while file loading
  881.     -new commands ARPLOAD ARPSAVE   (uses ARP filerequestor if arp.library)
  882.      MENUADD MENUDEL MENUDELHDR MENUCLEAR MENUOFF MENUON
  883.  
  884.     minor bugs fixed, major remodeling of the source (this is what I
  885.     use my vacation for!)
  886.  
  887.     menus:  the right mouse button may be mapped only if there is no
  888.     menu, Else is used as the menu selector.  NOTE! It is much faster
  889.     to surround a set of MENUADD commands in a source file with
  890.     MENUOFF at the beginning and MENUON at the end.  You can also specify
  891.     menu items as macros in other commands (example: project-save)
  892.  
  893. V1.28h SMALL RELEASE    references work better
  894.  
  895. V1.28g SMALL RELEASE    Fixed NK0 bug in 1.28f plus keymap problems in 1.28f
  896.  
  897. V1.28f RELEASE
  898.     Fixed macro bug created in 1.28e... could not specify macros on the
  899.     command line.
  900.  
  901. V1.28e INTERNAL/BETA
  902.     New Commands:   REF     (c-])   -cross reference the word under the
  903.                      cursor and bring up a new window
  904.                      containing a description for that
  905.                      word.  See docs above.
  906.  
  907.     -The keymapping has been fixed and should now work on any foreign
  908.      keyboard.
  909.     -MAJOR ADDITION:  () may be used instead of `' to enclose commands.
  910.      One can enclose the other ... that is, to get the "'" character you
  911.      can say (this is a charlie's day).
  912.  
  913. V1.28c RELEASE
  914.     New Commands:   CHFILENAME        -change default filename for a window
  915.             RECALL  (c-esc) -recall command line (e.g. you make a
  916.                      mistake).    Must be used from a keymap,
  917.                      default is c-esc.
  918.  
  919.             SCANF        -C scanf (single string only).  Extract
  920.                      strings from the text for use in any
  921.                      arbitrary command.
  922.  
  923.     Command Parser: $scanf        -as an argument by itself is recognized
  924.                      to be the extracted string from scanf.
  925.                      Currently, the variable name (after
  926.                      the dollar) can be anything since only
  927.                      one variable exists, but use '$scanf'
  928.                      for future compatibility.
  929.  
  930.     -Many Bug fixes (mainly benign bugs)
  931.     -^C (CONTROL C) now recognized when typed in a window.  c-c is mapped
  932.      to () = no action.
  933.     -Please look at the revised default keymappings listed in these docs.
  934.  
  935.  
  936. V1.28 LIMITED RELEASE
  937.     New Commands :  SCROLLUP    (a-up)
  938.             SCROLLDOWN    (a-down)
  939.     Modified Cmds:  ESCIMM
  940.     The execution of commands specified by an ESCIMM is blocked until
  941.     the user hits return on the ESCIMM command line.
  942.  
  943.             BCOPY
  944.     No longer unblocks the block.
  945.  
  946.     -Title bar status line no longer blinks when it changes
  947.     -Key releases no longer effect operation
  948. V1.27 RELEASE
  949.     -macros run about 20% faster due to hashing of the command table
  950.     -Maximum # of toggles raised to 256 (see IF/WHILE)
  951.     -small fixes to the code (nothing major)
  952.     -child windows inherit tab stops, insert mode, and wordwrap mode
  953.     -MOUSE BUTTONS AND MOVEMENT CAN NOW BE MAPPED
  954.     -New Commands: ICONIFY    (used to be hardwired.  Is now a command)
  955.     -Extended Commands: GOTO    (GOTO END of block)
  956. V1.26 Beta, minimal Release
  957.     -Workbench support
  958.     -New Command:   EXECUTE
  959. V1.25 RELEASE
  960.     -BSAVE does NOT UNBLOCK after saving (switch in functionality yet again)
  961.     -various bugs fixed (IF, tabs on file save)
  962.     -New Commands: MARGIN, REFORMAT, WORDWRAP, RESIZE,
  963.            TOPEDGE, LEFTEDGE, WIDTH, HEIGHT
  964.     -Command line options added for setting the window size and an optional
  965.      specified script file (when specified, local .EDRC not sourced).
  966.  
  967.     -Enhanced Commands: IF  ..more control with conditions, addition of
  968.                   a couple more specifications.
  969.                JOIN .. functionality slightly changed
  970.     -keymaps may now be used as macros in other commands. (macros)
  971.     -New keymaps added to the default set.
  972.     -Mouse movement cleaned up a little.
  973.  
  974. V1.24 Internal
  975.  
  976. V1.23 RELEASE
  977.     -S:.EDRC now sourced instead of C:.EDRC
  978.     -User keymappings now work in COMMAND mode (when you hit ESC).
  979.     -You can now map the Amiga keys ('A' for Amiga, since 'a' is alt).
  980.     -Enhanced Commands: IF/IFELSE/WHILE (optional '!' in front of cond)
  981.             new condition 'cb' 'character is in selected block'
  982.             GOTO block  (goto beginning of block)
  983.     -NewCommands:    PAGESET SAVETABS
  984.     -Writing TABS (always 8) out to disk to save space now supported.
  985.  
  986. V1.22 RELEASE (BUF FIXES FROM 1.20)
  987.     -'newfile' fixed
  988. V1.21 RELEASE (BUG FIXES FROM 1.20)
  989.     -iconify and window handling fixed
  990.     -left mouse button now tracks the mouse.
  991. V1.20 RELEASE
  992.     -bug fixes: bsave now unmarks the block, bdelete now sets 'modified' flag.
  993.         (other small fixes).
  994.     -enhancements: overwrite mode status indicator, find, find-replace now
  995.         completely implemented (yahhoo!!!)
  996.     -changed commands:    FIND NEXT PREV: no longer loop back to the top of
  997.         file or top->bottom in the case of PREV.  DELINE will now delete
  998.         text on the line if there is only one line of text.
  999.     -enhanced commands: GOTO REPEAT
  1000.     -new commands: SAVEMAP SAVESMAP TOGGLE SETTOGGLE RESETTOGGLE TLATE
  1001.            IF IFELSE WHILE BSOURCE
  1002.            FINDSTR REPSTR FINDR NEXTR PREVR
  1003.            NEWWINDOW
  1004.     -new keymappings: (see a-s, a-S, f3)
  1005.     -window iconification with mouse menu button.
  1006.  
  1007.  
  1008. V1.12 RELEASE
  1009.     -cursor is now pen #3 rather than #1.
  1010.     -changeover to AZTEC C, smaller executable.
  1011.     -now maps shift space to a space.
  1012.     -new commands: REMEOL, WLEFT, WRIGHT
  1013.     -display bug fixes (SPLIT)
  1014.     -FIND/PREV/NEXT will now abort a REPEAT if string not found.
  1015.  
  1016. V1.11 RELEASE NOTES
  1017.     -Bug fixes (mainly graphical mistakes).
  1018.     -User keymappings are disabled in command mode (so you can unmap
  1019.       single ascii characters you may have mapped).
  1020.     -Illegal key combinations no longer give garbage (e.g. ALT-CURSOR-DOWN)
  1021.       you can, of course, still map them to anything you wish.
  1022.     -Save now checks for error conditions on write.
  1023.     -Uses Default Console Keymap (i.e. no longer assumes USA)... but there
  1024.       *is* some stangeness.
  1025.  
  1026. V1.00 RELEASE NOTES
  1027.     -has find, but no replace function
  1028.     -assumes USA keyboard            (fixed 1.11)
  1029.     -disk files written out use spaces instead of tabs&spaces
  1030.  
  1031.  
  1032.                     VII
  1033.                 COMPILING
  1034.  
  1035. DME compiles only under AZTEC.    You must compile with the 32 bit int
  1036. option, but may use the small code/data model.    A support lib which I have
  1037. created (SUP32.LIB) is also required.  I use a precompiled symbol file
  1038. containing ALL the AMIGA includes (but not any Aztec standard includes).
  1039.