home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d07xx / d0770.lha / Uedit / DonMikneus.LZH / DonConfig next >
Text File  |  1989-09-28  |  112KB  |  3,741 lines

  1. =============================================================================
  2. Last Modified: 24 Mar 89
  3. DonConfig modified from Config! by Don Mikneus as follows:
  4. ((NOTE:  I updated this so it'd compile with Uedit v2.4.  R.S. 4/4/89))
  5.  
  6. * Single-buttonDown and hold scrolls text in opposite direction of mouse
  7.   location when mouse is at extreme limits of the window.
  8.  
  9. * Double-buttonDown & Drag hilites text until buttonUp.  Combine this with
  10.   scroll feature above for easy text hiliting by mouse alone.
  11.  
  12. * Shift-double-buttondown & Drag inverts region. Same as hilite feature.
  13.  
  14. * Ctl-buttonDown & Drag hilites text.  ButtonUp then loads the hilited file or
  15.   directory from any number of independent directories.  This allows mouse
  16.   controlled loading of filenames having embedded spaces.
  17.  
  18. * Buffer Status command changed to "Configure" to allow changing of buffer
  19.   variables.  It's easier to keep track of variables when all are shown
  20.   simultaneously.  Any buffer's variables can be changed once inside this
  21.   buffer-status function.
  22.  
  23. * Menus were rearranged.  Menu items are in either alphabetical or logical
  24.   order. Items containing submenus are in all CAPS.
  25.  
  26. * Modified Quit&Save options to consistently check whether file needs saving.
  27.  
  28. * All commands that are called by other commands have virtual-key labels 
  29.   so that a user cannot inadvertently swap-out a needed subcommand.
  30.  
  31. * Buffers used within commands have the highest buffer numbers.  Buffers used
  32.   for files have the lowest buffer numbers (Zero and up).  Same thing goes
  33.   for nVariables.
  34.  
  35. * Function keys F6 - F10 have no default definitions and are open for the
  36.   user.
  37.  
  38. * Cursor-arrow keys control cursor movement, keypad controls scroll movement.
  39.   "Shift" moves by word, "Alt" moves to end of text, "Ctl" moves to ABS end.
  40.  
  41. * Reformating can operate on paragraphs in a special mode (BlankDelimit) as
  42.   text delimited by blank lines only or in normal mode as text delimited by
  43.   both indent changes or blank lines.  AutoFormat provides auto-reformat
  44.   capability for paragraphs in special mode.  In AutoFormat mode,
  45.   reformatting occurs on any non-text entry cursor movement.  BlankDelimit
  46.   Mode reformats only when the current paragraph has changed. Spec LMargin
  47.   and Spec RMargin settings can be made for each paragraph separated by blank
  48.   lines.  Reformat can now operate on all hilited paragraphs, from current
  49.   paragraph to end of screen, or even to end of document.
  50.  
  51. * Primitive mode "completion-key" is the RETURN since that is what most
  52.   people expect.
  53.  
  54. * Ascii table and Key Table commands added to aid Config programming.
  55.  
  56. * Many commands modified to be more flexible in operation. For example, add/
  57.   sub number works on entire number regardless of where the cursor is in the
  58.   number.
  59.   
  60. =============================================================================
  61.  
  62. Config! defines Uedit's start-up settings and commands.  Config! must be in
  63. S: or in your current directory.
  64.  
  65. If you edit Config! and want to make a new Data! file, type "Run UE -c" in
  66. CLI.  (Or you can rename S:Data! or delete it, and Uedit will be forced to
  67. compile Config! next time.)
  68.  
  69. If you create a new config such as "NewConfig", you can make Uedit compile it
  70. by typing "UE -cNewConfig" in CLI.  On the "Save new Data?" question,
  71. selecting Yes will replace Data!.  Selecting No will preserve the old Data!. 
  72. Once inside Uedit, you can select "Save data" and save it under a new name
  73. like "NewData".
  74.  
  75. To make Uedit use NewData next time, type "UE -dNewData" in CLI.  To make it
  76. your standard data file, rename it to Data! or S:Data!.
  77.  
  78. ---------------------------------------------------------------------------
  79. Here is a description of how buffers and number variables are used in this file.  
  80. If you make changes which involve buffers or numeric variables, follow the 
  81. convention in this list:
  82. (Though this convention could be changed entirely, of course.)
  83.  
  84. buf95-99 = used for temporary purposes in commands
  85. buf94    = search string
  86. buf93    = replace string
  87. buf92    = copied hilite
  88. buf91    = copied invert
  89. buf90    = holds scratch deletes for Undo, keypad-0
  90. buf89    = make-command buffer
  91. buf88    = document names
  92. buf87    = holds Help, if loaded
  93. buf86    = used in buffer swapping command, CTRL-w
  94. buf85    = used for AmigaDOS commands
  95. buf84    = used for result of AmigaDOS commands (if result selected)
  96. buf83    = most recent directory name, if "Directory" has been selected
  97. buf82    = copied columnar data
  98. buf81    = debug message
  99. buf0-19  = file buffers
  100.  
  101. And this is how number variables are used in this config ...
  102. n95-n99  = temporary variables
  103. n94      = numeric total
  104. n93      = delay time
  105. n92      = current EOL column position when requested, Temp CurrentIndex
  106. n91      = temp column match, WB colors, TAB
  107. n90      = temp column match, ButtonDown Counter
  108. n89      = track mouse x position after double click, Temp SpecMargin Status
  109. n88      = track mouse y position after double click
  110. n87      = scroll position indicator for norm/interlace screen
  111. n86      = pointer to buffer for building sorted list in
  112. n85      = current buffer number
  113. n84      = last delete command's cursor position
  114. n83      = 1 if userLocalB and File was changed but not yet saved
  115. n82      = index to start of paragraph
  116.  
  117.       KEEP A BACKUP COPY OF THE ORIGINAL CONFIG! IF YOU CHANGE THIS FILE!
  118. =============================================================================
  119. Edit the contents of each set of angle brackets, but leave the angle-brackets
  120. as they are:
  121.  
  122. (To recompile these defaults anytime, select "Compile Def" in the menu.)
  123.  
  124. (Unless told otherwise, use 0 for "no" or 1 for "yes".)
  125.  
  126. <1>     make Key-Help file during this compile.  (For "TEACH KEYS" in menu.)
  127.         (NOTE:  Unless you need the Key-Help facility, you should change this
  128.         flag to 0.  The compile will go much faster.)
  129. <s:EdKeyHelp>  name of Key-Help file (1-19 characters.)
  130.  
  131. <0>     show cursor during compile of this configuration (slower, if show)
  132.  
  133. <RAM:uejunk>  Name for temporary file when one is needed.  19 chars max.
  134.  
  135. <27>    Primitive Mode (pmESC) terminator character.  ASCII value, 5-255.
  136.  
  137. <0>     user global flag A ; Any Integer Value
  138. <0>     user global flag B ; Any Integer Value
  139. <0>     columnar display mode
  140. <0>     cram display mode
  141. <1>     show row-column
  142.  
  143. <1>     mark gadgets
  144. <0>     Interlace/bitplanes. 0-3.
  145. <1>     show invisibles
  146. <0>     show busies
  147. <0>     key-help mode
  148.  
  149. <20>    maximum files to edit:  1-100
  150. <0>     make icons
  151. <0>     search case-sensitive
  152. <?>     search wildcard  (printable character)
  153. <$>     search either-or delimiter  (printable character)
  154.  
  155. <*>     Search multi wildcard.       Printable character.
  156. <~>     Search all-but delimiter.    Printable character.
  157. <0>     White allowed under single wildcard: 0=no, 1=space/tab, 2=any white.
  158. <0>     White allowed under multi wildcard: 0=no, 1=space/tab, 2=any white.
  159. <75>    Percent offset for submenus.  0-100 percent.
  160.  
  161. <0>     RESERVED  (l)
  162. <0>     RESERVED  (m)
  163. <0>     speak alerts
  164. <0>     speak messages
  165. <0>     Print tabs (if 0, tabs are converted to spaces during print)
  166.  
  167.  
  168. <1>     Smart tabs (don't convert tabs if inside quotes)
  169. <0>     RESERVED
  170. <0>     use printable cmd-keys for typing input
  171. <2>     printer: 0=par: 1=ser: 2=prt: 3=prt: (raw)
  172. <10>    idle-time (in seconds) after which idle command is executed: 1-9999
  173.  
  174. <0>     Hide display.
  175. <1>     Scroll type: 0 = show colors, 1 = faster
  176. <0>     Trap menus to use menu mouse button as a key
  177. <0>     Reserved
  178. <0>     Reserved
  179.  
  180. <0>     Reserved
  181. <0>     Reserved
  182. <0>     Reserved
  183. <0>     Reserved
  184. <0>     Reserved
  185.  
  186. <0>     use tabs - put in tabs, not spaces, when tab key pressed.
  187. <1>     autoindent mode
  188. <0>     overstrike mode
  189. <0>     autobackup mode
  190. <0>     RESERVED  (r)
  191.  
  192. <1>     wordwrap mode
  193. <0>     right-justification mode
  194. <1>     map illegal ASCII chars 0-4 to alternate values (see mappings below)
  195. <0>     RESERVED  (c)
  196. <0>     User local flag A
  197.  
  198. <0>     user local flag A
  199. <4>     tab table to use: 0-4  (See tables below.)
  200. <77>    line-length:    1-9999
  201. <5>     split window size in lines (2-100, up to max lines in window)
  202. <0>     left margin     0-200
  203.  
  204. <1>     top margin      0-200
  205. <1>     bottom margin   0-200
  206. <1>     lines/page:     1-200
  207. <10>    end-of-line character: 10=Newline, 13=Carriage Return
  208.  
  209. These are the 5 TAB tables.  There can be at most 32 column-entries in tab
  210. table.  The highest column is 255.  The lowest tab column is 2.  In Uedit, to
  211. change tab tables, select "Tab table"; to see the settings, select "See
  212. ruler"; to adjust the tabs, select "Set ruler".
  213.  
  214. <5>                 Tab table 0.  (32 entries max.  Column 2-255.)
  215. <6 20>              Tab table 1.  (32 entries max.  Column 2-255.)
  216. <5 10 20 45>        Tab table 2.  (32 entries max.  Column 2-255.)
  217. <>                  Tab table 3.  (32 entries max.  Column 2-255.)
  218. <3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 >
  219.                     Tab table 4.  (32 entries max.  Column 2-255.)
  220.  
  221. Uedit uses ASCII characters 0-3 internally for marking cleared text and for
  222. flags.  Thus, files cannot legally contain these characters.  If the above
  223. "map illegals" flag is not set, these odd characters are erased by Uedit upon
  224. loading the file.  If "Map illegals" is set (see default above ), ASCII 0-3
  225. are remapped into "safe" character values using the settings below.  Upon
  226. saving the file to disk the characters are converted back into their old
  227. ASCII 0-3 values:  (You could also map the 3 non-null ctrl characters to
  228. ASCII 28-31.  This would make tests for control characters work properly.)
  229.  
  230. <128>   map ASCII 0
  231. <129>   map ASCII 1
  232. <130>   map ASCII 2
  233. <131>   map ASCII 3
  234.  
  235. Printable key table:  DON'T TOUCH, unless you know what you are doing!  This
  236. is a translation table which converts raw keystrokes into printable
  237. characters.  (See Rom Kernal Manual, Volume 1, page 3-81.) There must be 64
  238. in each row.  Use OVERSTRIKE mode when modifying this, to save trouble.
  239. Unused -->     U             U    EUROPE--> EE   U          U
  240. <`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;'  456 zxcvbnm,./ .789>
  241. <~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:"  456 ZXCVBNM<>? .789>
  242.  
  243. Colors:
  244.  
  245. <2><1><0><3>    Workbench window colors (Preferences colors) (0-3)
  246.  
  247. Interlace RGB colors (0-15):
  248. Red     Green   Blue
  249. <00>    <00>    <15>     Register 0
  250. <12>    <12>    <15>     Register 1
  251. <00>    <00>    <00>     Register 2
  252. <15>    <00>    <00>     Register 3
  253.  
  254. Gadget Names (19 chars max):
  255.  
  256. <Next File>     Name for gadget 1 (19 chars max).
  257. <Copy HiLite>   Name for gadget 2 (19 chars max).
  258. <Cut  HiLite>   Name for gadget 3 (19 chars max).
  259. <Paste HiLite>  Name for gadget 4 (19 chars max).
  260.  
  261. <startup:
  262.  
  263. menu("File",1,normal-f1)
  264.   menu("New           CF1",1,ctl-f1)
  265.   menu("Open          AF1",1,alt-f1)
  266.   menu("Open w/Dir    C-d",1,ctl-d)
  267.   menu("Insert       SAF1",1,shftAlt-f1)
  268.   menu("Rename        A-r",1,alt-r)
  269.   menu("Restore      SCF1",1,shftCtl-f1)
  270.   menu("Close w/Save  AF2",1,alt-f2)
  271.   menu("Save As...     F2",1,normal-f2)
  272.   menu("Save AllFiles SF2",1,shft-f2)
  273.   menu("SetDefaultDir A-d",1,alt-d)
  274.   menu("Print        SC-p",1,shftCtl-p)
  275.   menu("About...         ",1,shftAltCtl-a)
  276.   menu("Quit          C-z",1,ctl-z)
  277.  
  278. menu("Buffers",2,normal-f1)
  279.      menu("Clear All    SAF2",2,shftAlt-f2)
  280.      menu("Clear #       C-f",2,ctl-f)
  281.      menu("Index Build  SA-i",2,shftAlt-i)
  282.      menu("Review All    A-b",2,alt-b)
  283.      menu("Speak HiLite  A-s",2,alt-s)
  284.      menu("Swap w/ Buf86 C-w",2,ctl-w)
  285.      menu("Swap w/ Buf0  L-w",2,lAmiga-w)
  286.  
  287. menu("Command",3,normal-f1)
  288.      menu("Do m times    C-m",3,ctl-m)
  289.      menu("Do Cmd #    A-ESC",3,alt-ESC)
  290.      menu("DOS   Result  C-y",3,ctl-y)
  291.      menu("DOS NoResult SC-y",3,shftctl-y)
  292.      menu("Compile Cmd   C-c",3,ctl-c)
  293.      menu("Compile Def  AC-c",3,altCtl-c)
  294.      menu("Cmd Buffer   SC-c",3,shftCtl-c)
  295.      menu("Kill Cmd    SAC-k",3,shftAltCtl-k)
  296.      menu("Swap Cmds     A-w",3,alt-w)
  297.      menu("Swap MouseUp SA-w",3,shftAlt-w)
  298.      menu("COMMAND DATA     ",3,virtual-a)
  299.   SUBmenu("Save Data    C-F2",3,ctl-f2)
  300.   SUBmenu("Load Data   AC-F1",3,altCtl-f1)
  301.      menu("GOTO             ",3,virtual-a)
  302.   SUBmenu("Line #        C-n",3,ctl-n)
  303.   SUBmenu("Page #        A-3",3,alt-3)
  304.   SUBmenu("Page Start    L-h",3,lAmiga-h)
  305.   SUBmenu("Page End      L-e",3,lAmiga-e)
  306.   SUBmenu("First Line   C-up",3,ctl-upArrow)
  307.   SUBmenu("Last  Line  C-dwn",3,ctl-downArrow)
  308.      menu("LEARN            ",3,virtual-a)
  309.   SUBmenu("eXecute Learn C-x",3,ctl-x)
  310.   SUBmenu("Save Learn #  C-5",3,ctl-5)
  311.   SUBmenu("Load Learn #  C-6",3,ctl-6)
  312.   SUBmenu("Run  Learn #  C-7",3,ctl-7)
  313.      menu("PRINT            ",3,normal-f1)
  314.   SUBmenu("Stop Current  L-p",3,lAmiga-p)
  315.   SUBmenu("Stop Queue    R-p",3,rAmiga-p)
  316.   SUBmenu("Restart print L-s",3,lAmiga-s)
  317.   SUBmenu("Select Port   A-p",3,alt-p)
  318.   SUBmenu("Queue Hilite  C-p",3,ctl-p)
  319.   SUBmenu("Code áEmbed   L-b",3,lAmiga-b)
  320.   SUBmenu("Code áFind    R-g",3,rAmiga-g)
  321.   SUBmenu("Code áHelp AC-hlp",3,altCtl-help)
  322.   SUBmenu("Codeá Raw     R-b",3,rAmiga-b)
  323.      menu("SPELLING         ",3,rAmiga-1)
  324.   SUBmenu("Load speller  R-1",3,rAmiga-1)
  325.   SUBmenu("Check fwd     R-2",3,rAmiga-2)
  326.   SUBmenu("Chk&mark fwd  R-3",3,rAmiga-3)
  327.   SUBmenu("Chk & collect R-4",3,rAmiga-4)
  328.   SUBmenu("Merge w/ dict R-5",3,rAmiga-5)
  329.   SUBmenu("Del from dict R-6",3,rAmiga-6)
  330.   SUBmenu("Free Speller  R-8",3,rAmiga-8)  
  331.  
  332. menu("Edit",4,virtual-a)
  333.      menu("Ascii         A-a",4,alt-a)
  334.      menu("Caps Flip     A-f",4,alt-f)
  335.      menu("Center Line   A-2",4,alt-2)
  336.      menu("Control Char  C-k",4,ctl-k)
  337.      menu("HardSpace S-Space",4,shft-space)
  338.      menu("UnDel   C-kpEnter",4,ctl-kpEnter)
  339.      menu("COLUMN           ",4,virtual-a)
  340.   SUBmenu("Copy  HiLit  SC-3",4,shftCtl-3)
  341.   SUBmenu("Cut   HiLit  SC-1",4,shftCtl-1)
  342.   SUBmenu("Paste        SC-4",4,shftCtl-4)
  343.   SUBmenu("Space HiLit  SC-2",4,shftCtl-2)
  344.   SUBmenu("Overwrite    SC-5",4,shftCtl-5)
  345.   SUBmenu("Ins HiL @Csr SC-6",4,shftCtl-6)
  346.   SUBmenu("OvW HiL @Csr SC-7",4,shftCtl-7)
  347.      menu("FORMAT MARKINGS  ",4,virtual-a)
  348.   SUBmenu("Insert FF     L-f",4,lAmiga-f)
  349.   SUBmenu("Del PageMark  L-d",4,lAmiga-d)
  350.   SUBmenu("Ins PageMark  L-v",4,lAmiga-v)
  351.   SUBmenu("AutoIns PgMk  L-r",4,lAmiga-r)
  352.      menu("HILITE           ",4,virtual-a)
  353.   SUBmenu("Start         KP1",4,normal-kp1)
  354.   SUBmenu("End           KP3",4,normal-kp3)
  355.   SUBmenu("Copy          kp.",4,normal-kpDot)
  356.   SUBmenu("Cut           kp-",4,normal-kpMinus)
  357.   SUBmenu("Paste     kpEnter",4,normal-kpEnter)
  358.   SUBmenu("Erase         C-h",4,ctl-h)
  359.      menu("INVERT           ",4,virtual-a)
  360.   SUBmenu("Start       S-KP1",4,shft-kp1)
  361.   SUBmenu("End         S-KP3",4,shft-kp3)
  362.   SUBmenu("Copy        A-kp.",4,alt-kpDot)
  363.   SUBmenu("Cut         A-kp-",4,alt-kpMinus)
  364.   SUBmenu("Paste   A-kpEnter",4,alt-kpEnter)
  365.   SUBmenu("Erase         C-i",4,ctl-i)
  366.      menu("REFORMAT         ",4,virtual-a)
  367.   SUBmenu("Paragraph      F4",4,normal-f4)
  368.   SUBmenu("Hilite Region SF4",4,shft-f4)
  369.   SUBmenu("To ScreenEnd  AF4",4,alt-f4)
  370.   SUBmenu("To Doc   End  CF4",4,ctl-f4)
  371.   SUBmenu("Space 2 Tab   R-t",4,rAmiga-t)
  372.   SUBmenu("Tab   2 Space L-t",4,lAmiga-t)
  373.   SUBmenu("DelTrailSpace C-4",4,ctl-4)
  374.      menu("SEARCH & REPLACE ",4,virtual-a)
  375.   SUBmenu("Set   Search  kp7",4,shft-kp7)
  376.   SUBmenu("Set   Replace kp9",4,shft-kp9)
  377.   SUBmenu("SEARCH  Fwrd  C-s",4,ctl-s)
  378.   SUBmenu("Replace Fwrd  C-r",4,ctl-r)
  379.   SUBmenu("Rpl All Fwrd AC-r",4,altCtl-r)
  380.   SUBmenu("SEARCH  Back SC-s",4,shftCtl-s)
  381.   SUBmenu("Replace Back SC-r",4,shftCtl-r)
  382.   
  383. menu("Mode",5,normal-f1)
  384.    checkedMenu("AutoBackup  SACF5",5,shftAltCtl-f5,autoBackup)
  385.    checkedMenu("Changed Flag  LF5",5,lAmiga-f5,changed)
  386.    checkedMenu("ColumnarData SC-`",5,shftCtl-`,columnar)
  387.           Menu("FORMAT",5,virtual-a) 
  388. checkedSUBMenu("AutoFormat   ACF4",5,altCtl-f4,userLocalB)
  389. checkedSUBMenu("AutoIndent    AF5",5,alt-f5,autoIndent)
  390. checkedSUBMenu("BlankDelimit  CF3",5,ctl-f3,userGlobalB)
  391. checkedSUBMenu("Right Justify A-j",5,alt-j,rightJustify)
  392. checkedSUBMenu("Spec LMargin SAF4",5,shftAlt-f4,userGlobalA)
  393. checkedSUBMenu("WordWrap      CF5",5,ctl-f5,wordWrap) 
  394.    checkedMenu("Help       C-help",5,ctl-help,teachKeys)
  395.    checkedMenu("Icon Files -G- F5",5,normal-f5,icons)
  396.    checkedMenu("Idle Save    ACF2",5,altCtl-f2,userLocalA)
  397.    checkedMenu("Learn         R-l",5,rAmiga-l,learnMode)
  398.    checkedMenu("Map ASC(0-5) SA-m",5,shftAlt-m,mapChars)
  399.    checkedMenu("Num Keypad-G- A-n",5,alt-n,useKeys)
  400.    checkedMenu("OverStrike    SF5",5,shft-f5,overStrike)
  401.    checkedMenu("Read-Only    SAF5",5,shftAlt-f5,readOnly)
  402.    checkedMenu("Search Caps   C-8",5,ctl-8,searchCaps)
  403.    checkedMenu("Speak Alrts  ACF5",5,altCtl-f5,speakAlerts)
  404.    checkedMenu("Speak Msgs   SCF5",5,shftCtl-f5,speakMsgs)
  405.    checkedMenu("Tabs Real  AC-tab",5,altCtl-tab,trueTabs)
  406.  
  407. menu("Adjust",6,normal-f1)
  408.          menu("Configure  S-HELP",6,shft-help)
  409.          menu("DataInput Key ESC",6,normal-ESC)
  410.          menu("End Of Line  SA-e",6,shftAlt-e)
  411.          menu("GadgetName AC-ESC",6,altCtl-esc)
  412.            menu("Hex# 2 Dec#   A-h",6,alt-h)
  413.          menu("nVariable     A-8",6,alt-8)
  414.            menu("Spec LMargin  SF3",6,shft-f3)
  415.            menu("Spec RMargin   F3",6,normal-f3)
  416.          menu("UnInvert      A-i",6,alt-i)
  417.          menu("UnHiLite      C-u",6,ctl-u)
  418.   
  419. menu("Display",7,normal-f1)
  420.   checkedMenu("Busies       SA-b",7,shftAlt-b,busies)
  421.   checkedMenu("Control Codes C-v",7,ctl-v,spooks)
  422.   checkedMenu("Interlace   S-ESC",7,shft-esc,lace)
  423.   checkedMenu("Mark Gadgets  C-g",7,ctl-g,markGadgets)
  424.   checkedMenu("MoreRows      RF5",7,rAmiga-f5,cram)
  425.   checkedMenu("Row/Column    C-2",7,ctl-2,rowCol)
  426.          menu("ASCII of Char C-a",7,ctl-a)
  427.          menu("ASCII Table   R-a",7,rAmiga-a)
  428.            menu("Key Codes     A-k",7,alt-k)
  429.            menu("Key Table    AC-k",7,altCtl-k)
  430.          menu("Refresh   SC-help",7,shftCtl-help)
  431.          menu("SPLIT WINDOWS    ",7,virtual-a)
  432.       SUBmenu("New           L-0",7,lAmiga-0)
  433.       SUBmenu("Decrease    L-kp2",7,lAmiga-kp2)
  434.       SUBmenu("Enlarge     L-kp8",7,lAmiga-kp8)
  435.       SUBmenu("Next Window   L-9",7,lAmiga-9)
  436.       SUBmenu("Close         L--",7,lAmiga--)
  437.       SUBmenu("Undo   Buffer L-1",7,lAmiga-1)
  438.       SUBmenu("Search Buffer L-2",7,lAmiga-2)
  439.       SUBmenu("ReplaceBuffer L-3",7,lAmiga-3)
  440.       SUBmenu("Hilite Buffer L-4",7,lAmiga-4)
  441.       SUBmenu("Invert Buffer L-5",7,lAmiga-5)
  442.       SUBmenu("Column Buffer L-6",7,lAmiga-6)
  443.       SUBmenu("Current Dir   L-7",7,lAmiga-7)
  444.       
  445. nameBuffer(94,"Search String")                   .. names for buffers
  446. nameBuffer(93,"Replace String")
  447. nameBuffer(92,"Copied Hilite")
  448. nameBuffer(91,"Copied Invert")
  449. nameBuffer(90,"Scratch Deletes")
  450. nameBuffer(89,"Command EditBuffer")
  451. nameBuffer(88,"Directory Name")
  452. nameBuffer(87,"Help")
  453. nameBuffer(86,"Index")
  454. nameBuffer(82,"Copied ColumnText")
  455.  
  456. runKey(shftAltCtl-z)
  457. runKey(virtual-7)
  458. >
  459.  
  460. NOTE:  shftAltCtl-z is executed automatically at startup.  Normally no
  461. command exists for it.  During an edit session you can create and save one,
  462. however, and it will be executed each time you start Uedit.
  463.  
  464. Press HELP if you want to see how to set up shftAltCtl-z  to  auto-load  your
  465. files.
  466. ===========================    VIRTUAL KEYS    =============================
  467.  
  468. NOTE: The following are subroutines which are only accessible from commands
  469. and cannot be directly accessed by the keyboard.  They permit swapping of
  470. normal commands without having to worry about one key calling another.
  471.  
  472. ERASE FILE GRACEFULLY
  473. <virtual-a:
  474.   if (eqNum(macroNum,465))  ..ctl-z
  475.     { if (askYesNo("Quit WITHOUT Save?")) quit(0)
  476.       equateNum(macroNum,1) ..clear this test
  477.     }
  478.   if (not saveFile(buf[n99]))
  479.     { putMsg("AMIGA-ESC=Abort.  Save File As")
  480.       freeBuf(buf88)
  481.       getFileName(buf88,buf[n99])
  482.       inputString(buf88)
  483.       if (setFileName(buf[n99],buf88)) 
  484.         if (not saveFile(buf[n99])) returnFalse 
  485.     }
  486. >
  487. HILITE COPY
  488. <virtual-b:
  489.   if (gtLoc(curFile,eHilite,sHilite))
  490.     { freeBuf(buf92) insertRgn(buf92,sFile,curFile,hilite) 
  491.     }
  492. >
  493. HILITE PASTE
  494. <virtual-c:
  495.   insertRgn(curFile,atCursor,buf92,all)
  496.   if (not onScreen(atCursor)) vScroll(atCursor) 
  497. >
  498. HILITE START
  499. <virtual-d:
  500.   equateLoc(curFile,sHilite,mouseLoc) equateNum(n90,2) 
  501. >
  502. SAVE File as
  503. <virtual-e:
  504.   putMsg("AMIGA-ESC=Abort, Save CurrentFile As")
  505.   freeBuf(buf88)
  506.   freeBuf(buf99)
  507.   getFileName(buf88,curFile)
  508.   getFileName(buf99,curFile)
  509.   inputString(buf88)
  510.   moveCursor(buf88,sFile)
  511.   moveCursor(buf99,sFile)
  512.   while (not is(buf88,eFile))
  513.     { if (is(buf99,eFile)) goto label(1)
  514.       copyChar(buf99,n99)
  515.       if (not is(buf88,n99)) goto label(1)
  516.       moveCursor(buf88,eChar)
  517.       moveCursor(buf99,eChar) 
  518.     }
  519.   if (not runKey(virtual-6)) 
  520.     { putMsg ("File was unchanged, no SAVE.")
  521.       return 
  522.     }
  523. label(1)
  524.   if (setFileName(curFile,buf88)) saveFile(curFile) 
  525. >
  526. SEARCH STRING EDIT IN buf94
  527. <virtual-g:
  528.   putMsg("AMIGA-ESC=Abort, Input Search String")
  529.   inputString(buf94)
  530.     putMsg("Searching Forward")
  531.   runKey(virtual-h) 
  532. >
  533. NOTE: returnTrue is needed below because "thisKey" could return a False even
  534. though search() returned True.  returnFalse is needed because equateLoc()
  535. will return a True:
  536. SEARCH FORWARD FOR STRING IN buf94
  537. <virtual-h:
  538.   if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
  539.   setSearch(buf94)
  540.   if (search(curFile,sInvert,eInvert,1)) returnTrue 
  541.   putMsg("Forward Search failed")
  542.   equateLoc(curFile,sInvert,eInvert)
  543.   returnFalse 
  544. >
  545. REPLACE STRING EDIT IN buf93
  546. <virtual-i:
  547.   putMsg("AMIGA-ESC=Abort.  Input Replace String")
  548.   inputString(buf93) 
  549. >
  550. INVERT COPY
  551. <virtual-j:
  552.   if (not gtLoc(curFile,eInvert,sInvert)) returnFalse
  553.   freeBuf(buf91)
  554.   insertRgn(buf91,sFile,curFile,invert) 
  555. >
  556. DELETE MESSAGE
  557. <virtual-k:
  558.   refreshDisplay
  559.   putMsg("Phrase Copied to buf90.  Recover with CTRL-ENTER") 
  560. >
  561. DELETE TO EOL
  562. <virtual-l:
  563.   if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf90)
  564.   if (is(curFile,eLine)) runKey(normal-del)
  565.   else
  566.     { equateLoc(curFile,locA,atCursor)
  567.       moveCursor(curFile,eLine)
  568.       equateLoc(curFile,locB,atCursor)
  569.       insertRgn(buf90,eFile,curFile,loc)
  570.       clearRgn(curFile,loc)
  571.     } 
  572. >
  573. SPACE INSERT
  574. <virtual-m:
  575.   insertChar(curFile," ") moveCursor(curFile,sChar)
  576.   if (is(curFile,sLine)) refreshDisplay
  577. >
  578. DIRECTORY NAME
  579. <virtual-n:
  580.   putMsg("AMIGA-ESC=Abort.  Enter New Editor Default Directory (use w/CLI only): ")
  581.   freeBuf(buf83)
  582.   if (inputString(buf83)) changeDir(buf83)
  583. >
  584. LINES/PAGE
  585. <virtual-o:
  586.   getLocal(buf[n85],n99,pageLines)
  587.   putMsg("AMIGA-ESC=Abort.  Enter New # Lines/Page")
  588.   inputNum(n99)
  589.   setLocal(buf[n85],pageLines,n99) 
  590. >
  591. SEARCH BACKWARD FOR STRING IN buf94
  592. <virtual-p:
  593.   setSearch(buf94)
  594.   if (search(curFile,sInvert,eInvert,-1)) returnTrue 
  595.   putMsg("Backward Search failed")
  596.   equateLoc(curFile,sInvert,eInvert)
  597.   returnFalse 
  598. >
  599. REPLACE INVERTED REGION W/ buf93
  600. <virtual-q:
  601.   if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  602.   clearRgn(curFile,invert)
  603.   insertRgn(curFile,sInvert,buf93,all)
  604.   runKey(virtual-h) 
  605. >
  606. PRINT: Get control key
  607. <virtual-r:
  608.   putMsg("Enter printer code (b c d e i l n s u x y 8 h=help):")
  609.   if (getKey(n99)) { mod(n99,n99,104)   putMsg(" ") returnTrue }
  610.   putMsg(" ")
  611.   returnFalse 
  612. >
  613. SPACE: Clear Leading
  614. <virtual-s:
  615.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  616.   while (is(curFile,space))
  617.     { if (is(curFile,eLine)) returnTrue
  618.       clearChar(curFile) 
  619.     } 
  620. >
  621. SET n92 = EOL column position
  622. <virtual-t:
  623.   equateLoc(curFile,locA,atCursor)
  624.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  625.   locToCol(curFile,n92,atCursor)
  626.   equateLoc(curFile,atCursor,locA) 
  627. >
  628. COLUMN-HILIGHTED COPIED TO buf82
  629. <virtual-u:
  630.   if (gtLoc(curFile,eHilite,sHilite))
  631.     { freeBuf(buf82) copyColData(buf82,sFile,curFile,hilite,1) 
  632.     } 
  633. >
  634. SORTED LIST BUILT BY SUCCESSIVELY ADDING INVERT REGIONS
  635. <virtual-v:
  636.   moveCursor(curFile,sInvert)
  637.   copyChar(curFile,n99)
  638.   if (is(curFile,upperCase)) add(n99,n99,32)
  639.   if (isEmpty(buf[n86])) insertChar(buf[n86],eLine)
  640.   moveCursor(buf[n86],sFile)
  641.   equateLoc(buf[n86],sPage,atCursor)
  642. label(1)
  643.   copyChar(buf[n86],n98)
  644.   if (is(buf[n86],upperCase)) add(n98,n98,32)
  645.   if (gtNum(n99,n98))
  646.     { moveCursor(buf[n86],downLine)
  647.       if (not is(buf[n86],eFile)) goto label(1)
  648.     }
  649.   insertRgn(buf[n86],atCursor,curFile,invert)
  650.   insertChar(buf[n86],eLine) 
  651. >
  652. PRINTER: Bracket the hilite region with printer codes using n99
  653. <virtual-w:
  654.   if (geLoc(curFile,sHilite,eHilite)) returnFalse
  655.   equateLoc(curFile,locA,atCursor)
  656.   moveCursor(curFile,sHilite)
  657.   printerCode(curFile,n98,0,0)
  658.   incNum(n98)
  659.   moveCursor(curFile,eHilite)
  660.   printerCode(curFile,n98,0,0)
  661.   moveCursor(curFile,locA) 
  662. >
  663. Check whether hilite is file/dir and load appropriately
  664. <virtual-x:
  665.   updateDisplay
  666.   moveCursor(curFile,sInvert)
  667.   equateNum(n99,0)
  668.   if (is(curFile,"(")) goto label(1)
  669.   moveCursor(curFile,eInvert)
  670.   moveCursor(curFile,eChar)
  671.   while (is(curFile,space)) moveCursor(curFile,eChar)
  672.   equateNum(n99,1)
  673.   insertRgn(buf99,eFile,curFile,invert)
  674.   if (is(curFile,"(")) goto label(1)
  675.   
  676.   refreshDisplay
  677.   loadFile(buf99)
  678.   return
  679.   
  680. label(1)  
  681.   moveCursor(curFile,eChar)
  682.   if (is(curFile,"d")) 
  683.     { moveCursor(curFile,eChar)
  684.       if (is(curFile,"i"))
  685.         { moveCursor(curFile,eChar)
  686.           if (is(curFile,"r"))
  687.             { if (eqNum(n99,0))
  688.                 { moveCursor(curFile,sInvert)
  689.                   moveCursor(curFile,sChar)
  690.                   while (is(curFile,space)) moveCursor(curFile,sChar)
  691.                   moveCursor(curFile,eChar)
  692.                   equateLoc(curFile,eInvert,atCursor)
  693.                   moveCursor(curFile,sChar)
  694.                   while (not is(curFile,whiteSpace)) moveCursor(curFile,sChar)
  695.                   moveCursor(curFile,eChar)
  696.                   equateLoc(curFile,sInvert,atCursor)
  697.                   insertRgn(buf99,eFile,curFile,invert)
  698.                 }
  699.               swapBuf(buf83,buf99)
  700.               runKey(ctl-d)                          ..Get Dir of Buf83
  701.               refreshDisplay
  702.             }
  703.         }
  704.     }
  705. >
  706.        
  707. Find Beginning of FileName
  708. <virtual-y:
  709.   while (is(curFile,space))
  710.     { if (not moveCursor(curFile,sChar)) goto label(1) 
  711.       if (is(curFile,eLine))             goto label(1)
  712.     }
  713.   goto label(2)
  714. label(1)
  715.   if (not is(curFile,eWord)) moveCursor(curFile,eWord)
  716.   moveCursor(curFile,sChar)
  717. label(2)
  718.   while (not is(curFile,space)) 
  719.     { if (not moveCursor(curFile,sChar)) goto label(3) }
  720.   moveCursor(curFile,eChar)
  721. label(3)
  722.   equateLoc(curFile,sInvert,atCursor)
  723.   updateDisplay
  724. >
  725.  
  726. DEBUG
  727. ..<virtual-d:
  728.   freeBuf(buf81)
  729.   insertRgn(buf81,eFile,"Paused at ",all)
  730.   toWord(buf81,n0)
  731.   putMsg(buf81)
  732.   refreshDisplay
  733.   delay(30)
  734. >
  735.  
  736. VIRTUAL KEYS 1-4 ARE USED IN "SPECIAL-REFORMAT" SECTION BELOW
  737.  
  738. NUMERIC front end for add/sub a number
  739. <virtual-5:
  740.   if (is(curFile,".")) 
  741.     { moveCursor(curFile,eChar)
  742.       if (not is(curFile,digit))
  743.         { do(n99,1,2) moveCursor(curFile,sChar)
  744.           if (not is(curFile,digit)) 
  745.             { moveCursor(curFile,eChar)
  746.               returnFalse
  747.             }
  748.         }
  749.     }
  750.   if (not is(curFile,digit)) returnFalse
  751.   if (not is(curFile,sWord)) moveCursor(curFile,sWord)
  752.   moveCursor(curFile,sChar)
  753.   if (is(curFile,".")) 
  754.     { moveCursor(curFile,sChar)
  755.       if (is(curFile,digit)) moveCursor(curFile,sWord)
  756.       else  
  757.         { moveCursor(curFile,eChar)
  758.           equateNum(n99,0)
  759.           goto label(0)
  760.         }
  761.     }
  762.   else moveCursor(curFile,eChar)
  763.   toNumber(n99,curFile)
  764.   moveCursor(curFile,eWord)
  765. label(0)
  766.   if (is(curFile,".")) 
  767.     { moveCursor(curFile,eChar)
  768.       if (not is(curFile,digit)) goto label(1)
  769.       toNumber(n98,curFile)
  770.       moveCursor(curFile,eChar)
  771.       if (not is(curFile,digit)) 
  772.         { mul(n98,n98,10)
  773.           moveCursor(curFile,sChar)
  774.         }
  775.      moveCursor(curFile,eWord)
  776.    } 
  777.  else
  778.    { 
  779.  label(1) 
  780.      equateNum(n98,0) 
  781.    }
  782.   mul(n99,n99,100)
  783.   if (gtNum(0,n99)) mul(n97,n98,-1)
  784.   else equateNum(n97,n98)
  785.   add(n99,n99,n97)
  786. >
  787.  
  788. REFORMAT feature to keep track of changed file
  789. <virtual-6:
  790.   if (getFlag(curFile,userLocalB))  returnTrue
  791.   if (not getFlag(curFile,changed)) returnFalse
  792. >
  793.  
  794. STARTUP default conditions
  795. <virtual-7:
  796.   equateNum(pmESC,10)                    .. Set Primitive Input Key = RETURN
  797. >
  798. ======================    GADGETS & CURSOR KEYS   ==========================
  799. NOTE:  There can be shft-closeBox, alt-closeBox, etc, commands also.
  800.  
  801. QUIT gracefully
  802. <normal-closeBox:
  803.   if (not isEmpty(curFile))
  804.     if (runKey(virtual-6))                    ..Check whether file is changed
  805.       if (askYesNo("Save Changes for This File Before Closing?"))
  806.         { equateNum(n99,curFile)
  807.           if (not runKey(virtual-a)) returnFalse 
  808.         }
  809.   freeBuf(curFile)
  810.   getMaxFiles(n98)
  811.   decNum(n98)
  812.   do (n99, 0, n98)
  813.     if (not isEmpty(buf[n99])) returnFalse
  814.   if (askYesNo("Quit Uedit?")) quit(0) 
  815. >
  816.  
  817. <normal-esc: 
  818.   putMsg("Enter new Primitive Mode terminator CTRL-key")
  819.   if (getKeyVal(n54,n99)) 
  820.     if (gtNum(n99,4))
  821.       if (gtNum(32,n99)) equateNum(pmESC,n99)
  822.   putMsg(" ") >
  823.              
  824. INTERLACE mode
  825. <shft-Esc:
  826.   flipFlag(curFile,lace) 
  827. >
  828. COMMAND Execute #
  829. <alt-Esc:
  830.   putMsg("AMIGA-ESC=Abort.  Enter the command number to execute")
  831.     inputNum(n99)
  832.     runKey(n99) 
  833. >
  834. QUIT No SAVES
  835. <ctl-esc:
  836.   quit(0)
  837. >
  838. GADGET Change Name
  839. <altCtl-esc:
  840.   putMsg("Enter Number of Gadget to Rename (1-4):")
  841.   inputNum(n99)
  842.   freeBuf(buf99)
  843.   insertRgn(buf99,eFile,"Enter Name for Gadget ",all)
  844.   toWord(buf99,n99)
  845.   putMsg(buf99)
  846.   freeBuf(buf99)
  847.   inputString(buf99)
  848.   gadgetName(n99,buf99)
  849. >
  850.   
  851.  
  852. NEXT FILE
  853. <normal-gadget1:
  854.   toggle(curFile) 
  855. >
  856. COPY HILITE TO BUFFER 92
  857. <normal-gadget2:
  858.   runKey(virtual-b) 
  859.   if (thisKey) putMsg("HiLite Copied to buf92") 
  860. >
  861. CUT HILITE TO BUFFER 92
  862. <normal-gadget3:
  863.   if (runKey(virtual-b)) clearRgn(curFile,hilite)
  864.     if (thisKey) putMsg("HiLite Copied to buf92") 
  865. >
  866. PASTE BUFFER 92 AT CURSOR
  867. <normal-gadget4:
  868.   runKey(virtual-c) 
  869. >
  870.  
  871. CURSOR Up
  872. <normal-upArrow:
  873.   equateLoc(curFile,locA,atCursor)
  874.   moveCursor(curFile,upLine) 
  875.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  876. >
  877. CURSOR Down
  878. <normal-downArrow:
  879.   equateLoc(curFile,locA,atCursor)
  880.   moveCursor(curFile,downLine) 
  881.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  882. >
  883. CURSOR Left
  884. <normal-leftArrow:
  885.   equateLoc(curFile,locA,atCursor)
  886.   moveCursor(curFile,sChar) 
  887.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  888. >
  889. CURSOR Right
  890. <normal-rightArrow:
  891.   equateLoc(curFile,locA,atCursor)
  892.   moveCursor(curFile,eChar) 
  893.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  894. >
  895.  
  896. CURSOR moves up 1/2 screen
  897. <shft-upArrow:
  898.   equateLoc(curFile,locA,atCursor)
  899.   getLocal(curFile,n97,pageLines)
  900.   if (eqNum(n97,1)) 
  901.     { getSplitLines(n98,n97)       .. get start & stop
  902.       sub(n97,n97,n98)
  903.       div (n98,n97,2)
  904.       do (n99,1,n98) moveCursor(curFile,upLine)
  905.       goto label(1) 
  906.     }
  907.   getPageRowCol(n99,n99,n98)
  908.     do (n98,2,n99) moveCursor(curFile,upLine)
  909.     vScroll(atCursor)
  910. label(1)
  911.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  912. >
  913. CURSOR moves down 1/2 screen
  914. <shft-downArrow:
  915.   equateLoc(curFile,locA,atCursor)
  916.   getLocal(curFile,n97,pageLines)
  917.   if (eqNum(n97,1)) 
  918.     { getSplitLines(n98,n97)       .. get start & stop
  919.       sub(n97,n97,n98)
  920.       div (n98,n97,2)
  921.       do (n99,1,n98) moveCursor(curFile,downLine)
  922.       return 
  923.     }
  924.   getPageRowCol(n99,n98,n99)
  925.     sub(n99,n97,n98)
  926.     do (n98,1,n99) moveCursor(curFile,downLine)
  927.   vScroll(atCursor) 
  928.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  929. >
  930. CURSOR to Start of Word
  931. <shft-leftArrow:
  932.   equateLoc(curFile,locA,atCursor)
  933.   moveCursor(curFile,sWord) 
  934.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  935. >
  936. CURSOR to End of Word
  937. <shft-rightArrow:
  938.   equateLoc(curFile,locA,atCursor)
  939.   moveCursor(curFile,eWord) 
  940.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  941. >
  942.  
  943. CURSOR to Top of Screen
  944. <alt-upArrow:
  945.   equateLoc(curFile,locA,atCursor)
  946.   if (eqLoc(curFile,atCursor,sPage)) 
  947.     { moveCursor(curFile,upLine) updateDisplay 
  948.     }
  949.   moveCursor(curFile,sPage) 
  950.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  951. >
  952. CURSOR to Bottom of Screen
  953. <alt-downArrow:
  954.   equateLoc(curFile,locA,atCursor)
  955.   equateLoc(curFile,mouseLoc,atCursor)
  956.   moveCursor(curFile,ePage) 
  957.   moveCursor(curFile,upLine)
  958.   if (eqLoc(curFile,mouseLoc,atCursor))
  959.     { moveCursor(curFile,downLine)
  960.       updateDisplay
  961.       moveCursor(curFile,ePage)
  962.       moveCursor(curFile,upLine)
  963.     }
  964.   while (inputWaiting)
  965.     { inputKey(n99)
  966.       moveCursor(curFile,downline)
  967.       moveCursor(curFile,ePage)
  968.       moveCursor(curFile,upLine) 
  969.     }
  970.  
  971. if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  972. >
  973. CURSOR to Start of Text in Line
  974. <alt-leftArrow:
  975.   equateLoc(curFile,locA,atCursor)
  976.   moveCursor(curFile,sLine)
  977.   while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
  978.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  979. >
  980. CURSOR to End of Text in Line
  981. <alt-rightArrow:
  982.   equateLoc(curFile,locA,atCursor)
  983.   moveCursor(curFile,eLine)
  984.   moveCursor(curFile,sChar)
  985.   while (is(curFile,whiteSpace))
  986.     { if (not moveCursor(curFile,sChar)) goto label(1)
  987.     }
  988. label(1)
  989.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  990. >
  991.  
  992. CURSOR to Start of File
  993. <ctl-upArrow:
  994.   equateLoc(curFile,locA,atCursor)
  995.   moveCursor(curFile,sFile) vScroll(atCursor) 
  996.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  997. >
  998. CURSOR to End of File
  999. <ctl-downArrow:
  1000.   equateLoc(curFile,locA,atCursor)
  1001.   moveCursor(curFile,eFile) vScroll(atCursor) 
  1002.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  1003. >
  1004. CURSOR to Start of Line
  1005. <ctl-leftArrow:
  1006.   equateLoc(curFile,locA,atCursor)
  1007.   moveCursor(curFile,sLine)
  1008.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  1009. >
  1010. CURSOR to End of Line
  1011. <ctl-rightArrow:
  1012.   equateLoc(curFile,locA,atCursor)
  1013.   moveCursor(curFile,eLine)
  1014.   if (getFlag(curFile,userLocalB)) runKey(virtual-1) 
  1015. >
  1016.  
  1017. HILITE Region moved to left by one space
  1018. <shftCtl-leftArrow:
  1019.   moveCursor(curFile,sHilite)
  1020.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1021. label(1)
  1022.   if (is(curFile,space)) clearChar(curFile)
  1023.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1024.   moveCursor(curFile,eChar)
  1025.   if (gtLoc(curFile,eHilite,atCursor)) goto label(1) 
  1026. >
  1027.  
  1028. HILITE Region moved to right by one space
  1029. <shftCtl-rightArrow:
  1030.   moveCursor(curFile,sHilite)
  1031.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1032. label(1)
  1033.   if (gtLoc(curFile,eHilite,atCursor))
  1034.     { insertChar(curFile," ")
  1035.       if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1036.       moveCursor(curFile,eChar)
  1037.       goto label(1)
  1038.     } 
  1039. >
  1040.  
  1041. HILITE : Start/End on Double Click; SINGLE: place cursor, and/or scroll
  1042. <normal-buttonDown:
  1043.   moveCursor(curFile,mouseLoc)
  1044.   if (getFlag(curFile,userLocalB)) runKey(virtual-1)  ..Special Reformat
  1045.   if (eqNum(macroNum,512))                            ..Ctl-buttonDown
  1046.     { putMsg("Select FileName to Load")
  1047.       equateNum(n90,2)
  1048.     }
  1049.   else
  1050.     { if (eqNum(macroNum,408))                        ..SA-ButtonDown
  1051.         { putMsg("Select Phrase to add to Index")
  1052.           equateNum(n90,2)
  1053.         }
  1054.       else
  1055.         { if (eqNum(n90,1))                           ..n90=1 after 1st click
  1056.             { if (eqLoc(curFile,locA,mouseLoc))
  1057.                 { equateNum(n90,2)                    ..n90=2 for double-click
  1058.                   if (eqNum(macroNum,96))             ..Normal-buttonDown
  1059.                     { putMsg("HiLite Started") 
  1060.                       refreshDisplay
  1061.                       runkey(virtual-d) 
  1062.                     }
  1063.                   if (eqNum(macroNum,200))            ..shft-buttonDown
  1064.                     { putMsg("Invert Started") 
  1065.                     }
  1066.                 }
  1067.             }
  1068.           else
  1069.             equateNum(n90,1) 
  1070.         }
  1071.     }
  1072.   equateLoc(curFile,locA,mouseLoc)
  1073.   if (eqNum(n90,2))                             ..If double-click,initialize
  1074.     { if (eqNum(macroNum,96))                   ..Normal-buttonDown
  1075.         { equateLoc(curFile,sHilite,locA)
  1076.           equateLoc(curFile,eHilite,sHilite)
  1077.         }
  1078.       else
  1079.         { equateLoc(curFile,sInvert,locA)
  1080.           equateLoc(curFile,eInvert,sInvert)
  1081.         }
  1082.     }
  1083.   updateDisplay
  1084.   equateNum(n87,175)                            ..define normal screen bottom
  1085.   delay(3)
  1086.   if (getFlag(curFile,lace)) equateNum(n87,375) ..define lace screen bottom
  1087.   while (mouseDown)
  1088.     { trackMouse
  1089.       mouseXY(n89,n88)
  1090.       if (gtNum(25,n88))  vScroll(upLine)       ..if at top    of screen
  1091.       else if (gtNum(n88,n87)) vScroll(downLine)..if at bottom of screen
  1092.       if (gtNum(n89,620)) hScroll(1)        ..if at right  of screen
  1093.       else if (gtNum(20,n89)) hScroll(-1)    ..if at left   of screen
  1094.       if (eqNum(n90,2))                         ..if double-click,move hilite
  1095.        {if (gtLoc(curFile,locA,mouseLoc))
  1096.          {if (eqNum(macroNum,96))               ..Normal buttonDown
  1097.            {equateLoc(curFile,sHilite,mouseLoc) equateLoc(curFile,eHilite,locA)
  1098.            }
  1099.           else
  1100.            {equateLoc(curFile,sInvert,mouseLoc) equateLoc(curFile,eInvert,locA)
  1101.            }
  1102.          }
  1103.         else
  1104.          {if (eqNum(macroNum,96))               ..Normal buttonDown
  1105.            {equateLoc(curFile,eHilite,mouseLoc) equateLoc(curFile,sHilite,locA)
  1106.            }
  1107.           else
  1108.            {equateLoc(curFile,eInvert,mouseLoc) equateLoc(curFile,sInvert,locA)
  1109.            }
  1110.          }
  1111.         refreshDisplay
  1112.        }
  1113.       else updateDisplay
  1114.     }
  1115.   if (eqNum(n90,2))                          ..for doubleclick complete,cleanup
  1116.     { equateNum(n90,0)  
  1117.       if (eqNum(macroNum,96))  { putMsg("HiLite Completed") goto label(9) }
  1118.       if (eqNum(macroNum,200)) { putMsg("Invert Completed") goto label(9) }
  1119.       putMsg(" ")
  1120.     }
  1121. label(9)
  1122.   if (eqNum(macroNum,512)) equateNum(n90,3)  ..remember ctl-buttonDown
  1123. >
  1124.  
  1125. INVERT: Start/End on Double Click; SINGLE: place cursor, and/or scroll
  1126. <shft-buttonDown:
  1127.   runKey(normal-buttonDown)           .. Uses MacroNum (200) to distinguish
  1128. >
  1129. HILITE FILENAME that is clicked
  1130. <ctl-buttonDown:
  1131.   runKey(normal-buttonDown)           .. Uses MacroNum (512) to distinguish
  1132. >
  1133.  
  1134. LOAD Hilited Filename/Directory
  1135. <normal-buttonUp:
  1136.   if (eqNum(n90,3)) runKey(ctl-buttonUp) .. n90 set at end normal-button cmd
  1137. >
  1138. LOAD Hilited Filename/Directory
  1139. <ctl-buttonUp:
  1140.    equateNum(n90,0)
  1141.    moveCursor(curFile,sFile)                  ..First Line of Buf = DirName
  1142.    equateLoc(curFile,locA,atCursor)
  1143.    if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1144.    equateLoc(curFile,locB,atCursor)
  1145.    freeBuf(buf99)
  1146.    insertRgn(buf99,eFile,curFile,loc)
  1147.    
  1148.    equateLoc(curFile,atCursor,sInvert)
  1149.    runKey(virtual-y)                          ..Find/Mark Start of FileName
  1150.    if (gtLoc(curFile,sInvert,eInvert)) equateLoc(curFile,eInvert,sInvert)
  1151.    equateLoc(curFile,atCursor,eInvert)
  1152.    while (not is(curFile,space)) 
  1153.      { if (is(curFile,eLine)) goto label(2)
  1154.        moveCursor(curFile,eChar)
  1155.      }
  1156. label(2)
  1157.    equateLoc(curFile,eInvert,atCursor)
  1158.    
  1159.    runKey(virtual-x)                          ..Load Hilited File/Directory
  1160. >
  1161.  
  1162. INDEX ADD PHRASE in buf86 by dragging mouse
  1163. <shftAlt-buttonDown:
  1164.   runKey(normal-buttonDown)                   ..Uses macroNum to distinguish
  1165.   equateLoc(curFile,atCursor,eInvert)
  1166.   if (not is(curFile,eWord)) moveCursor(curFile,eWord)
  1167.   equateLoc(curFile,eInvert,atCursor)
  1168.   refreshDisplay
  1169.   equateNum(n86,86)              .. n86 holds the buffer number for the index
  1170.   if (thisKey)
  1171.     putMsg("Inverted Phrase Added to buf86 Index. CTRL-w swaps File<->Index")
  1172.   runKey(virtual-v) 
  1173. >
  1174.  
  1175. INVERT START
  1176. <shftCtl-buttonDown:
  1177.   equateLoc(curFile,sInvert,mouseLoc)
  1178.   if (thisKey) putMsg("Invert Started")
  1179.   updateDisplay 
  1180. >
  1181. INVERT END
  1182. <altCtl-buttonDown:
  1183.   equateLoc(curFile,eInvert,mouseLoc)
  1184.   if (thisKey) { putMsg("Invert Completed") refreshDisplay } 
  1185. >
  1186.  
  1187. =======================   KEYPAD & FUNCTION KEYS   =========================
  1188.  
  1189. NOTE: FUNCTION KEYS F6 - F10 ARE AVAILABLE FOR DEFINITION BY THE USER
  1190.  
  1191. FILE previous
  1192. <normal-f1:
  1193.   getMaxFiles(n98)
  1194.     equateNum(n85,curFile)
  1195.   while (nothing)
  1196.     { if (gtNum(n85,n98)) equateNum(n85,n98)
  1197.       decNum(n85)
  1198.       if (gtNum(0,n85)) equateNum(n85,19)
  1199.       if (getFileName(buf99,buf[n85])) { editBuf(buf[n85]) returnTrue }
  1200.     } 
  1201. >
  1202. FILE next
  1203. <shft-f1:
  1204.   toggle(curFile) 
  1205. >
  1206. FILE Open w/name
  1207. <alt-f1:
  1208.   putMsg("Input External Filename to Edit")
  1209.   freeBuf(buf88)
  1210.   if (inputString(buf88)) loadFile(buf88) 
  1211. >
  1212. FILE Open New
  1213. <ctl-f1:
  1214.   newFile 
  1215. >
  1216. FILE Inserted from disk
  1217. <shftAlt-f1:
  1218.   putMsg("Input External Filename to Insert")
  1219.   freeBuf(buf88)
  1220.   if (inputString(buf88)) insertFile(curFile,atCursor,buf88) 
  1221. >
  1222. FILE Replace w/original
  1223. <shftCtl-f1:
  1224.   if (not askYesNo("Replace buffer w/ original file?"))  returnFalse
  1225.   if (getFileName(buf88,curFile)) { freeBuf(curFile) loadFile(buf88) } 
  1226. >
  1227. CONFIG Replaced from disk
  1228. <altCtl-f1:
  1229.   if (askYesNo("Load CommandData?"))
  1230.     { putMsg("Input Data Filename to Load (ESC = s:Data!)")
  1231.       freeBuf(buf99)
  1232.       inputString(buf99)
  1233.       loadConfig(buf99)
  1234.     } 
  1235. >
  1236.  
  1237. SAVE File as
  1238. <normal-f2:
  1239.   runKey(virtual-e) 
  1240. >
  1241. SAVE ALL CHANGED FILES
  1242. <shft-f2:
  1243.   getMaxFiles(n98)
  1244.   decNum(n98)
  1245.   do(n99,0,n98)
  1246.     { if (getFlag(buf[n99],changed))  saveFile(buf[n99]) 
  1247.       else
  1248.         { if (getFlag(buf[n99],userLocalB)) saveFile(buf[n99])
  1249.         }
  1250.     }
  1251. >
  1252. SAVE File then CLOSE
  1253. <alt-f2:
  1254.   if (runKey(virtual-e)) freeBuf(curFile) 
  1255. >
  1256. CONFIG Saved to disk
  1257. <ctl-f2:
  1258.    putMsg("Input Data Filename to SaveAs  (ESC => save to CurrentDir)")
  1259.      freeBuf(buf99)
  1260.    inputString(buf99)
  1261.    saveConfig(buf99) 
  1262. >
  1263. SAVE changes during idle periods toggle
  1264. <altCtl-f2:  flipFlag(curFile,userLocalA)
  1265. >
  1266. ERASE ALL NonFile BUFFERS
  1267. <shftAlt-f2:
  1268.   if (askYesNo("Erase NonFile Buffers?"))
  1269.     { getMaxFiles(n97)
  1270.       do(n99,n97,99) freeBuf(buf[n99]) 
  1271.     }
  1272. >
  1273.  
  1274. ==========================  SPECIAL REFORMAT  ================================
  1275. ========= COMMANDS TO REFORMAT PARAGRAPHS SEPARATED BY BLANK LINES ===========
  1276. All cursor movement and file-save commands were modified to accomodate the
  1277. special reformat capability.  In general, if AutomaticSpecial REFORMAT is
  1278. selected (ie userLocalB is set), the original cursor position is saved in
  1279. locA, the modified cursor location is saved in locB, the paragraph at the
  1280. original cursor position is reformatted, and the cursor is left at the
  1281. modified cursor position.
  1282.  
  1283. REFORMAT Paragragh delimited by blank lines, keeps Indent, handles SpecMargins
  1284. <virtual-1:
  1285.   if (not getFlag(curFile,changed)) returnFalse
  1286.   
  1287.   equateLoc(curFile,locB,atCursor)          .. Where cursor goes when complete
  1288.   equateLoc(curFile,atCursor,locA)          .. Where to do reformatting
  1289.   or(n83,n83,1)                             .. Remember to save changed file
  1290.   if (is(curFile,blankLine)) goto label(9)
  1291.  
  1292.   freeBuf(buf98)
  1293.   equateNum(n95,0)                          .. Special LMargin for 2ndLine
  1294.   getLocal(curFile,leftMargin,leftMargin)   .. Remember default conditions
  1295.   getLocal(curFile,lineLength,lineLength)
  1296.   equateNum(n97,lineLength)                 .. Set Special RMargin = Default
  1297.  
  1298.   .. For special LMargin, set n89(bit 1); For special RMargin, set n89(bit 2)
  1299.   runKey(virtual-2)                         .. Find End of Paragraph
  1300.   if (not runKey(virtual-3)) goto label(8)  .. Check for Special Format Codes
  1301.  
  1302.   ..Find & Mark location of start of 1stLine
  1303.   while (not is(curFile,blankLine))
  1304.     { if (not moveCursor(curFile,upLine)) goto label(1) 
  1305.     }
  1306.   moveCursor(curFile,downLine)
  1307. label(1)
  1308.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1309.   locToIndex(curFile,n82,atCursor)
  1310.  
  1311.   ..Calculate Special LeftMargins or 1stLine Indent
  1312.   if (and(n99,n89,1))                             ..If Special LMargin is true
  1313.     { if (not moveCursor(curFile,downLine)) goto label(3)
  1314.       if (is(curFile,blankLine))
  1315.         setLocal(curFile,leftMargin,1)
  1316.       else
  1317.         { if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1318.           while (is(curFile,space))
  1319.             { incNum(n95) moveCursor(curFile,eChar)
  1320.             }
  1321.           incNum(n95)                             ..Calculate Special 2ndLine
  1322.         }
  1323.       setLocal(curFile,leftMargin,n95)            ..LMargin = 2ndLine Indent
  1324.     }
  1325.   else 
  1326.     ..No Special LMargin, but Keep 1stLine Indent if > normal LMargin
  1327.     { colToLoc(curFile,atCursor,leftMargin)
  1328.       while (is(curFile,space)) 
  1329.         { swapChar(curFile,215) moveCursor(curFile,eChar)
  1330.         }
  1331.       if (not moveCursor(curFile,downLine)) goto label(3)
  1332.     }
  1333.  
  1334.   ..Join all lines in paragraph to 1stLine
  1335.   putMsg("Reformatting...")
  1336.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1337.   if (is(curFile,sFile)) goto label(3)
  1338.   while (not is(curFile,blankLine))
  1339.     { if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1340.       moveCursor(curFile,sChar) swapChar(curFile,32)
  1341.       if (not moveCursor(curFile,downLine)) goto label(3)
  1342.     }
  1343.  
  1344. label(3)
  1345.   .. If Special LMargin, Preserve 1stLine Indent whether <> 2ndLine Indent
  1346.   indexToLoc(curFile,atCursor,n82)               .. Goto Start of 1stLine
  1347.   if (and(n99,n89,1))
  1348.     { equateNum(n99,0)
  1349.       equateNum(n96,0)
  1350.       if (gtNum(n95,n96))
  1351.         { while (is(curFile,space)) 
  1352.             { if (gtNum(n95,n96))
  1353.                 { moveCursor(curFile,eChar)
  1354.                   incNum(n96)
  1355.                 }
  1356.               else goto label(5)
  1357.             }
  1358.         }
  1359.       while (gtNum(n95,n96))
  1360.         { if (is(curFile,space)) 
  1361.             { moveCursor(curFile,eChar)
  1362.               incNum(n96)
  1363.               while (is(curFile,space)) clearChar(curFile)
  1364.             }
  1365.           else
  1366.             { if (is(curFile,eLine)) goto label(8)
  1367.               else equateNum(n99,1)
  1368.               moveCursor(curFile,eChar)
  1369.               incNum(n96)
  1370.             }
  1371.         }
  1372. label(5)
  1373.       if (not is(curFile,sLine)) 
  1374.         { moveCursor(curFile,sChar)
  1375.           equateLoc(curFile,mouseLoc,locB)
  1376.           equateLoc(curFile,locB,atCursor)
  1377.           insertRgn(buf98,sFile,curFile,loc)
  1378.           clearRgn(curFile,loc)
  1379.           equateLoc(curFile,locB,mouseLoc)
  1380.         }
  1381.       if (eqNum(n99,0))
  1382.         ..1stLine Indent Contained only spaces upto 2ndLine LMargin
  1383.         { while (is(curFile,space)) 
  1384.             { swapChar(curFile,215)
  1385.               moveCursor(curFile,eChar)
  1386.             }
  1387.         }
  1388.     }
  1389.   reformat
  1390.  
  1391. label(8)
  1392.   ..Reformats complete.  Fix special paragraph codes.
  1393.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1394.   setLocal(curFile,leftMargin,leftMargin)
  1395.   setLocal(curFile,lineLength,lineLength) 
  1396.   if (and(n99,n89,2)) runKey(virtual-4)               ..Write RMargin Codes
  1397.   if (and(n99,n89,1))                                 ..Special LMargin
  1398.     { if (not and(n99,n89,4)) insertChar(curFile,"") ..Write LMargin Code
  1399.       indexToLoc(curFile,atCursor,n82)                ..Repair 1stLine
  1400.       if (not is(curFile,sLine)) moveCursor(curFile,sChar)
  1401.       while (is(curFile,215))
  1402.         { swapChar(curFile,32)
  1403.           moveCursor(curFile,sChar)
  1404.         }
  1405.       if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1406.       insertRgn(curFile,atCursor,buf98,all)
  1407.       if (gtNum(n95,1)) do (n99,2,n95) clearChar(curFile)
  1408.     }
  1409.   else
  1410.     ..No Special LMargin, but Repair 1stLine Indent 
  1411.     { indexToLoc(curFile,atCursor,n82)
  1412.       colToLoc(curFile,atCursor,leftMargin)
  1413.       while (is(curFile,215)) 
  1414.         { swapChar(curFile,32) moveCursor(curFile,eChar)
  1415.         }
  1416.     }
  1417.  
  1418. label(9)
  1419.   ..Done, Reset UEdit Change Flag, Goto proper cursor position
  1420.   if (getFlag(curFile,changed)) flipFlag(curFile,changed)
  1421.   equateLoc(curFile,atCursor,locB)
  1422.   putMsg(" ")
  1423. >
  1424.  
  1425. REFORMAT Find End of Paragraph
  1426. <virtual-2:
  1427.   while (not is(curFile,blankLine))
  1428.     { if (not moveCursor(curFile,downLine)) goto label(0) 
  1429.     }
  1430.   moveCursor(curFile,upLine)
  1431. label(0)
  1432.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1433.   if (is(curFile,eFile))
  1434.     { moveCursor(curFile,upLine)
  1435.       if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1436.     }
  1437.   moveCursor(curFile,sChar)
  1438. >
  1439.  
  1440. REFORMAT Check for Special Margin Codes
  1441. <virtual-3:
  1442.   equateNum(n89,0)                                ..Special Margins Flag
  1443.   if (and(n99,userGlobalA,1)) or(n89,n89,5)       ..Set Global&LMargin Flag
  1444.   if (is(curFile,""))                            ..Check For Special LMargin
  1445.     { or(n89,n89,1)                               ..Set Special LMargin  Flag
  1446.       and(n89,n89,251)                          ..Clear GlobalMode Flag
  1447.       clearChar(curFile)                          ..Don't Reformat MarginCode
  1448.       if (not moveCursor(curFile,sChar)) returnFalse
  1449.     }
  1450.   if (is(curFile,""))                            ..Check For Special RMargin
  1451.     { or(n89,n89,2)                               ..Set Special RMargin Flag
  1452.       moveCursor(curFile,sChar)
  1453.       copyChar(curFile,n97)
  1454.       sub(n97,n97,20)
  1455.       moveCursor(curFile,sChar)
  1456.       copyChar(curFile,n99)
  1457.       sub(n99,n99,20)
  1458.       mul(n99,n99,10)
  1459.       add(n97,n97,n99)
  1460.       moveCursor(curFile,sChar)
  1461.       copyChar(curFile,n99)
  1462.       sub(n99,n99,20)
  1463.       mul(n99,n99,100)
  1464.       add(n97,n97,n99)
  1465.       do (n99,1,4) clearChar(curFile)             ..Don't Reformat MarginCodes
  1466.       setLocal(curFile,lineLength,n97)            ..Set Special RMargin
  1467.     }
  1468.   returnTrue
  1469. >
  1470.  
  1471. REFORMAT Write Special RightMargin Codes for RightMargin stored in n97
  1472. <virtual-4:
  1473.   div(n99,n97,100)
  1474.   mul(n98,n99,100)
  1475.   sub(n98,n97,n98)
  1476.   add(n99,n99,20)
  1477.   insertChar(curFile,n99)
  1478.   div(n99,n98,10)
  1479.   mul(n96,n99,10)
  1480.   sub(n98,n98,n96)
  1481.   add(n99,n99,20)
  1482.   insertChar(curFile,n99)
  1483.   add(n99,n98,20)
  1484.   insertChar(curFile,n99)
  1485.   insertChar(curFile,"") 
  1486. >
  1487.  
  1488. REFORMAT Set Special RightMargins for current paragraph
  1489. <normal-f3:
  1490.   equateLoc(curFile,locA,atCursor)
  1491.   getLocal(curFile,n97,lineLength)
  1492.   equateNum(lineLength,n97)
  1493.   runKey(virtual-2)                       ..Move to EOP
  1494.   runKey(virtual-3)                       ..Read Current Margin Codes
  1495.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1496.   freeBuf(buf99)
  1497.   insertRgn(buf99,eFile,"AMIGA-ESC=Abort. 0=Remove. RightMargin= ",all)
  1498.   toWord(buf99,n97)
  1499.   insertRgn(buf99,eFile,". Enter new RightMargin:",all)
  1500.   putMsg(buf99)
  1501.   if (inputNum(n97)) if (gtNum(n97,0))
  1502.     runKey(virtual-4)                     ..Write New Special RMargin
  1503.   if (and(n99,n89,1)) insertChar(curFile,"")
  1504.   setLocal(curFile,lineLength,lineLength)
  1505.   equateLoc(curFile,atCursor,locA)
  1506. >
  1507. REFORMAT Toggle On/Off Special LeftMargins for current paragraph
  1508. <shft-f3:
  1509.   equateLoc(curFile,locA,atCursor)
  1510.   runKey(virtual-2)                       ..Move to EOP
  1511.   runKey(virtual-3)                       ..Read Current Margin Codes
  1512.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1513.   freeBuf(buf99)
  1514.   insertRgn(buf99,eFile,"Special LeftMargin now ",all)
  1515.   if (and(n99,n89,1)) 
  1516.     { insertRgn(buf99,eFile,"OFF",all)
  1517.       and(n89,n89,254)
  1518.     }
  1519.   else
  1520.     { insertRgn(buf99,eFile,"ON" ,all)
  1521.       or(n89,n89,1)
  1522.     }
  1523.   putMsg(buf99)
  1524.   if (and(n99,n89,2)) runKey(virtual-4)
  1525.   if (and(n99,n89,1)) insertChar(curFile,"")
  1526.   equateLoc(curFile,atCursor,locA)
  1527. >
  1528. REFORMAT mode toggle: Paragraphs separated by Blank Lines/by Indent Change
  1529. <ctl-f3:
  1530.   if (and(n99,userGlobalB,1)) 
  1531.     { and(userGlobalB,userGlobalB,65534)
  1532.       putMsg("REFORMAT now delimits paragraphs by Indent Changes")
  1533.       if (getFlag(curFile,userLocalB)) flipFlag(curFile,userLocalB)
  1534.     }
  1535.   else 
  1536.    { or(userGlobalB,userGlobalB,1)
  1537.      putMsg("REFORMAT now delimits paragraphs by Blank Lines ONLY")
  1538.    }  
  1539. >
  1540. REFORMAT Paragraph
  1541. <normal-f4:
  1542.   if (and(n99,userGlobalB,1))
  1543.     { if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
  1544.       equateLoc(curFile,locA,atCursor)
  1545.       runKey(virtual-1) 
  1546.       return
  1547.     }
  1548.   runKey(ctl-3)
  1549. >
  1550. REFORMAT Hilited Paragraphs 
  1551. <shft-f4:
  1552.   locToIndex(curFile,n92,atCursor)
  1553.   equateLoc(curFile,atCursor,sHilite)
  1554.   while (geLoc(curFile,eHilite,atCursor))
  1555.     { runKey(normal-f4)
  1556.       if (and(n99,userGlobalB,1))
  1557.         ..If Paragraphs separated by blank lines, move to next paragraph
  1558.         { while (not is(curFile,blankLine)) 
  1559.             { if (not moveCursor(curFile,downLine)) return 
  1560.             }
  1561.           while (is(curFile,blankLine)) 
  1562.             { if (not moveCursor(curFile,downLine)) return
  1563.             }
  1564.         }
  1565.     }
  1566.   indexToLoc(curFile,atCursor,n92)
  1567. >
  1568. REFORMAT to End of Screen Paragraphs separated by blank line
  1569. <alt-f4:
  1570.   locToIndex(curFile,n92,atCursor)
  1571. label(1)
  1572.   if (not getFlag(curFile,changed)) flipFlag(curFile,changed)
  1573.   equateLoc(curFile,locA,atCursor)
  1574.   runKey(virtual-1)
  1575.   while (not is(curFile,blankLine)) 
  1576.     { if (not moveCursor(curFile,downLine)) goto label(2)
  1577.     }
  1578.   while (is(curFile,blankLine)) 
  1579.     { if (not moveCursor(curFile,downLine)) goto label(2)
  1580.     }
  1581.   if (eqNum(macroNum,499))    ..ctl-F4
  1582.     { if (geLoc(curFile,atCursor,ePage)) goto label(2) }
  1583.   if (geLoc(curFile,atCursor,eFile)) goto label(2)
  1584.   goto label(1)
  1585. label(2)
  1586.   indexToLoc(curFile,atCursor,n92)
  1587. >
  1588. REFORMAT to End of Document Paragraphs separated by blank line
  1589. <ctl-f4:
  1590.   runKey(alt-f4)
  1591. >
  1592. REFORMAT with all paragraphs automatically having special left margins
  1593. <shftAlt-f4:
  1594.   if (and(n99,userGlobalA,1)) and(userGlobalA,userGlobalA,65534)
  1595.   else or(userGlobalA,userGlobalA,1)
  1596. >  
  1597. REFORMAT Automatically any changes to Paragraphs Separated by blank lines
  1598. <altCtl-f4:
  1599.   flipFlag(curFile,userLocalB) 
  1600.   if (getFlag(curFile,userLocalB))
  1601.     { if (not and(n99,userGlobalB,1))
  1602.         if (not askYesNo("OK TO DELIMIT PARAGRAPHS BY BLANK LINES?"))
  1603.           returnFalse
  1604.       runKey(virtual-1) 
  1605.       or(userGlobalB,userGlobalB,1)
  1606.     }
  1607. >
  1608.  
  1609. ===================== SPECIAL REFORMAT SECTION END =======================
  1610. ==========================================================================
  1611.  
  1612. SWITCH FLAG SETTINGS:
  1613. <normal-f5:     flipFlag(curFile,icons) >
  1614. <shft-f5:       flipFlag(curFile,overstrike) >
  1615. <alt-f5:        flipFlag(curFile,autoIndent) >
  1616. <ctl-f5:        flipFlag(curFile,wordWrap) >
  1617. <shftAlt-f5:    flipFlag(curFile,readOnly) >
  1618. <shftCtl-f5:    flipFlag(curFile,speakMsgs) >
  1619. <altCtl-f5:     flipFlag(curFile,speakAlerts) >
  1620. <shftAltCtl-f5: flipFlag(curFile,autoBackup) >
  1621. <lAmiga-f5:     flipFlag(curFile,changed)>
  1622. <rAmiga-f5:     flipFlag(curFile,cram)>
  1623.  
  1624. SEARCH string new, including either-or "$" and wildcards "?"
  1625. <normal-kp7:
  1626.   freeBuf(buf94) 
  1627.     if (runKey(virtual-g)) putMsg(" ") 
  1628. >
  1629. SEARCH string edit existing
  1630. <shft-kp7:
  1631.   if (runKey(virtual-g)) putMsg(" ") 
  1632. >
  1633.  
  1634. REPLACE string new
  1635. <normal-kp9:
  1636.   freeBuf(buf93) runKey(virtual-i) 
  1637. >
  1638. REPLACE string edit existing
  1639. <shft-kp9:
  1640.   runKey(virtual-i) 
  1641. >
  1642.  
  1643. CURSOR center on screen
  1644. <normal-kp5:
  1645.   vScroll(atCursor) 
  1646. >
  1647.  
  1648. SCROLL UP
  1649. <normal-kp8:
  1650.   vScroll(upLine)   
  1651. >
  1652. SCROLL DOWN
  1653. <normal-kp2:
  1654.   vScroll(downLine) 
  1655. >
  1656. SCROLL LEFT
  1657. <normal-kp4:
  1658.   hScroll(-1)    
  1659. >
  1660. SCROLL RIGHT
  1661. <normal-kp6:
  1662.   hScroll(1)    
  1663. >
  1664.  
  1665. <shft-kp8:
  1666.   getSplitLines(n98,n97)       .. get start & stop
  1667.   sub(n97,n97,n98)
  1668.   sub(n97,n97,1)
  1669.   do (n99,1,n97) vScroll(upLine)   
  1670. >
  1671. <shft-kp2:
  1672.   getSplitLines(n98,n97)       .. get start & stop
  1673.   sub(n97,n97,n98)
  1674.   sub(n97,n97,1)
  1675.   do (n99,1,n97) vScroll(downLine) 
  1676. >
  1677. <shft-kp4:
  1678.   hScroll(-10)    
  1679. >
  1680. <shft-kp6:
  1681.   hScroll(10)    
  1682. >
  1683.  
  1684. <alt-kp8:
  1685.   vScroll(sPage) 
  1686. >
  1687. <alt-kp2:
  1688.   vScroll(ePage) 
  1689. >
  1690. <alt-kp4:
  1691.   hScroll(-20) 
  1692. >
  1693. <alt-kp6:
  1694.   hScroll(20) 
  1695. >
  1696.  
  1697. <ctl-kp8:
  1698.   vScroll(sFile) 
  1699. >
  1700. <ctl-kp2:
  1701.   vScroll(eFile) 
  1702. >
  1703. <ctl-kp4:
  1704.   getLocal(curFile,n99,lineLength)
  1705.   do (n98,1,n99) hScroll(-1) 
  1706. >
  1707. <ctl-kp6:
  1708.   getLocal(curFile,n99,lineLength)
  1709.   do (n98,1,n99) hScroll(1) 
  1710. >
  1711.  
  1712. SPLIT Increase # lines by one
  1713. <lAmiga-kp8:
  1714.   equateNum(n99,curFile)
  1715.   getSplitLines(n98,n97)       .. get start & stop
  1716.   sub(n97,n97,n98)
  1717.   incNum(n97)                  .. bump # lines
  1718.   splitWindow(curFile,0)
  1719.   if (not splitWindow(buf[n99],n97))
  1720.     { decNum(n97)              .. decrement it back
  1721.       splitWindow(buf[n99],n97)
  1722.       returnFalse 
  1723.     }
  1724. >
  1725. SPLIT Decrease # lines by one
  1726. <lAmiga-kp2:
  1727.   equateNum(n99,curFile)
  1728.   getSplitLines(n98,n97)
  1729.   decNum(n97)
  1730.   sub(n97,n97,n98)
  1731.   if (gtNum(2,n97)) returnFalse
  1732.   splitWindow(curFile,0)
  1733.   splitWindow(buf[n99],n97) 
  1734. >
  1735.  
  1736. ====================  HILITE AND INVERT COMMANDS  ========================
  1737.  
  1738. HILITE start at cursor
  1739. <normal-kp1:
  1740.   equateLoc(curFile,sHilite,atCursor)
  1741.   equateNum(n90,2)
  1742.   refreshDisplay 
  1743. >
  1744. HILITE end at cursor
  1745. <normal-kp3:
  1746.   equateLoc(curFile,eHilite,atCursor)
  1747.   equateNum(n90,0)
  1748.   refreshDisplay 
  1749. >
  1750.  
  1751. INVERT start at cursor
  1752. <shft-kp1:
  1753.   equateLoc(curFile,sInvert,atCursor) refreshDisplay 
  1754. >
  1755. INVERT end at cursor
  1756. <shft-kp3:
  1757.   equateLoc(curFile,eInvert,atCursor) refreshDisplay 
  1758. >
  1759.  
  1760. HILITE region copied into buffer
  1761. <normal-kpDot:
  1762.   runKey(virtual-b) 
  1763. >
  1764. INVERT region copied into buffer
  1765. <alt-kpDot:
  1766.   if (thisKey)  putMsg("Invert Copied to buf91")
  1767.   runKey(virtual-j) 
  1768. >
  1769.  
  1770. HILITE, COPY THEN DELETE
  1771. <normal-kpMinus:
  1772.   if (runKey(virtual-b)) clearRgn(curFile,hilite) 
  1773. >
  1774. INVERT, COPY THEN DELETE
  1775. <alt-kpMinus:
  1776.   runKey(virtual-j) clearRgn(curFile,invert) 
  1777. >
  1778.  
  1779. HILITE-COPY INSERTED at cursor
  1780. <normal-kpEnter:
  1781.   runKey(virtual-c) 
  1782. >
  1783. INVERT-COPY INSERTED at cursor
  1784. <alt-kpEnter:
  1785.   insertRgn(curFile,atCursor,buf91,all)
  1786.   if (not onScreen(atCursor)) vScroll(atCursor) 
  1787. >
  1788. UNDELETE at cursor
  1789. <ctl-kpEnter:
  1790.   insertRgn(curFile,atCursor,buf90,all)
  1791.   if (not onScreen(atCursor)) vScroll(atCursor) 
  1792. >
  1793. BLANK-LINE INSERTED BELOW CUR LINE
  1794. <altCtl-kpEnter:
  1795.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  1796.   insertChar(curFile,eLine) 
  1797. >
  1798. BLANK-LINE INSERTED AT CURRENT LINE FOR TYPING
  1799. <shftAlt-kpEnter:
  1800.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  1801.   insertChar(curFile,eLine)  moveCursor(curFile,sChar)
  1802. >
  1803.  
  1804. ==========================   MISCELLANEOUS KEYS  ============================
  1805. HELP file toggle
  1806. <normal-help:
  1807.   if (not isEmpty(buf87))
  1808.     { equateNum(n99,curFile)
  1809.       if (eqNum(n99,42)) freeBuf(buf87)
  1810.       else editBuf(buf87)
  1811.     }
  1812.   else
  1813.     { if (insertFile(buf87,sFile,"S:EdHelp"))
  1814.         { editBuf(buf87)
  1815.           flipFlag(buf87,readOnly)
  1816.           flipFlag(buf87,changed)
  1817.         }
  1818.       else putMsg("Couldn't find S:DonHelp file")
  1819.     } 
  1820. >
  1821. STATUS settings
  1822. <shft-help:
  1823.   equateNum(n85,curFile)
  1824. label(0)
  1825.   if (getFlag(buf[n85],markGadgets))
  1826.     { equateNum(n95,1) flipFlag(buf[n85],markGadgets) 
  1827.     }
  1828.   else equateNum(n95,0)
  1829.   freeBuf(buf98)
  1830.   freeBuf(buf97)
  1831.   editBuf(buf98)
  1832.   insertRgn(buf97,sFile,"SELECT AN ITEM TO CHANGE FOR BUF ",all)
  1833.   toWord(buf97,n85)
  1834.   setFileName(buf98,buf97)
  1835.   setLocal(buf98,pageLines,1)
  1836.   insertRgn(buf98,atCursor,
  1837. "Scroll or Select using MOUSE or ARROWS/RETURN         CLICK HERE TO RESUME
  1838. Buffer Number        C-e:á
  1839. Buffer Size             :á
  1840. Colors            A-HELP:á
  1841. End-of-line             :á
  1842. Idle timer         SAC-i:á
  1843. Max files           SC-m:á
  1844. Printer select       A-p:á
  1845. Search eitherOr     AC-e:á
  1846. Search wildcard     AC-w:á
  1847. Serial number           :á
  1848. Speak mode              :á
  1849. Speak pitch             :á
  1850. Speak speed             :á
  1851. Split size           L-8:á
  1852. Tab table        SAC-tab:á
  1853. #Lines Per Page         :á
  1854. Left   Margin        C-l:á
  1855. Right  Margin   A-RETURN:á
  1856. Top    Margin        C-t:á
  1857. Bottom Margin        C-b:á
  1858. ",all)
  1859.   moveCursor(buf98,sFile)
  1860.   equateNum(n90,1)
  1861.   do (n91,729,741)   .. write first 12 info lines to config buffer
  1862.     { incNum(n90)
  1863.       lineToLoc(buf98,atCursor,n90)
  1864.       colToLoc(buf98,atCursor,27)
  1865.       runKey(n91) 
  1866.     }
  1867.   do(n91,743,749)    .. write next 6 info lines to config buffer
  1868.     { incNum(n90)
  1869.       lineToLoc(buf98,atCursor,n90)
  1870.       colToLoc(buf98,atCursor,27)
  1871.       runKey(n91) 
  1872.     }
  1873.   equateLoc(buf98,sPage,sFile)
  1874.   equateLoc(buf98,eInvert,atCursor)
  1875. label(1)
  1876.   equateNum(n94,0)
  1877.   equateLoc(buf98,sInvert,atCursor)
  1878.   if (not is(buf98,eLine)) clearRgn(buf98,invert)
  1879.   moveCursor(buf98,sFile)
  1880.   setLocal(buf98,pageLines,1)
  1881.  
  1882. ..loop inside label(2) until a proper keystoke takes it out
  1883. label(2)  
  1884.   refreshDisplay
  1885.   getKey(n98)
  1886.   if (eqNum(n98,97))                                .. buttonUp
  1887.     { moveCursor(buf98,mouseLoc) goto label(4) 
  1888.     }
  1889.   else if (eqNum(n98,69))  goto label(5)            .. ESC
  1890.   else if (eqNum(n98,68))  goto label(4)            .. RETURN
  1891.   else if (eqNum(n98,76))  moveCursor(curFile,upLine)
  1892.   else if (eqNum(n98,77))  moveCursor(curFile,downLine)
  1893.   else 
  1894.     {  if (eqNum(n98,62))  runKey(normal-kp8)
  1895.        else if (eqNum(n98,30))  runKey(normal-kp2)
  1896.        goto label(2) 
  1897.     }
  1898.   colToLoc(buf98,atCursor,1)
  1899.   equateLoc(buf98,sInvert,atCursor)
  1900.   moveCursor(buf98,eLine)
  1901.   equateLoc(buf98,eInvert,atCursor)
  1902.   goto label(2)
  1903. label(3)
  1904.   putMsg("Item Cannot be Changed Now")
  1905.   goto label(1)
  1906. label(4)
  1907.   colToLoc(buf98,atCursor,1)
  1908.   equateLoc(buf98,sInvert,atCursor)
  1909.   moveCursor(buf98,eLine)
  1910.   equateLoc(buf98,eInvert,atCursor)
  1911.   refreshDisplay
  1912.   getPageRowCol(n99,n98,n97)
  1913.   if (eqNum(n98,0))       goto label(5)
  1914.   else if (eqNum(n98, 1)) runKey(ctl-e)          ..Buffer Number
  1915.   else if (eqNum(n98, 2)) goto label(3)          ..Buffer Size
  1916.   else if (eqNum(n98, 3)) runKey(alt-Help)       ..Colors
  1917.   else if (eqNum(n98, 4)) goto label(3)          ..End of Line
  1918.   else if (eqNum(n98, 5)) runKey(shftAltCtl-i)   ..Idle timer
  1919.   else if (eqNum(n98, 6)) runKey(shftCtl-m)      ..Max Files
  1920.   else if (eqNum(n98, 7)) runKey(alt-p)          ..Printer Select
  1921.   else if (eqNum(n98, 8)) runKey(altCtl-e)       ..Search eitherOr
  1922.   else if (eqNum(n98, 9)) runKey(altCtl-w)       ..Search wildcard
  1923.   else if (eqNum(n98,10)) goto label(3)          ..Serial Number
  1924.   else if (eqNum(n98,11)) goto label(3)          ..Speak mode
  1925.   else if (eqNum(n98,12)) goto label(3)          ..Speak speed
  1926.   else if (eqNum(n98,13)) goto label(3)          ..Speak pitch
  1927.   else if (eqNum(n98,14)) runKey(lAmiga-8)       ..Split Size
  1928.   else if (eqNum(n98,15)) runKey(shftAltCtl-tab) ..Tab Table
  1929.   else if (eqNum(n98,16)) runKey(virtual-o)      ..#Lines per Page
  1930.   else if (eqNum(n98,17)) runKey(ctl-l)          ..Left   Margin
  1931.   else if (eqNum(n98,18)) runKey(alt-return)     ..Right  Margin
  1932.   else if (eqNum(n98,19)) runKey(ctl-t)          ..Top    Margin
  1933.   else if (eqNum(n98,20)) runKey(ctl-b)          ..Bottom Margin
  1934.   else if (gtNum(n98,20)) goto label(3)
  1935.   colToLoc(buf98,atCursor,27)                         ..move to data
  1936.   if (gtNum(n98,13)) { add(n98,n98,729) runKey(n98) } ..show change2screen
  1937.   else { add(n98,n98,728) runKey(n98) }
  1938.   if (eqNum(n94,1)) goto label(0)
  1939.   else              goto label(1)
  1940. label(5)
  1941.   editBuf(buf[n85])
  1942.   if (eqNum(n95,1)) flipFlag(buf[n85],markGadgets)
  1943.   equateLoc(buf98,eInvert,sInvert)
  1944.   freeBuf(buf98)
  1945.   runKey(virtual-y)
  1946. >
  1947.  
  1948. Functions below type the current configuration values to the config buffer
  1949. <shftAltCtl-1:                        .. item = 1, key = 729
  1950.   toWord(buf98,n85)                   .. Buffer Number
  1951.   equateNum(n94,1) 
  1952. >
  1953. <shftAltCtl-2:
  1954.   fileSize(buf[n85],n99)              .. Buffer Size
  1955.   toWord(buf98,n99) 
  1956. >
  1957. <shftAltCtl-3:
  1958.   getWBColors(n99,n98,n97,n96)        .. Colors
  1959.   toWord(buf98,n99)
  1960.   toWord(buf98,n98)
  1961.   toWord(buf98,n97)
  1962.   toWord(buf98,n96) 
  1963. >
  1964. <shftAltCtl-4:
  1965.   copyChar(buf98,n99)                 .. EOL
  1966.   toWord(buf98,n99) 
  1967. >
  1968. <shftAltCtl-5:
  1969.   toWord(buf98,idleTime)              .. Idle Time
  1970. >            
  1971. <shftAltCtl-6:
  1972.   getMaxFiles(n99)                    .. Max Files
  1973.   toWord(buf98,n99) 
  1974. >
  1975. <shftAltCtl-7:
  1976.   toWord(buf98,prefPrint)             .. Print Select
  1977. >
  1978. <shftAltCtl-8:
  1979.   insertChar(buf98,eitherOr)          .. Search eitherOr
  1980. >
  1981. <shftAltCtl-9:
  1982.   insertChar(buf98,wildCard)          .. Search wildcard
  1983. >
  1984. <shftAltCtl-0:
  1985.   getSerialNum(n99)                   .. Serial Number
  1986.   toWord(buf98,n99) 
  1987. >
  1988. <shftAltCtl--:
  1989.   insertChar(buf98,0)        .. Speak mode UNUSED NOW
  1990. >
  1991. <shftAltCtl-=:
  1992.   toWord(buf98,0)            .. Speak Pitch UNUSED NOW
  1993. >
  1994. <shftAltCtl-\:
  1995.   toWord(buf98,0)            .. Speak speed UNUSED NOW
  1996. >
  1997. <shftAltCtl-kp0:                      .. item = 14, key = 743
  1998.   toWord(buf98,splitSize)
  1999. >
  2000. <shftAltCtl-q:                        .. key = 744
  2001.   getLocal(buf[n85],n99,tabTable)     .. Tab Table
  2002.   toWord(buf98,n99) 
  2003. >
  2004. <shftAltCtl-w:
  2005.   getLocal(buf[n85],n99,pageLines)    .. #Lines Per Page
  2006.   toWord(buf98,n99) 
  2007. >
  2008. <shftAltCtl-e:
  2009.   getLocal(buf[n85],n99,leftMargin)   .. Left   Margin
  2010.   toWord(buf98,n99) 
  2011. >
  2012. <shftAltCtl-r:
  2013.   getLocal(buf[n85],n99,lineLength)   .. Right  Margin
  2014.   toWord(buf98,n99) 
  2015. >
  2016. <shftAltCtl-t:
  2017.   getLocal(buf[n85],n99,topMargin)    .. Top    Margin
  2018.   toWord(buf98,n99) 
  2019. >
  2020. <shftAltCtl-y:
  2021.   getLocal(buf[n85],n99,bottomMargin) .. Botton Margin
  2022.   toWord(buf98,n99) 
  2023. >
  2024.  
  2025. COLORS of WB
  2026. <alt-help: 
  2027. if (getFlag(curFile,lace)) laceColor
  2028. else toggle(color) 
  2029. >
  2030. HELP mode toggle for keys, PRESS Amiga-ESC to Exit
  2031. <Ctl-help:
  2032.   putMsg("Key-Help mode.  PRESS Amiga-ESC to Abort")
  2033.   flipFlag(curFile,teachKeys) 
  2034. >
  2035. REFRESH display
  2036. <shftCtl-help:     refreshDisplay 
  2037. >
  2038. HELP for printer control codes
  2039. <altCtl-help:
  2040.   freebuf(buf99)
  2041.   putMsg(" ")
  2042.   insertRgn(buf99,sFile,
  2043. "á                       TO ENABLE SPECIAL PRINTING
  2044.                          ==========================
  2045. Press lAmiga-b and then one of the letters below.  The hilite region will print 
  2046. as boldface, italics, 8 lines/inch, etc, by bracketing it with printer codes:
  2047.                                              
  2048.            8 = 8 lines/inch                     l = enlarged   
  2049.            b = boldface                         n = NLQ        
  2050.            c = condensed                        s = shadow     
  2051.            d = double strike                    u = underline  
  2052.            e = elite                            x = superscript
  2053.            i = italics                          y = subscript          
  2054.  
  2055.                                OTHER KEYS
  2056.                                ==========
  2057.       rAmiga-g = find next printer code in document
  2058.       rAmiga-b = input a printer code # (0-75.  See table in Manual.)
  2059.       
  2060.  
  2061. \"Printer Select\" must be 2 or 3 for these codes to control your printer. 
  2062. Select \"SETUP/CHG CONFIGURE\" to see what \"Printer Select\" is.  
  2063. Select your printer in Preferences.
  2064.  
  2065. ",all)
  2066.   flipFlag(buf99,readOnly)
  2067.   equateNum(n85,curFile)
  2068.   editBuf(buf99)
  2069.   vScroll(sFile)
  2070.   updateDisplay
  2071.   getKey(n99)
  2072.   editBuf(buf[n85])
  2073.   freeBuf(buf99) 
  2074. >
  2075. HELP tell which keys are open
  2076. <lAmiga-help:
  2077.   while (getKey(n99))
  2078.     { if (inUse(n99)) putMsg("In use - Amiga-Esc to abort help mode")
  2079.       else putMsg("Available - Amiga-Esc to abort help mode") 
  2080.     }
  2081. >
  2082. HELP next key. Copy key-help to RAM: on first
  2083. <rAmiga-help:
  2084.   putMsg("Input a Key, Gadget, Click etc to get Help Msg")
  2085.   getKey(n99)
  2086.   teachOne(n99) 
  2087. >
  2088.  
  2089. DELETE to end of word:
  2090. <shft-del:
  2091.   if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf90)
  2092.   equateLoc(curFile,locA,atCursor)
  2093.   moveCursor(curFile,eWord)
  2094.   equateLoc(curFile,locB,atCursor)
  2095.   insertRgn(buf90,eFile,curFile,loc)
  2096.   clearRgn(curFile,loc)
  2097.   if (thisKey) runkey(virtual-k) 
  2098. >
  2099. DELETE to end of line:
  2100. <alt-del:
  2101.   runKey(virtual-l)
  2102.   if (thisKey) runkey(virtual-k) 
  2103. >
  2104. DELETE entire line
  2105. <ctl-del:
  2106.   locToLine(curFile,n99,atCursor)
  2107.   if (not eqNum(n99,n84)) freeBuf(buf90)
  2108.   locToLine(curFile,n84,atCursor)
  2109.   colToLoc(curFile,atCursor,1)
  2110.   equateLoc(curFile,locA,atCursor)
  2111.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  2112.   moveCursor(curFile,eChar)
  2113.   equateLoc(curFile,locB,atCursor)
  2114.   insertRgn(buf90,eFile,curFile,loc)
  2115.   clearRgn(curFile,loc)
  2116.   if (thisKey)  runKey(virtual-k) 
  2117. >
  2118. DELETE below cursor to EOL
  2119. <shftCtl-del:
  2120.   equateLoc(curFile,mouseLoc,atCursor)
  2121.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  2122.   if (not is(curFile,eFile))
  2123.   { moveCursor(curFile,downLine)
  2124.     runKey(virtual-l)
  2125.     moveCursor(curFile,mouseLoc)
  2126.   }
  2127.   if (thisKey)  runKey(virtual-k) 
  2128. >
  2129. DELETE to end of page
  2130. <altCtl-del:
  2131.   indexToLoc(curFile,locA,n84)
  2132.   if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
  2133.   locToIndex(curFile,n84,atCursor)
  2134.   equateLoc(curFile,locA,atCursor)
  2135.   moveCursor(curFile,ePage)
  2136.   equateLoc(curFile,locB,atCursor)
  2137.   insertRgn(buf90,eFile,curFile,loc)
  2138.   clearRgn(curFile,loc)
  2139.   if (thisKey)  runKey(virtual-k) 
  2140. >
  2141.  
  2142. BACKSPACE to start of word
  2143. <shft-bs:
  2144.   indexToLoc(curFile,locA,n84)
  2145.   if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
  2146.   locToIndex(curFile,n84,atCursor)
  2147.   equateLoc(curFile,locB,atCursor)
  2148.   moveCursor(curFile,sWord)
  2149.   equateLoc(curFile,locA,atCursor)
  2150.   insertRgn(buf90,sFile,curFile,loc)
  2151.   clearRgn(curFile,loc)
  2152.   if (thisKey)  runKey(virtual-k)  
  2153. >
  2154. BACKSPACE to start of line
  2155. <alt-bs:
  2156.   indexToLoc(curFile,locA,n84)
  2157.   if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
  2158.   locToIndex(curFile,n84,atCursor)
  2159.   if (is(curFile,sLine)) runKey(normal-bs)
  2160.   else
  2161.     { equateLoc(curFile,locB,atCursor)
  2162.       moveCursor(curFile,sLine)
  2163.       equateLoc(curFile,locA,atCursor)
  2164.       insertRgn(buf90,sFile,curFile,loc)
  2165.       clearRgn(curFile,loc)
  2166.     }
  2167.   if (thisKey)  runKey(virtual-k)  
  2168. >
  2169. BACKSPACE above cursor to EOL
  2170. <ctl-bs:
  2171.   equateLoc(curFile,mouseLoc,atCursor)
  2172.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  2173.   if (not is(curFile,sFile))
  2174.     { moveCursor(curFile,upLine)
  2175.       runKey(alt-del)
  2176.       moveCursor(curFile,mouseLoc)
  2177.     }
  2178.   if (thisKey)  runKey(virtual-k)  
  2179. >
  2180. BACKSPACE to start of page
  2181. <altCtl-bs:
  2182.   indexToLoc(curFile,locA,n84)
  2183.   if (not eqLoc(curFile,locA,atCursor)) freeBuf(buf90)
  2184.   locToIndex(curFile,n84,atCursor)
  2185.   equateLoc(curFile,locB,atCursor)
  2186.   moveCursor(curFile,sPage)
  2187.   equateLoc(curFile,locA,atCursor)
  2188.   insertRgn(buf90,sFile,curFile,loc)
  2189.   clearRgn(curFile,loc)
  2190.   vScroll(atCursor)
  2191.   if (thisKey)  runKey(virtual-k)  
  2192. >
  2193.  
  2194. SPACE,HARD inserted at cursor
  2195. <shft-space:
  2196.   insertChar(curFile,160) 
  2197. >
  2198. SPACE inserted at cursor
  2199. <ctl-space:
  2200.   runKey(virtual-m) 
  2201. >
  2202. SPACE inserted in front of word for typing
  2203. <shftCtl-space:
  2204.   if (not is(curFile,sWord)) moveCursor(curFile,sWord)
  2205.   runKey(virtual-m) 
  2206. >
  2207. SPACES removed between words
  2208. <altCtl-space:
  2209.   while (not is(curFile,space))
  2210.     { moveCursor(curFile,eChar) if(is(curFile,eFile)) returnTrue 
  2211.     }
  2212.   moveCursor(curFile,eChar)
  2213.   while (is(curFile,space)) clearChar(curFile) 
  2214. >
  2215.  
  2216. LINE-LENGTH adjust
  2217. <alt-return:
  2218.   if (thisKey) equateNum(n85,curFile)
  2219.   putMsg("AMIGA-ESC=Abort.  Enter New Right Margin")
  2220.   if (inputNum(n99)) setLocal(buf[n85],lineLength,n99) 
  2221. >
  2222.  
  2223. =========================  TAB COMMANDS  ==============================
  2224.  
  2225. TAB Transparent forward
  2226. <shft-tab: moveCursor(curFile,eTab) 
  2227. >
  2228. TAB Transparent backward
  2229. <alt-tab:  moveCursor(curFile,sTab) 
  2230. >
  2231. TAB Undo - delete white space back to previous tab column
  2232. <ctl-tab: 
  2233.   equateLoc(curFile,locA,atCursor)
  2234.   moveCursor(curFile,sTab)
  2235.   while (nothing)
  2236.     { if (is(curFile,space)) goto label(1)
  2237.       if (is(curFile,9))  goto label(1)  .. a TAB
  2238.       return
  2239. label(1)
  2240.       clearChar(curFile)
  2241.       if (eqLoc(curFile,atCursor,locA)) return 
  2242.     }
  2243. >
  2244. TAB toggle: Switch to/from using spaces for tabs or using real tabs
  2245. <altCtl-tab: flipFlag(curFile,trueTabs)
  2246. >
  2247. TAB ruler display above cursor line
  2248. <shftAlt-tab:  seeRuler
  2249. >
  2250. TAB ruler set using mouse or keys
  2251. <shftCtl-tab:
  2252.   putMsg("Set TABS w/Mouse, Tab, Space, BS, Del (anykey,Amiga-Esc=Abort)")
  2253.   setRuler putMsg(" ") 
  2254. >
  2255. TAB table number select(0-4) used for TAB spacing
  2256. <shftAltCtl-tab:
  2257.    equateNum(n97,curFile)
  2258.    putMsg("AMIGA-ESC=Abort.  Enter new tab table # (0-4)")
  2259.    if (inputNum(n99)) if (geNum(n99,0)) if (gtNum(5,n99))
  2260.      { setLocal(buf[n97],tabTable,n99) 
  2261.           setLocal(buf[n85],tabTable,n99) 
  2262.      }
  2263.    putMsg("Set TABS w/Mouse, Tab, Space, BS, Del (anykey,Amiga-Esc=Abort)")
  2264.    setRuler putMsg(" ") 
  2265. >
  2266.  
  2267. ==========================   GENERAL COMMANDS   ===============================
  2268.  
  2269. ASCII Input
  2270. <alt-a:
  2271.   putMsg("AMIGA-ESC=Abort.  Enter ASCII value to write at cursor")
  2272.     inputNum(n99)
  2273.     typeChar(n99)
  2274. >
  2275. ASCII value of char under cursor (use to ID ctl-chars)
  2276. <ctl-a:
  2277.   copyChar(curFile,n99)
  2278.   freeBuf(buf99)
  2279.   toWord(buf99,n99)
  2280.   insertRgn(buf99,sFile,"Previous Character's ASCII Value was ",all)
  2281.   putMsg(buf99)
  2282.   moveCursor(curFile,eChar) 
  2283. >
  2284. ASCII value table
  2285. <rAmiga-a:
  2286.     freeBuf(buf87)
  2287.   insertChar(buf87,eLine)
  2288.     insertRgn(buf87,sFile,
  2289.       "ASCII Val = Col Position + Last Value on Prev Line  50",all)
  2290.     equateLoc(buf87,sHilite,sFile)
  2291.     colToLoc(buf87,eHilite,51)
  2292.     if (getFlag(buf87,autoIndent)) flipFlag(curFile,autoIndent)
  2293.     if (not getFlag(buf87,spooks)) flipFlag(curFile,spooks)
  2294.   do (n99,1,4)
  2295.       { mul(n98,n99,50)
  2296.         add(n98,n98,1)
  2297.         add(n97,n98,49)
  2298.          do (n96,n98,n97) insertChar(buf87,n96)
  2299.          insertChar(buf87," ")
  2300.          toWord(buf87,n97)
  2301.       insertChar(buf87,eLine) 
  2302.     }
  2303.     splitWindow(buf87,5) 
  2304. >
  2305.  
  2306. BUFFERS examination
  2307. <alt-b:
  2308.   equateNum(n99,curFile)
  2309.   getMaxFiles(n97)
  2310.   do (n85,n97,99) if (not isEmpty(buf[n85]))
  2311.     { editBuf(buf[n85])
  2312.       putMsg("F1=Next     F2=Edit this one     F3=Stop")
  2313.       getKey(n98)
  2314.       if (eqNum(n98,normal-f2)) { putMsg(" ") returnTrue }
  2315.       if (eqNum(n98,normal-f3)) goto label(1)
  2316.     }
  2317. label(1)
  2318.   editBuf(buf[n99])
  2319.   putMsg(" ") 
  2320. >
  2321. MARGIN BOTTOM setup
  2322. <ctl-b:
  2323.   if (thisKey) equateNum(n85,curFile)
  2324.   putMsg("AMIGA-ESC=Abort.  Enter Bottom Margin (0-200 lines)")
  2325.   if (inputNum(n99)) setLocal(buf[n85],bottomMargin,n99) 
  2326. >
  2327. BUSIES toggle
  2328. <shftAlt-b:
  2329.   flipFlag(curFile,busies) 
  2330. >
  2331. PRINT code embed: Next letter key brackets hilite for boldface, italics etc.
  2332. <lAmiga-b:
  2333.   if (runKey(virtual-r))
  2334.     { if (eqNum(n99,normal-h))
  2335.         runKey(altCtl-help)
  2336.       else
  2337.         { equateNum(n98,-1)
  2338.           if (eqNum(n99,normal-8)) equateNum(n98,55)
  2339.           if (eqNum(n99,normal-i)) equateNum(n98,6)
  2340.           if (eqNum(n99,normal-u)) equateNum(n98,8)
  2341.           if (eqNum(n99,normal-b)) equateNum(n98,10)
  2342.           if (eqNum(n99,normal-e)) equateNum(n98,15)
  2343.           if (eqNum(n99,normal-c)) equateNum(n98,17)
  2344.           if (eqNum(n99,normal-l)) equateNum(n98,19)
  2345.           if (eqNum(n99,normal-s)) equateNum(n98,21)
  2346.           if (eqNum(n99,normal-d)) equateNum(n98,23)
  2347.           if (eqNum(n99,normal-n)) equateNum(n98,25)
  2348.           if (eqNum(n99,normal-x)) equateNum(n98,27)
  2349.           if (eqNum(n99,normal-y)) equateNum(n98,29)
  2350.           if (eqNum(n98,-1)) returnFalse
  2351.           runKey(virtual-w)
  2352.         }
  2353.     } 
  2354. >
  2355. Insert printer code.  (See printer code table for meaning of numbers 0-75.)
  2356. <rAmiga-b:
  2357.   putMsg("AMIGA-ESC=Abort.  Enter Printer Code (0-75, see printer-codes)")
  2358.   equateNum(n98,0)
  2359.   equateNum(n97,0)
  2360.   if (inputNum(n99))
  2361.     { if (geNum(n99,0)) if (geNum(75,n99))
  2362.         { if (eqNum(n99,12))
  2363.             { putMsg("Enter foreground color (30-39)") goto label(2) 
  2364.             }
  2365.           if (eqNum(n99,13))
  2366.             { putMsg("Enter background color (40-49)") goto label(2) 
  2367.             }
  2368.           if (eqNum(n99,48)) returnFalse
  2369.           if (eqNum(n99,57))
  2370.             { putMsg("Enter form length") goto label(2) 
  2371.             }
  2372.           if (eqNum(n99,58)) returnFalse .. perf skip n
  2373.           if (eqNum(n99,64)) returnFalse .. t&b margins
  2374.           if (eqNum(n99,65)) returnFalse .. l&r margins
  2375.           if (eqNum(n99,75)) returnFalse .. extended cmd
  2376.           goto label(1)
  2377. label(2)
  2378.           if (not inputNum(n98)) return
  2379. label(1)
  2380.           printerCode(curFile,n99,53,52)
  2381.         }
  2382.     } 
  2383. >
  2384.  
  2385. COMMAND COMPILER
  2386. <ctl-c:
  2387.   putMsg("Compiling")
  2388.   if (not compile) beepDisplay 
  2389. >
  2390. COMMAND-writing buf89 selected
  2391. <shftCtl-c:
  2392.   editBuf(buf89)
  2393.   putMsg("Type in command e.g. <key:  etc>, CTRL-c to Compile") 
  2394. >
  2395. COMMAND input and COUNT number of times executed
  2396. <shftAlt-c:
  2397.   equateNum(n99,0)
  2398.   putMsg("Input Command to Execute & Count:")
  2399.   if (getKey(n98))
  2400.     { while (runKey(n98)) incNum(n99)
  2401.       freeBuf(buf99)
  2402.       insertRgn(buf99,sFile,"Times Executed = ",all)
  2403.       toWord(buf99,n99)
  2404.       putMsg(buf99)
  2405.     }
  2406. >
  2407. COMMAND Compile configuration default values at the top of Config! file
  2408. <altCtl-c:
  2409.   moveCursor(curFile,sFile)
  2410.   if (not compileDefaults) beepDisplay
  2411. >
  2412.  
  2413. DIRECTORY-edit directoryname in buf83, load new buffer with directory
  2414. <ctl-d:
  2415.   if (eqNum(macroNum,450))     ..ctl-d, can be called from virtual-x
  2416.     { putMsg("Enter Dir to Get")
  2417.       inputString(buf83)
  2418.     }
  2419.   fileSize(buf83,n99)
  2420.   if (eqNum(n99,0)) return
  2421.   freeBuf(buf98)
  2422.   insertRgn(buf98,eFile,"dir ",all)
  2423.   insertRgn(buf98,eFile,buf83,all)
  2424.   moveCursor(buf84,sFile)
  2425.   if (not execute(buf84,buf98)) returnFalse
  2426.   moveCursor(buf83,eFile)
  2427.   moveCursor(buf83,sChar)
  2428.   if (not isEmpty(buf83)) 
  2429.     { if (not is(buf83,":")) if (not is(buf83,"/"))
  2430.         insertRgn(buf83,eFile,"/",all) }
  2431.   moveCursor(buf84,sFile)
  2432.   insertChar(buf84,eLine)
  2433.   insertRgn(buf84,sFile,buf83,all)
  2434.   newFile
  2435.   swapBuf(buf84,curFile)
  2436.   freeBuf(buf84)
  2437.   vScroll(sFile)
  2438.   putMsg("To Load Files: Select with CTRL-Left_Mouse_Button")
  2439.   setFileName(curFile,buf98)
  2440.   flipFlag(curFile,changed)  
  2441. >
  2442.  
  2443. DIRECTORY change DEFAULT
  2444. <alt-d:
  2445.   runKey(virtual-n) 
  2446. >
  2447. DELAY change time
  2448. <shftAlt-d:
  2449.   putMsg("Input # Tenths of Seconds (delay)")
  2450.   inputNum(n93) 
  2451. >
  2452. DELAY # tenths of seconds stored in n93 (see shftAlt-d)
  2453. <shftAltCtl-d:
  2454.   delay(n93) 
  2455. >
  2456. PAGE-division Delete next 
  2457. <lAmiga-d:
  2458. label(1)
  2459.   if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  2460.   if (not is(curFile,eForm)) moveCursor(curFile,eForm)
  2461.   if (not is(curFile,eLine)) moveCursor(curFile,eline)
  2462.   if (not is(curFile,12))
  2463.     { moveCursor(curFile,eChar)
  2464.       if (not is(curFile,eFile)) goto label(1)
  2465.       returnFalse 
  2466.     }
  2467.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  2468.   getPageRowCol(n99,n99,n98)              .. Page,Col values not used
  2469.   getLocal(curFile,n98,topMargin)
  2470.   getLocal(curFile,n97,bottomMargin)      .. bottomMargin value not used
  2471.   equateLoc(curFile,locA,atCursor)        .. start of ff line
  2472.   moveCursor(curFile,downLine)
  2473.   while (gtNum(n98,0))                    .. del tm lines
  2474.     { if (not is(curFile,blankLine)) goto label(2)
  2475.       decNum(n98)
  2476.       moveCursor(curFile,downLine) 
  2477.     }
  2478. label(2)
  2479.   equateLoc(curFile,locB,atCursor)
  2480.   equateLoc(curFile,atCursor,locA)
  2481.   moveCursor(curFile,upLine)
  2482.   while (gtNum(n99,0))
  2483.     { decNum(n99)
  2484.       if (not is(curFile,blankLine))
  2485.         { moveCursor(curFile,downLine)
  2486.           goto label(3) 
  2487.         }
  2488.       moveCursor(curFile,upLine)
  2489.     }
  2490. label(3)
  2491.   equateLoc(curFile,locA,atCursor)
  2492.   clearRgn(curFile,loc) 
  2493. >
  2494.  
  2495. BUFFER EDIT
  2496. <ctl-e:
  2497.   putMsg("Input Buffer Number to EDIT")
  2498.   if (inputNum(n85)) if (thisKey) editBuf(buf[n85]) 
  2499. >
  2500. END-OF-LINE new
  2501. <alt-e:
  2502.   putMsg("Input New End-Of-Line value (usually 10 or 13)")
  2503.   inputNum(n99)
  2504.   setEol(n99)
  2505.   refreshDisplay 
  2506. >
  2507. END-OF-LINE replace existing character
  2508. <shftAlt-e:
  2509.    putMsg("Replace EOL: Current End-Of-Line value for File (usually 10/13)")
  2510.    inputNum(n99)
  2511.    if (not gtNum(n99,0)) returnFalse
  2512.    putMsg("What End-Of-Line value should it be (usually 10/13)")
  2513.    inputNum(n98)
  2514.    if (not gtNum(n98,0)) returnFalse
  2515.    setEol(n99)
  2516.    moveCursor(curFile,sFile)
  2517.    putMsg("Changing EOL Characters...LeftAmiga-ESC to abort")
  2518.    while (moveCursor(curFile,eLine))
  2519.      if (is(curFile,n99)) swapChar(curFile,n98)
  2520.    setEol(n98)
  2521.    equateNum(pmESC,n98)     .. Allow RETURN key to end Primitive mode
  2522.    vScroll(sFile)
  2523.    putMsg(" ")
  2524.    refreshDisplay 
  2525. >
  2526. EITHER-OR new
  2527. <altCtl-e:
  2528.   putMsg("Input New Either-Or Char for Search")
  2529.   getChar(eitherOr)
  2530.   putMsg(" ") 
  2531. >
  2532. GOTO PAGE End
  2533. <lAmiga-e:  moveCursor(curFile,eForm) 
  2534. >
  2535.  
  2536. ERASE buffer
  2537. <ctl-f:
  2538.   putMsg("Input Buffer # to FREE")
  2539.   if (inputNum(n99)) freeBuf(buf[n99]) 
  2540. >
  2541. CASE FLIP UPPER/LOWER of character under cursor
  2542. <alt-f:
  2543.   if (is(curFile,alpha))
  2544.     { if (is(curFile,lowerCase)) toUpper(curFile)
  2545.       else toLower(curFile)
  2546.     }
  2547.   moveCursor(curFile,eChar) 
  2548. >
  2549. FORMFEED Insert
  2550. <lAmiga-f:  insertChar(curFile,12) 
  2551. >
  2552.  
  2553. GADGETS displayed
  2554. <ctl-g:
  2555.   flipFlag(curFile,markGadgets) 
  2556. >
  2557. PRINT Goto/Invert next printer code (can erase it with ctl-i)
  2558. <rAmiga-g:
  2559.   freeBuf(buf99)
  2560.   insertRgn(buf99,sFile,"?$??",word)
  2561.   setSearch(buf99)
  2562.   if (search(curFile,sInvert,eInvert,1))
  2563.     putMsg("Press CTL-i to delete the code")
  2564.   else
  2565.     putMsg("No Printer Codes found") 
  2566. >
  2567.  
  2568. HEX TOGGLE hexadecimal/decimal
  2569. <alt-h:
  2570.   hexDecimal(curFile) 
  2571. >
  2572. HILITE ERASE Region- No Copy is made
  2573. <ctl-h:
  2574.   clearRgn(curFile,hilite) 
  2575. >
  2576. GOTO PAGE Start
  2577. <lAmiga-h:  moveCursor(curFile,sForm) 
  2578. >
  2579.  
  2580. INVERT uninvert
  2581. <alt-i:
  2582.   equateLoc(curFile,sInvert,eInvert) refreshDisplay 
  2583. >
  2584. INVERT ERASE Region- No Copy is made
  2585. <ctl-i:
  2586.   clearRgn(curFile,invert) 
  2587. >
  2588. ((See shftAlt-buttonDown in ref to shftAlt-i.))
  2589. INDEX creation for keywords in buf86: Ref Line#'s in Curfile of Keywords
  2590. <shftAlt-i:
  2591.   if (isEmpty(buf86)) returnFalse
  2592.   equateNum(n85,curFile)
  2593.   runKey(virtual-o)
  2594.   freeBuf(buf99)
  2595. label(1)
  2596.   moveCursor(buf86,sFile)
  2597.   while (is(buf86,whiteSpace)) clearChar(buf86)
  2598.   if (is(buf86,eFile))
  2599.     { swapBuf(buf99,buf86)
  2600.       freeBuf(buf99)
  2601.       setFileName(buf86,"Index")
  2602.       equateLoc(buf86,sPage,sFile)
  2603.       equateLoc(buf86,atCursor,sFile)
  2604.       putMsg("Press CTRL-w to see Index")
  2605.       returnTrue
  2606.     }
  2607.   freeBuf(buf94)
  2608.   insertRgn(buf94,sFile,buf86,line)
  2609.   clearRgn(buf86,line)
  2610.   putMsg(buf94)
  2611.   moveCursor(buf99,eFile)
  2612.   insertRgn(buf99,eFile,buf94,all)
  2613.   insertRgn(buf99,eFile,"  ",all)
  2614.   insertChar(buf99,eLine)
  2615.   moveCursor(buf99,sChar)
  2616.   equateNum(n98,0)
  2617.   moveCursor(curFile,sFile)
  2618. label(2)
  2619.   setSearch(buf94)
  2620.   while (search(curFile,sInvert,eInvert,1))
  2621.     { moveCursor(curFile,sChar)
  2622.       if (is(curFile,alpha))
  2623.         {
  2624. label(3)
  2625.           moveCursor(curFile,eInvert)
  2626.           goto label(2) 
  2627.         }
  2628.       if (is(curFile,digit)) goto label(3)
  2629.       moveCursor(curFile,eInvert)
  2630.       if (is(curFile,alpha)) goto label(2)
  2631.       if (is(curFile,digit)) goto label(2)
  2632.       locToLine(curFile,n99,atCursor)
  2633.       getLocal(curFile,n97,pageLines)
  2634.       div(n99,n99,n97)
  2635.       incNum(n99)
  2636.       if (not eqNum(n99,n98))
  2637.         { if (not eqNum(n98,0)) insertChar(buf99,",")
  2638.           toWord(buf99,n99)
  2639.           equateNum(n98,n99) 
  2640.         }
  2641.    }
  2642.    goto label(1) 
  2643. >
  2644. IDLE-timer value (seconds) input (after which idle command executed)
  2645. <shftAltCtl-i:
  2646.   putMsg("Input idle time (seconds)")
  2647.   if (inputNum(n99)) equateNum(idleTime,n99) 
  2648. >
  2649.  
  2650. JUSTIFY file right
  2651. <alt-j:
  2652.   flipFlag(curFile,rightJustify)
  2653.   if (getFlag(curFile,userLocalB))
  2654.     if (not getFlag(curFile,changed)) flipFlag(curFile,changed) 
  2655. >
  2656. JOIN next line to current line
  2657. <ctl-j:
  2658.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  2659.   equateLoc(curFile,locA,atCursor)
  2660. label(1)
  2661.   moveCursor(curFile,eChar)
  2662.   if (is(curFile,space)) goto label(1)
  2663.   if (is(curFile,9)) goto label(1)         .. a TAB
  2664.   equateLoc(curFile,locB,atCursor)
  2665.   clearRgn(curFile,loc)
  2666.   insertChar(curFile," ") 
  2667. >
  2668.  
  2669. KEY-CODE Display
  2670. <alt-k:
  2671.   putMsg("Will Display Codes for next Key Command")
  2672.   getKeyVal(n99,n98)
  2673.   freeBuf(buf99)
  2674.   toWord(buf99,n99)
  2675.   insertRgn(buf99,eFile,"/",all)
  2676.   toWord(buf99,n98)
  2677.   insertRgn(buf99,sFile,"Macro/ASCII Codes for that key are ",all)
  2678.   putMsg(buf99) 
  2679. >
  2680. CTL-CHARACTER INPUT , such as formfeed, into text at cursor
  2681. <ctl-k:
  2682.   putMsg("Input a Control Character") 
  2683.   getKeyVal(n54,n53)
  2684.   typeChar(n53)
  2685. >
  2686. KEY-AVAILABILITY
  2687. <altCtl-k:
  2688.   putMsg("Creating key table, please wait...")
  2689.   freeBuf(buf99)
  2690.   insertRgn(buf99,sFile,
  2691. "1 !      1 
  2692. 2 @      2 
  2693. 3 #      3 
  2694. 4 $      4 
  2695. 5 %      5 
  2696. 6 ^      6 
  2697. 7 &      7 
  2698. 8 *      8 
  2699. 9 (      9 
  2700. 0 )     10 
  2701. - _     11 
  2702. = +     12 
  2703. \ |     13 
  2704. --------14 
  2705. kp0     15 
  2706. Q       16 
  2707. W       17 
  2708. E       18 
  2709. R       19 
  2710. T       20 
  2711. Y       21 
  2712. U       22 
  2713. I       23 
  2714. O       24 
  2715. P       25 
  2716. [ {     26 
  2717. ] }     27 
  2718. --------28 
  2719. kp1     29 
  2720. kp2     30 
  2721. kp3     31 
  2722. A       32 
  2723. S       33 
  2724. D       34 
  2725. F       35 
  2726. G       36 
  2727. H       37 
  2728. J       38 
  2729. K       39 
  2730. L       40 
  2731. ; :     41 
  2732. ' \"     42 
  2733. --------43 
  2734. --------44 
  2735. kp4     45 
  2736. kp5     46 
  2737. kp6     47 
  2738. --------48 
  2739. Z       49 
  2740. X       50 
  2741. C       51 
  2742. V       52 
  2743. B       53 
  2744. N       54 
  2745. M       55 
  2746. , <     56 
  2747. . >     57 
  2748. / ?     58 
  2749. --------59 
  2750. kp.     60 
  2751. kp7     61 
  2752. kp8     62 
  2753. kp9     63 
  2754. Space   64 
  2755. BS      65 
  2756. Tab     66 
  2757. kpEnter 67 
  2758. Return  68 
  2759. ESC     69 
  2760. DEL     70 
  2761. --------71 
  2762. --------72 
  2763. --------73 
  2764. kpMinus 74 
  2765. --------75 
  2766. upArrow 76 
  2767. downArrow  
  2768. rightArrow 
  2769. leftArrow  
  2770. F1      80 
  2771. F2      81 
  2772. F3      82 
  2773. F4      83 
  2774. F5      84 
  2775. F6      85 
  2776. F7      86 
  2777. F8      87 
  2778. F9      88 
  2779. F10     89 
  2780. --------90 
  2781. --------91 
  2782. --------92 
  2783. --------93 
  2784. --------94 
  2785. Help    95 
  2786. buttonDn96 
  2787. buttonUp97 
  2788. Gadget1-98 
  2789. Gadget2-99 
  2790. Gadg3--100 
  2791. Gadg4--101 
  2792. CloseBx102 
  2793. ` ~    103 
  2794. ",all)
  2795.   editBuf(buf99) 
  2796.   equateNum(n99,0)                           .. outer loop prefix counter
  2797.   do (n99,0,10)
  2798.     { moveCursor(buf99,sFile) vScroll(sFile) refreshDisplay
  2799.       do (n98,1,103)                         .. inner loop key counter
  2800.         { mul(n97,n99,104)                   .. prefix,
  2801.           add(n97,n97,n98)                   .. plus key, gives value
  2802.           moveCursor(buf99,eLine)
  2803.           if (inUse(n97)) insertChar(buf99,"X") else insertChar(buf99,"-")
  2804.           insertRgn(buf99,atCursor,"    ",all) 
  2805.         }
  2806.     }
  2807.   insertRgn(buf99,sFile,"
  2808.  
  2809.              Master keytable for current status of Uedit
  2810.  
  2811.     X Key in use     - Key not in use     ---- Non-key or Europe
  2812.  
  2813.           Any specific key value is: (prefix * 104) + KeyCode       
  2814.  
  2815. KeyName    Norm Shft Alt  SA   Ctl  SC   AC   SAC  lAmi rAmi Virtual
  2816. |          |0   |1   |2   |3   |4   |5   |6   |7   |8   |9   |10    {-- Prefix 
  2817. v  KeyCode |    |    |    |    |    |    |    |    |    |    |
  2818.          v
  2819. ",all)
  2820.   vscroll(sFile) refreshDisplay
  2821.   putMsg(" ") >
  2822. KILL command: including mouse clicks, menu selections, gadgets, keys
  2823. <shftAltCtl-k:
  2824.   putMsg("Next Command-Key will be Deleted!  AmigaESC to Abort")
  2825.   if (getKey(n99)) if (killKey(n99))
  2826.     { putMsg("Key Command was Deleted") returnTrue 
  2827.     }
  2828.   putMsg("User Aborted, No Action taken") 
  2829. >
  2830.  
  2831. MARGIN LEFT set
  2832. <ctl-l:
  2833.   if (thisKey) equateNum(n85,curFile)
  2834.   putMsg("AMIGA-ESC=Abort. Enter Left Margin (0-200)")
  2835.   if (inputNum(n99)) setLocal(buf[n85],leftMargin,n99) 
  2836. >
  2837. LEARN mode toggle on/off
  2838. <rAmiga-l:
  2839.   flipFlag(curFile,learnMode)
  2840.   if (getFlag(curFile,learnMode))
  2841.     { putMsg("LEARN MODE ACTIVE  CTRL-x:End,  RightAmiga-l:Cancel") 
  2842.     }
  2843.   else
  2844.     { putMsg("Learn Mode Cancelled") 
  2845.     }
  2846. >
  2847. CASE convert char under cursor to LOWER
  2848. <alt-l:
  2849.   toLower(curFile) moveCursor(curFile,eChar) 
  2850. >
  2851.  
  2852.   
  2853. MULTIPLY next command
  2854. <ctl-m:
  2855.   putMsg("Next Command will be Repeated m times. Input m Multiplier:")
  2856.   inputNum(cmdMultiplier) 
  2857. >
  2858. Map illegal ASCII (0 thru 5) characters into safe ones.  (See top of Config!)
  2859. <shftAlt-m:  flipFlag(curFile,mapChars)
  2860. >
  2861. Max # of files to edit
  2862. <shftCtl-m: 
  2863.   putMsg("Enter Max # files to edit")
  2864.   getMaxFiles(n99)
  2865.   inputNum(n99)
  2866.   setMaxFiles(n99) 
  2867. >
  2868.   
  2869. GOTO line NUMBER
  2870. <ctl-n:
  2871.   putMsg("Input Line NUMBER to Goto")
  2872.   if (inputNum(n99))
  2873.     { lineToLoc(curFile,atCursor,n99) vScroll(atCursor) 
  2874.     }
  2875. >
  2876.  
  2877. NUMERIC keypad toggle for numbers/ctrl
  2878. <alt-n:
  2879.   flipFlag(curFile,useKeys)
  2880. >
  2881.  
  2882. OPEN line at cursor for typing
  2883. <ctl-o:
  2884.   insertChar(curFile,eLine) moveCursor(curFile,sChar) 
  2885. >
  2886.  
  2887. PRINT port select
  2888. <alt-p:
  2889.   putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
  2890.   if (inputNum(n99))
  2891.     if (geNum(n99,0)) if (gtNum(4,n99)) equateNum(prefPrint,n99)
  2892.   putMsg(" ")
  2893. >
  2894. PRINT hilite region
  2895. <ctl-p:
  2896.   print(curFile,hilite) 
  2897. >
  2898. PRINT Entire current file
  2899. <shftCtl-p:
  2900.   putMsg("Current File now in PrintQueue.  Stop=LeftAmiga-p.")
  2901.   print(curFile,all) 
  2902. >
  2903. PAGE size change
  2904. <altCtl-p:
  2905.   equateNum(n85,curFile)
  2906.   runKey(virtual-o) 
  2907. >
  2908. PRINT Stop current
  2909. <lAmiga-p:
  2910.   abortPrint abort
  2911. >
  2912. PRINT Stop all prints that are stored up
  2913. <rAmiga-p:
  2914.   while (abortPrint) nothing
  2915.   abort 
  2916. >
  2917.  
  2918. REPLACE "matched" region, forward search
  2919. <ctl-r:
  2920.   runKey(virtual-q) 
  2921. >
  2922. REPLACE "matched" region, backward search
  2923. <shftCtl-r:
  2924.   if (eqLoc(curFile,sInvert,eInvert)) returnFalse
  2925.   clearRgn(curFile,invert)
  2926.   insertRgn(curFile,sInvert,buf93,all)
  2927.   runKey(virtual-p) 
  2928. >
  2929. REPLACE-ALL forward
  2930. <altCtl-r:
  2931.   while(runKey(virtual-q)) nothing 
  2932. >
  2933. RENAME curfile
  2934. <alt-r:
  2935.   putMsg("RENAME  Input New Filename")
  2936.   getFileName(buf88,curFile)
  2937.   if (inputString(buf88))
  2938.   setFileName(curFile,buf88)
  2939.     if (not getFlag(curFile,changed)) flipFlag(curFile,changed) 
  2940. >
  2941. PAGE-divisions and Page-numbers Auto-insert in document
  2942. <lAmiga-r:
  2943.    putMsg("Scanning")
  2944.    equateLoc(curFile,locA,atCursor)
  2945.    freeBuf(buf99)
  2946.    insertChar(buf99,12)
  2947.    setSearch(buf99)
  2948.    if (search(curFile,sInvert,eInvert,1))
  2949.      { putMsg("Delete old paging divisions first using lAmiga-d")
  2950.        returnFalse }
  2951.    putMsg(" ")
  2952.    equateLoc(curFile,atCursor,locA)
  2953.    if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  2954.    while (nothing)
  2955.      { moveCursor(curFile,eForm)
  2956.        getLocal(curFile,n99,bottomMargin)
  2957.        getPageRowCol(n98,n98,n97)           .. Page,Col values not used
  2958.        getLocal(curFile,n97,pageLines)
  2959.        if (gtNum(n97,n98))                  .. last page is short
  2960.          { while (gtNum(n97,n98))
  2961.              { insertChar(curFile,eLine)
  2962.                incNum(n98) 
  2963.              }
  2964.            do (n96,1,n99)  moveCursor(curFile,upLine)
  2965.            runKey(lAmiga-v)
  2966.            return
  2967.          }                                   .. end if gtnum(n97
  2968.        do (n96,1,n99)  moveCursor(curFile,upLine)
  2969.        equateNum(n96,1)
  2970.        while (is(curFile,blankLine))
  2971.          { moveCursor(curFile,downLine)
  2972.            incNum(n96)
  2973.            if (geNum(n96,n99)) goto label(1) 
  2974.          }
  2975. label(1)
  2976.        runKey(lAmiga-v)
  2977.        moveCursor(curFile,downLine)
  2978.        updateDisplay
  2979.      } 
  2980. >                                      .. end while nothing
  2981.      
  2982.  
  2983. SPEAK hilite region a line at a time
  2984. <alt-s:
  2985.   if (gtLoc(curFile,eHilite,sHilite))
  2986.     { equateLoc(curFile,locA,atCursor)
  2987.       equateLoc(curFile,sInvert,sHilite)
  2988.       equateLoc(curFile,atCursor,sHilite)
  2989.       while (gtLoc(curFile,eHilite,sInvert))
  2990.         { if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  2991.           moveCursor(curFile,eChar)
  2992.           if (gtLoc(curFile,atCursor,eHilite))
  2993.             equateLoc(curFile,eInvert,eHilite)
  2994.           else equateLoc(curFile,eInvert,atCursor)
  2995.           if (gtLoc(curFile,eInvert,sInvert))
  2996.             { freeBuf(buf95)
  2997.               insertRgn(buf95,sFile,curFile,invert)
  2998.               speak(buf95) 
  2999.             }
  3000.           equateLoc(curFile,sInvert,atCursor)
  3001.         }
  3002.       equateLoc(curFile,atCursor,locA)
  3003.     } 
  3004. >
  3005.  
  3006. SEARCH forward, invert "matched" region, put cursor at start of region
  3007. <ctl-s:
  3008.   putMsg("Searching Forward")
  3009.   if (runKey(virtual-h)) putMsg(" ")  
  3010. >
  3011. SEARCH backward
  3012. <shftCtl-s:
  3013.   putMsg("Searching Backward")
  3014.   if (runKey(virtual-p)) putMsg(" ") 
  3015. >
  3016. PRINT Restart current
  3017. <lAmiga-s:
  3018.   restartPrint
  3019. >
  3020.  
  3021. MARGIN TOP setup
  3022. <ctl-t:
  3023.   if (thisKey) equateNum(n85,curFile)
  3024.   putMsg("AMIGA-ESC=Abort. Enter Top Margin (0-200 lines)")
  3025.   if (inputNum(n99)) setLocal(buf[n85],topMargin,n99) 
  3026. >
  3027. TAB Converted to spaces in document
  3028. <lAmiga-t:
  3029.   tabsToSpaces 
  3030. >
  3031. TAB Converted from spaces in document
  3032. <rAmiga-t:
  3033.   spacesToTabs 
  3034. >
  3035.     
  3036. HILITE to UnHiLited
  3037. <ctl-u:
  3038.   equateLoc(curFile,sHilite,eHilite) refreshDisplay 
  3039. >
  3040. CASE convert char under cursor to UPPER case
  3041. <alt-u:
  3042.   toUpper(curFile) moveCursor(curFile,eChar) 
  3043. >
  3044.  
  3045. CTRL-CHARACTERS VISIBILITY toggle
  3046. <ctl-v:
  3047.   flipFlag(curFile,spooks) refreshDisplay 
  3048. >
  3049. PAGE-division Insert at cursor
  3050. <lAmiga-v: 
  3051.   if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  3052.   getPageRowCol(n99,n98,n97)
  3053.   getLocal(curFile,n97,bottomMargin)
  3054.   getLocal(curFile,n96,pageLines)
  3055.   div(n97,n97,2)
  3056.   add(n98,n98,n97)
  3057.   while (gtNum(n96,n98)) { incNum(n98) insertChar(curFile,eLine) }
  3058.   getLocal(curFile,n96,lineLength)
  3059.   div(n96,n96,2)
  3060.   while (gtNum(n96,0)) { insertChar(curFile," ") decNum(n96) }
  3061.   toWord(curFile,n99)
  3062.   insertChar(curFile,12)                    .. FormFeed to bottom of page
  3063.   getLocal(curFile,n99,topMargin)
  3064.   while (gtNum(n99,0)) { decNum(n99) insertChar(curFile,eLine) } 
  3065. >
  3066.  
  3067. SWAP commands including mouse clicks, menu selections, gadgets, keys
  3068. <alt-w:
  3069.   putMsg("Next 2 Keys will be Swapped")
  3070.   if (getKey(n98)) if (getKey(n99)) if (swapKey(n98,n99))
  3071.     { putMsg("Keys were Swapped") returnTrue }
  3072.   putMsg(" ") 
  3073. >
  3074. SWAP current buffer in window with buffer 86
  3075. <ctl-w:
  3076.   putMsg("CTRL-w to toggle MainFile <-
  3077. > Index")
  3078.   swapBuf(curFile,buf86) >
  3079. SWAP BUTTON-UP
  3080. <shftAlt-w:
  3081.   putMsg("Next Function Key will be Swapped with Button-Up")
  3082.   if (getKey(n98)) if (swapKey(n98,normal-buttonUp))
  3083.     { putMsg("Old Operation now performed by ButtonUp") returnTrue 
  3084.     }
  3085.   putMsg(" ") 
  3086. >
  3087. WILD-CARD character change
  3088. <altCtl-w:
  3089.   putMsg("Input New Search Wild-Card Char")
  3090.   getChar(wildCard)
  3091.   putMsg(" ") 
  3092. >
  3093. Swap current buffer to buffer 0 (the "home" buffer of Uedit)
  3094. <lAmiga-w: swapBuf(buf0,curFile) editBuf(buf0)
  3095. >
  3096.  
  3097. LEARN-BUFFER EXECUTED
  3098. <ctl-x:
  3099.   runLearn 
  3100. >
  3101.  
  3102. AmigaDOS command executed, results collected
  3103. <ctl-y:
  3104.   putMsg("Enter AmigaDOS command. Results will be displayed")
  3105.   freeBuf(buf85)
  3106.   if (not inputString(buf85)) returnFalse
  3107.   freeBuf(buf84)
  3108.   if (not execute(buf84,buf85)) returnFalse
  3109.   if (not isEmpty(buf84))
  3110.     { putMsg("Result of AmigaDOS command") editBuf(buf84) 
  3111.     }
  3112.   else
  3113.     { putMsg("No message from AmigaDOS") freeBuf(buf84) 
  3114.     }
  3115. >
  3116. AmigaDOS command executed, BUT no results collected
  3117. <shftctl-y:
  3118.   putMsg("Enter AmigaDOS command to do. Results not collected")
  3119.   freeBuf(buf85)
  3120.   if (inputString(buf85)) execute(" ",buf85) 
  3121. >
  3122.  
  3123. QUIT, BUT Save all changed files first (ala VMS EVE)
  3124. <ctl-z:
  3125.   getMaxFiles(n97)
  3126.   decNum(n97)
  3127.   do (n99,0,n97)
  3128.     { if (getFlag(buf[n99],changed)) 
  3129.         { editBuf(buf[n99])
  3130.           if (not runKey(virtual-a)) returnFalse .. virtual-a uses buf[n99]
  3131.         }
  3132.       else
  3133.         { if (getFlag(buf[n99],userLocalB)) 
  3134.             { editBuf(buf[n99])
  3135.               if (not runKey(virtual-a)) returnFalse .. virtual-a uses buf[n99]
  3136.             }
  3137.         }
  3138.     }
  3139.   quit(0) 
  3140. >
  3141.  
  3142. SPACE clear leading
  3143. <ctl-1:
  3144.   equateLoc(curFile,locA,atCursor)
  3145.   runKey(virtual-s)
  3146.   equateLoc(curFile,atCursor,locA) 
  3147. >
  3148.  
  3149. CENTER text in line
  3150. <alt-2:
  3151.   runKey(virtual-s)
  3152.   if (is(curFile,blankLine)) returnFalse
  3153.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  3154.   getLocal(curFile,n99,lineLength)
  3155.   locToCol(curFile,n98,atCursor)
  3156.   if (gtNum(n99,n98))
  3157.     { moveCursor(curFile,sLine)
  3158.       sub(n98,n99,n98)
  3159.       div(n98,n98,2)
  3160.       do (n99,2,n98) insertChar(curFile," ") 
  3161.     }
  3162. >
  3163. ROW-COL displayed
  3164. <ctl-2:
  3165.   flipFlag(curFile,rowCol) 
  3166. >
  3167.  
  3168. GOTO PAGE #
  3169. <alt-3:
  3170.   putMsg("Input Page # to Goto")
  3171.   if (inputNum(n99)) gotoPage(curFile,n99) 
  3172. >
  3173. REFORMAT paragraph
  3174. <ctl-3:
  3175.   putMsg("REFORMATING Paragraph Delimited by Indent Change")
  3176.   if (reformat) moveCursor(curFile,downLine)
  3177.   putMsg(" ") 
  3178. >
  3179. REFORMAT HiLite region
  3180. <altCtl-3:
  3181.   putMsg("Reformatting HiLite Region")
  3182.   moveCursor(curFile,sHiLite)
  3183.   while (gtLoc(curFile,eHilite,atCursor))
  3184.     { if (reformat) moveCursor(curFile,downLine)
  3185.       else returnFalse
  3186.       if (is(curFile,eFile)) return
  3187.     }
  3188. >
  3189.  
  3190. MATCH indent of prev line
  3191. <alt-4:
  3192.   moveCursor(curFile,upLine)
  3193.   equateNum(n99,0)
  3194.   if (not getFlag(curFile,autoIndent))
  3195.     { flipFlag(curFile,autoIndent) equateNum(n99,1) 
  3196.     }
  3197.   if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  3198.   clearChar(curFile)
  3199.   typeChar(eLine)
  3200.   if (eqNum(n99,1)) flipFlag(curFile,autoIndent) 
  3201. >
  3202. SPACE--delete trailing white-space in entire document
  3203. <ctl-4:
  3204.   putMsg("Deleting trailing white space for every line in this file")
  3205.   equateLoc(curFile,locA,atCursor)
  3206.   moveCursor(curFile,sFile)
  3207. label(1)
  3208.   if (is(curFile,eFile))
  3209.     { equateLoc(curFile,atCursor,locA)
  3210.       putMsg("All trailing white space is deleted")
  3211.       returnTrue 
  3212.     }
  3213.   moveCursor(curFile,eLine)
  3214.   moveCursor(curFile,sChar)
  3215. label(2)
  3216.   while (is(curFile,space))
  3217.     { clearChar(curFile) moveCursor(curFile,sChar) 
  3218.     }
  3219.   while (is(curFile,9))
  3220.     { clearChar(curFile) moveCursor(curFile,sChar) 
  3221.     }
  3222.   if (is(curFile,space)) goto label(2)
  3223.   moveCursor(curFile,eLine) 
  3224.   goto label(1) 
  3225. >
  3226.  
  3227. JUSTIFY right from cursor location
  3228. <alt-5:
  3229.   runKey(virtual-t)
  3230.     getLocal(curFile,n99,lineLength)
  3231.   sub(n92,n99,n92)
  3232.   if (gtNum(n92,0))
  3233.     { while (decNum(n92)) insertChar(curFile," ") 
  3234.     }
  3235.   else if (gtNum(0,n92))
  3236.          { while (incNum(n92)) if (is(curFile,space)) clearChar(curFile) 
  3237.          }
  3238. >
  3239. LEARN-SEQUENCE saved to disk
  3240. <ctl-5:
  3241.   putMsg("Save Learn to what #")
  3242.   if (inputNum(n99)) saveLearn(n99) 
  3243. >
  3244.  
  3245. EOL column position stored in n92
  3246. <alt-6:
  3247.   runKey(virtual-t) 
  3248. >
  3249. LEARN-SEQUENCE loaded from disk
  3250. <ctl-6:
  3251.   putMsg("Load what Learn #")
  3252.   if (inputNum(n99)) loadLearn(n99) 
  3253. >
  3254.  
  3255. LEARN-SEQUENCE Loaded from disk and Run
  3256. <ctl-7:
  3257.   putMsg("Input Learn # to Load & Run")
  3258.   if (inputNum(n99)) if (loadLearn(n99)) runLearn 
  3259. >
  3260.  
  3261. VARIABLE # Change
  3262. <alt-8:
  3263.   putMsg("Enter Uedit's n-variable # to Edit")
  3264.   inputNum(n99)
  3265.   freeBuf(buf99)
  3266.   insertRgn(buf99,eFile,"Enter new value (AMIGA-ESC=NoChange) n",all)
  3267.   toWord(buf99,n99)
  3268.   insertRgn(buf99,eFile," now = ",all)
  3269.   toWord(buf99,n[n99])
  3270.   putMsg(buf99) 
  3271.   if (inputNum(n98))
  3272.     equateNum(n[n99],n98) 
  3273. >
  3274. SEARCH exactly toggle
  3275. <ctl-8:
  3276.   flipFlag(curFile,searchCaps) 
  3277. >
  3278.  
  3279. ========================   COLUMN COMMANDS   ===========================
  3280.  
  3281. COLUMN mode toggle
  3282. <shftCtl-`:
  3283.   flipFlag(curFile,columnar) refreshDisplay
  3284. >
  3285.  
  3286. COLUMN-Hilited Cut
  3287. <shftCtl-1:
  3288.   if (thisKey) putMsg("HiLite Column Copied to buf82")
  3289.   locToIndex(curFile,n99,sHilite)
  3290.   runKey(virtual-u)                    .. Copy Hilite to buf82
  3291.   clearColData(curFile,hilite,0)
  3292.   indexToLoc(curFile,atCursor,n99) 
  3293. >
  3294.  
  3295. COLUMN-Hilited data Spaced-out
  3296. <shftCtl-2:
  3297.   clearColData(curFile,hilite,1) 
  3298. >
  3299.  
  3300. COLUMN-Hilited Copied
  3301. <shftCtl-3:
  3302.   if (thisKey) putMsg("HiLite Column Copied to buf82")
  3303.   runKey(virtual-u)                      .. Copy Hilite to buf82
  3304. >                    
  3305.  
  3306. COLUMN data (buf82) Inserted
  3307. <shftCtl-4:
  3308.   copyColData(curFile, atCursor, buf82, all, 1)
  3309. >
  3310.  
  3311. COLUMN data (buf82) Overlayed
  3312. <shftCtl-5:
  3313.   copyColData(curFile,atCursor,buf82,all,0)
  3314. >
  3315.  
  3316. COLUMN-Hilited data Inserted at cursor
  3317. <shftCtl-6:
  3318.   copyColData(curFile,atCursor,curFile,hilite,1)
  3319. >
  3320.  
  3321. COLUMN-Hilited data Overlayed at cursor
  3322. <shftCtl-7:
  3323.   copyColData(curFile,atCursor,curFile,hilite,0)
  3324. >
  3325.  
  3326.  
  3327. ====================== SPLIT WINDOW COMMANDS =================================
  3328.  
  3329. SPLIT WINDOW: Erase current
  3330. <lAmiga--:  splitWindow(curFile,0)>
  3331. SPLIT WINDOW to show current file
  3332. <lAmiga-0:  splitWindow(curFile,splitSize)>
  3333. SPLIT WINDOW to show Undo buffer
  3334. <lAmiga-1:  splitWindow(buf90,splitSize)>
  3335. SPLIT WINDOW to show search buffer
  3336. <lAmiga-2:  splitWindow(buf94,splitSize)>
  3337. SPLIT WINDOW to show replace buffer
  3338. <lAmiga-3:  splitWindow(buf93,splitSize)>
  3339. SPLIT WINDOW to show copied-hilite buffer
  3340. <lAmiga-4:  splitWindow(buf92,splitSize)>
  3341. SPLIT WINDOW to show copied-invert buffer
  3342. <lAmiga-5:  splitWindow(buf91,splitSize)>
  3343. SPLIT WINDOW to show copied-columnar buffer
  3344. <lAmiga-6:  splitWindow(buf82,splitSize)>
  3345. SPLIT WINDOW to show current directory name
  3346. <lAmiga-7:  splitWindow(buf83,splitSize)>
  3347. SPLIT WINDOW size Set
  3348. <lAmiga-8: 
  3349.   putMsg("Enter # lines in split window (2 or more)")
  3350.   if (inputNum(n99)) if (geNum(n99,2)) equateNum(splitSize,n99)
  3351.   putMsg(" ") 
  3352. >
  3353. SPLIT WINDOW Switch to next
  3354. <lAmiga-9: toggle(windowSplit)>
  3355.  
  3356. =========================  ARITHMETIC COMMANDS  ===========================
  3357. NUMERIC--INITIALIZE total to zer0
  3358. <ctl-0:
  3359.   putMsg("Numeric Total initialized to 0")
  3360.   equateNum(n94,0) 
  3361. >
  3362.  
  3363. NUMERIC--type running total into text at cursor
  3364. <ctl-=:
  3365.   freeBuf(buf99)
  3366.   div(n97,n94,100)
  3367.   if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
  3368.   toWord(buf99,n97)
  3369.   insertChar(buf99,".")
  3370.   if (gtNum(0,n94)) mul(n97,n94,-1)
  3371.   else equateNum(n97,n94)
  3372.   mod(n97,n97,100)
  3373.   if (gtNum(10,n97)) insertChar(buf99,"0")
  3374.   toWord(buf99,n97)
  3375.   insertRgn(curFile,atCursor,buf99,all)
  3376.   insertRgn(buf99,sFile,"Inserted Total into text ",all)
  3377.   putMsg(buf99) 
  3378. >
  3379.  
  3380. NUMERIC--add next word to running total & display total
  3381. <shftCtl-=:
  3382.   if (not runKey(virtual-5)) returnFalse
  3383.   add(n94,n94,n99)
  3384.   freeBuf(buf99)
  3385.   div(n97,n94,100)
  3386.   if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
  3387.   toWord(buf99,n97)
  3388.   insertChar(buf99,".")
  3389.   mod(n97,n94,100)
  3390.   if (gtNum(0,n94)) mul(n97,-1,n97)
  3391.   if (gtNum(10,n97)) insertChar(buf99,"0")
  3392.   toWord(buf99,n97)
  3393.   insertRgn(buf99,sFile,"Running total is ",all)
  3394.   putMsg(buf99) 
  3395. >
  3396.  
  3397. Subtract the next word (if a number) from arithmetic total & display total
  3398. <ctl--:
  3399.   if (not runKey(virtual-5)) returnFalse
  3400.   sub(n94,n94,n99)
  3401.   freeBuf(buf99)
  3402.   div(n97,n94,100)
  3403.   if (gtNum(0,n94)) if (eqNum(n97,0)) insertChar(buf99,"-")
  3404.   if (gtNum(0,n94)) insertChar(buf99,"-")
  3405.   toWord(buf99,n97)
  3406.   insertChar(buf99,".")
  3407.   mod(n97,n94,100)
  3408.   if (gtNum(0,n97)) mul(n97,n97,-1)
  3409.   if (gtNum(10,n97)) insertChar(buf99,"0")
  3410.   toWord(buf99,n97)
  3411.   insertRgn(buf99,sFile,"Running total is ",all)
  3412.   putMsg(buf99) 
  3413. >
  3414.  
  3415. =========================  SPELLING   COMMANDS  ===========================
  3416. Start spell-checking mode by loading in the dictionary table.
  3417. <rAmiga-1:  if (spellerUp) goto label(0)
  3418.             if (not startSpell("Udtable","Udict",1)) {
  3419.                 putMsg("No memory or dictionary not found")
  3420.                 returnFalse
  3421.             }
  3422.             label(0)
  3423.             putMsg("Speller is up") >
  3424.  
  3425. Find first misspelled word, starting at cursor.  Abort with Amiga-ESC.
  3426. <rAmiga-2:      if (not spellerUp) {
  3427.                     putMsg("Speller not up")
  3428.                     returnFalse
  3429.                 }
  3430.                 putMsg(" ")
  3431.                 while (not spell(buf54,curFile)) runKey(104) >
  3432.  
  3433. Click word in msg line (buf54), select word to replace word before cursor.
  3434. <104:
  3435.     if (isEmpty(buf54)) return
  3436.     insertRgn(buf54,efile," ***",all)
  3437.     putMsg(buf54)
  3438.     vscroll(atCursor)
  3439.     updateDisplay
  3440.     getKeyVal(n3,n4)
  3441.     if (eqNum(n3,normal-esc)) abort
  3442.     mousexy(n1,n2)
  3443.     while (inputKey(n54)) nothing
  3444.     if (mouseDown) while (not inputWaiting) {
  3445.         if (not mouseDown) goto label(0)
  3446.         inputKey(n54)
  3447.     }
  3448.     label(0)
  3449.     if (geNum(n3,normal-gadget1) & geNum(normal-gadget4,n3) 
  3450.                                  & gtNum(n2,10) & gtNum(20,n2)) {
  3451.         div(n1,n1,8)
  3452.         incNum(n1)
  3453.         moveCursor(buf54,sfile)
  3454.         moveCursor(buf54,eword)
  3455.         locToIndex(buf54,n54,atcursor)
  3456.         if (gtNum(n1,n54)) {
  3457.             indexToLoc(buf54,atCursor,n1)
  3458.             if (is(buf54,alpha)) {
  3459.                 movecursor(buf54,eword)
  3460.                 movecursor(buf54,sword)
  3461.                 movecursor(curfile,sword)
  3462.                 if (is(curfile,upperCase)) toUpper(buf54)
  3463.                 clearRgn(curfile,word)
  3464.                 insertrgn(curfile,atcursor,buf54,word)
  3465.             }
  3466.         }
  3467.     }
  3468.     putMsg(" ")
  3469.     freeBuf(buf54)
  3470.     while (inputKey(n54)) nothing
  3471.     if (mouseDown) while (not inputWaiting) {
  3472.         if (not mouseDown) return
  3473.         inputKey(n54)
  3474.     }
  3475. >
  3476.  
  3477. Spell-check from cursor fwd.  Mark bad words with "@".
  3478. <rAmiga-3:      if (not runKey(rAmiga-1)) returnFalse
  3479.                 putMsg("Spell checking ... abort with Amiga-ESC")
  3480.                 while (not spell(" ",curFile)) insertChar(curFile,"@")
  3481.                 putMsg(" ") >
  3482.  
  3483. Load supplemental dictionary & spell from cursor fwd.  Add to supplement.
  3484. <rAmiga-4:   if (not runKey(rAmiga-1)) returnFalse
  3485.              equateNum(n54,curFile)
  3486.              putMsg("Dict supplement to use (ESC = UdSupplement)")
  3487.              freebuf(buf54)
  3488.              equateNum(n99,0)
  3489.              if (inputString(buf54))  {
  3490.                 if (not loadFile(buf54)) goto label(3)
  3491.              } else {
  3492. label(3)
  3493.                 if (not loadFile("UdSupplement")) {
  3494.                     if (not newFile) {
  3495.                         putMsg("Close a file for me!")
  3496.                         returnFalse
  3497.                     }
  3498.                     setFileName(curfile,"UdSupplement")
  3499.                 }
  3500.              }
  3501.              putMsg("Spell checking ... abort with Amiga-Esc")
  3502.              if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
  3503. label(0)
  3504.              while (not spell(" ",buf[n54])) {
  3505.                 moveCursor(buf[n54],sWord)
  3506.                 freeBuf(buf54)
  3507.                 insertRgn(buf54,eFile,buf[n54],word)
  3508.                 moveCursor(buf[n54],eWord)
  3509.                 moveCursor(buf54,sFile)
  3510.                 if (not is(buf54,"'")) if (not is(buf54,alpha)) goto label(0)
  3511.                 moveCursor(buf54,eFile)
  3512.                 
  3513.                 putMsg(buf54)                 .. remove for faster speed
  3514.                 
  3515.                 insertChar(buf54,eLine)
  3516.                 moveCursor(curFile,eFile)
  3517.  
  3518. label(4)        .. could remove this block but it helps hugely in speed.
  3519.                 setSearch(buf54)
  3520.                 if (search(curFile,locA,locB,-1)) {
  3521.                     if (is(curFile,sWord)) goto label(0)
  3522.                     moveCursor(curFile,sWord)
  3523.                     goto label(4)
  3524.                 }
  3525.                 moveCursor(buf54,sChar)
  3526.                 clearChar(buf54) .. remove eline
  3527.                 
  3528.                 ..  this sect for speed
  3529.                 moveCursor(buf54,sFile)
  3530.                 copyChar(buf54,n47)      .. copy 1st char of word
  3531.                 freeBuf(buf52)
  3532.                 insertChar(buf52,eLine)  .. load in eline-1stchar
  3533.                 insertChar(buf52,n47)
  3534.                 moveCursor(curFile,eFile).. search for starting place
  3535.                 setSearch(buf52)
  3536.                 search(curfile,locA,locB,-1)
  3537.                 moveCursor(curFile,eWord).. move fwd, so sWord works
  3538.                 
  3539.                 if (is(curFile,sFile)) goto label(1)
  3540.                 while (nothing) {
  3541.                     moveCursor(curFile,sWord)
  3542.                     freeBuf(buf53)
  3543.                     insertRgn(buf53,eFile,curFile,word)
  3544.                     stringComp(n53,buf54,buf53,1)       .. ignore case
  3545.                     if (eqNum(n53,0)) goto label(0)     .. found it, continue
  3546.                     if (gtNum(n53,0)) {
  3547. label(1)
  3548.                         moveCursor(curFile,eWord)
  3549.                         moveCursor(curFile,eChar)
  3550. label(2)
  3551.                         insertRgn(curFile,atCursor,buf54,all)
  3552.                         insertChar(curFile,eLine)
  3553.                         updateDisplay                 .. remove for faster speed
  3554.                         incNum(n99)
  3555.                         if (gtNum(n99,19)) {
  3556.                             fileSize(curFile,n99)  .. force buffer packing
  3557.                             equateNum(n99,0)
  3558.                         }
  3559.                         goto label(0)
  3560.                     }
  3561.                     if (is(curFile,sFile)) goto label(2)
  3562.                 }
  3563.             }
  3564.             moveCursor(curFile,sFile)
  3565.             putMsg("These words weren't in dictionary")
  3566.             .. stopSpell       .. use if want speller removed
  3567.             >
  3568.  
  3569. Merge dict supplement with dict-files.  dict.A-Z must be in Current Directory.
  3570. <rAmiga-5:  if (isEmpty(curFile)) returnFalse
  3571.             moveCursor(curFile,sFile)
  3572.             freeBuf(buf52)
  3573.             freeBuf(buf54)
  3574.             insertRgn(buf54,eFile,"dict. ",all)
  3575.             if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
  3576.             equateNum(n50,0)
  3577.             while (nothing) {
  3578.                 moveCursor(curFile,eWord)
  3579.                 moveCursor(curFile,sWord)
  3580.                 freeBuf(buf53)
  3581.                 if (not insertRgn(buf53,eFile,curFile,word)) {
  3582. label(6)
  3583.                         if (getFlag(buf52,changed)) saveFile(buf52)
  3584.                         goto label(0)
  3585.                 }
  3586.                 moveCursor(buf53,sFile)
  3587.                 toUpper(buf53)
  3588.                 copyChar(buf53,n54)   .. copy 1st letter of word A-Z
  3589.                 toLower(buf53)
  3590.                 if (eqNum(n54,39)) equateNum(n54,65)  .. apost becomes 'A'
  3591.                 else {
  3592.                     if (gtNum(n54,90)) goto label(1)  .. must be A-Z
  3593.                     if (gtNum(65,n54)) goto label(1)
  3594.                 }
  3595.                 moveCursor(buf54,eFile)
  3596.                 moveCursor(buf54,sChar)
  3597.                 swapChar(buf54,n54) .. make it "dict.A" etc.
  3598.                 
  3599.                 if (not eqNum(n54,n50)) {
  3600.                     if (not eqNum(n50,0)) 
  3601.                         if (getFlag(buf52,changed)) saveFile(buf52)
  3602.                     clearRgn(buf52,all)
  3603.                     fileSize(buf52,n49) .. make it pack buffer
  3604.                     if (not insertFile(buf52,eFile,buf54)) {
  3605.                     putMsg("Can't find dict.A-Z!")
  3606.                         returnFalse
  3607.                     }
  3608.                     setFileName(buf52,buf54)
  3609.                     if (getFlag(buf52,changed)) flipFlag(buf52,changed)
  3610.                     equateNum(n50,n54)  .. save dict-letter
  3611.                 }
  3612.                 .. put word in dict.
  3613.                 moveCursor(buf53,eFile)
  3614.                 putMsg(buf53)
  3615.                 insertChar(buf53,eLine)
  3616.                 moveCursor(buf52,eFile)
  3617. label(2)
  3618.                 setSearch(buf53)
  3619.                 if (search(buf52,locA,locB,-1)) {
  3620.                     if (is(buf52,sWord)) goto label(1)
  3621.                     goto label(2) .. continue searching
  3622.                 }
  3623.                 .. didn't find it.  Do the slow scan & insert the word.
  3624.                 moveCursor(buf53,eFile)
  3625.                 moveCursor(buf53,sChar)
  3626.                 clearChar(buf53) .. remove eLine
  3627.                 moveCursor(buf52,eFile)
  3628.                 equateNum(n49,1)
  3629. label(4)
  3630.                 while (nothing) {
  3631.                     if (eqNum(n49,1)) do(n48,1,40) moveCursor(buf52,sWord)
  3632.                     moveCursor(buf52,sWord)
  3633.                     freeBuf(buf51)
  3634.                     insertRgn(buf51,eFile,buf52,word)
  3635.                     stringComp(n53,buf53,buf51,1)       .. ignore case
  3636.                     if (eqNum(n53,0)) goto label(1)     .. found it, continue
  3637.                     if (gtNum(n53,0)) {
  3638.                         if (eqNum(n49,1)) goto label(5)
  3639.                         moveCursor(buf52,eWord)
  3640.                         moveCursor(buf52,eChar)
  3641. label(3)
  3642.                         insertRgn(buf52,atCursor,buf53,all)
  3643.                         insertChar(buf52,eLine)
  3644.                         goto label(1)
  3645.                     }
  3646.                     if (is(buf52,sFile)) {
  3647.                         if (eqNum(n49,1)) {
  3648. label(5)
  3649.                             equateNum(n49,0)
  3650.                             do (n48,1,41) moveCursor(buf52,eWord)
  3651.                             goto label(4)
  3652.                         }
  3653.                         goto label(3)
  3654.                     }
  3655.                 }
  3656.  
  3657. label(1) .. next word
  3658.                 moveCursor(curFile,eLine)
  3659.                 moveCursor(curFile,eChar)
  3660.                 updateDisplay
  3661.                 if (is(curFile,eFile)) goto label(6)
  3662.             }
  3663. label(0)
  3664.             putMsg("Done.  Run Udbuild to rebuild working dict & table")
  3665.             freeBuf(buf52)
  3666. >
  3667.  
  3668. Remove words from dict-files.  dict.A-Z must be in Current Directory.
  3669. <rAmiga-6:  if (isEmpty(curFile)) returnFalse
  3670.             moveCursor(curFile,sFile)
  3671.             freeBuf(buf52)
  3672.             freeBuf(buf54)
  3673.             insertRgn(buf54,eFile,"dict. ",all)
  3674.             if (getFlag(curFile,searchCaps)) flipFlag(curFile,searchCaps)
  3675.             equateNum(n50,0)
  3676.             while (nothing) {
  3677.                 moveCursor(curFile,eWord)
  3678.                 moveCursor(curFile,sWord)
  3679.                 freeBuf(buf53)
  3680.                 if (not insertRgn(buf53,eFile,curFile,word)) {
  3681. label(6)
  3682.                         if (getFlag(buf52,changed)) saveFile(buf52)
  3683.                         goto label(0)
  3684.                 }
  3685.                 moveCursor(buf53,sFile)
  3686.                 toUpper(buf53)
  3687.                 copyChar(buf53,n54)   .. copy 1st letter of word A-Z
  3688.                 toLower(buf53)
  3689.              if (eqNum(n54,39)) equateNum(n54,65)  .. apost becomes 'A'
  3690.                 else {
  3691.                     if (gtNum(n54,90)) goto label(1)  .. must be A-Z
  3692.                     if (gtNum(65,n54)) goto label(1)
  3693.                 }
  3694.                 moveCursor(buf54,eFile)
  3695.                 moveCursor(buf54,sChar)
  3696.                 swapChar(buf54,n54) .. make it "dict.A" etc.
  3697.                 
  3698.                 if (not eqNum(n54,n50)) {
  3699.                     if (not eqNum(n50,0)) 
  3700.                         if (getFlag(buf52,changed)) saveFile(buf52)
  3701.                     clearRgn(buf52,all)
  3702.                     fileSize(buf52,n49) .. make it pack buffer
  3703.                     if (not insertFile(buf52,eFile,buf54)) {
  3704.                         putMsg("Can't find dict.A-Z!")
  3705.                         returnFalse
  3706.                     }
  3707.                     setFileName(buf52,buf54)
  3708.                     if (getFlag(buf52,changed)) flipFlag(buf52,changed)
  3709.                     equateNum(n50,n54)  .. save dict-letter
  3710.                 }
  3711.                 .. remove word from dict.
  3712.                 moveCursor(buf53,eFile)
  3713.                 putMsg(buf53)
  3714.                 insertChar(buf53,eLine)
  3715.                 moveCursor(buf52,eFile)
  3716. label(2)
  3717.                 setSearch(buf53)
  3718.                 if (search(buf52,locA,locB,-1)) {
  3719.                     if (is(buf52,sWord)) {
  3720.                         clearRgn(buf52,loc)
  3721.                         goto label(1) .. next word
  3722.                     }
  3723.                     goto label(2) .. continue searching
  3724.                 }
  3725.  
  3726. label(1) .. next word
  3727.                 moveCursor(curFile,eLine)
  3728.                 moveCursor(curFile,eChar)
  3729.                 if (is(curFile,eFile)) goto label(6)
  3730.                 updateDisplay
  3731.             }
  3732. label(0)
  3733.             putMsg("Done.  Run Udbuild to rebuild working dict & table")
  3734.             freeBuf(buf52)
  3735. >
  3736.  
  3737. Stop spell-checking mode.  (Frees up about 12k of memory.)
  3738. <rAmiga-8:   if (spellerUp) { stopSpell putMsg("Speller removed") } >
  3739.  
  3740. <normal-f6:
  3741. equateNum(pmesc,10) >