[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1267.0. "EDT/SEDT Keypad Emulator for DME" by CGOU01::ADAMS (Clint Adams, Canadian Cust. Support) Tue Mar 22 1988 12:16

    For all you EDT/SEDT junkies out there (like me) I am posting an init
    file for Matt Dillon's DME Editor which will simulate the numeric
    keypad ala EDT (actually I used the numeric keypad from SEDT as
    my template).
    
    DME is a very fast and flexible editor and in my quest to have some
    sort of EDT compatibility while waiting for SEDT I have found it
    very usefull and the only one that will properly read keys from
    the Numeric Keypad (I think that Uedit does as well, but it looked
    more complicated).

    Tacked on the end of this reply is the file EDT.EDRC and EDTKEY.HLP.
    For those of you that are already using DME all you need to to is cut
    the files out of the note, download and include EDT.EDRC in your
    s:.edrc (be careful if you already have some keypad keys mapped). Also
    if you put EDTKEY.HLP in s: the HELP key and the PF2 key will load this
    file in a new window, its a map of the function and keypad keys. 
    
    For those of you who want to try it but are not using DME, I have
    put together an archive of the executable, docs, and my EDT.EDRC.
    It can be found at:
    
    		CGOU01::AMNEW:DME129.ARC
    
    I put the arc together with VMS Arc so all the file names have a
    period after them and will require some renaming. Read the DME docs
    for information about installation and commands.

   ---cut here----
#   EDT Keypad Emulator for Matt Dillon's DME Editor
#   by Clint Adams (CGOU01::ADAMS)
#       
#   The key definitions below will make the Keypad on the A500 or
#   A2000 behave more or less like the EDT Keypad (mostly ala SEDT). 
#   Read the comments associated with each key for their particular 
#   idiosyncrasies. 
#
#   Include this file in your s:.edrc (see DME docs) or as your only s:.edrc
#
#   The EDT functions can be simulated but not really emulated by DME because
#   of it's block mode nature ie. no undletes are possible.
#   Again see the key comments below. Feel free to change the keymappings to
#   make them work the way you like, I am no EDT heavy and some of the keys
#   may not be just right.
#
#   Make sure you have done a "SetMap Usa1" in your startup-sequence or the
#   grey keys on the A500/2000 Keypad won't return anything. Also by changing
#   some keymappings it could probably be adapted to the A1000
#
#
#   Regular DME stuff recommended in the DOCS.
savetabs on
map c-tab   ``    ' left left left left'
map cs-tab  `del del del del'
map a-tab   `goto block while cb `c-tab down''
map as-tab  `goto block while cb `cs-tab down''
#   I don't care for the default mapping of the Return key.
map return `split first down'
#
#   If using pulldowns, make F5 key do the Iconification rather than
#   the Right Mouse Button.
map `f5' `iconify'
#
#   This key will load the keyhelp file in a new window.
map `help' `newwindow newfile s:dmeedt.hlp'
#
#   I like pulldowns, add or delete them if you wish, they have
#   no bearing on the EDT Keypad stuff. Note the use of ARPLOAD
#   and ARPSAVE, makes a very nice user interface.
#
#
menuadd Project ChangeName  (escimm (chfilename ))
menuadd Project Load	    arpload
menuadd Project Insert	    f1
menuadd Project NewWindow   f3
menuadd Project Save	    f9
menuadd Project SaveAs	    arpsave
menuadd Project SaveQuit    (project-save project-quit)
menuadd Project Iconify     Iconify
menuadd Project Quit	    quit
menuadd Convert LF->CRLF    (top repeat -1 (last tlate 13 down))
menuadd Convert CRLF->LF    (top repeat -1 (last left if c=13 del down))
menuadd Block	Indent	    (goto block while cb (first (    ) down))
menuadd Block	Backdent    (goto block while cb (first repeat 4 (if c=32 del) down))

#   map keys for EDT keypad
#
#   Keypad ( - GOLD Key
map `nk(' `settoggle 0'
#
#   Keypad ) - Help
map `nk)' `newwindow newfile s:dmeedt.hlp'
#   Keypad 0 - Line(Open Line)
map `nk0' `ifelse 0 s-nk0 `ifelse 1 cs-nk0 as-nk0''
map `s-nk0' `resettoggle 0 split'
map `as-nk0' `first down'
map `cs-nk0' `first up'
#   Keypad 1 - Word(Change Case) Change Case applies to
#	       character under the cursor only.
map `nk1' `ifelse 0 s-nk1 `ifelse 1 cs-nk1 as-nk1''
map `s-nk1' `resettoggle 0 ifelse cl `tlate -32' `if cu `tlate +32'' right'
map `as-nk1' `wright'
map `cs-nk1' `wleft'
#   Keypad 2 - End of Line(Del. to EOL)
map `nk2' `ifelse 0 `s-nk2' `as-nk2''
map `s-nk2' `remeol join resettoggle 0'
map `as-nk2' `last'
#   Keypad 3 - Char(Specins)
map `nk3' `ifelse 0 s-nk3 `ifelse 1 cs-nk3 as-nk3''
map `s-nk3' `resettoggle 0 escimm `tlate ''
map `as-nk3' `right'
map `cs-nk3' `left'
#
# keypad 4 and 5 change toggle forward and reverse.
#
#   Keypad 4 - Advance(Bottom)
map `nk4' `ifelse 0 `s-nk4' `as-nk4''
map `s-nk4' `bottom resettoggle 0'
map `as-nk4' `resettoggle 1'
#   Keypad 5 - Backup(Top)
map `nk5' `ifelse 0 `s-nk5' `as-nk5''
map `s-nk5' `top resettoggle 0'
map `as-nk5' `settoggle 1'
#   Keypad 6 - Cut(Paste) DME includes the current line in the block
#		to be cut so the macro does an "up" before the cut
#		is done to simulate an EDT cut. Blocks should only
#		defined in the forward direction. If the Sel (Keypad.)
#		is hit a second time the block to be cut will be
#		be highlighted, but the whole block will be cut
#		including the current line.
map `nk6' `ifelse 0 `s-nk6'`as-nk6''
map `s-nk6' `resettoggle 0 insfile ram:pastebuf'
map `as-nk6' `up block bsave ram:pastebuf bdelete'
#   Keypad 7 - Page(Command)
map `nk7' `ifelse 0 s-nk7 `ifelse 1 cs-nk7 as-nk7''
map `s-nk7' `resettoggle 0 escimm `esc ''
map `as-nk7' `pagedown'
map `cs-nk7' `pageup'
#   Keypad 8 - Section(Fill) A section will be 50% of the current window.
map `nk8' `ifelse 0 s-nk8 `ifelse 1 cs-nk8 as-nk8''
map `s-nk8' `resettoggle 0 reformat'
map `as-nk8' `pageset 50 pagedown pageset 100'
map `cs-nk8' `pageset 50 pageup pageset 100'
#    Keypad 9 - Subst Next(Subst) This command forward only.
map `nk9' `ifelse 0 `s-nk9' `as-nk9''
map `s-nk9' `resettoggle 0 escimm `findstr 'escimm `repstr ' nextr '
map `as-nk9' `nextr'
#    Keypad . - Select(Cancel)
map `nk.' `ifelse 0 `s-nk.' `as-nk.''
map `s-nk.' `resettoggle 0 unblock'
map `as-nk.' `block'
#    Keypad / - Find Next(Find) Find is forward only but Find Next can
#				both directions.
map `nk/' `ifelse 0 s-nk/ `ifelse 1 cs-nk/ as-nk/''
map `s-nk/' `resettoggle 0 escimm `find  ''
map `as-nk/' `next'
map `cs-nk/' `prev'
#    Keypad - * Delete Line
map `nk*' `remeol join'
#    Keypad - - Delete Word
map `nk-' `while ca del right'
#    Keypad + - Delete Char
map `nk+' `del'
    

    --------cut here------
                                        +-------------------------------+
   F1     F2     F3     F4      F5      |       |       | Find  |Delete |
+----------------------------------+    | GOLD  | HELP  | Next  | Line  |
|Insert| Load |NewWin|      |Icon- |    |       |       | FIND  |       |
| File |  New |NewFil|      | ify  |    +-------------------------------+
|      |      |      |      |      |    | Page  | Sect  | Subst.|Delete |
+----------------------------------+    |       |  FILL | Next  | Word  |
   F6     F7     F8     F9    F10       |COMMAND|  PAR  | SUBST.|       |
+----------------------------------+    +-------------------------------+
| Save | Save | Save | Save |      |    |Forward|Reverse| Cut   |Delete |
| and  | Block| Load |      |      |    |       |       |       | Char  |
|Iconif|      |  New |      |      |    |BOTTOM |  TOP  | PASTE |       |
+----------------------------------+    +-------------------------------+
                                        | Word  | End   | Char  |       |
                                        |CHANGE | Line  |       | Enter |
                                        | CASE  |DEL EL.| ASCII |       |
                                        +-----------------------+       |
                                        |     Line      |Select |       |
                                        |               |       |       |
                                        |  OPEN  LINE   |CANCEL |       |
                                        +-------------------------------+
T.RTitleUserPersonal
Name
DateLines
1267.1thanksMVCAD3::BAEDERD. Scott DTN 237-2961 SHR1-3/E19Tue Mar 22 1988 12:508
    thanks...I was thinking of doing the same...now, at least I have
    99% of it done for the a1000...thanks again!
    
    ps...dme also available in the mvcad3 archives (I think in the
    [amiga.arc] area)
    
    scott.
    
1267.2protectedWJG::GUINEAUDreams beget RealityTue Mar 22 1988 12:595
    
>    		CGOU01::AMNEW:DME129.ARC
    
-RMS-E-PRV, insufficient privilege or file protection violation

1267.3CGFSV2::CADAMSClint Adams - Calgary, CanadaTue Mar 22 1988 13:284
  
    The protection should be fixed now, the directory was protected.
    
    	Regards....  Clint
1267.4SOFTY::HEFFELFINGERGive my body to science fiction.Tue Mar 22 1988 21:567
    Great minds *do* think alike.  I did one months ago for my 1000.
    I never really got it quite right, so I just went back to using the default
    bindings.  Still love DME even if it won't do EDT undeletes.  (Matt
    must be busy with his DNET project since we haven't had a new release
    since *January*  :-)
    
    Gary
