home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / text / tjm / dme.doc < prev    next >
Text File  |  1995-02-27  |  36KB  |  902 lines

  1.  
  2. dme/dme                             dme/dme
  3.  
  4. DME.DOC         DME version 1.45         Matthew Dillon
  5.                July 1991
  6.  
  7. DME, (C)Copyright 1987-90, Matthew Dillon.  All Rights Reserved.
  8. This software may be distributed for non-profit only.  This software is
  9. FREEWARE, not shareware.
  10.  
  11.     Matthew Dillon
  12.     891 Regal Rd
  13.     Berkeley, Ca. 94708
  14.     USA
  15.  
  16.  
  17.     Source is avalable:
  18.  
  19.     (1) By regular mail (send a disk)
  20.     (2) By Electronic mail:
  21.         INTERNET:    uunet.uu.net!overload!dillon        OR
  22.             dillon@overload.Berkeley.CA.US
  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.     1.42 additions by Markys Wenzel
  35.  
  36. ---------------------------------------------------------------------------
  37.  
  38. 0   Installation
  39. I   Overview
  40. II  Keymapping        key and mouse mapping
  41. III Command Sequences    DME commands
  42. IV  File Particulars    notes on loading and saving files,
  43. V   Workbench Support
  44. VI  Revision Summary    revision numbering, changes made, etc...
  45. VII Compiling        compiling instructions
  46.  
  47.                     0
  48.                    INSTALLATION
  49.  
  50. The NULL: device must be mounted to be able to use the EXECUTE command.
  51. This is so EXECUTE works even if the console window goes away.    Otherwise,
  52. simply put DME in an accessable location (usually C:).  Put the dme.icon
  53. file in the same directory as DME if you want to access the application
  54. from the workbench (dme.icon is not needed if accessed from a CLI or shell).
  55.  
  56. People appear to have problems using the EXECUTE command when DME is run
  57. from the workbench.  I have no solution yet.
  58.  
  59. CONFIGURATION of default window placement, pen selection, and most editor
  60. modes (insert/overwrite, margin, etc...) is accomplished by bringing up
  61. DME, setting it up how you like, then selecting the SAVECONFIG menu
  62. option (saves to s:dme.config).
  63.  
  64.  
  65.                     I
  66.                  OVERVIEW
  67.  
  68. See REVISIONS section for revisions.  DME is an editor designed mainly for
  69. programmers.  Although it is not a word processor, it does include many
  70. word processing features such as Word-Wrap and automatic paragraph
  71. formatting.  Here is a quick 'features' list:
  72.  
  73.     -control language based on a rich command set accessed manually
  74.      or via arbitrary mapping of keys.  (Every key may be mapped to 128
  75.      different things via qualifier and mouse keys)
  76.  
  77.     -General variables, reference macros as variables, ENV: enviroment
  78.      variables (1.30C and beyond).
  79.  
  80.     -fast visual response (it scrolls quickly)... even faster when
  81.      BlitzFonts or similar text speedup utilities are installed.
  82.  
  83.     -title-line statistics showing your current position in the file,
  84.      file name, whether the file has been modified or not, etc...
  85.  
  86.     -Multiple Windows, ability to iconify windows
  87.  
  88.     -Word Wrap and automatic paragraph formatting.
  89.  
  90.     -ability to map any KEY or MOUSE BUTTON combination.
  91.  
  92.     -Proportional gadget in right border (TJM)
  93.  
  94.     -Attempts to have only one editor running at a time (TJM)
  95.  
  96. DME has been designed to allow easy expansion, and I intend to make many
  97. future improvments.  It has not been designed for user friendliness, but is
  98. straight forward if you read this document [care]fully.
  99.  
  100. AS OF 1.40 and until further notice DME no longer takes command line
  101. arguments other than file arguments, or workbench based window arguments.
  102. DME used to take arguments to specify window dimensions.  Use the saveconfig
  103. command to setup default window parameters.
  104.  
  105. Actually (TJM) it does still take command line options, but only the following:
  106.     -i - iconify (not thoroughly tested for original dme invocation, but seems
  107.      to work fine for subsequent (non-original) dme invocations)
  108.  
  109.     -n - force DME to create a new instance of itself, along with a new DME
  110.      port ("DME1", "DME2", etc. except 1st one: "DME")
  111.  
  112. The 1.40-41 Version is an experimental intermediate version, documentation may
  113. not be up to date.
  114.  
  115. Normally, DME will automatically SOURCE two script files, S:.EDRC, and the
  116. .EDRC in your current directory. These files do not have to exist.  These
  117. script files usually contain mappings and do things (for example, turn on
  118. savetabs).
  119.  
  120.  
  121.                     II
  122.                  KEYMAPPING
  123.  
  124. MOUSE BUTTONS:
  125.  
  126.     The mouse buttons and combinations thereof may now be mapped.  The
  127.     default mappings for the mouse buttons are as follows:
  128.  
  129.     Left-button:    Move cursor to current mouse position
  130.     Right-button:   Iconify window
  131.     Left-button held down while moving mouse tracks the cursor
  132.  
  133.     The iconification features:
  134.     -Remembers original window size and placement
  135.     -Remembers placement of iconified window when you re-iconify later.
  136.  
  137.     Currently, you will crash the machine if you run out of memory and DME
  138.     is unable to open the icon window or original window, so be careful.
  139.  
  140.     see below for mapping the mouse buttons and mouse movement.
  141.  
  142.  
  143. KEYBOARD:
  144.  
  145. The rest of the Functional interface for DME is based on key/mouse/menu
  146. mappings and a rich command set.  Unlike other text editors, any
  147. non-qualifier key in DME may be defined to have any meaning whatsoever.  It
  148. just so happens that the default keymappings assign such things as the
  149. (return) key to the RETURN function, the (up) key to the UP function,
  150. etc...    Keys are named by their keycap labels with the following
  151. exceptions:
  152.  
  153.     the name for Back-Space is    BS
  154.     the name for numeric keypad keys are prepended with an NK, except for
  155.     the Enter key which is named 'ENTER'.
  156.     The four cursor control keys are labeled UP, DOWN, LEFT, and RIGHT
  157.     The three mouse buttons are labeled RMB, MMB, and LMB.
  158.  
  159. NOTES:
  160.        You must type commands in lower-case, except for text, which can be
  161.        either lower or upper case, and for upper-case alpha keys when
  162.        specifying keymaps (i.e.  A and s-a are the same key).  The
  163.        exception is the AMIGA qualifier key, which uses 'A' instead of
  164.        'a'(Alt).
  165.  
  166.        Each key may be qualified with any combination of CTRL, ALT, SHIFT,
  167.        AMIGA, or any of the MOUSE buttons.  With 6 qualifiers (7 if your
  168.        mouse has a middle button), you can assign up to 64 (128) different
  169.        maps to each physical key on the keyboard.
  170.  
  171.        The CAPS-LOCK, when lit, is equivalent to SHIFT only for Alpha keys.
  172.  
  173.        The AMIGA-ALT (aA) combination isn't very usable since Intuition
  174.        uses the sequence to duplicate a Mouse SELECT.  Other AMIGA
  175.        sequences are used by intuition for mouse movement and other things.
  176.        Some other qualifier combinations may not be usable due to other
  177.        special sequences.
  178.  
  179.        Some keys must be mapped by their lower-case keycap.  That is, to
  180.        map the '>' key (USA keyboard), you specify shift dot (s-.)
  181.  
  182.  
  183.     ***EXAMPLES:***
  184.  
  185.     tab tab
  186.     a-a ALT a
  187.     A-a AMIGA a
  188.     sA-a    SHIFT AMIGA a
  189.     s-tab    SHIFT tab
  190.     c-tab    CTRL tab
  191.     ac-?    ALT-CTRL ?
  192.     s-f5    SHIFT F5
  193.     nk0 Numeric Keypad 0
  194.     cs-nk0    CTRL SHIFT Numeric Keypad 0
  195.     L-lmb    Left Mouse button pressed
  196.     L-mmove    Mouse moved while left mouse button held down
  197.     LR-lmb    left mouse button hit while right mouse button held down
  198.     s-.     shift . ('>' for USA keyboards)
  199.  
  200.     ***************
  201.  
  202. MAPPING MOUSE BUTTONS
  203.  
  204.     Mouse buttons serve both as QUALIFIERS and as KEYS.  Thus, you can map
  205.     both normal keystrokes which require a mouse button to be held down:
  206.  
  207.     map L-a ((left button and an a))
  208.  
  209.     as well as the mouse keys themselves:
  210.  
  211.     map L-lmb   ((left mouse key))
  212.  
  213.     note that you had to specify the left mouse button down qualifier L as
  214.     well as the left mouse button LMB.    <TJM:> If you don't specify the
  215.     L- qualifier, then you will be mapping the mouse-up event.    Otherwise,
  216.     you are mapping the mouse-down event.  Be careful when mapping the mouse-up
  217.     event, because you will get this event when the proportional gadget is
  218.     moved, too.
  219.  
  220.     If you map the left mouse button, and also map a sequence such as left
  221.     mouse button + a:
  222.  
  223.     map L-lmb   tomouse
  224.     map L-a     ((hello))
  225.  
  226.     Note that the first mapping will always get executed even if you
  227.     intended L-a (that is, BOTH mappings would get executed).  In order
  228.     to avoid confusion you might want to UNMAP the system default mapping
  229.     for the right mouse button (mapped to ICONIFY) if you wish to apply
  230.     combinations to the right mouse button.
  231.  
  232.     MOUSE MOVEMENT is mapped with one or more mouse qualifiers (L, R, M),
  233.     plus 'MMOVE' for the key.  That is:
  234.  
  235.     map LR-mmove ((moving the mouse with both buttons held down))
  236.  
  237.     Or how bout capping the characters under the mouse while moving the
  238.     mouse?
  239.  
  240.     map LR-mmove (tomouse if cl (tlate -32))
  241.  
  242.  
  243. DEFAULT KEYMAPPINGS:
  244.  
  245.     All Printable Ascii keys mapped to their ascii equivalent. BS, DEL, UP,
  246.     DOWN, LEFT, RIGHT, TAB, S-TAB, and ENTER are mapped properly.  These are
  247.     the default system keymappings.
  248.  
  249.  
  250.     map (a-c)       (bcopy)
  251.     map (a-d)       (bdelete)
  252.     map (a-down)    (scrolldown)
  253.     map (a-l)       (while cu (tlate +32 right))
  254.     map (a-m)       (bmove)
  255.     map (a-r)       (nextr)
  256.     map (a-s)       (bsource)
  257.     map (a-u)       (while cl (tlate -32 right))
  258.     map (a-up)      (scrollup)
  259.     map (bs)        (bs)
  260.     map (c-/)       (escimm (find ))
  261.     map (c-])       (ref)
  262.     map (c-[)       (ctags)
  263.     map (c-1)       (goto block)
  264.     map (c-b)       (block)
  265.     map (c-c)       ()
  266.     map (c-del)     (remeol)
  267.     map (c-down)    (pagedown)
  268.     map (c-esc)     (recall)
  269.     map (c-f)       (reformat)
  270.     map (c-g)       (escimm (goto ))
  271.     map (c-i)       (insertmode on)
  272.     map (c-j)       (join)
  273.     map (c-l)       (wleft)
  274.     map (c-n)       (next)
  275.     map (c-o)       (insertmode off)
  276.     map (c-p)       (prev)
  277.     map (c-q)       (quit)
  278.     map (c-r)       (wright)
  279.     map (c-s)       (split first down)
  280.     map (c-u)       (unblock)
  281.     map (c-up)      (pageup)
  282.     map (c-w)       (wordwrap toggle)
  283.     map (del)       (del)
  284.     map (down)      (down)
  285.     map (enter)     (return)
  286.     map (esc)       (esc)
  287.     map (f1)        (escimm (insfile ))
  288.     map (f10)       (saveold quit)
  289.     map (f2)        (escimm (newfile ))
  290.     map (f3)        (escimm (newwindow newfile ))
  291.     map (f6)        (saveold iconify)
  292.     map (f7)        (escimm (bsave ))
  293.     map (f8)        (saveold escimm (newfile ))
  294.     map (f9)        (saveold)
  295.     map (L-lmb)     (tomouse)
  296.     map (L-mmo)     (tomouse)
  297.     map (left)      (left)
  298.     map (R-rmb)     (iconify)
  299.     map (return)    (ifelse b (return) (return insline) up firstnb down)
  300.     map (right)     (right)
  301.     map (s- )       (( ))
  302.     map (s-del)     (deline)
  303.     map (s-down)    (bottom)
  304.     map (s-left)    (first)
  305.     map (s-right)   (last)
  306.     map (s-tab)     (backtab)
  307.     map (s-up)      (top)
  308.     map (sa-s)      (unblock block block bsource)
  309.     map (tab)       (tab)
  310.     map (up)        (up)
  311.  
  312.  
  313.  
  314.                     III
  315.                  COMMAND SEQUENCES
  316.  
  317. DME has a rich command set which allows you to embed commands within
  318. commands, or specify multiple commands in a row.  A command consists of a
  319. KEYWORD followed by a FIXED number of arguments (0, 1, 2...).  The argument
  320. delimeter in DME is a SPACE.  Therefore, to embed strings containing spaces
  321. as a single argument, you must surround the string with (string)
  322. (backsinglequote-string-singlequote).  TEXT to be written as if typed is
  323. also specified via a string in backquote-quotes.  For example:
  324. ALSO 1-CHAR:  )c or 'c
  325.  
  326.     right right (hello) right right (hello) enter down
  327.     map f4 (right right) map f5 (left left)
  328.     map f4 ((hello))
  329.  
  330. Reiterating (because this is important!)... If a command expects ONE
  331. argument, then it really does expect a single argument, and any remaining
  332. arguments are thought to be the next command... so:
  333.  
  334.     map f4 right
  335.                     -right is only one word, so no need
  336.                      for ().
  337.     map f4 (right right)
  338.                     -we want to map f4 to two rights... we
  339.                      need the () or the second right will
  340.                      not be part of the map.
  341.  
  342.     map c-del (repeat cright del)
  343.                     -this is already implimented as REMEOL,
  344.                      but shown here for clarity.
  345.  
  346. Some arguments will eventually be fed through the command interpreter more
  347. than once.  The MAP command is a good example.    When you execute a MAP
  348. command, the first run through the command interpreter installs the map
  349. string minus a set of quotes.  So, if you want to specify text, you must
  350. enclose the text in two sets of ((text)) because the map string gets passed
  351. through the command interpreter again when you hit the mapped key.  Here
  352. are some more complex examples:
  353.  
  354.     map f4 (right right (hello) left left)      *RIGHT*
  355.     map f4 right right hello left left        *WRONG*
  356.  
  357.     map f4 (map f4 ((hello)))
  358.                     -the first time you hit F4, it's command
  359.                      is to re-map itself to the TEXT (hello).
  360.                      (gads!).
  361.  
  362.     map c-i (repeat tr (( )))
  363.                     -example of how to embed a space in a
  364.                      map and repeat (goes through command
  365.                      interpreter three times!).
  366.  
  367.  
  368. An easy way to fool around executing commands or making maps is either to
  369. use the ESC key (which enters command mode), or  a-S (alt-shift-s), which
  370. EXECUTES the current DME line that the cursor is on.... so you can use DME
  371. to edit and test your new keymappings.
  372.  
  373.  
  374.                 STRING VARIABLES
  375.  
  376.     String variables are replaced with their contents.    Three specification
  377.     forms are allowed:
  378.  
  379.     $varname        - varname can only consist of a-z,A-Z,0-9,-,_
  380.     $(varname)      - anything not containing a '(' or ')'
  381.     $`varname'      - anything not containing a '`' or '''
  382.  
  383.     Several special variables exist:
  384.  
  385.     filename    - the current filename
  386.     scanf        - the current scanf'd string (see SCANF below)
  387.     lineno        - the current cursor line number (1 .. N)
  388.     colno        - the current cursor column number (1 .. N)
  389.     modified    - modified flag (1 or 0)
  390.     margin        - the current margin (1 .. N)
  391.     currentline - the entire line on which the cursor sits
  392.     fpath        - path part of current file name (fully qualified under 2.0 - TJM)
  393.     fname        - current filename without fpath part
  394.     rexxport    - this dme invocation's rexx port name (TJM)
  395.  
  396.     Other variables cause a search of three variable domains to find the
  397.     contents.  For example, if you give  $DMEFONT:
  398.  
  399.     (1) An Internal variable named DMEFONT is searched for.  Internal
  400.         variables are case sensitive.  (see SET, UNSET)
  401.  
  402.     (2) An Enviroment variable name DMEFONT is searched for.  Enviroment
  403.         variables are NOT case sensitive.  (see SETENV, UNSETENV).  The
  404.         1.3 ENV: is used.
  405.  
  406.     (3) A DME keymap or menu definition named DMEFONT is searched for.
  407.         This allows you to say something like $sa-tab to insert the
  408.         contents of the shift-alt-tab keymap.   (see MAP, UNMAP, and
  409.         MENU oriented commands).
  410.  
  411.     The reason for the other two forms of variable specifiction is to allow
  412.     one to access strangely named variables (with puncuation and other crap).
  413.  
  414.     SPECIAL NOTE:  What is wrong with this command?
  415.  
  416.     repeat 100 (first ($myvar))
  417.  
  418.     What is wrong is that $myvar is evaluated BEFORE the repeat is
  419.     executed.  myvar might contain characters that would confuse the
  420.     command specification when.  That is, if myvar contained a '(' you
  421.     could get something like:    repeat 100 (fist ((())  which is obviously
  422.     incorrect.    By using \ you can cause $myvar to be evaluated at
  423.     loop-execution time rather than before:
  424.  
  425.     repeat 100 (first (\$myvar))
  426.  
  427.     These kinds of problems can also occur when you do keymaps... you
  428.     probably do not want to evaluate the variable at keymap-entry time,
  429.     but rather would want the variable evaluated at keymap-execution time.
  430.  
  431.     On the otherhand, this is perfectly allowable:
  432.  
  433.     set x (tlate +1)
  434.     repeat 100 ($x)
  435.  
  436.     Which executes the command (tlate +1) 100 times... By NOT surrounding
  437.     the variable with parens (depends on the situation), the variable is
  438.     executed rather than inserted as text.
  439.  
  440.  
  441.                SPECIAL CHARACTERS
  442.  
  443.     ^ is used to introduce a control character.  For example, ^c would
  444.     embed a control-c.    You cannot embed c-@ (ascii code 0).
  445.  
  446.     backslash \ is used to override special meanings.  The next character
  447.     is overriden.
  448.  
  449.     map c-a ((^l))      -map control a to produce a control l
  450.     map c-a ((\\\^l))   -map control a to produce a "^l".  The first
  451.              \ overides the second, and the third overides
  452.              the ^.
  453.  
  454. COMMAND LIST:
  455.  
  456.     (text)          -enter text as if typed.
  457.     key         -execute a keymap as a macro (example:  c-a)
  458.     header-item     -execute a menu item as a macro (example: Project-Save)
  459.              (case independant)
  460.     ADDPATH path    -Add the specified symbolic directory to DME's special
  461.              search path (see REF and CTAGS).
  462.     APPENDSAVE name -append current text to a file
  463.     ARPINSFILE        -INSFILE filerequestor, only if ARP.LIBRARY installed
  464.     ARPLOAD        -NEWFILE filerequestor, only if ARP.LIBRARY installed
  465.     ARPSAVE        -SAVEAS  filerequestor, only if ARP.LIBRARY installed
  466.     ASLFONT        -\
  467.     ASLINSFILE        - \/obvious...
  468.     ASLLOAD        - /
  469.     ASLSAVE        -/
  470.     BACK        -same as BS
  471.     BACKTAB        -backward tab
  472.     BAPPENDSAVE name-append the block to a file
  473.     BCOPY        -copy block before cursor line
  474.     BDELETE        -delete the block
  475.     BGPEN pen        -set background pen
  476.     BLOCK        -Set start or end of block
  477.     BMOVE        -move block before cursor line
  478.     BOTTOM        -Move to Bottom of File
  479.     BS            -backspace, (delete char to left of cursor)
  480.     BSAVE file        -save the block to a file
  481.     BSOURCE        -source current text block as if it were a script file
  482.     CD name        - change default directory
  483.     CHFILENAME name -change the name of the working file
  484.     COL offset        - adjust column # by offset
  485.     CTAGS        -search for the tag under the cursor (see below)
  486.     DEL         -delete, (deletes char under cursor)
  487.     DELINE        -delete line
  488.     DOWN        -cursor down
  489.     DOWNADD        -cursor down.  If at bottom of text, add a line.
  490.     ESC         -toggle manual command entry mode
  491.     ESCIMM arg        -go into command entry mode prompting with a
  492.              predefined string.
  493.     EXECUTE comm    -Execute a CLI command
  494.     FGPEN pen        -Set foreground pen
  495.     FIND string     -SET the search pattern and do a NEXT
  496.     FINDFILE fname  -Attempt to make window/buffer with file name 'fname' current
  497.     FINDR s1 s2     -Set find and replace patterns and do one find/rep.
  498.     FINDSTR string  -SET the search string pattern
  499.     FIRST        -move to column 1
  500.     FIRSTNB        -Move to first non-blank in line.
  501.     GETVAL rest     -preprocess rest of line & return in RESULT (rexx only) (TJM+MMW)
  502.     GOTO BLOCK        -Goto the beginning of the marked block.
  503.     GOTO START        -same as GOTO BLOCK.  undefined if no block
  504.     GOTO END        -goes to the END of the marked block.  undef. if no blk.
  505.     GOTO [+/-]N     -Goto an absolute or relative line number
  506.     HGPEN pen        -set highlight pen
  507.     ICONIFY        -iconify the window
  508.     IF cnd act        -IF/WHILE/IFELSE.. SEE BELOW
  509.     IFELSE cnd ifact elseact
  510.     IGNORECASE what -set case ignore for seaches.  what = on, off, or toggle
  511.     INSERTMODE what -set INSERTMODE.  what = on, off, or toggle
  512.     INSFILE name    -insert a file into the current text.
  513.     INSLINE        -insert line
  514.     JOIN        -join next line to line at cursor
  515.     JUSTIFY how     -simple text justification.  Currently only 'full'
  516.              justification supported (justify full).
  517.     LAST        -move one beyond the last non-space in a line.
  518.     LEFT        -cursor left
  519.     MAP key map     -map a key to a keymap
  520.     MARGIN N        -set WordWrap and paragraph formatting margin
  521.              (related to WORDWRAP and REFORMAT)
  522.     MENUADD hdr item cmd    -add menu item
  523.     MENUDEL hdr item        -delete menu item
  524.     MENUDELHDR hdr        -delete menu header
  525.     MENUCLEAR            -delete entire menu
  526.     MENUON            -enable menus  (multiple calls are stacked)
  527.     MENUOFF            -disable menus (multiple calls are stacked)
  528.     MODIFIED on/off/toggle
  529.             -set modified flag manually
  530.  
  531.     NEWFILE name    -replace current text with new file
  532.     NEWWINDOW        -open new window using default window parameters
  533.     NEXT        -find next occurance of search pattern
  534.     NEXTR        -find next occurance and replace
  535.     NULL        -no operation
  536.     OPENWINDOW geo  -open new window using specified geometry.    Geometry is
  537.              specified as:  +/-leftedge+/-topedge+/-width+/-height,
  538.              where negative numbers denote values relative to the
  539.              width or height of the screen.  For example, the
  540.              following opens a nearly full-screen window leaving
  541.              10 pixels above, below, to the left, and to the right:
  542.  
  543.             openwindow +10+10-10-10
  544.  
  545.              The following opens a window in the upper right hand
  546.              corner of width 320 and height 100.
  547.  
  548.             openwindow  -320+0+320+100
  549.             openwindow  -320+0-0+100    (same thing)
  550.             openwindow  -320-100-0-0    (lower rght hand corner)
  551.  
  552.     PAGEDOWN        -pagedown a partial page (see PAGESET)
  553.     PAGESET n        -n PERCENT (0 to 100). page step size relative to the
  554.              current number of rows in the window.
  555.     PAGEUP        -pageup a partial page (see PAGESET)
  556.     PING n        -set a text marker (0-9).
  557.     PONG n        -move to a previously set text marker (0-9)
  558.     PREV        -find previous occurance of search pattern
  559.     PREVR        -find previous occurance and replace
  560.     PUSHMARK        -push the currently marked block onto a stack and
  561.              unhighlight the block
  562.     POPMARK        -pop the block stack and highlight the popped block
  563.     PURGEMARK        -clear the mark stack
  564.     QUIT        -quit
  565.     RECALL        -recall most recently entered command.  Must be used
  566.              from a keymap (c-esc).
  567.     REF         -reference string under cursor (see below)
  568.     REFORMAT        -reformat paragraph using the margin.
  569.     REMEOL        -Remove text under and beyond the cursor.
  570.     REMPATH wild    -Remove one or more symbolic directorys from DME's
  571.              special path... a */? wildcard is acceptable.
  572.     REQFONT        -\
  573.     REQINSFILE        - \/obvious...
  574.     REQLOAD        - /
  575.     REQSAVE        -/
  576.     REPEAT cnt comm -SEE BELOW
  577.     REPSTR string   -SET the replace string pattern
  578.     RESETTOGGLE N   -clear toggle array entry N(0..31)
  579.     RESIZE cols rows-Resize current window. E.G:  (resize 70 23)
  580.     RETURN        -same as (FIRST DOWNADD)
  581.     RIGHT        -cursor right
  582.     RX            -ARexx macro, no args   (RX macname)            (async - TJM)
  583.     RX1         -ARexx macro, one arg   (RX1 macname arg1)      (async - TJM)
  584.     RX2         -ARexx macro, two args  (RX2 macname arg1 arg2) (async - TJM)
  585.     RXBLOCK        -block all intuition messages (REXX only - TJM)
  586.     RXUNBLOCK        -unblock RXBLOCK (no nesting) (REXX only - TJM)
  587.     SAVEAS file     -save current text under a different name (title
  588.              line name does not change)
  589.     SAVECONFIG        -save current editor configuration to s:dme.config
  590.     SAVEMAP file    -save user keymappings
  591.     SAVEOLD        -save current text under current name
  592.     SAVESMAP file   -save all keymappings, including system keymaps
  593.     SAVETABS on/off -Optimize file saves by crunching spaces to tabs.
  594.              The default is OFF.
  595.     SCANF ctlstr    -scan the string at the current text position (C scanf)
  596.              example:    (scanf %s)          SEE BELOW
  597.     SCREENBOTTOM    -Move cursor to the bottom of the screen.
  598.     SCREENTOP        -Move cursor to the top of the screen
  599.     SCROLLUP        -Scroll up without moving cursor
  600.     SCROLLDOWN        -Scroll down without moving cursor
  601.  
  602.     SET var str     -create/modify an internal variable (access w/ $)
  603.     SETENV var str  -create/modify an enviroment variable (1.3 ENV:)
  604.     SETFONT font sz -Set the window's font.  ex:   (setfont topaz.font 11)
  605.  
  606.     SETPARCOL col   -Set the LEFT margin for word wrap mode paragraphing &
  607.              reformat.    MUST be less than MARGIN.
  608.  
  609.     SETTOGGLE N     -set toggle array entry N  (0..255)
  610.     SOURCE file     -source a script file. '#' in first column for comment
  611.     SPLIT        -Split line at cursor
  612.     SWAPMARK        -PUSHMARK, swap top two marks on stack, POPMARK
  613.     TAB         -forward tab
  614.     TABSTOP N        -Set tab stops every N.  does not effect text load
  615.     TITLE (title)   -set window title manually
  616.     TLATE [+/-]N    -translate character by +N or -N, or set character
  617.              to exactly N if no + or -. (e.g. TLATE +65 TLATE 3)
  618.     TOGGLE N        -flip toggle array entry N (0..255)  (See IF)
  619.     TOMOUSE        -moves cursor to mouse position
  620.     TOP         -Move to Top of File
  621.     TPEN pen        -set pen for title bar rendering
  622.     UNBLOCK        -clear the block markers for the current window
  623.     UNDELINE        -insert most recently deleted line (only last line saved)
  624.     UNDO        -undo current line (must be mapped to a key to work)
  625.     UNJUSTIFY        -removes extra spaces in a line
  626.     UNMAP key        -unmap a key
  627.     UP            -cursor up
  628.     UNSET var        -delete an internal variable
  629.     UNSETENV var    -delete an enviroment variable
  630.     WHILE cnd act   -(see below)
  631.     WLEFT        -move to beginning of previous word.  If in the
  632.              middle of a word, move to beginning of current word.
  633.     WORDWRAP on/off/toggle
  634.             -Word Wrap mode (related to MARGIN)
  635.     WRIGHT        -move to beginning of next word
  636.  
  637.  
  638.     -------------------------------------------------------------
  639.     -------------    More Info on Complicated Commands    -----------------
  640.     -------------------------------------------------------------
  641.  
  642.     MENUOFF/ON        -This command will enable/disable menus.  Users
  643.              who have a whole bunch of MENUADD commands in
  644.              their .EDRC should note that disabling menus at
  645.              the beginning will speed up the MENUADD commands.
  646.              Then reenable menus at the end.  These calls are
  647.              stackable in that if you call MENUOFF, say, twice,
  648.              it will take two MENUON commands to restore
  649.              menus.  The reverse is not true.
  650.  
  651.     CTAGS   (c-[)   -(1.30B and beyond) Compatible with Aztec's CTAGS
  652.              program.  This command searches for the subroutine
  653.              name under the cursor in the associated tags file
  654.              ("tags" in the directory holding the file currently
  655.              being edited).  Also, the file "tags" in directories
  656.              specified by the special DME path (see ADDPATH and
  657.              REMPATH) will be searched.
  658.  
  659.              If the tag is found, it loads the file the subroutine
  660.              resides in if neccesary, then WindowToFront()'s the
  661.              window, ActivateWindow()s it, and GOTO's the line
  662.              where the subroutine starts.  The search within the
  663.              source file is anchored to the left column.  If the
  664.              file is already loaded, it is not reloaded.
  665.  
  666.              This enables a programmer to quickly trace subroutines
  667.              over an arbitrary number of files.
  668.  
  669.              The tags file contains one or more lines of the following
  670.              format:
  671.  
  672.              subroutine-name file-name /^search-pattern
  673.              (that's a slash and a carrot, then the pattern)
  674.  
  675.              -- EXAMPLE of 'TAGS' file:
  676.              setpen cmd1.c /^setpen(
  677.              do_up cmd1.c /^do_up(
  678.              --
  679.  
  680.             SPECIAL NOTE:  CTAGS will work even if you are not in
  681.             the directory containing the file.    You can thus place
  682.             a tags file in the directory containing the files it
  683.             references, and the filenames WITHIN the tags file need
  684.             not be a full path.
  685.  
  686.     REF     (c-])   -(1.28d and beyond).  This is a very powerful new
  687.              command that allows you to bring up a reference to
  688.              a keyword with a single keystroke.  This is useful for
  689.              programmers who have on-line documentation or fully
  690.              commented include files.  DME opens a window just big
  691.              enough to fit the reference.
  692.  
  693.              NOTE:  The new CTAGS command may be more suited to
  694.              your application.
  695.  
  696.              The reference keyword is the alpha-numeric string
  697.              currently under the cursor.  REF will search the
  698.              file DME.REFS in the directories listed by the
  699.              special DME path (see ADDPATH and REMPATH).  The
  700.              file must be built by the user and each line has the
  701.              following format:
  702.  
  703.              (keyword) (nolines/endstring) (file) (searchstr/##seekpos)
  704.  
  705.              Surrounding the keywords with `' or () is optional if
  706.              the keyword does not contain spaces.
  707.  
  708.             keyword     -keyword under cursor
  709.             nolines/ends-either a number (the number of lines
  710.                      in the reference) or a string denoting
  711.                      the end of the reference when found.
  712.             file        -the file containing the reference
  713.                      material
  714.             searchstr/##-search string in file that indicates
  715.                      the beginning of the reference, or
  716.                      two hashes (##) and the seek position
  717.                      in decimal (like ##2343).  The latter
  718.                      method is used mainly for reference-
  719.                      generator programs.
  720.  
  721.              Upon finding a successful keyword match the specified
  722.              file is openned and the seach string searched for.  If
  723.              a seek position was specified no search is made and a
  724.              seek is made to the beginning of the reference.  If
  725.              found, the indicated number of lines (if a number
  726.              is specified for <nolines/ends>) or until a match with
  727.              the endstring (if a string was specified) will be
  728.              placed in a temporary file and a new DME window
  729.              brought up. The temporary file is then deleted.
  730.  
  731.              When looking for matches, the compare is anchored at
  732.              the beginning of each line in the file.  Thus, any
  733.              spaces in front of the string in the file must be
  734.              duplicated.
  735.  
  736.              T: must be assigned to a temporary directory, usually
  737.              RAM:   See the included example DME.REFS file.  The
  738.              most common things referenced are the autodocs and
  739.              commented include files.
  740.  
  741.              Some modification of the included DME.REFS.* files may
  742.              be required due to differences in include file and
  743.              autodoc format.
  744.  
  745.     SCANF ctlstr    -This is equivalent to the C scanf() function with the
  746.              restriction that only one conversion is allowed, that
  747.              conversion being a string.  Thus:
  748.  
  749.              scanf %s        will place the string under the
  750.                     cursor in the variable $scanf
  751.  
  752.              scanf %4s        The first four chars of the string.
  753.  
  754.              scanf %[0123456789]
  755.                     will scan the string while it contains
  756.                     specified chars (e.g. scan a number)
  757.  
  758.              scanf %[~,]    will scan the string until it finds
  759.                     a ','.
  760.  
  761.             The variable $scanf may be used as an argument in any
  762.             command.  Example:    (insfile $scanf).
  763.  
  764.             NOTE:  If using $scanf in a macro, you probably want
  765.             to precede it with a \ to prevent it from being
  766.             evaluated at macro-creation time.
  767.  
  768.  
  769.     REPEAT N arg    -Repeat (arg) N times.  Apart from being a number, N
  770.              can also be one of:
  771.  
  772.             line    Current line # (lines begin at 1)
  773.             lbot    #lines to the bottom, including current line
  774.             cleft    column # (cols begin at 0)
  775.             cright    #chars to eol, including current char under cursor
  776.             tr    #char positions to next tab
  777.             tl    #char positions to next back tab
  778.  
  779.             Certain commands can abort a REPEAT loop.
  780.             Specifically, any FIND[R], NEXT[R], or PREV[R] in which
  781.             the search string is NOT found will abort a REPEAT.
  782.             Most operations which can go out of bounds, such as
  783.             UP, LEFT, RIGHT, DOWN, also abort a repeat.
  784.  
  785.             Specifying -1 as N causes REPEAT to go on forever
  786.             (well, actually, 0xFFFFFFFF times) or until an abort.
  787.  
  788.     IF [!]condition arg
  789.     WHILE [!]condition arg
  790.     IFELSE [!]condition arg else arg
  791.  
  792.         If the specified condition is true, execute the argument.  For
  793.         WHILE, the argument is executed until the condition is false
  794.         (be careful!).
  795.  
  796.         the optional '!' inverts the logic.
  797.  
  798.         Conditions:
  799.  
  800.  
  801.         #        if toggle entry # is SET.  there are 256 toggles (0..255)
  802.         t        if On line 1
  803.         b        if On last line
  804.         l        if At column 0
  805.         r        if At end of line (spaces below and beyond)
  806.         m        if Text has been modified
  807.         i        if in insert mode
  808.         x[<=>]# if column position (starts at 1) is (any OR combo of
  809.             <, =, or >) than some number.  Example:   x<=20
  810.         y[<=>]# if Line number (starts at 1) is (same as for x)
  811.         cl        character under cursor is lower case alpha
  812.         cu        character under cursor is upper case alpha
  813.         ca        character under cursor is alpha-numeric
  814.         cn        character under cursor is numeric
  815.         c[<=>]# character under cursor is ascii code # (# in decimal)
  816.             optional conditionals as in 'x' and 'y'.
  817.         cb        cursor within a block
  818.         e        in cmdline mode
  819.  
  820.     Example: simulating an insert mode toggle: ALT-i (not CTL-i)
  821.  
  822.     map a-i (ifelse 0 (toggle 0 insertmode OFF) (toggle 0 insertmode ON))
  823.  
  824.     Example: while lower case, map to upper case and move right.
  825.  
  826.     map c-U (while cl (tlate -32 right))
  827.  
  828.     Example: Search/Replace all of text.
  829.  
  830.     map c-R (escimm (findstr ) escimm (repstr ) repeat -1 nextr)
  831.  
  832.      if c<32 ((char under cursor is smaller than 32))
  833.      if c<>32 ((char under cursor is not equal to 32))
  834.      while !b down
  835.  
  836.  
  837.                     IV
  838.                  FILE PARTICULARS
  839.  
  840. No Matter what you set internal tabs to, tabs in disk files will be 8.
  841. This allows you to use your favorite tabs stops (mine are 4) and still
  842. have your disk files compatible with TYPE, a printer, etc...  DME by
  843. default doesn't bother to optimize when writing out files and simply uses
  844. spaces. If you (SAVETABS on) before saving (or in your S:.EDRC, etc...),
  845. DME will attempt to optimize the file by placing TABS in appropriate
  846. places.  DME will not place any TABS after the first single, back, or
  847. double quote is encountered in a line.    If this does not cover every
  848. situation in your particular application that you want to be *sure* no tabs
  849. will occur in sensitive sections, then you should not use (SAVETABS on).
  850.  
  851. It should be noted that since DME removes spaces at the end of the line,
  852. editing UUENCODED ascii files will not work for uuencoded lines which end
  853. with a space.  The nominal fix is to add an extra character after each
  854. uuencoded line (anything) in the proper column, which is ignored by the
  855. UUDECODE program.
  856.  
  857. The command to save the current document under the default name is SAVEOLD,
  858. *not* SAVE.  SAVE is not a valid command.  This is to prevent people who
  859. have not read the documentation from assuming 'save' takes an argument (and
  860. screwing up their work).  SAVEOLD does NOT take an argument, SAVEAS does.
  861.  
  862. SAVEOLD/SAVEAS do not automatically backup the destination file.  If you
  863. are working in an enviroment where you are worried about ensuring a viable
  864. copy can be recovered if your Amiga crashes in the middle of the save, you
  865. can write a macro to save the file into two places.  Usually, people backup
  866. their working disks so this is not neccesary.
  867.  
  868. Workbench Support:  If DME is run from the workbench, it will automatically
  869. construct an icon file when you save a document.  If run from a CLI, no
  870. icon file is generated.
  871.  
  872.                     V
  873.                   WORKBENCH SUPPORT
  874.  
  875. DME V1.26 and beyond support the workbench in the following way:  (1) you
  876. can click on the DME icon to bring up DME with the file "unnamed".  (2) you
  877. can select one or more standard ascii documents which have DME as the
  878. default tool.  If DME has no knowlege of a text icon, it uses its own.
  879. Command line arguments are passed to DME via the tooltypes entries for
  880. DME's application icon or via individual document icons.  The following
  881. format is used:  (This is a hack, no?)
  882.  
  883.     ****** WARNING, 1.40-41, most workbench options do not work.
  884.  
  885.     ARG=flag
  886.  
  887.     See the OVERVIEW section for allowed flags.  Only one argument per line
  888.     is allowed (sorry).  The tooltypes for the application icon are
  889.     processed first, then the tooltypes for each document icon are
  890.     processed before each file is loaded.
  891.  
  892.     ARG= -t10
  893.     ARG= -l10
  894.  
  895.  
  896.                     VII
  897.                 COMPILING
  898.  
  899. DME now compiles under either Manx C or Lattice C (V5.02 and beyond).
  900. dres.library is no longer required.
  901.  
  902.