home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / xdme1820.lha / XDME / Macros / BN / xdme.edrc < prev    next >
Text File  |  1993-01-27  |  14KB  |  350 lines

  1. ##
  2. ## XDME.edrc for XDME V1.60.04
  3. ## "\$VER: xdme.edrc 1.0 (04.12.92)"
  4. ## (C)1992 by Bernd Noll
  5. ##
  6. ########################################################################
  7. ##
  8. ##  Bei diesem File handelt es sich lediglich um eine
  9. ##  macro-sammlung, die es erlauben soll,
  10. ##  mein .EDRC - file für den DME 1.51 auf dem XDME zu verwenden
  11. ##
  12. ########################################################################
  13. ##
  14.     settoggle  1
  15.     resettoggle 0
  16.  
  17. #if $DEBUG_XDME (debug 1)
  18.  
  19. ##
  20. ##
  21. ########################################################################
  22. ##
  23. ##  "Constant" declarations
  24. ##
  25. ## Be careful there are some more special variables - look below
  26. ##
  27. ##
  28. ## take these vars as constants so you can play with return/c-tab more easily
  29. ##
  30.     set tabs        4
  31.     set number        0123456789
  32.     set upper        ABCDEFGHIJKLMNOPQRSTUVWXYZ
  33.     set lower        abcdefghijklmnopqrstuvwxyz
  34.     set alphanum    _$number$upper$lower
  35.     set _hasedrc    255  rem (tabu)
  36.     set _mouseblock 254
  37.     set _caser        253
  38.     set _block2     252  rem (blockbegin is set)
  39.     set _movemark   251  rem (or 9 see below)
  40. ##
  41. ##
  42. ##  perhaps tell caller-process that s:.edrc was sourced
  43. ##  --- not neccessary , if u do not use -no[sedrc]
  44. ##
  45.     settoggle    $_hasedrc
  46. ##
  47. ##
  48. ##  preferences
  49. ##
  50.     set margin        80
  51.     set tabstop     $tabs
  52.     pageset        30
  53.     savetabs on
  54. ##
  55. ##
  56. ########################################################################
  57. ########################################################################
  58. ##
  59. ## own macro-definitions:
  60. ##
  61.     macroload ed:XDME.macros
  62. ##
  63. ########################################################################
  64. ##
  65. ##  Keymapping
  66. ##
  67.     keyload ed:XDME.keys
  68. ##
  69. ########################################################################
  70. ########################################################################
  71. ##
  72. ##  word completition, is called on every [LMR]-tab in escimm-mode
  73. ##  used Variables:
  74. ##   _M_QUEST            - Searchstring
  75. ##   _M_COUNT            - Number of last string in List
  76. ##   _M_RES            - Matching String
  77. ##  used Macros:
  78. ##   startmatching newsearch - define New Searchstring and do first searching
  79. ##   endmatching         - reset all used Variables
  80. ##   matchnext             - do the next searching
  81. ##
  82.     set tabfile     env:dme.commands
  83.     endmatching
  84. ##  the first endmatching initializes all Variables
  85. ##
  86. ########################################################################
  87. ##
  88. ##   That vars are used for my RETURN - Mappings
  89. ##
  90. ##
  91. ## there are several variables used:
  92. ## _crl _crc blockbeginner blockender
  93. ##
  94. ## these vars are used on every -return and so they should also not be used
  95.     set _crl 0
  96.     set _crc 0
  97. ##
  98. #   setmacro fcr  0 (split down firstnb)
  99. ##
  100. ##
  101. ##  Then the better(?) and bigger ones
  102. ##
  103. ##
  104. ## language dependent : fill this variable with the keywords that request an
  105. ## indent in the next line; only the first word of a line is checked
  106. ##  Normal Typing
  107.     set blockbeginner \$blockbeginner    rem (with that silly trick we might come around that ugly new macroexpansion - simply undefine the variable during call)
  108.     set blockender    \$blockender
  109. ##  Modula-2 Style
  110. #   set blockbeginner (IF ELSE ELSIF REPEAT LOOP WHILE WITH CASE FOR)
  111. #   set blockender    (END ELSE ELSIF UNTIL)
  112. ##  C Sytle
  113. #   set blockbeginner (if else while for switch case FOREVER)
  114. #   set blockender    (else case)
  115. ##
  116. ## with getcolno/getlineno You need not worry about the recursiondepth and number of escapes before a variable
  117. ##
  118. ########################################################################
  119. ##
  120. ##  Blocks
  121. ##
  122. ## these vars are NO constants, they are used by mousemarker-macros
  123. ## are therefor should not be used otherwise, as their values may change anytime
  124. #   set _markl 0 set _markc 0
  125. ## i've put these two variable together to shorten search time
  126.     set _markj        null
  127. ##
  128.     settoggle    $_mouseblock
  129.     resettoggle $_movemark
  130. ##
  131. ########################################################################
  132. ##
  133. ##  These Goodies are for 1-hand typing,
  134. ##  if the other is at your girlfriend, the mouse or ...
  135. ##
  136. ##  if You do not like space and enter, simply redefine
  137. ##  QAdd and QBrk in the following lines and source again
  138. ##  (as it is not possible to store variable keys)
  139. ##
  140. #   set QAdd  (f1)
  141. #   set QBrk  (enter)
  142. #   set QBreak ( [abort with <\$QBrk>])
  143. ##
  144. ## but * U cannot Use all Qualifiers
  145. ##     * work with 10 Toggles
  146. ##     * do not see what qualifier is pressed
  147. ## ( is there a suggestion for A)
  148. ##
  149.     set QPre (`)
  150.     set QQualList (q ( ) s a c x y l m r)
  151.     set QTitle2 (Q-Quit Space-Continue sacxyzlmr - Qualifiers)
  152. ##
  153. ##
  154.     setmacro qquit  0 (filter q () () () set 240 0 set 241 0 set 242 0 set 243 0 set 244 0 set 245 0 set 246 0 set 247 0 set 248 0)
  155.     setmacro qcont  0 (qcheck 240 s qcheck 241 a qcheck 242 c qcheck 243 x qcheck 244 y qcheck 245 z qcheck 246 R qcheck 247 M qcheck 248 L qquit )
  156.     setmacro qcheck 2 (if \$arg1 (qualifier +\$arg2 ))
  157. #   setmacro qset   1 (ifelse \$arg1<240 (ifelse \$arg1=239 (qcont) (ifelse \$arg1=238 (qquit) (titlevar QTitle2))) (toggle \$arg1 titlevar QTitle2))
  158.     setmacro qset   1 (ifelse \$arg1<240 (ifelse \$arg1=239 (qcont) (ifelse \$arg1=238 (qquit) (titlevar QTitle2))) (toggle \$arg1 titlevar QTitle2))
  159.     map   (a-$QPre) (titlevar QTitle2 filter (am) (q ( ) s a c x y z l m r ) (QNum) (add QNum 238 titlevar QNum qset \$QNum)
  160. #(ifelse \$QNum<2 (ifelse \$QNum=0 qquit qcont) (add QNum 238 eval (toggle \$QNum) title (\$QTitle2))))
  161. ##
  162. ##
  163. ########################################################################
  164. ##
  165. ##  Menu-Bar
  166. ##
  167.     menuload ED:XDME.menu
  168. ##
  169. #   menuoff
  170. ##
  171. ##  auisg-menus: Project & Edit
  172. ##
  173. #   menuadd Project (New)           (newwindow)
  174. #   menuadd Project (Open...)       (newwindow arpload)
  175. #   menuadd Project (Visit...)      (arpvisitfile)
  176. #   menuadd Project (-------)       (null)
  177. #   menuadd Project (Save)          (saveold)
  178. #   menuadd Project (Save As...)    (arpsave)
  179. #   menuadd Project (------- )      (null)
  180. #   menuadd Project (Iconify)       (iconify)
  181. #   menuadd Project (Close)         (quit)
  182. #   menuadd Project (-------  )     (null)
  183. #   menuadd Project (About...)      (NULL)
  184. #   menuadd Project (-------   )    (null)
  185. #   menuadd Project (Quit DME)      (repeat \$textnum closewindow)
  186. ##
  187. #   menuadd Edit (Cut)      (cut)
  188. #   menuadd Edit (Copy)     (copy)
  189. #   menuadd Edit (Paste)    (paste)
  190. #   menuadd Edit (-----)    (null)
  191. #   menuadd Edit (Erase)    (bdelete)
  192. #   menuadd Edit (----- )   (null)
  193. ##
  194. ##
  195. ##
  196. ##  additional menus
  197. ##
  198. #   menuadd Search  (<<< Find >>>)          (null)
  199. #   menuadd Search  (Set FindStr )          (right wleft scanf %[\$alphanum] findstr \$scanf)
  200. #   menuadd Search  (Find        c-f)       (c-f)
  201. #   menuadd Search  (Find Next   c-n)       (next)
  202. #   menuadd Search  (Find Prev.  c-p)       (prev)
  203. #   menuadd Search  (Corresponding)         (findmatch)
  204. #   menuadd Search  ( )                     ()
  205. #   menuadd Search  (Push to Stack)         (pushvar  findstr title pushed)
  206. #   menuadd Search  (Pop from Stack)        (popvar   findstr title popped)
  207. #   menuadd Search  (Swap with Stack)       (swapvar  findstr title swapped)
  208. #   menuadd Search  (Clear Stack)           (purgevar findstr title cleared)
  209. ##
  210. #   menuadd Search  (------------ )         (null)
  211. #   menuadd Search  (<< Replace >>)         (null)
  212. #   menuadd Search  (Set RepStr  )          (right wleft scanf %[\$alphanum] repstr \$scanf)
  213. #   menuadd Search  (Replace     c-r)       (c-r)
  214. #   menuadd Search  (Repl.Next  sc-n)       (nextr)
  215. #   menuadd Search  (Repl.Prev  sc-p)       (prevr)
  216. #   menuadd Search  (  )                    ()
  217. #   menuadd Search  (Push to Stack )        (pushvar  repstring title pushed)
  218. #   menuadd Search  (Pop from Stack )       (popvar   repstring title popped)
  219. #   menuadd Search  (Swap with Stack )      (swapvar  repstring title swapped)
  220. #   menuadd Search  (Clear Stack )          (purgevar repstring title cleared)
  221. #   menuadd Search  (------------  )        (null)
  222. #   menuadd Search  (Ignore case c-i)       (c-i)
  223. #   menuadd Search  (------------)          (null)
  224. ##
  225. #   menuadd Block   (Mark       c-b)        (c-b)
  226. #   menuadd Block   (Unmark     c-u)        (c-u)
  227. #   menuadd Block   (-----------)           (null)
  228. #   menuadd Block   (Move       c-m)        (c-m)
  229. #   menuadd Block   (Erase      c-e)        (c-e)
  230. #   menuadd Block   (Duplicate  c-d)        (c-d)
  231. #   menuadd Block   (Indent     tab)        (tab)
  232. #   menuadd Block   (Backdent s-tab)        (s-tab)
  233. #   menuadd Block   ( )                     (null)
  234. #   menuadd Block   (Push To Stack)         (pushmark  title pushed)
  235. #   menuadd Block   (Pop From Stack)        (popmark   title popped)
  236. #   menuadd Block   (Swap With Stack)       (swapmark  title swapped)
  237. #   menuadd Block   (Clear Stack)           (purgemark title cleared)
  238. #   menuadd Block   (-----------  )         (null)
  239. #   menuadd Block   (Execute   sc-b)        (bsource)
  240. #   menuadd Block   (Load       c-l)        (arpinsfile)
  241. #   menuadd Block   (Write      c-w)        (c-w)
  242. #   menuadd Block   (Sort      sc-s)        (sc-s)
  243. ##
  244. #   menuadd Line    (Split   c-s)           (c-s)
  245. #   menuadd Line    (Join    c-j)           (c-j)
  246. #   menuadd Line    (Del     c-y)           (c-y)
  247. #   menuadd Line    (Undel  sc-y)           (sc-y)
  248. #   menuadd Line    (Ins     c-x)           (c-x)
  249. #   menuadd Line    (Undo   sc-u)           (sc-u)
  250. #   menuadd Line    (Exec  sc-hp)           (sc-help)
  251. #   menuadd Line    (Dos   Ac-hp)           (Ac-help)
  252. #   menuadd Line    (Rexx  ac-hp)           (ac-help)
  253. ##
  254. #   menuadd Move    (First Position)        (first)
  255. #   menuadd Move    (First Char)            (firstnb)
  256. #   menuadd Move    (Last Char)             (last)
  257. #   menuadd Move    (--------------)        (null)
  258. #   menuadd Move    (Goto Line     c-g)     (escimm (goto ))
  259. #   menuadd Move    (Top Line      c-cu)    (top)
  260. #   menuadd Move    (Last Line     c-cd)    (bottom)
  261. #   menuadd Move    (-------------- )       (null)
  262. #   menuadd Move    (Set mark 1  sc-nk1)    (ping 1)
  263. #   menuadd Move    (Set mark 2  sc-nk2)    (ping 2)
  264. #   menuadd Move    (Set mark 3  sc-nk3)    (ping 3)
  265. #   menuadd Move    (Goto mark 1  c-nk1)    (pong 1)
  266. #   menuadd Move    (Goto mark 2  c-nk2)    (pong 2)
  267. #   menuadd Move    (Goto mark 3  c-nk3)    (pong 3)
  268. #   menuadd Move    ( )                     (null)
  269. #   menuadd Move    (Push To Stack)         (pushdot  title pushed)
  270. #   menuadd Move    (Pop From Stack)        (popdot   title popped)
  271. #   menuadd Move    (Swap With Stack)       (swapdot  title swapped)
  272. #   menuadd Move    (Clear Stack)           (purgedot title cleared)
  273. #   menuadd Move    (--------------  )      (null)
  274. #   menuadd Move    (Previous-Char)         (ifelse l (ifelse t (( ) left) (up last)) left)
  275. #   menuadd Move    (Next-Char)             (ifelse r (ifelse b right (down first)) right)
  276. #   menuadd Move    (AnyChar Mode   c-a)    (c-a)
  277. ##
  278. #   menuadd Misc    (Scanf)                 (set scanf \$currentword title \$scanf)
  279. #   menuadd Misc    (ScanRes)               ((\$scanf))
  280. #   menuadd Misc    (Reference    c-help)   (c-help)
  281. #   menuadd Misc    (Show ASCII)            (title \$ascii)
  282. #   menuadd Misc    (--------------)        (null)
  283. #   menuadd Misc    (Cli command    c-\\)   (c-\\)
  284. #   menuadd Misc    (Show-Text)             (escimm (execute `UTIS:MuchMore :))
  285. #   menuadd Misc    (Manual)                (escimm (execute `run execute script:man )
  286. #   menuadd Misc    (--------------  )      (null)
  287. #   menuadd Misc    (Word_To_Upper)         (upper_word )
  288. #   menuadd Misc    (Word_To_Lower)         (lower_word )
  289. #   menuadd Misc    (--PREFS-------)        (null)
  290. #   menuadd Misc    (Overwrite Mode c-o)    (c-o)
  291. #   menuadd Misc    (Use mouse to block)    (toggle \$_mouseblock ifelse \$_mouseblock (title (MOUSEBLOCK ON)) (title (MOUSEBLOCK OFF)))
  292. #   menuadd Misc    (View Mode      )       (viewmode toggle)
  293. #   menuadd Misc    (--PREFS------- )       (null)
  294. #   menuadd Misc    (Wordwrap      sc-w)    (sc-w)
  295. #   menuadd Misc    (Reformat      sc-r)    (sc-r)
  296. #   menuadd Misc    (Margin        sc-m)    (sc-m)
  297. ##
  298. #   menuadd User    (Add Text)              (right wleft scanf %s menuoff menuadd User (\$scanf) ((\$scanf)) () menuon execute (echo >> dme.rsc "menuadd User (\$scanf) ((\$scanf))"))
  299. #   menuadd User    (Add Comm)              (right wleft escimm  (set name `) escimm (set function `) menuoff menuadd User (\$name) (\$function) menuon execute (echo >> dme.rsc "menuadd User (\$name) (\$function)"))
  300. #   menuadd User    (Del Item)              (escimm (menudel User `))
  301. #   menuadd User    («««« USER: »»»»)       ()
  302. ##
  303. #   menuon
  304. ##
  305. ##
  306. ########################################################################
  307. ##
  308. ##  Debugging purposes
  309. ##
  310.     menuoff
  311.     menuadd User tg_debug    (debug toggle)
  312.     menuadd User end_filter  (filter q (( )) () () null)
  313.     menuadd User end_rexxview (rx ("closerexxview"))
  314.     menuon
  315. ##
  316. ########################################################################
  317. ##
  318. ##  This allows U to use a small additional Project-rc
  319. ##  it works together with the entries in the User-Menu
  320. ##
  321.     menuoff
  322.     force rf (source dme.rsc)
  323.     menuon
  324. ##
  325. ##
  326. ########################################################################
  327. ##
  328. ##  if there is no text: display the filereq
  329. ##
  330.     resettoggle 10 if t (if b (if r (rx ("if '\$fname'='unnamed' then 'toggle 10'")))) if 10 (arpload resettoggle 10)
  331. ##
  332. ########################################################################
  333. ##
  334.  
  335. # any editor addenda are here in my system
  336. addpath ed:
  337.  
  338.  
  339. # control support
  340. map  c-\\    (escimm (execute `))
  341.  
  342.  
  343. #map L-lmb (tomouse if $_mouseblock ( set _markj (col \$colno goto \$lineno) resettoggle $_movemark ))
  344. map L-lmb   ( tomouse resettoggle $_movemark ))
  345. map L-mmove ( ifelse !$_mouseblock ( tomouse ) ( ifelse $_movemark ( unblock force s ( pushdot \$_markj block popdot ) tomouse block ) ( toggle $_movemark set _markj (col \$colno goto \$lineno))))
  346.  
  347. fgpen 1
  348. hgpen 2
  349. bbpen 0
  350.