1267.5New and ImprovedCGFSV2::CADAMSClint Adams - Calgary, CanadaFri Mar 25 1988 13:0216
Attached is a new and improved version. It includes some of the things
I use the most when using SEDT like Gold File,Get,Quit,Top,Bottom.

Also, I changed the delete line function so that it will do a delete
to a buffer in RAM disk allowing an undelete line.

Other changes are an end of line join on the "del", "bs", and the "KP+"
and some improvement for the delete word function.

I also remapped the arrow keys to behave like SEDT (ie. they wrap at the
beginning and end of lines).

I have also added "control a" for beginning of line and "control e" for
end of line (ala EMACS)


1267.6CGFSV2::CADAMSClint Adams - Calgary, CanadaFri Mar 25 1988 13:04161
#   EDT Keypad Emulator for Matt Dillon's DME Editor
#   by Clint Adams (CGOU01::ADAMS)
#
#   The key definitions below will make the Keypad on the A500 or
#   A2000 behave more or less like the EDT Keypad (mostly ala SEDT).
#   Read the comments associated with each key for their particular
#   idiosyncrasies.
#
#   Include this file in your s:.edrc (see DME docs) or as your only s:.edrc
#
#   The EDT functions can be simulated but not really emulated by DME because
#   of it's block mode nature.   Again see the key comments below.
#   Feel free to change the keymappings to make them work the way you like,
#   I'm no EDT heavy and some of the keys may not be just right.
#
#   Make sure you have done a "SetMap Usa1" in your startup-sequence or the
#   grey keys on the A500/2000 Keypad won't return anything. Also by changing
#   some keymappings it could probably be adapted to the A1000
#
#
#   Regular DME stuff recommended in the DOCS.
savetabs on
map c-tab   ``    ' left left left left'
map cs-tab  `del del del del'
map a-tab   `goto block while cb `c-tab down''
map as-tab  `goto block while cb `cs-tab down''
#   I don't care for the default mapping of the Return key.
map return `split first down'
#
#   If using pulldowns, make F5 key do the Iconification rather than
#   the Right Mouse Button.
map `f5' `iconify'
#
#   This key will load the keyhelp file in a new window.
map `help' `newwindow newfile s:dmeedt.hlp'
#
#   I like pulldowns, add or delete them if you wish, they have
#   no bearing on the EDT Keypad stuff. Note the use of ARPLOAD
#   and ARPSAVE, makes a very nice user interface.
#
#
menuadd Project ChangeName  (escimm (chfilename ))
menuadd Project Load	    arpload
menuadd Project Insert	    f1
menuadd Project NewWindow   (newwindow arpload)
menuadd Project Save	    f9
menuadd Project SaveAs	    arpsave
menuadd Project SaveQuit    (project-save project-quit)
menuadd Project Iconify     Iconify
menuadd Project Quit	    quit
menuadd Convert LF->CRLF    (top repeat -1 (last tlate 13 down))
menuadd Convert CRLF->LF    (top repeat -1 (last left if c=13 del down))
menuadd Block	Indent	    (goto block while cb (first (    ) down))
menuadd Block	Backdent    (goto block while cb (first repeat 4 (if c=32 del) down))

