home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
languages
/
dice_466
/
dice206b.lzh
/
netdcc
/
doc
/
dme.doc
< prev
next >
Wrap
Text File
|
1990-10-27
|
46KB
|
1,195 lines
dme/dme dme/dme
DME.DOC DME version 1.42 Matthew Dillon
22 August 1990
DME, (C)Copyright 1987-90, Matthew Dillon. All Rights Reserved.
This software may be distributed for non-profit only. This software is
FREEWARE, not shareware.
Matthew Dillon
891 Regal Rd
Berkeley, Ca. 94708
USA
Source is avalable:
(1) By regular mail (send a disk)
(2) By Electronic mail:
INTERNET: uunet.uu.net!overload!dillon OR
dillon@overload.Berkeley.CA.US
Donations welcome but not solicited (I ain't a starving artist).
icon by Bryce Nesbitt
text markers and the text-block stack by Kevin Seghetti (some of the new
commands for 1.30).
AREXX interface (Bill Hawes' ARexx REXX language interpreter) ported
by Kim DeVaughn
1.42 additions by Markys Wenzel
---------------------------------------------------------------------------
0 Installation
I Overview
II Keymapping key and mouse mapping
III Command Sequences DME commands
IV File Particulars notes on loading and saving files,
V Workbench Support
VI Revision Summary revision numbering, changes made, etc...
VII Compiling compiling instructions
0
INSTALLATION
The NULL: device must be mounted to be able to use the EXECUTE command.
This is so EXECUTE works even if the console window goes away. Otherwise,
simply put DME in an accessable location (usually C:). Put the dme.icon
file in the same directory as DME if you want to access the application
from the workbench (dme.icon is not needed if accessed from a CLI or shell).
People appear to have problems using the EXECUTE command when DME is run
from the workbench. I have no solution yet.
CONFIGURATION of default window placement, pen selection, and most editor
modes (insert/overwrite, margin, etc...) is accomplished by bringing up
DME, setting it up how you like, then selecting the SAVECONFIG menu
option (saves to s:dme.config).
I
OVERVIEW
See REVISIONS section for revisions. DME is an editor designed mainly for
programmers. Although it is not a word processor, it does include many
word processing features such as Word-Wrap and automatic paragraph
formatting. Here is a quick 'features' list:
-control language based on a rich command set accessed manually
or via arbitrary mapping of keys. (Every key may be mapped to 128
different things via qualifier and mouse keys)
-General variables, reference macros as variables, ENV: enviroment
variables (1.30C and beyond).
-fast visual response (it scrolls quickly)... even faster when
BlitzFonts or similar text speedup utilities are installed.
-title-line statistics showing your current position in the file,
file name, whether the file has been modified or not, etc...
-Multiple Windows, ability to iconify windows
-Word Wrap and automatic paragraph formatting.
-ability to map any KEY or MOUSE BUTTON combination.
DME has been designed to allow easy expansion, and I intend to make many
future improvments. It has not been designed for user friendliness, but is
straight forward if you read this document [care]fully.
AS OF 1.40 and until further notice DME no longer takes command line
arguments other than file arguments, or workbench based window arguments.
DME used to take arguments to specify window dimensions. Use the saveconfig
command to setup default window parameters.
The 1.40-41 Version is an experimental intermediate version, documentation may
not be up to date.
Normally, DME will automatically SOURCE two script files, S:.EDRC, and the
.EDRC in your current directory. These files do not have to exist. These
script files usually contain mappings and do things (for example, turn on
savetabs).
II
KEYMAPPING
MOUSE BUTTONS:
The mouse buttons and combinations thereof may now be mapped. The
default mappings for the mouse buttons are as follows:
Left-button: Move cursor to current mouse position
Right-button: Iconify window
Left-button held down while moving mouse tracks the cursor
The iconification features:
-Remembers original window size and placement
-Remembers placement of iconified window when you re-iconify later.
Currently, you will crash the machine if you run out of memory and DME
is unable to open the icon window or original window, so be careful.
see below for mapping the mouse buttons and mouse movement.
KEYBOARD:
The rest of the Functional interface for DME is based on key/mouse/menu
mappings and a rich command set. Unlike other text editors, any
non-qualifier key in DME may be defined to have any meaning whatsoever. It
just so happens that the default keymappings assign such things as the
(return) key to the RETURN function, the (up) key to the UP function,
etc... Keys are named by their keycap labels with the following
exceptions:
the name for Back-Space is BS
the name for numeric keypad keys are prepended with an NK, except for
the Enter key which is named 'ENTER'.
The four cursor control keys are labeled UP, DOWN, LEFT, and RIGHT
The three mouse buttons are labeled RMB, MMB, and LMB.
NOTES:
You must type commands in lower-case, except for text, which can be
either lower or upper case, and for upper-case alpha keys when
specifying keymaps (i.e. A and s-a are the same key). The
exception is the AMIGA qualifier key, which uses 'A' instead of
'a'(Alt).
Each key may be qualified with any combination of CTRL, ALT, SHIFT,
AMIGA, or any of the MOUSE buttons. With 6 qualifiers (7 if your
mouse has a middle button), you can assign up to 64 (128) different
maps to each physical key on the keyboard.
The CAPS-LOCK, when lit, is equivalent to SHIFT only for Alpha keys.
The AMIGA-ALT (aA) combination isn't very usable since Intuition
uses the sequence to duplicate a Mouse SELECT. Other AMIGA
sequences are used by intuition for mouse movement and other things.
Some other qualifier combinations may not be usable due to other
special sequences.
Some keys must be mapped by their lower-case keycap. That is, to
map the '>' key (USA keyboard), you specify shift dot (s-.)
***EXAMPLES:***
tab tab
a-a ALT a
A-a AMIGA a
sA-a SHIFT AMIGA a
s-tab SHIFT tab
c-tab CTRL tab
ac-? ALT-CTRL ?
s-f5 SHIFT F5
nk0 Numeric Keypad 0
cs-nk0 CTRL SHIFT Numeric Keypad 0
L-lmb Left Mouse button pressed
L-mmove Mouse moved while left mouse button held down
LR-lmb left mouse button hit while right mouse button held down
s-. shift . ('>' for USA keyboards)
***************
MAPPING MOUSE BUTTONS
Mouse buttons serve both as QUALIFIERS and as KEYS. Thus, you can map
both normal keystrokes which require a mouse button to be held down:
map L-a ((left button and an a))
as well as the mouse keys themselves:
map L-lmb ((left mouse key))
note that you had to specify the left mouse button down qualifier L as
well as the left mouse button LMB.
If you map the left mouse button, and also map a sequence such as left
mouse button + a:
map L-lmb tomouse
map L-a ((hello))
Note that the first mapping will always get executed even if you
intended L-a (that is, BOTH mappings would get executed). In order
to avoid confusion you might want to UNMAP the system default mapping
for the right mouse button (mapped to ICONIFY) if you wish to apply
combinations to the right mouse button.
MOUSE MOVEMENT is mapped with one or more mouse qualifiers (L, R, M),
plus 'MMOVE' for the key. That is:
map LR-mmove ((moving the mouse with both buttons held down))
Or how bout capping the characters under the mouse while moving the
mouse?
map LR-mmove (tomouse if cl (tlate -32))
DEFAULT KEYMAPPINGS:
All Printable Ascii keys mapped to their ascii equivalent. BS, DEL, UP,
DOWN, LEFT, RIGHT, TAB, S-TAB, and ENTER are mapped properly. These are
the default system keymappings.
map (a-c) (bcopy)
map (a-d) (bdelete)
map (a-down) (scrolldown)
map (a-l) (while cu (tlate +32 right))
map (a-m) (bmove)
map (a-r) (nextr)
map (a-s) (bsource)
map (a-u) (while cl (tlate -32 right))
map (a-up) (scrollup)
map (bs) (bs)
map (c-/) (escimm (find ))
map (c-]) (ref)
map (c-[) (ctags)
map (c-1) (goto block)
map (c-b) (block)
map (c-c) ()
map (c-del) (remeol)
map (c-down) (pagedown)
map (c-esc) (recall)
map (c-f) (reformat)
map (c-g) (escimm (goto ))
map (c-i) (insertmode on)
map (c-j) (join)
map (c-l) (wleft)
map (c-n) (next)
map (c-o) (insertmode off)
map (c-p) (prev)
map (c-q) (quit)
map (c-r) (wright)
map (c-s) (split first down)
map (c-u) (unblock)
map (c-up) (pageup)
map (c-w) (wordwrap toggle)
map (del) (del)
map (down) (down)
map (enter) (return)
map (esc) (esc)
map (f1) (escimm (insfile ))
map (f10) (saveold quit)
map (f2) (escimm (newfile ))
map (f3) (escimm (newwindow newfile ))
map (f6) (saveold iconify)
map (f7) (escimm (bsave ))
map (f8) (saveold escimm (newfile ))
map (f9) (saveold)
map (L-lmb) (tomouse)
map (L-mmo) (tomouse)
map (left) (left)
map (R-rmb) (iconify)
map (return) (return insline up firstnb down)
map (right) (right)
map (s- ) (( ))
map (s-del) (deline)
map (s-down) (bottom)
map (s-left) (first)
map (s-right) (last)
map (s-tab) (backtab)
map (s-up) (top)
map (sa-s) (unblock block block bsource)
map (tab) (tab)
map (up) (up)
III
COMMAND SEQUENCES
DME has a rich command set which allows you to embed commands within
commands, or specify multiple commands in a row. A command consists of a
KEYWORD followed by a FIXED number of arguments (0, 1, 2...). The argument
delimeter in DME is a SPACE. Therefore, to embed strings containing spaces
as a single argument, you must surround the string with (string)
(backsinglequote-string-singlequote). TEXT to be written as if typed is
also specified via a string in backquote-quotes. For example:
right right (hello) right right (hello) enter down
map f4 (right right) map f5 (left left)
map f4 ((hello))
Reiterating (because this is important!)... If a command expects ONE
argument, then it really does expect a single argument, and any remaining
arguments are thought to be the next command... so:
map f4 right
-right is only one word, so no need
for ().
map f4 (right right)
-we want to map f4 to two rights... we
need the () or the second right will
not be part of the map.
map c-del (repeat cright del)
-this is already implimented as REMEOL,
but shown here for clarity.
Some arguments will eventually be fed through the command interpreter more
than once. The MAP command is a good example. When you execute a MAP
command, the first run through the command interpreter installs the map
string minus a set of quotes. So, if you want to specify text, you must
enclose the text in two sets of ((text)) because the map string gets passed
through the command interpreter again when you hit the mapped key. Here
are some more complex examples:
map f4 (right right (hello) left left) *RIGHT*
map f4 right right hello left left *WRONG*
map f4 (map f4 ((hello)))
-the first time you hit F4, it's command
is to re-map itself to the TEXT (hello).
(gads!).
map c-i (repeat tr (( )))
-example of how to embed a space in a
map and repeat (goes through command
interpreter three times!).
An easy way to fool around executing commands or making maps is either to
use the ESC key (which enters command mode), or a-S (alt-shift-s), which
EXECUTES the current DME line that the cursor is on.... so you can use DME
to edit and test your new keymappings.
STRING VARIABLES
String variables are replaced with their contents. Three specification
forms are allowed:
$varname - varname can only consist of a-z,A-Z,0-9,-,_
$(varname) - anything not containing a '(' or ')'
$`varname' - anything not containing a '`' or '''
Two special variables exist:
filename - the current filename
scanf - the current scanf'd string (see SCANF below)
lineno - the current cursor line number (1 .. N)
colno - the current cursor column number (1 .. N)
Other variables cause a search of three variable domains to find the
contents. For example, if you give $DMEFONT:
(1) An Internal variable named DMEFONT is searched for. Internal
variables are case sensitive. (see SET, UNSET)
(2) An Enviroment variable name DMEFONT is searched for. Enviroment
variables are NOT case sensitive. (see SETENV, UNSETENV). The
1.3 ENV: is used.
(3) A DME keymap or menu definition named DMEFONT is searched for.
This allows you to say something like $sa-tab to insert the
contents of the shift-alt-tab keymap. (see MAP, UNMAP, and
MENU oriented commands).
The reason for the other two forms of variable specifiction is to allow
one to access strangely named variables (with puncuation and other crap).
SPECIAL NOTE: What is wrong with this command?
repeat 100 (first ($myvar))
What is wrong is that $myvar is evaluated BEFORE the repeat is
executed. myvar might contain characters that would confuse the
command specification when. That is, if myvar contained a '(' you
could get something like: repeat 100 (fist ((()) which is obviously
incorrect. By using \ you can cause $myvar to be evaluated at
loop-execution time rather than before:
repeat 100 (first (\$myvar))
These kinds of problems can also occur when you do keymaps... you
probably do not want to evaluate the variable at keymap-entry time,
but rather would want the variable evaluated at keymap-execution time.
On the otherhand, this is perfectly allowable:
set x (tlate +1)
repeat 100 ($x)
Which executes the command (tlate +1) 100 times... By NOT surrounding
the variable with parens (depends on the situation), the variable is
executed rather than inserted as text.
SPECIAL CHARACTERS
^ is used to introduce a control character. For example, ^c would
embed a control-c. You cannot embed c-@ (ascii code 0).
backslash \ is used to override special meanings. The next character
is overriden.
map c-a ((^l)) -map control a to produce a control l
map c-a ((\\\^l)) -map control a to produce a "^l". The first
\ overides the second, and the third overides
the ^.
COMMAND LIST:
(text) -enter text as if typed.
key -execute a keymap as a macro (example: c-a)
header-item -execute a menu item as a macro (example: Project-Save)
(case independant)
ADDPATH path -Add the specified symbolic directory to DME's special
search path (see REF and CTAGS).
ARPINSFILE -INSFILE filerequestor, only if ARP.LIBRARY installed
ARPLOAD -NEWFILE filerequestor, only if ARP.LIBRARY installed
ARPSAVE -SAVEAS filerequestor, only if ARP.LIBRARY installed
BACK -same as BS
BACKTAB -backward tab
BCOPY -copy block before cursor line
BDELETE -delete the block
BGPEN pen -set background pen
BLOCK -Set start or end of block
BMOVE -move block before cursor line
BOTTOM -Move to Bottom of File
BS -backspace, (delete char to left of cursor)
BSAVE file -save the block to a file
BSOURCE -source current text block as if it were a script file
CHFILENAME name -change the name of the working file
CTAGS -search for the tag under the cursor (see below)
DEL -delete, (deletes char under cursor)
DELINE -delete line
DOWN -cursor down
DOWNADD -cursor down. If at bottom of text, add a line.
ESC -toggle manual command entry mode
ESCIMM arg -go into command entry mode prompting with a
predefined string.
EXECUTE comm -Execute a CLI command
FGPEN pen -Set foreground pen
FIND string -SET the search pattern and do a NEXT
FINDR s1 s2 -Set find and replace patterns and do one find/rep.
FINDSTR string -SET the search string pattern
FIRST -move to column 1
FIRSTNB -Move to first non-blank in line.
GOTO BLOCK -Goto the beginning of the marked block.
GOTO START -same as GOTO BLOCK. undefined if no block
GOTO END -goes to the END of the marked block. undef. if no blk.
GOTO [+/-]N -Goto an absolute or relative line number
HEIGHT N -set height in PIXELS for any new windows
HGPEN pen -set highlight pen
ICONIFY -iconify the window
IF cnd act -IF/WHILE/IFELSE.. SEE BELOW
IFELSE cnd ifact elseact
IGNORECASE what -set case ignore for seaches. what = on, off, or toggle
INSERTMODE what -set INSERTMODE. what = on, off, or toggle
INSFILE name -insert a file into the current text.
INSLINE -insert line
JOIN -join next line to line at cursor
JUSTIFY how -simple text justification. Currently only 'full'
justification supported (justify full).
LAST -move one beyond the last non-space in a line.
LEFT -cursor left
LEFTEDGE N -set leftedge on the screen in PIXELS for any new window
MAP key map -map a key to a keymap
MARGIN N -set WordWrap and paragraph formatting margin
(related to WORDWRAP and REFORMAT)
MENUADD hdr item cmd -add menu item
MENUDEL hdr item -delete menu item
MENUDELHDR hdr -delete menu header
MENUCLEAR -delete entire menu
MENUON -enable menus (multiple calls are stacked)
MENUOFF -disable menus (multiple calls are stacked)
MODIFIED on/off/toggle
-set modified flag manually
NEWFILE name -replace current text with new file
NEWWINDOW -open new window using default window parameters
NEXT -find next occurance of search pattern
NEXTR -find next occurance and replace
NULL -no operation
OPENWINDOW geo -open new window using specified geometry. Geometry is
specified as: +/-leftedge+/-topedge+/-width+/-height,
where negative numbers denote values relative to the
width or height of the screen. For example, the
following opens a nearly full-screen window leaving
10 pixels above, below, to the left, and to the right:
openwindow +10+10-10-10
The following opens a window in the upper right hand
corner of width 320 and height 100.
openwindow -320+0+320+100
openwindow -320+0-0+100 (same thing)
openwindow -320-100-0-0 (lower rght hand corner)
PAGEDOWN -pagedown a partial page (see PAGESET)
PAGESET n -n PERCENT (0 to 100). page step size relative to the
current number of rows in the window.
PAGEUP -pageup a partial page (see PAGESET)
PING n -set a text marker (0-9).
PONG n -move to a previously set text marker (0-9)
PREV -find previous occurance of search pattern
PREVR -find previous occurance and replace
PUSHMARK -push the currently marked block onto a stack and
unhighlight the block
POPMARK -pop the block stack and highlight the popped block
PURGEMARK -clear the mark stack
QUIT -quit
RECALL -recall most recently entered command. Must be used
from a keymap (c-esc).
REF -reference string under cursor (see below)
REFORMAT -reformat paragraph using the margin.
REMEOL -Remove text under and beyond the cursor.
REMPATH wild -Remove one or more symbolic directorys from DME's
special path... a */? wildcard is acceptable.
REPEAT cnt comm -SEE BELOW
REPSTR string -SET the replace string pattern
RESETTOGGLE N -clear toggle array entry N(0..31)
RESIZE cols rows-Resize current window. E.G: (resize 70 23)
RETURN -same as (FIRST DOWNADD)
RIGHT -cursor right
RX -ARexx macro, no args (RX macname)
RX1 -ARexx macro, one arg (RX1 macname arg1)
RX2 -ARexx macro, two args (RX2 macname arg1 arg2)
SAVEAS file -save current text under a different name (title
line name does not change)
SAVECONFIG -save current editor configuration to s:dme.config
SAVEMAP file -save user keymappings
SAVEOLD -save current text under current name
SAVESMAP file -save all keymappings, including system keymaps
SAVETABS on/off -Optimize file saves by crunching spaces to tabs.
The default is OFF.
SCANF ctlstr -scan the string at the current text position (C scanf)
example: (scanf %s) SEE BELOW
SCREENBOTTOM -Move cursor to the bottom of the screen.
SCREENTOP -Move cursor to the top of the screen
SCROLLUP -Scroll up without moving cursor
SCROLLDOWN -Scroll down without moving cursor
SET var str -create/modify an internal variable (access w/ $)
SETENV var str -create/modify an enviroment variable (1.3 ENV:)
SETFONT font sz -Set the window's font. ex: (setfont topaz.font 11)
SETPARCOL col -Set the LEFT margin for word wrap mode paragraphing &
reformat. MUST be less than MARGIN.
SETTOGGLE N -set toggle array entry N (0..255)
SOURCE file -source a script file. '#' in first column for comment
SPLIT -Split line at cursor
SWAPMARK -PUSHMARK, swap top two marks on stack, POPMARK
TAB -forward tab
TABSTOP N -Set tab stops every N. does not effect text load
TITLE (title) -set window title manually
TLATE [+/-]N -translate character by +N or -N, or set character
to exactly N if no + or -. (e.g. TLATE +65 TLATE 3)
TMPHEIGHT N -set window height for next window only, pixels
TMPWIDTH N -set window width for next window only, pixels
TOGGLE N -flip toggle array entry N (0..255) (See IF)
TOMOUSE -moves cursor to mouse position
TOP -Move to Top of File
TOPEDGE N -set topedge in the screen in PIXELS for any new window
TPEN pen -set pen for title bar rendering
UNBLOCK -clear the block markers for the current window
UNDELINE -insert most recently deleted line (only last line saved)
UNDO -undo current line (must be mapped to a key to work)
UNJUSTIFY -removes extra spaces in a line
UNMAP key -unmap a key
UP -cursor up
UNSET var -delete an internal variable
UNSETENV var -delete an enviroment variable
WHILE cnd act -(see below)
WIDTH N -set width in PIXELS for any new window
WLEFT -move to beginning of previous word. If in the
middle of a word, move to beginning of current word.
WORDWRAP on/off/toggle
-Word Wrap mode (related to MARGIN)
WRIGHT -move to beginning of next word
-------------------------------------------------------------
------------- More Info on Complicated Commands -----------------
-------------------------------------------------------------
MENUOFF/ON -This command will enable/disable menus. Users
who have a whole bunch of MENUADD commands in
their .EDRC should note that disabling menus at
the beginning will speed up the MENUADD commands.
Then reenable menus at the end. These calls are
stackable in that if you call MENUOFF, say, twice,
it will take two MENUON commands to restore
menus. The reverse is not true.
CTAGS (c-[) -(1.30B and beyond) Compatible with Aztec's CTAGS
program. This command searches for the subroutine
name under the cursor in the associated tags file
("tags" in the directory holding the file currently
being edited). Also, the file "tags" in directories
specified by the special DME path (see ADDPATH and
REMPATH) will be searched.
If the tag is found, it loads the file the subroutine
resides in if neccesary, then WindowToFront()'s the
window, ActivateWindow()s it, and GOTO's the line
where the subroutine starts. The search within the
source file is anchored to the left column. If the
file is already loaded, it is not reloaded.
This enables a programmer to quickly trace subroutines
over an arbitrary number of files.
The tags file contains one or more lines of the following
format:
subroutine-name file-name /^search-pattern
(that's a slash and a carrot, then the pattern)
-- EXAMPLE of 'TAGS' file:
setpen cmd1.c /^setpen(
do_up cmd1.c /^do_up(
--
SPECIAL NOTE: CTAGS will work even if you are not in
the directory containing the file. You can thus place
a tags file in the directory containing the files it
references, and the filenames WITHIN the tags file need
not be a full path.
REF (c-]) -(1.28d and beyond). This is a very powerful new
command that allows you to bring up a reference to
a keyword with a single keystroke. This is useful for
programmers who have on-line documentation or fully
commented include files. DME opens a window just big
enough to fit the reference.
NOTE: The new CTAGS command may be more suited to
your application.
The reference keyword is the alpha-numeric string
currently under the cursor. REF will search the
file DME.REFS in the directories listed by the
special DME path (see ADDPATH and REMPATH). The
file must be built by the user and each line has the
following format:
(keyword) (nolines/endstring) (file) (searchstr/##seekpos)
Surrounding the keywords with `' or () is optional if
the keyword does not contain spaces.
keyword -keyword under cursor
nolines/ends-either a number (the number of lines
in the reference) or a string denoting
the end of the reference when found.
file -the file containing the reference
material
searchstr/##-search string in file that indicates
the beginning of the reference, or
two hashes (##) and the seek position
in decimal (like ##2343). The latter
method is used mainly for reference-
generator programs.
Upon finding a successful keyword match the specified
file is openned and the seach string searched for. If
a seek position was specified no search is made and a
seek is made to the beginning of the reference. If
found, the indicated number of lines (if a number
is specified for <nolines/ends>) or until a match with
the endstring (if a string was specified) will be
placed in a temporary file and a new DME window
brought up. The temporary file is then deleted.
When looking for matches, the compare is anchored at
the beginning of each line in the file. Thus, any
spaces in front of the string in the file must be
duplicated.
T: must be assigned to a temporary directory, usually
RAM: See the included example DME.REFS file. The
most common things referenced are the autodocs and
commented include files.
Some modification of the included DME.REFS.* files may
be required due to differences in include file and
autodoc format.
SCANF ctlstr -This is equivalent to the C scanf() function with the
restriction that only one conversion is allowed, that
conversion being a string. Thus:
scanf %s will place the string under the
cursor in the variable $scanf
scanf %4s The first four chars of the string.
scanf %[0123456789]
will scan the string while it contains
specified chars (e.g. scan a number)
scanf %[~,] will scan the string until it finds
a ','.
The variable $scanf may be used as an argument in any
command. Example: (insfile $scanf).
NOTE: If using $scanf in a macro, you probably want
to precede it with a \ to prevent it from being
evaluated at macro-creation time.
REPEAT N arg -Repeat (arg) N times. Apart from being a number, N
can also be one of:
line Current line # (lines begin at 1)
lbot #lines to the bottom, including current line
cleft column # (cols begin at 0)
cright #chars to eol, including current char under cursor
tr #char positions to next tab
tl #char positions to next back tab
Certain commands can abort a REPEAT loop.
Specifically, any FIND[R], NEXT[R], or PREV[R] in which
the search string is NOT found will abort a REPEAT.
Most operations which can go out of bounds, such as
UP, LEFT, RIGHT, DOWN, also abort a repeat.
Specifying -1 as N causes REPEAT to go on forever
(well, actually, 0xFFFFFFFF times) or until an abort.
IF [!]condition arg
WHILE [!]condition arg
IFELSE [!]condition arg else arg
If the specified condition is true, execute the argument. For
WHILE, the argument is executed until the condition is false
(be careful!).
the optional '!' inverts the logic.
Conditions:
# if toggle entry # is SET. there are 256 toggles (0..255)
t if On line 1
b if On last line
l if At column 0
r if At end of line (spaces below and beyond)
m if Text has been modified
i if in insert mode
x[<=>]# if column position (starts at 1) is (any OR combo of
<, =, or >) than some number. Example: x<=20
y[<=>]# if Line number (starts at 1) is (same as for x)
cl character under cursor is lower case alpha
cu character under cursor is upper case alpha
ca character under cursor is alpha-numeric
cn character under cursor is numeric
c[<=>]# character under cursor is ascii code # (# in decimal)
optional conditionals as in 'x' and 'y'.
cb cursor within a block
Example: simulating an insert mode toggle: ALT-i (not CTL-i)
map a-i (ifelse 0 (toggle 0 insertmode OFF) (toggle 0 insertmode ON))
Example: while lower case, map to upper case and move right.
map c-U (while cl (tlate -32 right))
Example: Search/Replace all of text.
map c-R (escimm (findstr ) escimm (repstr ) repeat -1 nextr)
if c<32 ((char under cursor is smaller than 32))
if c<>32 ((char under cursor is not equal to 32))
while !b down
IV
FILE PARTICULARS
No Matter what you set internal tabs to, tabs in disk files will be 8.
This allows you to use your favorite tabs stops (mine are 4) and still
have your disk files compatible with TYPE, a printer, etc... DME by
default doesn't bother to optimize when writing out files and simply uses
spaces. If you (SAVETABS on) before saving (or in your S:.EDRC, etc...),
DME will attempt to optimize the file by placing TABS in appropriate
places. DME will not place any TABS after the first single, back, or
double quote is encountered in a line. If this does not cover every
situation in your particular application that you want to be *sure* no tabs
will occur in sensitive sections, then you should not use (SAVETABS on).
It should be noted that since DME removes spaces at the end of the line,
editing UUENCODED ascii files will not work for uuencoded lines which end
with a space. The nominal fix is to add an extra character after each
uuencoded line (anything) in the proper column, which is ignored by the
UUDECODE program.
The command to save the current document under the default name is SAVEOLD,
*not* SAVE. SAVE is not a valid command. This is to prevent people who
have not read the documentation from assuming 'save' takes an argument (and
screwing up their work). SAVEOLD does NOT take an argument, SAVEAS does.
SAVEOLD/SAVEAS do not automatically backup the destination file. If you
are working in an enviroment where you are worried about ensuring a viable
copy can be recovered if your Amiga crashes in the middle of the save, you
can write a macro to save the file into two places. Usually, people backup
their working disks so this is not neccesary.
Workbench Support: If DME is run from the workbench, it will automatically
construct an icon file when you save a document. If run from a CLI, no
icon file is generated.
V
WORKBENCH SUPPORT
DME V1.26 and beyond support the workbench in the following way: (1) you
can click on the DME icon to bring up DME with the file "unnamed". (2) you
can select one or more standard ascii documents which have DME as the
default tool. If DME has no knowlege of a text icon, it uses its own.
Command line arguments are passed to DME via the tooltypes entries for
DME's application icon or via individual document icons. The following
format is used: (This is a hack, no?)
****** WARNING, 1.40-41, most workbench options do not work.
ARG=flag
See the OVERVIEW section for allowed flags. Only one argument per line
is allowed (sorry). The tooltypes for the application icon are
processed first, then the tooltypes for each document icon are
processed before each file is loaded.
ARG= -t10
ARG= -l10
VI
REVISION SUMMARY
V1.43
- refs command fixed yet again
V1.42
- keyboard macro routines accept foreign characters (> ascii code 127)
- bug fix to $variable stuff when 'variable' does not exist
- bug fix to split
- bug fix to join
- COL command enhanced (now w/ +col and -col for relative movement)
- new special vars: $margin, $modified, $currentline
- new commands UNDELINE, MODIFIED, JUSTIFY, UNJUSTIFY, TITLE
- cosmetic changes to arp requester
V1.41 HOPEFULLY STABLE
- Recompiled with fixes and new DICE version
V1.40 GAMMA INTERMEDIATE
- No longer configurable with 'config' program. Now saves window
dimensions, color selection, and most window modes (insert, margin,
etc...) to S:dme.config, restoring automatically when any new
window is brought up.
- Can no longer specify window dimensions on command line or via
workbench, sorry!
- New commands: SAVECONFIG FGPEN BGPEN HGPEN
- Fixed bug in ARP requester ... wasn't saving D2/D3/A6. Also fixed
but in Lattice asm... apparently if the __MERGED section in afilereq.asm
is first lattice asm generates a 0 byte bss section OOPS!
- This is an Experimental intermediate version
(executable compiled w/ my compiler and may not compile cleanly under
Lattice or Aztec)
V????
- didn't restore pr_ConsoleDevice after an execute!
V1.39
- NEW COMMAND, 'setparcol'. Set paragraph left margin for reformat
command and word wrap mode. The default is -1 (same as original
format), else a column number.
- case sensitive bug fixed.. used to always be case insensitive
no matter which option you chose.
- search-and-replace bug fixed... cursor positioned to END of
replaced string to prevent improper operation when replace
string is a superset of the search string.
- Menus more compact.
V1.38
- Removed fix in 1.37, use '1.4libpatch' if running under 1.4A16.
- FIXED AREXX BUG... DMe would crash if ARexx was installed for
V's 1.37 and 1.36
V1.37
- 1.4a16 crashes on OpenLibrary() where the library does not
exist. Doesn't try to open arex if running under 1.4
(for now, this is a temporary stopgap)
V1.36
-Removed dres.library IPC. Removed dres.library requirement. (ARexx IPC
still in of course). Source now compilable under Lattice C and Manx C.
V1.35a
-can change block pen now and DME updates the title using the correct
color.
V1.35
-Bug in 1.34 fixed, would only work if dres.library was installed
OOOPPS.
V1.34
-New variables $fpath and $fname have been added. $fpath is the path
part of the current filename, including trailing / or : (if any).
$fname is anything after that. For example:
FILE fpath fname
s:.edrc s: .edrc
blah blah (path = "")
/poof / poof
V1.33 RELEASE
-You can now run <nil: >nil: DME and close the console window that
you ran it from. The execute command now requires the NULL: device
to be mounted or an error will occur.
-space -> tab conversion does not take place after the first control
character (<32), as well as the first quote ("), open paren ((), or
single quote (') that it didn't before.
V1.32 (small fixes)
-Fixed workbench bugs, DME would exit if it could not find the
executables disk object. No longer does so.
V1.31 RELEASE
-Added new variables $lineno and $colno
-Added CD command, ARPLOAD automatically CD's to DIR part of
requester.
-Added IPC support (my own ipc)
-Fixed bug in BMOVE (when the source block is an entire file)
V1.30C LIMITED
-MAJOR! Macros, Internal variables, and ENV: enviroment variables
may be specified with $varname, $(varname), or $`varname'.
-New commands: SET, SETENV, UNSET, UNSETENV (variable support)
-REFS window bug fixed I hope (made window slightly too small).
-SAVE[S]MAP bug fixed for space mappings
-CTAGS doesn't modify the window title if the window is iconified
(allows you to make the following map: map <somemap> (iconify ctags)
V1.30B Limited release
-Kim fixed a bug in splitpath
-added CTAGS command... support for Aztec's CTAGS program
-added ADDPATH command... special directory paths for DME
-added REMPATH
REFS no longer searches fixed directories, but looks at the
ADDPATH directories. CTAGS also looks at the ADDPATH
directories. CTAGS supports arbitrary directory specifications
and is intelligent about where to look for the TAGS file.
V1.30 RELEASE
-a couple small bugs fixed
-fixed text bug that sometimes overwrites the right border
-added new commands
SETFONT (for all of text, static fonts only)
IGNORECASE (for searches)
-added new commands (AREXX support, Kim DeVaughn)
RX, RX1, RX2
-added new commands (by Kevin Speghetti)
PUSHMARK, POPMARK, SWAPMARK, PURGEMARK block marker stack
PING, PONG text markers (0-9)
note: block marks on the stack, ping and pong, do not track text
changes (bug).
-Many commands will now work while the text window is iconified
without having to uniconify it.
V1.29E
-Fixed low memory bug in do_bomve() again.
-Fixed arp file requestor problems.
-added ARPINSFILE command.
V1.29D
-Fixed low memory bug in do_bmove()...
V1.29C
-highlighted icon window if file modified
V1.29B
-INLINE FILENAME:
added $filename variable. $scanf and $filename can now be embedded
anywhere on the command line.
- ^x added (control-character), so you do not have to embed actual
control characters in your macros.
- \ overide added (\^x) produces "^x" instead of control-x, etc...
V1.29 RELEASE
-Foreign keyboards supported better.
-Iconify window is activated rather than not activated.
-can keymap keys which normally produce nothing.
-blocks are displayed in a different color
-can now move/copy across windows
-can now resize window while file loading
-new commands ARPLOAD ARPSAVE (uses ARP filerequestor if arp.library)
MENUADD MENUDEL MENUDELHDR MENUCLEAR MENUOFF MENUON
minor bugs fixed, major remodeling of the source (this is what I
use my vacation for!)
menus: the right mouse button may be mapped only if there is no
menu, Else is used as the menu selector. NOTE! It is much faster
to surround a set of MENUADD commands in a source file with
MENUOFF at the beginning and MENUON at the end. You can also specify
menu items as macros in other commands (example: project-save)
V1.28h SMALL RELEASE references work better
V1.28g SMALL RELEASE Fixed NK0 bug in 1.28f plus keymap problems in 1.28f
V1.28f RELEASE
Fixed macro bug created in 1.28e... could not specify macros on the
command line.
V1.28e INTERNAL/BETA
New Commands: REF (c-]) -cross reference the word under the
cursor and bring up a new window
containing a description for that
word. See docs above.
-The keymapping has been fixed and should now work on any foreign
keyboard.
-MAJOR ADDITION: () may be used instead of `' to enclose commands.
One can enclose the other ... that is, to get the "'" character you
can say (this is a charlie's day).
V1.28c RELEASE
New Commands: CHFILENAME -change default filename for a window
RECALL (c-esc) -recall command line (e.g. you make a
mistake). Must be used from a keymap,
default is c-esc.
SCANF -C scanf (single string only). Extract
strings from the text for use in any
arbitrary command.
Command Parser: $scanf -as an argument by itself is recognized
to be the extracted string from scanf.
Currently, the variable name (after
the dollar) can be anything since only
one variable exists, but use '$scanf'
for future compatibility.
-Many Bug fixes (mainly benign bugs)
-^C (CONTROL C) now recognized when typed in a window. c-c is mapped
to () = no action.
-Please look at the revised default keymappings listed in these docs.
V1.28 LIMITED RELEASE
New Commands : SCROLLUP (a-up)
SCROLLDOWN (a-down)
Modified Cmds: ESCIMM
The execution of commands specified by an ESCIMM is blocked until
the user hits return on the ESCIMM command line.
BCOPY
No longer unblocks the block.
-Title bar status line no longer blinks when it changes
-Key releases no longer effect operation
V1.27 RELEASE
-macros run about 20% faster due to hashing of the command table
-Maximum # of toggles raised to 256 (see IF/WHILE)
-small fixes to the code (nothing major)
-child windows inherit tab stops, insert mode, and wordwrap mode
-MOUSE BUTTONS AND MOVEMENT CAN NOW BE MAPPED
-New Commands: ICONIFY (used to be hardwired. Is now a command)
-Extended Commands: GOTO (GOTO END of block)
V1.26 Beta, minimal Release
-Workbench support
-New Command: EXECUTE
V1.25 RELEASE
-BSAVE does NOT UNBLOCK after saving (switch in functionality yet again)
-various bugs fixed (IF, tabs on file save)
-New Commands: MARGIN, REFORMAT, WORDWRAP, RESIZE,
TOPEDGE, LEFTEDGE, WIDTH, HEIGHT
-Command line options added for setting the window size and an optional
specified script file (when specified, local .EDRC not sourced).
-Enhanced Commands: IF ..more control with conditions, addition of
a couple more specifications.
JOIN .. functionality slightly changed
-keymaps may now be used as macros in other commands. (macros)
-New keymaps added to the default set.
-Mouse movement cleaned up a little.
V1.24 Internal
V1.23 RELEASE
-S:.EDRC now sourced instead of C:.EDRC
-User keymappings now work in COMMAND mode (when you hit ESC).
-You can now map the Amiga keys ('A' for Amiga, since 'a' is alt).
-Enhanced Commands: IF/IFELSE/WHILE (optional '!' in front of cond)
new condition 'cb' 'character is in selected block'
GOTO block (goto beginning of block)
-NewCommands: PAGESET SAVETABS
-Writing TABS (always 8) out to disk to save space now supported.
V1.22 RELEASE (BUF FIXES FROM 1.20)
-'newfile' fixed
V1.21 RELEASE (BUG FIXES FROM 1.20)
-iconify and window handling fixed
-left mouse button now tracks the mouse.
V1.20 RELEASE
-bug fixes: bsave now unmarks the block, bdelete now sets 'modified' flag.
(other small fixes).
-enhancements: overwrite mode status indicator, find, find-replace now
completely implemented (yahhoo!!!)
-changed commands: FIND NEXT PREV: no longer loop back to the top of
file or top->bottom in the case of PREV. DELINE will now delete
text on the line if there is only one line of text.
-enhanced commands: GOTO REPEAT
-new commands: SAVEMAP SAVESMAP TOGGLE SETTOGGLE RESETTOGGLE TLATE
IF IFELSE WHILE BSOURCE
FINDSTR REPSTR FINDR NEXTR PREVR
NEWWINDOW
-new keymappings: (see a-s, a-S, f3)
-window iconification with mouse menu button.
V1.12 RELEASE
-cursor is now pen #3 rather than #1.
-changeover to AZTEC C, smaller executable.
-now maps shift space to a space.
-new commands: REMEOL, WLEFT, WRIGHT
-display bug fixes (SPLIT)
-FIND/PREV/NEXT will now abort a REPEAT if string not found.
V1.11 RELEASE NOTES
-Bug fixes (mainly graphical mistakes).
-User keymappings are disabled in command mode (so you can unmap
single ascii characters you may have mapped).
-Illegal key combinations no longer give garbage (e.g. ALT-CURSOR-DOWN)
you can, of course, still map them to anything you wish.
-Save now checks for error conditions on write.
-Uses Default Console Keymap (i.e. no longer assumes USA)... but there
*is* some stangeness.
V1.00 RELEASE NOTES
-has find, but no replace function
-assumes USA keyboard (fixed 1.11)
-disk files written out use spaces instead of tabs&spaces
VII
COMPILING
DME now compiles under either Manx C or Lattice C (V5.02 and beyond).
dres.library is no longer required.