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

  1. # DME-WS version 1.0, copyright (C) 1988 by Bela Lubkin
  2. # Permission granted for personal use and adaptation.  No commercial rights
  3. # are granted.
  4.  
  5. # Developed for use with Matthew Dillon's programmable editor "DME".  I used
  6. # DME version 1.29 and have no idea how this would work with other versions.
  7. # I'd like to know if there is a later version...
  8.  
  9. # This is a set of macros for DME that give it a WordStar-like command set.
  10. # Not all of WordStar's commands were possible or desirable; the subset chosen
  11. # is that suitable for a programmer's editor.
  12. #
  13. # If you don't have WordStar commands burned into your circuits, I don't
  14. # recommend you start now; it >is< an efficient editing system but it is not
  15. # well represented on the Amiga and this implementation is kludgy at best.  I
  16. # hear noise that MSS' Scribble! is WS-influenced, so if you're facile with
  17. # Scribble! you might be able to make sense out of this.
  18. #
  19. # I'm providing no documentation beyond this bit of rambling at the beginning,
  20. # some comments on weaknesses of various commands interspersed within the
  21. # definitions, and the definitions themselves.  Another good reason not to
  22. # jump in unless you're already a WordStar addict.
  23. #
  24. # The WordStar command set I've used is heavily influenced by Turbo
  25. # Pascal, SideKick, EDWIN, and by my own personal preferences built up over
  26. # 4 years of using those 3 WS-alike-but-reconfigurable editors.  Thus, for
  27. # instance, most of the ^K-prefix commands (^KC=block copy) are duplicated as
  28. # alt-command (^KC=alt-C); the function keys are elaborations of SideKick's;
  29. # etc.
  30. #
  31. # DME's block commands are line-oriented; there was nothing I could do about
  32. # this, so you'll have to bear with.  (WordStar's are stream-oriented).
  33. #
  34. # ALL TWO-CHARACTER COMMANDS MUST BE GIVEN AS TWO >CONTROL< CHARACTERS.
  35. # WordStar will accept "control-Q R".  DME-WS wants "control-Q control-R".
  36.  
  37. # Contact me at:
  38. #   XBBS     (408) 476-4946 (5-user)  (PC-Pursuit: CASJO node)
  39. #   Pyrzqxgl (408) 476-4633                      "
  40. #   FAUG BBS (415) 595-2479  (Whatever the San Fransisco node's called)
  41. #   BBS-JC   (415) 961-7250                      "
  42. #   My own BBS soon to come -- I think.
  43.  
  44.  
  45.  
  46.  
  47. # Toggles used:
  48. #   1=^J prefix (set but not used)
  49. #   2=^K prefix
  50. #   3=^O prefix
  51. #   4=^P prefix (set but not used)
  52. #   5=^Q prefix
  53. #   6=search vs. replace
  54. #   7=scratch used by backspace
  55. #   8=auto-indent flag (alt-I)
  56.  
  57. pageset 99
  58.  
  59. map `ca-j' `resettoggle 1'
  60. map `ca-k' `resettoggle 2'
  61. map `ca-o' `resettoggle 3'
  62. map `ca-p' `resettoggle 4'
  63. map `ca-q' `resettoggle 5'
  64. map `cas-esc' `ca-j ca-k ca-o ca-p ca-q'
  65. map `a-esc' `cas-esc esc'
  66. map `s-esc' `a-esc'
  67. map `c-[' `a-esc'
  68. map `esc' `a-esc'
  69. map `c-esc' `cas-esc recall'
  70.  
  71. # ^A fails if there is whitespace to the left of the cursor and extending to
  72. # the beginning of the line.
  73. map `c-a' `ifelse 3 `s-f3' `ifelse 5 `ca-q settoggle 6 escimm `findstr ' escimm `repstr ' nextr' `c-left'''
  74.  
  75. map `c-b' `if 2 `a-b' if 3 `ca-o reformat' if 5 `ca-q goto block''
  76. map `c-c' `ifelse 2 `a-c' `ifelse 5 `ca-q bottom last' `pagedown'''
  77. map `c-d' `ifelse 2 `s-f2' `ifelse 5 `ca-q last' `right'''
  78. map `c-e' `ifelse 5 `ca-q screentop' `up''
  79.  
  80. # ^F works correctly but causes disconcerting horizontal scrolling when moving
  81. # from within last word on line to end of line, when line is longer than
  82. # window width.
  83. map `c-f' `ifelse 5 `ca-q resettoggle 6 escimm `find '' `c-right''
  84.  
  85. map `c-g' `del'
  86. map `c-h' `ifelse 2 `a-h' `backspace''
  87. map `c-i' `ifelse 3 `ca-o saveold iconify' `ifelse 5 `a-i' `tab'''
  88. map `c-j' `settoggle 1'
  89. map `c-k' `ifelse 2 `a-k' `ifelse 5 `ca-q goto end down' `settoggle 2'''
  90. map `c-l' `ifelse 6 nextr next'
  91. map `c-L' `ifelse 6 prevr prev'
  92. map `c-m' `enter'
  93. map `c-n' `ifelse b `split down down deline up' `split''
  94. map `c-o' `settoggle 3'
  95.  
  96. # ^P doesn't do anything; I could see no reasonable way to implement it and it
  97. # didn't seem important in context anyway.  It could probably be implemented
  98. # by prefixing each control-character definition with something like
  99. #    ifelse 4 `ca-p `A' left tlate -64' `rest-of-definition'
  100. # or
  101. #    ifelse 4 ``A' ca-p' `rest-of-definition'
  102. # if ca-p were defined as
  103. #    map ca-p `resettoggle 4 left tlate -64 right'
  104. # but either choice seemed >too< obscene... (both examples insert a ^A).
  105. # Alternatively, enable the following definition:
  106. #    map `c-p' `while c>32 `tlate -32' right'
  107. # which defines ^P as "convert the character under the cursor to a control
  108. # character, then go right".
  109. map `c-p' `settoggle 4'
  110.  
  111. map `c-q' `ifelse 2 `a-q' `settoggle 5''
  112. map `c-r' `ifelse 2 `a-r' `ifelse 5 `ca-q top first' pageup'''
  113. map `c-s' `ifelse 2 `f2' `ifelse 5 `ca-q first' `left'''
  114.  
  115. # ^T works correctly but resorts to tricks that may appear disconcerting on
  116. # screen.
  117. map `c-t' `ifelse r `join if !l del' `split `!' down first wright ifelse l `up deline up last bs' `split deline up last join del bs'''
  118.  
  119. map `c-u' `unblock'
  120. map `c-v' `ifelse 2 `a-v' `insertmode toggle''
  121.  
  122. # ^W scrolls the screen but cannot place the cursor correctly; different
  123. # scroll primitives or a conditional to test whether the cursor is at the
  124. # bottom of the window would be necessary.
  125. map `c-w' `ifelse 2 `a-w' `ifelse 3 `ca-o wordwrap toggle' `c-up'''
  126.  
  127. map `c-x' `ifelse 2 `c-f2' `ifelse 5 `ca-q screenbottom' `down'''
  128. map `c-y' `ifelse 2 `a-y' `ifelse 5 `ca-q remeol' s-del''
  129.  
  130. # ^Z scrolls the screen but cannot place the cursor correctly; different
  131. # scroll primitives or a conditional to test whether the cursor is at the top
  132. # of the window would be necessary.
  133. map `c-z' `c-down'
  134.  
  135. map `c-]' `ref'
  136.  
  137. map `backspace' `ifelse !l bs `if !t `resettoggle 7 if b `toggle 7' `!' up last join if 7 down del if !l del'''
  138. map `s-backspace' `backspace'
  139. map `c-backspace' `backspace'
  140. map `a-backspace' `backspace'
  141. map `enter' `ifelse b `split down first down deline' `split down first' if 8 `up ifelse c<>32 `down' `down `!' first split up firstnb down join del'''
  142. map `s-enter' `enter'
  143. map `c-enter' `enter'
  144. map `a-enter' `enter'
  145. map `return' `enter'
  146. map `s-return' `enter'
  147. map `c-return' `enter'
  148. map `a-return' `enter'
  149. map `help' `iconify'
  150. map `c-help' `source s:ws.edrc'
  151. map `L-lmb' `tomouse'
  152. map `L-mmove' `tomouse'
  153. map `aA-lmb' `tomouse'
  154. map `aA-mmove' `tomouse'
  155. map `saA-mmove' `tomouse'
  156. map `R-rmb' `iconify'
  157. map `aA-rmb' `iconify'
  158. map `c-up' `scrollup'
  159. map `c-down' `scrolldown'
  160. map `c-left' `ifelse l `up last' `wleft''
  161. map `c-right' `ifelse r `down first' `wright if l `up if r up last'''
  162. map `a-up' `repeat 5 up'
  163. map `a-down' `repeat 5 down'
  164. map `a-left' `repeat 10 left'
  165. map `a-right' `repeat 10 right'
  166. map `s-up' `top'
  167. map `s-down' `bottom'
  168. map `s-left' `first'
  169. map `s-right' `last'
  170. map `s-del' `if b `downadd up' deline first'
  171. map `c-del' `remeol'
  172. map `s- ' `` ''
  173. map `c- ' `` ''
  174. map `a- ' `` ''
  175. map `s-tab' `backtab'
  176. map `a-b' `ca-k block'
  177. map `a-c' `ca-k bcopy'
  178. map `a-h' `ca-k unblock'
  179. map `a-i' `ca-q toggle 8 ifelse 8 `escimm `Autoindent ON, press ESC...'' `escimm `Autoindent OFF, press ESC...'''
  180. map `a-k' `ca-k up block down'
  181. map `a-q' `ca-k quit'
  182. map `a-r' `ca-k escimm `insfile ''
  183. map `a-s' `bsource'
  184. map `a-v' `ca-k bmove'
  185. map `a-w' `ca-k escimm `bsave ''
  186. map `a-y' `ca-k bdelete'
  187. map `as-s' `unblock block block bsource'
  188. map `f2' `ca-k saveold'
  189. map `c-f2' `ca-k saveold quit'
  190. map `s-f2' `ca-k saveold escimm `newfile ''
  191. map `f3' `escimm `newfile ''
  192. map `s-f3' `ca-o escimm `newwindow newfile ''
  193.  
  194. map `del' `del'
  195. map `down' `down'
  196. map `left' `left'
  197. map `right' `right'
  198. map `tab' `tab'
  199. map `up' `up'
  200.  
  201. # Some hardwired DME commands that I trash..
  202. unmap `a-d'
  203. unmap `a-l'
  204. unmap `a-m'
  205. unmap `a-u'
  206. unmap `c-/'
  207. unmap `c-1'
  208. unmap `f1'
  209. unmap `f6'
  210. unmap `f7'
  211. unmap `f8'
  212. unmap `f9'
  213. unmap `f10'
  214.  
  215.