#   map keys for EDT keypad
#
#   Keypad ( - GOLD Key
map `nk(' `settoggle 0'
#
#   Keypad ) - Help
map `nk)' `newwindow newfile s:dmeedt.hlp'
#   Keypad 0 - Line(Open Line)
map `nk0' `ifelse 0 s-nk0 `ifelse 1 cs-nk0 as-nk0''
map `s-nk0' `resettoggle 0 split'
map `as-nk0' `first down'
map `cs-nk0' `first up'
#   Keypad 1 - Word(Change Case) Change Case applies to
#	       character under the cursor only.
map `nk1' `ifelse 0 s-nk1 `ifelse 1 cs-nk1 as-nk1''
map `s-nk1' `resettoggle 0 ifelse cl `tlate -32' `if cu `tlate +32'' right'
map `as-nk1' `wright'
map `cs-nk1' `wleft'
#   Keypad 2 - End of Line(Del. to EOL)
map `nk2' `ifelse 0 `s-nk2' `as-nk2''
map `s-nk2' `remeol last resettoggle 0'
map `as-nk2' `last'
#   Keypad 3 - Char(Specins)
map `nk3' `ifelse 0 s-nk3 `ifelse 1 cs-nk3 as-nk3''
map `s-nk3' `resettoggle 0 escimm `tlate ''
map `as-nk3' `right'
map `cs-nk3' `left'
#
# keypad 4 and 5 change toggle forward and reverse.
#
#   Keypad 4 - Advance(Bottom)
map `nk4' `ifelse 0 `s-nk4' `as-nk4''
map `s-nk4' `bottom last resettoggle 0'
map `as-nk4' `resettoggle 1'
#   Keypad 5 - Backup(Top)
map `nk5' `ifelse 0 `s-nk5' `as-nk5''
map `s-nk5' `top first resettoggle 0'
map `as-nk5' `settoggle 1'
#   Keypad 6 - Cut(Paste) DME includes the current line in the block
#		to be cut so the macro does an "up" before the cut
#		is done to simulate an EDT cut. Blocks should only
#		defined in the forward direction. If the Sel (Keypad.)
#		is hit a second time the block to be cut will be
#		be highlighted, but the whole block will be cut
#		including the current line.
map `nk6' `ifelse 0 `s-nk6'`as-nk6''
map `s-nk6' `resettoggle 0 insfile ram:pastebuf'
map `as-nk6' `up block bsave ram:pastebuf bdelete'
#   Keypad 7 - Page(Command)
map `nk7' `ifelse 0 s-nk7 `ifelse 1 cs-nk7 as-nk7''
map `s-nk7' `resettoggle 0 escimm `esc ''
map `as-nk7' `pagedown'
map `cs-nk7' `pageup'
#   Keypad 8 - Section(Fill) A section will be 50% of the current window.
map `nk8' `ifelse 0 s-nk8 `ifelse 1 cs-nk8 as-nk8''
map `s-nk8' `resettoggle 0 reformat'
map `as-nk8' `pageset 50 pagedown pageset 100'
map `cs-nk8' `pageset 50 pageup pageset 100'
#    Keypad 9 - Subst Next(Subst) This command forward only.
map `nk9' `ifelse 0 `s-nk9' `as-nk9''
map `s-nk9' `resettoggle 0 escimm `findstr 'escimm `repstr ' nextr '
map `as-nk9' `nextr'
#    Keypad . - Select(Cancel)
map `nk.' `ifelse 0 `s-nk.' `as-nk.''
map `s-nk.' `resettoggle 0 unblock'
map `as-nk.' `block'
#    Keypad / - Find Next(Find) Find is forward only but Find Next can
#				both directions.
map `nk/' `ifelse 0 s-nk/ `ifelse 1 cs-nk/ as-nk/''
map `s-nk/' `resettoggle 0 escimm `find  ''
map `as-nk/' `next'
map `cs-nk/' `prev'
#    Keypad - * Delete Line(Undelete Line)
map `nk*' `ifelse 0 `s-nk*' `as-nk*''
map `s-nk*' `resettoggle 0 insfile ram:linebuf'
map `as-nk*' `unblock block block bsave ram:linebuf deline'
#    Keypad - - Delete Word
map `nk-' `while c>32 del wright'
#    Keypad + - Delete Char
# delete with end-of-line join and handling of DME bug with join at the bottom of the file
map `nk+' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 1 down'''
map `del' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 1 down'''
# backspace with end-of-line join and handling of DME bug with join at the bottom of the file
map `bs' `ifelse !l bs `ifelse b `settoggle 2' `resettoggle 2' up last join if 2 down del''
#    SEDT Bottom Document
map `b' `ifelse 0 `s-nk4' ``b'''
map `B' `ifelse 0 `s-nk4' ``B'''
#    SEDT Top Document
map `t' `ifelse 0 `s-nk5' ``t'''
map `T' `ifelse 0 `s-nk5' ``T'''
#    SEDT File/Quit
map `f' `ifelse 0 `f10' ``f'''
map `F' `ifelse 0 `f10' ``F'''
#    SEDT Quit
map `q' `ifelse 0 `quit' ``q'''
map `Q' `ifelse 0 `quit' ``Q'''
#    SEDT Get Document
map `g' `ifelse 0 `f1' ``g'''
map `G' `ifelse 0 `f1' ``G'''
#    End Of Line
map `c-e' `last'
#    Beginning of Line
map `c-a' `first'
#    Map Arrow Keys to Emulate EDT
map `left' `ifelse l `up last' `left''
map `right' `ifelse r `first down' `right''
1267.7Anyone seen DME Version 130...CGFSV2::CADAMSClint Adams - Calgary, CanadaTue Sep 13 1988 18:5912
Hi...

I've noticed that DME Version 130 was on one of the latest Fish
Disks. Has anyone seen it, and if so, would it be possible to upload
it somewhere.

Not sure what the enhancements are but would like to find out.

DME is my editor of choice until the port of SEDT is done, which sounds
like it will be concurrent with the release of Workbench 1.4.... 8^).

                Regards....  Clint
1267.8Don't forget DME in your quest for an EDT keypad..CGOFS::CADAMSClint Adams - Calgary, CanadaMon Jan 08 1990 12:0419
    
    Hi...
    
    With all the talk about EDT Emulation I thought I would wake up this
    topic. The next note contains the init file for DME that I am currently
    using (check back a few replies for a description).
    
    I am still using DME in combination with this little keymap hack (I
    found SEDT a little slow and large for 99% of my requirements) as an
    editor and a text reader, I have yet to fine a text reader that gives
    me the over functionality and speed that DME does, it is very fast at
    rendering text to the screen.
    
    The lastest version of DME (Version 138) was on the last batch of Fish
    disks and now suppoerts Arexx. It is totally configurable and only about
    60K in length.
    
    
    	Regards....    Clint
1267.9The latest keymap file..CGOFS::CADAMSClint Adams - Calgary, CanadaMon Jan 08 1990 12:07164
#   EDT Keypad Emulator for Matt Dillon's DME Editor
#   by Clint Adams (CGOU01::ADAMS)
#
#   The key definitions below will make the Keypad on the A500 or
#   A2000 behave more or less like the EDT Keypad (mostly ala SEDT).
#   Read the comments associated with each key for their particular
#   idiosyncrasies.
#
#   Include this file in your s:.edrc (see DME docs) or as your only s:.edrc
#
#   The EDT functions can be simulated but not really emulated by DME because
#   of it's block mode nature.   Again see the key comments below.
#   Feel free to change the keymappings to make them work the way you like,
#   I'm no EDT heavy and some of the keys may not be just right.
#
#   Make sure you have done a "SetMap Usa1" in your startup-sequence or the
#   grey keys on the A500/2000 Keypad won't return anything. Also by changing
#   some keymappings it could probably be adapted to the A1000
#
#
#   Regular DME stuff recommended in the DOCS.
savetabs on
map c-tab   ``    ' left left left left'
map cs-tab  `del del del del'
map a-tab   `goto block while cb `c-tab down''
map as-tab  `goto block while cb `cs-tab down''
#   I don't care for the default mapping of the Return key.
map return `split first down'
#
#   If using pulldowns, make F5 key do the Iconification rather than
#   the Right Mouse Button.
map `f5' `iconify'
#
#   This key will load the keyhelp file in a new window.
map `help' `newwindow newfile s:dmeedt.hlp'
#
#   I like pulldowns, add or delete them if you wish, they have
#   no bearing on the EDT Keypad stuff. Note the use of ARPLOAD
#   and ARPSAVE, makes a very nice user interface.
#
#
menuadd Project ChangeName  (escimm (chfilename ))
menuadd Project Load	    arpload
menuadd Project Insert	    f1
menuadd Project NewWindow   (newwindow arpload)
menuadd Project Save	    f9
menuadd Project SaveAs	    arpsave
menuadd Project SaveQuit    (project-save project-quit)
menuadd Project Iconify     Iconify
menuadd Project Quit	    quit
menuadd Convert LF->CRLF    (top repeat -1 (last tlate 13 down))
menuadd Convert CRLF->LF    (top repeat -1 (last left if c=13 del down))
menuadd Block	Indent	    (goto block while cb (first (    ) down))
menuadd Block	Backdent    (goto block while cb (first repeat 4 (if c=32 del) down))

#   map keys for EDT keypad
resettoggle 0
resettoggle 1
#
#   Keypad ( - GOLD Key
map `nk(' `settoggle 0'
#
#   Keypad ) - Help
map `nk)' `newwindow newfile s:dmeedt.hlp'
#   Keypad 0 - Line(Open Line)
map `nk0' `ifelse 0 s-nk0 `ifelse 1 cs-nk0 as-nk0''
map `s-nk0' `resettoggle 0 split'
map `as-nk0' `first down'
map `cs-nk0' `first up'
#   Keypad 1 - Word(Change Case) Change Case applies to
#	       character under the cursor only.
map `nk1' `ifelse 0 s-nk1 `ifelse 1 cs-nk1 as-nk1''
map `s-nk1' `resettoggle 0 ifelse cl `tlate -32' `if cu `tlate +32'' right'
map `as-nk1' `wright'
map `cs-nk1' `wleft'
#   Keypad 2 - End of Line(Del. to EOL)
map `nk2' `ifelse 0 `s-nk2' `as-nk2''
map `s-nk2' `remeol last resettoggle 0'
map `as-nk2' `last'
#   Keypad 3 - Char(Specins)
map `nk3' `ifelse 0 s-nk3 `ifelse 1 cs-nk3 as-nk3''
map `s-nk3' `resettoggle 0 escimm `tlate ''
map `as-nk3' `right'
map `cs-nk3' `left'
#
# keypad 4 and 5 change toggle forward and reverse.
#
#   Keypad 4 - Advance(Bottom)
map `nk4' `ifelse 0 `s-nk4' `as-nk4''
map `s-nk4' `bottom last resettoggle 0'
map `as-nk4' `resettoggle 1'
#   Keypad 5 - Backup(Top)
map `nk5' `ifelse 0 `s-nk5' `as-nk5''
map `s-nk5' `top first resettoggle 0'
map `as-nk5' `settoggle 1'
#   Keypad 6 - Cut(Paste) DME includes the current line in the block
#		to be cut so the macro does an "up" before the cut
#		is done to simulate an EDT cut. Blocks should only
#		defined in the forward direction. If the Sel (Keypad.)
#		is hit a second time the block to be cut will be
#		be highlighted, but the whole block will be cut
#		including the current line.
map `nk6' `ifelse 0 `s-nk6'`as-nk6''
map `s-nk6' `resettoggle 0 insfile ram:pastebuf'
map `as-nk6' `up block bsave ram:pastebuf bdelete unblock'
#   Keypad 7 - Page(Command)
map `nk7' `ifelse 0 s-nk7 `ifelse 1 cs-nk7 as-nk7''
map `s-nk7' `resettoggle 0 escimm `esc ''
map `as-nk7' `pagedown'
map `cs-nk7' `pageup'
#   Keypad 8 - Section(Fill) A section will be 50% of the current window.
map `nk8' `ifelse 0 s-nk8 `ifelse 1 cs-nk8 as-nk8''
map `s-nk8' `resettoggle 0 reformat'
map `as-nk8' `pageset 50 pagedown pageset 100'
map `cs-nk8' `pageset 50 pageup pageset 100'
#    Keypad 9 - Subst Next(Subst) This command forward only.
map `nk9' `ifelse 0 `s-nk9' `as-nk9''
map `s-nk9' `resettoggle 0 escimm `findstr 'escimm `repstr ' nextr '
map `as-nk9' `nextr'
#    Keypad . - Select(Cancel)
map `nk.' `ifelse 0 `s-nk.' `as-nk.''
map `s-nk.' `resettoggle 0 unblock'
map `as-nk.' `block'
#    Keypad / - Find Next(Find) Find is forward only but Find Next can
#				both directions.
map `nk/' `ifelse 0 s-nk/ `ifelse 1 cs-nk/ as-nk/''
map `s-nk/' `resettoggle 0 escimm `find  ''
map `as-nk/' `next'
map `cs-nk/' `prev'
#    Keypad - * Delete Line(Undelete Line)
map `nk*' `ifelse 0 `s-nk*' `as-nk*''
map `s-nk*' `resettoggle 0 insfile ram:linebuf'
map `as-nk*' `block block bsave ram:linebuf deline unblock'
#    Keypad - - Delete Word
map `nk-' `while c>32 del wright'
#    Keypad + - Delete Char
# delete with end-of-line join and handling of DME bug with join at the bottom of the file
map `nk+' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 3 down'''
map `del' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 3 down'''
# backspace with end-of-line join and handling of DME bug with join at the bottom of the file
map `bs' `ifelse !l bs `ifelse b `settoggle 2' `resettoggle 2' up last join if 2 down del''
#    SEDT Bottom Document
map `b' `ifelse 0 `s-nk4' ``b'''
map `B' `ifelse 0 `s-nk4' ``B'''
#    SEDT Top Document
map `t' `ifelse 0 `s-nk5' ``t'''
map `T' `ifelse 0 `s-nk5' ``T'''
#    SEDT File/Quit
map `f' `ifelse 0 `f10' ``f'''
map `F' `ifelse 0 `f10' ``F'''
#    SEDT Quit
map `q' `ifelse 0 `quit' ``q'''
map `Q' `ifelse 0 `quit' ``Q'''
#    SEDT Get Document
map `g' `ifelse 0 `f1' ``g'''
map `G' `ifelse 0 `f1' ``G'''
#    End Of Line
map `c-e' `last'
#    Beginning of Line
map `c-a' `first'
#    Map Arrow Keys to Emulate EDT
map `left' `ifelse l `up last' `left''
map `right' `ifelse r `first down' `right''
    
1267.10Want auto-indenting schemeDECWET::DAVISMark W. Davis 206.865.8749Mon Nov 18 1991 15:079
    Does anyone have a 'sane' mapping for auto-indenting and brace mapping?
    I will probably write my own, but thought I'd check here first - why
    reinvent the wheel.  I am using DME v1.45.
    
    mark
    
    p.s. I modified Clint's EDT mapping adding some reverse functions and
    more menu items.  Anyone still using DME?  Should I post the
    modifications?
1267.11Post Away!NITMOI::WITHERSAnother Hallmark Moment. -Al BundyTue Nov 19 1991 11:099
    Re: .10 (Mark)
    
    I most certainly am still using DME!:-)  I'm also still using the EDT
    mappings posted here.  I've made very few improvements, so I would very
    much like to see it posted! :-)
    
    Thanks,
    George
    
1267.12Some minor changesDECWET::DAVISMark W. Davis 206.865.8749Tue Nov 19 1991 11:33205
#   EDT Keypad Emulator for Matt Dillon's DME Editor
#   by Clint Adams (CGOU01::ADAMS)
#
#   The key definitions below will make the Keypad on the A500 or
#   A2000 behave more or less like the EDT Keypad (mostly ala SEDT).
#   Read the comments associated with each key for their particular
#   idiosyncrasies.
#
#   Include this file in your s:.edrc (see DME docs) or as your only s:.edrc
#
#   The EDT functions can be simulated but not really emulated by DME because
#   of it's block mode nature.   Again see the key comments below.
#   Feel free to change the keymappings to make them work the way you like,
#   I'm no EDT heavy and some of the keys may not be just right.
#
#   Make sure you have done a "SetMap Usa1" in your startup-sequence or the
#   grey keys on the A500/2000 Keypad won't return anything. Also by changing
#   some keymappings it could probably be adapted to the A1000
#
#   Modified by mark w. davis 
#   changed:	additional menu commands (from v1.45 release w/changes)
#		arpload on 'F2'
#		improved EOL mapping - now moves in reverse
#		improved keypad delete word - now acts like EDT
#		deleted <gold> b,t,g,f,q mapping due to interference with caps lock 
#		keypad '0' reverse more like EDT
#		changed highlight pen color for use with my 8 color WB
#               some other minor stuff
#
#   Regular DME stuff recommended in the DOCS.
savetabs on
map c-tab   ``    ' left left left left'
map cs-tab  `del del del del'
map a-tab   `goto block while cb `c-tab down''
map as-tab  `goto block while cb `cs-tab down''
#
#   I don't care for the default mapping of the Return key.
map return `split first down'
#
#   If using pulldowns, make F5 key do the Iconification rather than
#   the Right Mouse Button.
map `f5' iconify
#
#   This key will load the keyhelp file in a new window.
map `help' `newwindow newfile s:dmeedt.hlp'
#
#   I like pulldowns, add or delete them if you wish, they have
#   no bearing on the EDT Keypad stuff. Note the use of ARPLOAD
#   and ARPSAVE, makes a very nice user interface.
#
#
#
menuoff
menuclear
menuadd Project (Load File)             arpload
menuadd Project (Insert File  ARP )     arpinsfile
menuadd Project (Open NewWin  (f3))     f3
menuadd Project (Rename File)           (escimm (chfilename ))
menuadd Project (Save         (f9))     f9
menuadd Project (Save As)               (escimm (saveas ))
menuadd Project (Save LoadNew (f8))     f8
menuadd Project (Save Quit    (f10))    f10
menuadd Project (Save Config)           saveconfig
menuadd Project (Quit)                  quit
menuadd Project (Iconify      (a-i))    iconify

menuadd Control (Case Sensitive)      (ignorecase off)
menuadd Control (Case InSensitive)    (ignorecase on)
menuadd Control (Save tabs on)        (savetabs on)
menuadd Control (Save tabs off)       (savetabs off)
menuadd Control (LF   -> CRLF)        (top repeat -1 (last tlate 13 down))
menuadd Control (CRLF -> LF)          (top repeat -1 (last left if c=13 del down))

menuadd Mode	(Insert)              (insertmode on)
menuadd Mode	(Overwrite)           (insertmode off)
menuadd Mode	(Wordwrap)            (wordwrap toggle)
menuadd Mode	(Wordwrap LMargin)    (escimm (setparcol ))
menuadd Mode	(Wordwrap RMargin)    (escimm (margin ))

menuadd Find	(Find)                (escimm (find ))
menuadd Find	(Next)                (next)
menuadd Find	(Prev)                (prev)
menuadd Find	(Find-Replace)        (escimm (findstr) escimm (repstr ))
menuadd Find	(Next-Replace)        (nextr)
menuadd Find	(Glob-Rep)            (repeat -1 nextr)

menuadd Block	(Set Start)           (unblock block)
menuadd Block	(Set End)             (block)
menuadd Block	Indent	   (goto block while cb (first (    ) down))
menuadd Block	Backdent   (goto block while cb (first repeat 4 (if c=32 del) down))
menuadd Block	(Clear)               (unblock)
menuadd Block	(Copy)                (bcopy)
menuadd Block	(Move)                (bmove)
menuadd Block	(Delete)              (bdelete)
menuadd Block	(Save)                (escimm (bsave ))

menuadd Marker	(Mark 1)    (ping 1)
menuadd Marker	(Mark 2)    (ping 2)
menuadd Marker	(Mark 3)    (ping 3)
menuadd Marker	(Mark 4)    (ping 4)
menuadd Marker	(Goto 1)    (pong 1)
menuadd Marker	(Goto 2)    (pong 2)
menuadd Marker	(Goto 3)    (pong 3)
menuadd Marker	(Goto 4)    (pong 4)
menuon

#   map keys for EDT keypad
resettoggle 0
resettoggle 1
#
#   Keypad ( - GOLD Key
map `nk(' `settoggle 0'
#
#   Keypad ) - Help
map `nk)' `newwindow newfile s:dmeedt.hlp'
#   Keypad 0 - Line(Open Line)
map `nk0' `ifelse 0 s-nk0 `ifelse 1 cs-nk0 as-nk0''
map `s-nk0' `resettoggle 0 split'
map `as-nk0' `first down'
map `cs-nk0' `ifelse l up `first''
#   Keypad 1 - Word(Change Case) Change Case applies to
#	      character under the cursor only.
map `nk1' `ifelse 0 s-nk1 `ifelse 1 cs-nk1 as-nk1''
map `s-nk1' `resettoggle 0 ifelse cl `tlate -32' `if cu `tlate +32'' right'
map `as-nk1' `wright'
map `cs-nk1' `wleft'
#   Keypad 2 - End of Line(Del. to EOL)
map `nk2' `ifelse 0 `s-nk2' `as-nk2''
map `s-nk2' `remeol last resettoggle 0'
map `as-nk2' (ifelse 1 (up last) (ifelse r (down last) last))
#   Keypad 3 - Char(Specins)
map `nk3' `ifelse 0 s-nk3 `ifelse 1 cs-nk3 as-nk3''
map `s-nk3' `resettoggle 0 escimm `tlate ''
map `as-nk3' `right'
map `cs-nk3' `left'
#
# keypad 4 and 5 change toggle forward and reverse.
#
#   Keypad 4 - Advance(Bottom)
map `nk4' `ifelse 0 `s-nk4' `as-nk4''
map `s-nk4' `bottom last resettoggle 0'
map `as-nk4' `resettoggle 1'
#   Keypad 5 - Backup(Top)
map `nk5' `ifelse 0 `s-nk5' `as-nk5''
map `s-nk5' `top first resettoggle 0'
map `as-nk5' `settoggle 1'
#   Keypad 6 - Cut(Paste) DME includes the current line in the block
#	       to be cut so the macro does an "up" before the cut
#	       is done to simulate an EDT cut. Blocks should only
#	       defined in the forward direction. If the Sel (Keypad.)
#	       is hit a second time the block to be cut will be
#	       be highlighted, but the whole block will be cut
#	       including the current line.
map `nk6' `ifelse 0 `s-nk6'`as-nk6''
map `s-nk6' `resettoggle 0 insfile ram:pastebuf'
map `as-nk6' `up block bsave ram:pastebuf bdelete unblock'
#   Keypad 7 - Page(Command)
map `nk7' `ifelse 0 s-nk7 `ifelse 1 cs-nk7 as-nk7''
map `s-nk7' `resettoggle 0 escimm `esc ''
map `as-nk7' `pagedown'
map `cs-nk7' `pageup'
#   Keypad 8 - Section(Fill) A section will be 50% of the current window.
map `nk8' `ifelse 0 s-nk8 `ifelse 1 cs-nk8 as-nk8''
map `s-nk8' `resettoggle 0 reformat'
map `as-nk8' `pageset 50 pagedown pageset 100'
map `cs-nk8' `pageset 50 pageup pageset 100'
#    Keypad 9 - Subst Next(Subst) This command forward only.
map `nk9' `ifelse 0 `s-nk9' `as-nk9''
map `s-nk9' `resettoggle 0 escimm `findstr 'escimm `repstr ' nextr '
map `as-nk9' `nextr'
#    Keypad . - Select(Cancel)
map `nk.' `ifelse 0 `s-nk.' `as-nk.''
map `s-nk.' `resettoggle 0 unblock'
map `as-nk.' `block'
#    Keypad / - Find Next(Find) Find is forward only but Find Next can
#			       both directions.
map `nk/' `ifelse 0 s-nk/ `ifelse 1 cs-nk/ as-nk/''
map `s-nk/' `resettoggle 0 escimm `find  ''
map `as-nk/' `next'
map `cs-nk/' `prev'
#    Keypad - * Delete Line(Undelete Line)
map `nk*' `ifelse 0 `s-nk*' `as-nk*''
map `s-nk*' `resettoggle 0 insfile ram:linebuf'
map `as-nk*' `block block bsave ram:linebuf deline unblock'
#    Keypad - - Delete Word
map `nk-' `ifelse r (del join) `ifelse c=32 del (while c>32 del)''
#    Keypad + - Delete Char
# delete with end-of-line join and handling of DME bug with join at the bottom of the file
map `nk+' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 3 down'''
map `del' `ifelse !r del `if !b `down ifelse b `settoggle 3' `resettoggle 3' up join if 3 down'''
# backspace with end-of-line join and handling of DME bug with join at the bottom of the file
map `bs' `ifelse !l bs `ifelse b `settoggle 2' `resettoggle 2' up last join if 2 down del''
#    End Of Line
map `c-e' `last'
#    Beginning of Line
map `c-a' `first'
#    Map Arrow Keys to Emulate EDT
map `left' `ifelse l `up last' `left''
map `right' `ifelse r `first down' `right''
#   Map arpload on "f2"
map (f2) arpload
ignorecase on
HGPEN 5