home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-11-20 | 77.2 KB | 2,257 lines |
- -----------------------------------------------------------------------------
- | Config! V2.3 |
- | Copyright (C) 1986-87 Rick Stiles. All rights reserved. |
- ----------------------------------------------------------------------------
-
- Config! defines Uedit's start-up settings and commands. Config! must be in
- S: or in your current directory.
-
- If you edit Config! and want to make a new Data! file, type "Run UE -c" in
- CLI. (Or you can rename S:Data! or delete it, and Uedit will be forced to
- compile Config! next time.)
-
- If you create a new config such as "NewConfig", you can make Uedit compile it
- by typing "UE -cNewConfig" in CLI. On the "Save new Data?" question,
- selecting Yes will replace S:Data!. Selecting No will preserve the old
- S:Data!. Once inside Uedit, you can select "Save data" and save it under a
- new name like "NewData".
-
- To make Uedit use NewData next time, type "UE -dNewData" in CLI. To make it
- your standard data file, rename it to S:Data!.
-
-
- =============================================================================
- Edit the contents of each set of angle brackets, but leave the angle-brackets
- as they are:
-
- (To recompile these defaults anytime, select "Cfg defalts" in the menu.)
-
- (Unless told otherwise, use 0 for "no" or 1 for "yes".)
-
- <1> make Key-Help file during this compile. (For "TEACH KEYS" in menu.)
- (NOTE: Unless you need the Key-Help facility, you should change this
- flag to 0. The compile will go much faster.)
- <Key-Help> name of Key-Help file (1-19 characters.)
-
- <1> show cursor during compile of this configuration (slower, if show)
-
- <0> user global flag A
- <0> user global flag B
- <0> columnar display mode
- <0> cram display mode
- <1> show row-column
-
- <1> mark gadgets
- <0> interlace screen
- <1> show invisibles
- <0> show busies
- <0> key-help mode
-
- <20> maximum files to edit: 1-100
- <0> make icons
- <0> search case-sensitive
- <?> search wildcard (printable character)
- <$> search either-or delimiter (printable character)
-
- <0> RESERVED (l)
- <0> RESERVED (m)
- <0> speak alerts
- <0> speak messages
- <200> speech speed: 40-400
-
-
- <120> speech pitch: 65-320
- <n> speak mode: n=natural,f=female,m=male,r=robotic
- <0> use printable cmd-keys for typing input
- <0> printer: 0=par: 1=ser: 2=prt: 3=prt: (raw)
- <10> idle-time (in seconds) after which idle command is executed: 1-9999
-
- <1> use tabs - put in tabs, not spaces, when tab key pressed.
- <1> autoindent mode
- <0> overstrike mode
- <0> autobackup mode
- <0> RESERVED (r)
-
- <1> wordwrap mode
- <0> right-justification mode
- <0> map illegal ASCII chars 0-4 to alternate values (see mappings below)
- <0> RESERVED (c)
- <0> RESERVED (f)
-
- <0> user local flag A
- <0> user local flag B
- <4> tab table to use: 0-4 (See tables below.)
- <77> line-length: 1-200
- <2> split window size in lines (2-100, up to max lines in window)
-
- <0> RESERVED (f)
- <5> top margin 0-200
- <5> bottom margin 0-200
- <66> lines/page: 1-200
- <10> end-of-line character: 10=Newline, 13=Carriage Return
-
- These are the 5 TAB tables. There can be at most 32 column-entries in tab
- table. The highest column is 255. The lowest tab column is 2. In Uedit, to
- change tab tables, select "Tab table"; to see the settings, select "See
- ruler"; to adjust the tabs, select "Set ruler".
-
- <5> Tab table 0. (32 entries max. Column 2-255.)
- <6 20> Tab table 1. (32 entries max. Column 2-255.)
- <5 10 20 45> Tab table 2. (32 entries max. Column 2-255.)
- <> Tab table 3. (32 entries max. Column 2-255.)
- <5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73
- > Tab table 4. (32 entries max. Column 2-255.)
-
- Uedit uses ASCII characters 0-4 internally for marking cleared text and for
- flags. Thus, files cannot legally contain these characters. If the above
- "map illegals" flag is not set, these odd characters are erased by Uedit upon
- loading the file. If "Map illegals" is set (see default above ), ASCII 0-4
- are remapped into "safe" character values using the settings below. Upon
- saving the file to disk the characters are converted back into their old
- ASCII 0-4 values: (You could also map the 4 non-null ctrl characters to
- ASCII 28-31. This would make tests for control characters work properly.)
-
- <128> map ASCII 0
- <129> map ASCII 1
- <130> map ASCII 2
- <131> map ASCII 3
- <132> map ASCII 4
-
- Printable key table: DON'T TOUCH, unless you know what you are doing! This
- is a translation table which converts raw keystrokes into printable
- characters. (See Rom Kernal Manual, Volume 1, page 3-81.) There must be 64
- in each row. Use OVERSTRIKE mode when modifying this, to save trouble.
- Unused --> U U EUROPE--> EE U U
- <`1234567890-=\ 0qwertyuiop[] 123asdfghjkl;' 456 zxcvbnm,./ .789>
- <~!@#$%^&*()_+| 0QWERTYUIOP{} 123ASDFGHJKL:" 456 ZXCVBNM<>? .789>
-
- Colors:
-
- <3><2><0><1> Workbench window colors (Preferences colors) (0-3)
-
- Interlace RGB colors (0-15):
- Red Green Blue
- <9> <5> <0> Register 0
- <10> <10> <10> Register 1
- <0> <0> <0> Register 2
- <15> <10> <0> Register 3
-
- Gadget Names (19 chars max):
-
- <Next File> Name for gadget 1
- <Prev File> Name for gadget 2
- <Scroll down> Name for gadget 3
- <Scroll up> Name for gadget 4
-
- ===========================================================================
-
- Everything from here onward is menu selections or commands.
-
- Be sure and keep a backup copy of the original Config!, if you change this
- file!
-
- (( NOTE:
- The left hand entries below are Menu Titles. Their key argument is not
- used. Menu Titles should be as brief as possible. Menu selection names
- can have up to 17 characters. Entries with a SUB-menu entries below them
- are titles for the submenu items. Titles never do anything and their key-
- arguments are meaningless and ignored.
- ))
-
- <startup:
-
- menu("Files",1,normal-f1)
- menu("Next file f1",1,normal-f1)
- menu("Prev file S-f1",1,shft-f1)
- menu("Open A-f1",1,alt-f1)
- menu("New file C-f1",1,ctl-f1)
- menu("Insert file SA-f1",1,shftAlt-f1)
- menu("Restore SC-f1",1,shftCtl-f1)
- menu("Rename A-n",1,alt-n)
- menu("AmigaDOS C-y",1,ctl-y)
- menu("DOS + result C-z",1,ctl-z)
- menu("Directory A-z",1,alt-z)
- menu("CD (Chg dir) AC-z",1,altCtl-z)
- menu("Save f2",1,normal-f2)
- menu("Save as... S-f2",1,shft-f2)
- menu("Save changes A-f2",1,alt-f2)
- menu("Close f3",1,normal-f3)
- menu("Auto-close S-f3",1,shft-f3)
- menu("Quit f4",1,normal-f4)
- menu("Auto-Quit S-f4",1,shft-f4)
- menu("About... ",1,shftAltCtl-a)
-
- menu("Buffers",2,normal-f1)
- menu("Search & Replace ",2,normal-f1)
- SUBmenu("Search fwd f9",2,normal-f9)
- SUBmenu("Replace fwd f10",2,normal-f10)
- SUBmenu("Rpl all fwd A-f10",2,alt-f10)
- SUBmenu("Search bkwd S-f9",2,shft-f9)
- SUBmenu("Rpl bkwd S-f10",2,shft-f10)
- SUBmenu("Set search f7",2,normal-f7)
- SUBmenu("Set replace f8",2,normal-f8)
- checkedSUBmenu("Search caps C-8",2,ctl-8,searchCaps)
- SUBmenu("Set wildcard A-f7",2,alt-f7)
- SUBmenu("Set eitherOr C-f7",2,ctl-f7)
- menu("Buffers ",2,alt-f3)
- SUBmenu("Swap buf #0 A-w",2,alt-w) .. %% NEW & useful, one hopes
- SUBmenu("Swap buf #43 C-w",2,ctl-w) .. %% Changed title only
- SUBmenu("See buffers SC-f6",2,shftCtl-f6)
- SUBmenu("Edit buffer SA-f6",2,shftAlt-f6)
- SUBmenu("Free buffers A-f3",2,alt-f3)
- menu("Speak hilite A-s",2,alt-s)
-
- menu("Commands",3,normal-f1)
- menu("Configurations ",3,normal-f6)
- SUBmenu("UStar ",3,virtual-u)
- SUBmenu("Directory Utility",3,virtual-d)
- SUBmenu("Regular UE data ",3,virtual-e)
- SUBmenu("Save data A-f6",3,alt-f6)
- SUBmenu("Load data C-f6",3,ctl-f6)
- menu("Compile ",3,normal-f6)
- SUBmenu("Compile f6",3,normal-f6)
- SUBmenu("Cfg defalts AC-f6",3,altCtl-f6) .. %% new. Compiles dfalts
- SUBmenu("Make command S-f6",3,shft-f6)
- menu("Keys ",3,normal-f6)
- SUBmenu("Swap keys f5",3,normal-f5)
- SUBmenu("Swap mouseUp A-m",3,alt-m)
- SUBmenu("Kill key SAC-f6",3,shftAltCtl-f6)
- SUBmenu("Find key lAmi-f6",3,lAmiga-f6) .. %% new
- menu("Learn ",3,normal-f6)
- checkedSUBmenu("Start learn C-s",3,ctl-s,learnMode)
- SUBmenu("End/Run learn C-r",3,ctl-r)
- SUBmenu("Command mult C-m",3,ctl-m)
- SUBmenu("Save learn C-5",3,ctl-5)
- SUBmenu("Load learn C-6",3,ctl-6)
- SUBmenu("Run learn # C-7",3,ctl-7)
-
- menu("Edits",4,normal-f1)
- menu("Cut&Paste Hilite ",4,normal-f1)
- SUBmenu("Copy kp.",4,normal-kpDot)
- SUBmenu("Cut kp-",4,normal-kpMinus)
- SUBmenu("Paste kpEnter",4,normal-kpEnter)
- SUBmenu("Clear C-h",4,ctl-h)
- menu("Cut&Paste Invert ",4,normal-f1)
- SUBmenu("I-Copy C-kp.",4,ctl-kpDot)
- SUBmenu("I-Cut C-kp-",4,ctl-kpMinus)
- SUBmenu("I-Paste C-kpEnter",4,ctl-kpEnter)
- SUBmenu("I-Clear C-i",4,ctl-i)
- checkedmenu("Col display SC-`",4,shftCtl-`,columnar)
- menu("Columnar ",4,normal-f1)
- SUBmenu("Col Cut SC-1",4,shftCtl-1)
- SUBmenu("Col Erase SC-2",4,shftCtl-2)
- SUBmenu("Col Copy SC-3",4,shftCtl-3)
- SUBmenu("Col Insert SC-4",4,shftCtl-4)
- SUBmenu("Col Overlay SC-5",4,shftCtl-5)
- SUBmenu("Ins Hil->Csr SC-6",4,shftCtl-6)
- SUBmenu("Ovl Hil->Csr SC-7",4,shftCtl-7)
- menu("Reformats C-3",4,ctl-3)
- SUBmenu("Paragraph C-3",4,ctl-3)
- SUBmenu("Del white-spc C-4",4,ctl-4)
- SUBmenu("Tabs->spaces L-t",4,lAmiga-t)
- SUBmenu("Spaces->tabs R-t",4,rAmiga-t)
- menu("Page formatting ",4,normal-f1)
- SUBmenu("Go to page # A-3",4,alt-3)
- SUBmenu("Top of page L-h",4,lAmiga-h)
- SUBmenu("Bottom page L-b",4,lAmiga-b)
- SUBmenu("Divide page L-v",4,lAmiga-v)
- SUBmenu("Auto page div L-r",4,lAmiga-r)
- SUBmenu("Del page div L-d",4,lAmiga-d)
- SUBmenu("Del page # L-y",4,lAmiga-y)
-
- menu("Modes",5,normal-f1)
- menu("TEACH KEYS ",5,normal-f1)
- checkedSUBmenu("Teach keys C-help",5,ctl-help,teachKeys) .. %% new
- SUBmenu("Teach one C-t",5,ctl-t) .. %% new
- menu("Local modes ",5,normal-f1)
- checkedSUBmenu("OverStrike S-f5",5,shft-f5,overStrike)
- checkedSUBmenu("WordWrap C-f5",5,ctl-f5,wordWrap)
- checkedSUBmenu("Right justify A-j",5,alt-j,rightJustify)
- checkedSUBmenu("AutoIndent A-f5",5,alt-f5,autoIndent)
- checkedSUBmenu("Read-only SA-f5",5,shftAlt-f5,readOnly)
- checkedSUBmenu("Changed flag L-f5",5,lAmiga-f5,changed) .. %% new
- checkedSUBmenu("Use tabs AC-tab",5,altCtl-tab,trueTabs) .. %% new
- checkedSUBmenu("AutoBackup SAC-f5",5,shftAltCtl-f5,autoBackup)
- checkedSUBmenu("Map illegals SA-m",5,shftAlt-m,mapChars) .. %% new
- checkedSUBmenu("Save on idle C-f2",5,ctl-f2,userLocalA) .. %% new
- menu("Global modes ",5,normal-f1)
- checkedSUBmenu("Interlace S-esc",5,shft-esc,lace)
- checkedSUBmenu("Row/Column C-2",5,ctl-2,rowCol)
- checkedSUBmenu("Mark gadgets C-g",5,ctl-g,markGadgets)
- checkedSUBmenu("Invisibles C-v",5,ctl-v,spooks)
- checkedSUBmenu("Busies C-b",5,ctl-b,busies)
- checkedSUBmenu("Use keys A-u",5,alt-u,useKeys)
- checkedSUBmenu("Make icons AC-i",5,altCtl-i,icons)
- menu("Printing ",5,normal-f1)
- SUBmenu("Print select A-p",5,alt-p) .. %% new
- SUBmenu("Print hilite C-p",5,ctl-p)
- SUBmenu("Print file AC-p",5,altCtl-p)
- SUBmenu("Restart print L-s",5,lAmiga-s)
- SUBmenu("Abort print L-a",5,lAmiga-a)
- SUBmenu("Stop all prts R-a",5,rAmiga-a)
- SUBmenu("Code help ",5,virtual-p)
- SUBmenu("Bracket word L-p",5,lAmiga-p)
- SUBmenu("Find code R-g",5,rAmiga-g)
- SUBmenu("Embed code L-g",5,lAmiga-g)
- SUBmenu("Type formfeed L-f",5,lAmiga-f)
-
- menu("Numbers",6,normal-f1)
- menu("Show vals S-help",6,shft-help)
- menu("Tab ruler ",6,normal-f1)
- SUBmenu("See ruler SA-tab",6,shftAlt-tab) .. %% new
- SUBmenu("Set ruler SC-tab",6,shftCtl-tab) .. %% new
- SUBmenu("Tab table SAC-tab",6,shftAltCtl-tab) .. %% was Tab space
- menu("Line/Page ",6,normal-f1)
- SUBmenu("Line length C-rtn",6,ctl-return)
- SUBmenu("Lines/page A-g",6,alt-g)
- SUBmenu("Top margin L-u",6,lAmiga-u) .. %% new
- SUBmenu("Bottom margin L-l",6,lAmiga-l) .. %% new
- SUBmenu("End of line C-e",6,ctl-e)
- menu("Max files AC-f1",6,altCtl-f1) .. %% new
- menu("Idle timer SAC-i",6,shftAltCtl-i) .. %% new
- menu("Name gadget C-esc",6,ctl-esc)
- menu("File size C-1",6,ctl-1)
-
- menu("Colors",7,normal-f1)
- menu("Colors A-help",7,alt-help)
- menu("Lace color A-esc",7,alt-esc)
- menu("Split window ",7,normal-f1) .. %% SEE NAMEBUF BELOW
- SUBmenu("Next split L-9",7,lAmiga-9)
- SUBmenu("Elim curr L-0",7,lAmiga-0)
- SUBmenu("Set size L-8",7,lAmiga-8)
- SUBmenu("Curr buf L-c",7,lAmiga-c)
- SUBmenu("Undo buf L-1",7,lAmiga-1)
- SUBmenu("Search buf L-2",7,lAmiga-2)
- SUBmenu("Replac buf L-3",7,lAmiga-3)
- SUBmenu("Hilite buf L-4",7,lAmiga-4)
- SUBmenu("Invert buf L-5",7,lAmiga-5)
- SUBmenu("Columnar L-6",7,lAmiga-6)
- SUBmenu("Dir name L-7",7,lAmiga-7)
-
- menu("Refresh SC-help",7,shftCtl-help) .. %% was on CTL-HELP key!
- menu("Unhilite A-h",7,alt-h)
- menu("Uninvert A-i",7,alt-i)
-
- nameBuffer(37,"Copied Columnar") .. %% names for buffers
- nameBuffer(38,"Directory Name")
- nameBuffer(45,"Scratch Deletes")
- nameBuffer(46,"Copied Invert")
- nameBuffer(47,"Copied Hilite")
- nameBuffer(48,"Replace String")
- nameBuffer(49,"Search String")
-
- runKey(shftAltCtl-z) >
-
- alertUser("Uedit is shareware. See Uedit-Policy.") >
-
- NOTE: shftAltCtl-z is executed automatically at startup. Normally no
- command exists for it. During an edit session you can create and save one,
- however, and it will be executed each time you start Uedit.
-
- Press HELP if you want to see how to set up shftAltCtl-z to auto-load your
- files.
-
-
- ---------------------------------------------------------------------------
- Here is a description of how buffers are used in this file. If you make
- changes which involve buffers, you should follow the convention in this list:
- (You can change this convention entirely, of course.)
-
- buf55-99 = available for user commands
- buf50-54 = used for temporary purposes in commands
- buf49 = search string
- buf48 = replace string
- buf47 = copied hilite
- buf46 = copied invert
- buf45 = holds scratch deletes for Undo, keypad-0
- buf44 = make-command buffer
- buf43 = document names
- buf42 = holds Help, if loaded
- buf41 = used in buffer swapping command, ctl-w
- buf40 = used for AmigaDOS commands
- buf39 = used for result of AmigaDOS commands (if result selected)
- buf38 = most recent directory name, if "Directory" has been selected
- buf37 = copied columnar data
-
- ---------------------------------------------------------------------------
- Load and show help file - press again to release help
- <normal-help: if (not isEmpty(buf42)) {
- getBufNum(n54)
- if (eqNum(n54,42)) freeBuf(buf42)
- else editBuf(buf42)
- } else {
- if (insertFile(buf42,sFile,"S:Help!")) {
- editBuf(buf42)
- flipFlag(buf42,readOnly)
- } else putMsg("Couldn't find S:Help! file.")
- } >
-
-
- %% NEW: ShowFlags CL fct has been ELIMINATED.
-
- Show current values of line-length, lines/page, tab-table #, colors, etc
- <shft-help: freeBuf(buf54)
- insertRgn(buf54,atCursor,
- "Serial number :
- Buffer :
- Changed :
- Size :
- Max files :
- Split size :
- Idle timer :
- Colors :
- Cmd Mult :
- End-of-line :
- Line length :
- Lines/page :
- Top margin :
- Bottom margin :
- Tab table :
- Printer select :
- Speak mode :
- Speak speed :
- Speak pitch :
- Search wildcard :
- Search eitherOr :
-
- ",all)
- moveCursor(buf54,sFile)
- moveCursor(buf54,eLine)
- getSerialNum(n54)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getBufNum(n4)
- toWord(buf54,n4)
-
- moveCursor(buf54,eline)
- if (getFlag(curFile,changed)) insertChar(buf54,"Y")
- else insertChar(buf54,"n")
-
- moveCursor(buf54,eline)
- fileSize(curFile,n54)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getMaxFiles(n54)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- toWord(buf54,splitSize)
-
- moveCursor(buf54,eline)
- toWord(buf54,idleTime)
-
- moveCursor(buf54,eline)
- getWBColors(n0,n1,n2,n3)
- toWord(buf54,n0)
- toWord(buf54,n1)
- toWord(buf54,n2)
- toWord(buf54,n3)
-
- moveCursor(buf54,eline)
- toWord(buf54,cmdMultiplier)
-
- moveCursor(buf54,eline)
- copyChar(buf54,n54)
- toWord(buf54,n54)
-
- moveCursor(buf54,eLine)
- getLocal(curFile,n54,lineLength)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getLocal(curFile,n54,pageLines)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getLocal(curFile,n54,topMargin)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getLocal(curFile,n54,bottomMargin)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- getLocal(curFile,n54,tabTable)
- toWord(buf54,n54)
-
- moveCursor(buf54,eline)
- toWord(buf54,prefPrint)
-
- moveCursor(buf54,eline)
- insertChar(buf54,speakMode)
-
- moveCursor(buf54,eline)
- toWord(buf54,speakSpeed)
-
- moveCursor(buf54,eline)
- toWord(buf54,speakPitch)
-
- moveCursor(buf54,eline)
- insertChar(buf54,wildCard)
-
- moveCursor(buf54,eline)
- insertChar(buf54,eitherOr)
- equateLoc(buf54,sPage,sFile)
- freeBuf(buf53)
- insertRgn(buf53,sFile,"Settings for Buffer ",all)
- toWord(buf53,n4)
- insertChar(buf54,eLine)
- setFileName(buf54,buf53)
- getBufNum(n53)
- moveCursor(buf54,eFile)
- editBuf(buf54)
- putMsg(" ")
- getKey(n54)
- editBuf(buf[n53])
- freeBuf(buf54)>
-
- Rotate 4 Workbench colors in Uedit
- <alt-help: toggle(color) >
-
- %% new
- Start this Key-Help mode - press Amiga-ESC to leave this Key-Help mode
- <ctl-help: flipFlag(curFile,teachKeys) >
-
- Refresh window (or screen in interlace), including title bar
- <shftCtl-help: refreshDisplay >
-
- %% This now looks up maxfiles
- Close file. If changed, ask "Save changes?" If no files, ask "Really quit?"
- <normal-closeBox:
- if (getFlag(curfile,changed)) {
- if (askYesNo("Save changes?"))
- if (not saveFile(curFile)) return
- }
- freeBuf(curFile)
- if (isEmpty(curFile)) {
- equateNum(n1,0)
- getMaxFiles(n2)
- decNum(n2)
- do (n0,0,n2) if (not isEmpty(buf[n0])) equatenum(n1,1)
- if (eqNum(n1,0))
- if (askYesNo("Really quit?")) quit(0)
- } >
-
- Switch to next document
- <normal-gadget1: toggle(curFile) >
- Switch to previous document
- <normal-gadget2: runKey(shft-f1) >
- Scroll display down
- <normal-gadget3: while (mouseDown) { vScroll(downLine) updateDisplay } >
- Scroll display up
- <normal-gadget4: while (mouseDown) { vScroll(upLine) updateDisplay } >
-
- Scroll up 1 line
- <normal-upArrow: vScroll(upLine) >
- Scroll down 1 line
- <normal-downArrow: vScroll(downLine) >
- Scroll right 1 char
- <normal-leftArrow: hScroll(eChar) >
- Scroll left 1 char
- <normal-rightArrow: hScroll(sChar) >
- Scroll up 11 lines
- <shft-upArrow: do (n54,1,11) vScroll(upLine) >
- Scroll down 11 lines
- <shft-downArrow: do (n54,1,11) vScroll(downLine) >
- Scroll right 10 chars
- <shft-leftArrow: do (n54,1,10) hScroll(eChar) >
- Scroll left 10 chars
- <shft-rightArrow: do (n54,1,10) hScroll(sChar) >
-
- Scroll to start of page
- <alt-upArrow: vScroll(sPage) >
- Scroll to bottom of page
- <alt-downArrow: vScroll(ePage) >
- Scroll right 20 chars
- <alt-leftArrow: do (n54,1,20) hScroll(eChar) >
- Scroll left 20 chars
- <alt-rightArrow: do (n54,1,20) hScroll(sChar) >
-
- Scroll to start of file
- <ctl-upArrow: vScroll(sFile) >
- Scroll to end of file
- <ctl-downArrow: vScroll(eFile) >
- Scroll to end of line
- <ctl-leftArrow: equateNum(n54,lineLength)
- do (n53,1,n54) hScroll(eChar) >
- Scroll to start of line
- <ctl-rightArrow: while (hScroll(sChar)) nothing >
-
- Place cursor or scroll if button held
- <normal-buttonDown:
- moveCursor(curFile,mouseLoc)
- updateDisplay
- mouseXY(n0,n1)
- if (getFlag(curFile,lace)) if (gtNum(30,n1)) return
- while (mouseDown) {
- trackMouse
- mouseXY(n2,n3)
- if (gtNum(n3,n1)) vScroll(downLine)
- if (gtNum(n1,n3)) vScroll(upLine)
- updateDisplay
- }
- >
- Set start of hilite region
- <shft-buttonDown: equateLoc(curFile,sHilite,mouseLoc) refreshDisplay >
- Set end of hilite region
- <alt-buttonDown: equateLoc(curFile,eHilite,mouseLoc) refreshDisplay >
-
- Load filename that is CTRL-clicked. ("Directory" selection sets directory.)
- <ctl-buttonDown:
- equateLoc(curFile,atCursor,mouseLoc)
- if (not is(curFile,whiteSpace)) {
- while (not is(curFile,whiteSpace))
- { moveCursor(curFile,sChar) if (is(curFile,sFile)) goto label(1) }
- label(1)
- while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
- equateLoc(curFile,sInvert,atCursor)
- while (not is(curFile,whiteSpace)) {
- moveCursor(curFile,eChar) if (is(curFile,eFile)) goto label(2) }
- label(2)
- equateLoc(curFile,eInvert,atCursor)
- refreshDisplay
- freeBuf(buf54)
- insertRgn(buf54,sFile,buf38,all)
- insertRgn(buf54,eFile,curFile,invert)
- loadFile(buf54)
- } >
- Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
- <shftAlt-buttonDown:
- equateLoc(curFile,atCursor,mouseLoc)
- moveCursor(curFile,eWord)
- equateLoc(curFile,eInvert,atCursor)
- moveCursor(curFile,sWord)
- equateLoc(curFile,sInvert,atCursor)
- refreshDisplay>
-
- Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
- <shftAlt-buttonUp:
- equateLoc(curFile,atCursor,mouseLoc)
- moveCursor(curFile,eWord)
- equateLoc(curFile,eInvert,atCursor)
- if (geLoc(curFile,sInvert,eInvert)) returnFalse
- moveCursor(curFile,sInvert)
- if (is(curFile,upperCase)) equateNum(n0,1)
- else equateNum(n0,0)
- toLower(curFile)
- copyChar(curFile,n54)
- if (eqNum(n0,1)) toUpper(curFile)
- if (isEmpty(buf41)) insertChar(buf41,eLine)
- moveCursor(buf41,sFile)
- equateLoc(buf41,sPage,atCursor)
- label(1)
- if (is(buf41,upperCase)) equateNum(n0,1)
- else equateNum(n0,0)
- toLower(buf41)
- copyChar(buf41,n53)
- if (eqNum(n0,1)) toUpper(buf41)
- if (gtNum(n54,n53)) {
- moveCursor(buf41,downLine)
- if (not is(buf41,eFile)) goto label(1)
- }
- insertRgn(buf41,atCursor,curFile,invert)
- insertChar(buf41,eLine)
- >
-
- Set start of invert region
- <shftCtl-buttonDown: equateLoc(curFile,sInvert,mouseLoc) refreshDisplay >
- Set end of invert region
- <altCtl-buttonDown: equateLoc(curFile,eInvert,mouseLoc) refreshDisplay >
- Drag mouse and create hilite region
- <shftAltCtl-buttonDown:
- equateLoc(curFile,locA,mouseLoc)
- while (trackMouse) nothing
- if (gtLoc(curFile,locA,mouseLoc))
- { equateLoc(curFile,sHilite,mouseLoc) equateLoc(curFile,eHilite,locA) }
- else
- { equateLoc(curFile,eHilite,mouseLoc) equateLoc(curFile,sHilite,locA) }
- refreshDisplay >
-
- Switch to next file
- <normal-f1: toggle(curFile) >
-
- Switch to previous file
- <shft-f1: getMaxFiles(n53)
- if (geNum(1,n53)) { editBuf(buf0) returnFalse }
- decNum(n53)
- getBufNum(n54)
- while (nothing) {
- if (gtNum(n54,n53)) equateNum(n54,n53)
- decNum(n54)
- if (gtNum(0,n54)) equateNum(n54,n53)
- if (getFileName(buf54,buf[n54])) {
- editBuf(buf[n54])
- returnTrue
- }
- } >
- Load a file
- <alt-f1: putMsg("Input new filename:")
- freeBuf(buf43)
- if (inputString(buf43)) loadFile(buf43) >
-
- Open new "Noname" file
- <ctl-f1: newFile >
- Insert file at cursor
- <shftAlt-f1: putMsg("Input filename to insert:")
- freeBuf(buf43)
- if (inputString(buf43)) insertFile(curFile,atCursor,buf43) >
- Restore current file to original
- <shftCtl-f1: if (not askYesNo("Restore file to original?"))
- returnFalse
- if (getFileName(buf43,curFile))
- { freeBuf(curFile) loadFile(buf43) } >
-
- %% new
- Set max number of files can load for normal editing (1-100, usually 20)
- <altCtl-f1: putMsg("Input max # documents allowed (1-100)")
- if (inputNum(n54)) setMaxFiles(n54)>
-
- Save file currently in window
- <normal-f2: saveFile(curFile) >
-
- Save file under different name
- <shft-f2: putMsg("Save file as:")
- freeBuf(buf43)
- if (inputString(buf43)) if (setFileName(curFile,buf43))
- saveFile(curFile) >
-
- %% use maxfiles
- Save all changed files
- <alt-f2: getMaxFiles(n53)
- decNum(n53)
- do(n54,0,n53)
- if (getFlag(buf[n54],changed)) saveFile(buf[n54]) >
-
- %% Used with idle-command
- Turn on/off saving changes during idle periods
- <ctl-f2: flipFlag(curFile,userLocalA)>
-
- Close current file. If changed, ask "Save changes?"
- <normal-f3: if (not isEmpty(curFile)) if (getFlag(curFile,changed))
- if (askYesNo("Save changes before closing?"))
- if (not saveFile(curFile)) returnFalse
- freeBuf(curFile) >
-
- Save file, if changed, then close it
- <shft-f3: if (getFlag(curFile,changed)) if (not saveFile(curFile))
- returnFalse
- freeBuf(curFile) >
-
- %% use maxfiles
- Free all non-file buffers. Erases search string, directory name, etc
- <alt-f3: getMaxFiles(n52)
- do(n54,n52,54) freeBuf(buf[n54]) >
-
- %% use maxfiles
- Ask "Save changes?", if any changes, then ask "Really quit?"
- <normal-f4: if (not askYesNo("Really quit?")) returnFalse
- equateNum(n53,0)
- getMaxFiles(n52)
- decNum(n52)
- do(n54,0,n52) if (getFlag(buf[n54],changed)) equateNum(n53,1)
- if (eqNum(n53,1)) if (askYesNo("Save changes?")) runKey(shft-f4)
- quit(0) >
-
- %% use maxfiles
- Save all changed files automatically, then quit
- <shft-f4: getMaxFiles(n52)
- decNum(n52)
- do (n54,0,n52) if (getFlag(buf[n54],changed))
- if (not saveFile(buf[n54])) returnFalse
- quit(0) >
-
- Quit fast, WITHOUT saving any files!!
- <alt-f4: quit(10) >
-
- Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
- <normal-f5: putMsg("Next 2 function keys will be swapped!")
- if (getKey(n53)) if (getKey(n54)) if (swapKey(n53,n54))
- { putMsg("Keys were swapped.") return }
- putMsg(" ") >
-
- Toggle overstrike typing mode
- <shft-f5: flipFlag(curFile,overstrike) >
- Toggle autoindent typing mode
- <alt-f5: flipFlag(curFile,autoIndent) >
- Toggle wordwrap typing mode
- <ctl-f5: flipFlag(curFile,wordWrap) >
- %% new
- Toggle "changed" status of current buffer
- <lAmiga-f5: flipFlag(curFile,changed) >
- Convert file to read-only status
- <shftAlt-f5: flipFlag(curFile,readOnly) >
- Toggle speak-messages status
- <shftCtl-f5: flipFlag(curFile,speakMsgs) >
- Toggle speak-alerts status
- <altCtl-f5: flipFlag(curFile,speakAlerts) >
- Toggle auto-backup mode
- <shftAltCtl-f5: flipFlag(curFile,autoBackup) >
-
-
- WARNING: You can't compile this one with F6, but in startup you can
- put cursor before it and ESC will compile from there forward.
-
- Compile command at or following cursor
- <normal-f6: if (not compile) beepDisplay >
-
- Select buffer 44 to use for scratch editing or writing commands
- <shft-f6: editBuf(buf44)
- putMsg("Type in command, <anykey: etc>, and press F6 to compile:") >
- %%new
- Find out if keys have got commands attached
- <lAmiga-f6: while (getKey(n54)) {
- if (inUse(n54)) putMsg("In use - Amiga-esc to abort")
- else putMsg("Available - Amiga-esc to abort")
- }>
-
- Save UE config to disk. Default is Data! or last name you gave
- <alt-f6:
- if (askYesNo("Save data?")) {
- putMsg("Input data filename or ESC:")
- freeBuf(buf54)
- inputString(buf54)
- saveConfig(buf54)
- } >
-
- Restore UE config from disk. Default is Data! or last name you gave
- <ctl-f6:
- if (askYesNo("Load data?")) {
- putMsg("Input data filename or ESC:")
- freeBuf(buf54)
- inputString(buf54)
- loadConfig(buf54)
- } >
-
- Compile configuration default values at the top of Config! file
- <altCtl-f6: moveCursor(curFile,sFile)
- if (not compileDefaults) beepDisplay>
-
- Input the number of a buffer to edit
- <shftAlt-f6: putMsg("Input number of buffer to edit:")
- if (inputNum(n54)) { editBuf(buf[n54]) vScroll(sFile) } >
-
- .. %% this now looks up maxfiles
- Examine all buffers that aren't empty
- <shftCtl-f6: getMaxFiles(n52)
- do (n54,n52,54) if (not isEmpty(buf[n54])) {
- editBuf(buf[n54])
- vScroll(sFile)
- updateDisplay
- putMsg("F1=continue, F2=edit this one, F3=stop:")
- getKey(n53)
- if (eqNum(n53,normal-f2)) { putMsg(" ") return }
- if (eqNum(n53,normal-f3)) goto label(1)
- }
- label(1)
- toggle(curFile)
- putMsg(" ") >
-
- Kill next command, including mouse button, menu selection, gadget, key
- <shftAltCtl-f6:
- putMsg("Next command-key will be deleted!")
- if (getKey(n54)) if (killKey(n54))
- { putMsg("Key command was deleted.") return }
- putMsg(" ") >
-
- Input search text & search fwd. (Either-Or="$" and wildcard="?".)
- <normal-f7: freeBuf(buf49) runKey(shft-f7) >
-
- Modify existing search text and then search fwd
- <shft-f7: putMsg("Input search string:")
- inputString(buf49)
- runKey(normal-f9) >
-
- %% use getChar
- Input new search wild-card character
- <alt-f7: putMsg("Input new search wild-card char:")
- getChar(wildCard)
- putMsg(" ")>
-
- %% use getChar
- Input new search either-or character
- <ctl-f7: putMsg("Input new search either-or char:")
- getChar(eitherOr)
- putMsg(" ")>
-
- Input replace text to use in search-replace
- <normal-f8: freeBuf(buf48) runKey(shft-f8) >
-
- Modify existing replace text
- <shft-f8: putMsg("input replace string:") inputString(buf48) >
-
- Search forward, mark matched region, put cursor at start of rgn
- <normal-f9: if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
- if (search(curFile,sInvert,eInvert,buf49,eChar)) {
- if (thisKey) if (not onScreen(atCursor)) vScroll(atCursor)
- putMsg(" ")
- return
- }
- putMsg("Search failed.")
- equateLoc(curFile,sInvert,eInvert)
- refreshDisplay
- returnFalse >
-
- Search backward, mark matched region, put cursor at start of rgn
- <shft-f9: if (search(curFile,sInvert,eInvert,buf49,sChar)) {
- if (thisKey) if (not onScreen(atCursor)) vScroll(atCursor)
- putMsg(" ")
- return
- }
- putMsg("Search failed.")
- equateLoc(curFile,sInvert,eInvert)
- refreshDisplay
- returnFalse >
-
- Replace matched region with replace text, then search forward
- <normal-f10: if (eqLoc(curFile,sInvert,eInvert)) returnFalse
- clearRgn(curFile,invert)
- insertRgn(curFile,sInvert,buf48,all)
- runKey(normal-f9) >
-
- Replace matched region with replace text, then search backward
- <shft-f10: if (eqLoc(curFile,sInvert,eInvert)) returnFalse
- clearRgn(curFile,invert)
- insertRgn(curFile,sInvert,buf48,all)
- runKey(shft-f9) >
-
- Replace and continue forward search-replace until search fails
- <alt-f10: while(runKey(normal-f10)) nothing >
-
- Open a space under cursor for typing
- <shft-del: insertChar(curFile," ") moveCursor(curFile,sChar)
- if (is(curFile,sLine)) refreshDisplay>
-
- Open line for typing below cursor line
- <alt-del: if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- insertChar(curFile,eLine)>
-
- Delete line above cursor line
- <ctl-del: equateLoc(curFile,mouseLoc,atCursor)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- if (not is(curFile,sFile)) {
- moveCursor(curFile,upLine)
- runKey(virtual-x) .. %% this runs ctl-d
- moveCursor(curFile,mouseLoc)
- }>
-
- Open a space for typing in front of current word
- <shft-bs: if (not is(curFile,sWord)) moveCursor(curFile,sWord)
- runKey(shft-del)>
-
- Open line for typing above the current line
- <alt-bs: if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- insertChar(curFile,eLine) moveCursor(curFile,sChar)>
-
- Delete line below cursor line
- <ctl-bs: equateLoc(curFile,mouseLoc,atCursor)
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- if (not is(curFile,eFile)) {
- moveCursor(curFile,downLine)
- runKey(virtual-x) .. %% this runs ctl-d
- moveCursor(curFile,mouseLoc)
- }>
-
-
- ---------------------------- Keypad Keys ----------------------------------
- Find cursor and center it in window
- <normal-kp5: vScroll(atCursor) >
-
- Delete word left, storing it in Undo buffer
- <normal-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sWord)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Delete word right, storing it in Undo buffer
- <normal-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eWord)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
- Move cursor up 1 line
- <normal-kp8: moveCursor(curFile,upLine) >
- Move cursor down 1 line
- <normal-kp2: moveCursor(curFile,downLine) >
- Move cursor to start of word
- <normal-kp4: moveCursor(curFile,sWord) >
- Move cursor to end of word
- <normal-kp6: moveCursor(curFile,eWord) >
-
- Set start of hilite region at cursor
- <normal-kp1: equateLoc(curFile,sHilite,atCursor) refreshDisplay >
-
- Set end of hilite region at cursor
- <normal-kp3: equateLoc(curFile,eHilite,atCursor) refreshDisplay >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <normal-kp0: insertRgn(curFile,atCursor,buf45,all) >
-
- <virtual-kpDot: if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)>
-
- Copy hilite region into buffer
- <normal-kpDot: runKey(virtual-kpDot)
- if (gtLoc(curFile,eHilite,sHilite))
- { freeBuf(buf47) insertRgn(buf47,sFile,curFile,hilite)
- equateLoc(buf47,sPage,sFile) }
- else returnFalse >
-
- Copy hilite region into buffer, then delete hilite region
- <normal-kpMinus: runKey(virtual-kpDot)
- if (runKey(normal-kpDot)) clearRgn(curFile,hilite) >
-
- Insert copied hilite at cursor
- <normal-kpEnter: runKey(virtual-kpDot)
- if (is(curFile,sFile)) {
- equateLoc(curFile,sHilite,atCursor)
- equateLoc(curFile,eHilite,sHilite)
- } else {
- equateLoc(curFile,sHilite,atCursor)
- decLoc(curFile,sHilite)
- equateLoc(curFile,eHilite,atCursor)
- }
- insertRgn(curFile,atCursor,buf47,all)
- if (eqLoc(curFile,atCursor,sHilite))
- equateLoc(curFile,sHilite,sFile)
- else incLoc(curFile,sHilite)
- if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)
- if (not onScreen(atCursor)) vScroll(atCursor) >
-
- Find cursor and center it in window
- <shft-kp5: vScroll(atCursor) >
-
- Delete char to left of cursor, storing it in Undo buffer
- <shft-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sChar)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Delete char under cursor, storing it in Undo buffer
- <shft-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eChar)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
- Move cursor up one line
- <shft-kp8: moveCursor(curFile,upLine) >
- Move cursor down one line
- <shft-kp2: moveCursor(curFile,downLine) >
- Move cursor left 1 char
- <shft-kp4: moveCursor(curFile,sChar) >
- Move cursor right 1 char
- <shft-kp6: moveCursor(curFile,eChar) >
- Set start of hilite region at cursor
- <shft-kp1: runKey(normal-kp1) >
- Set end of hilite region at cursor
- <shft-kp3: runKey(normal-kp3) >
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <shft-kp0: runKey(normal-kp0) >
- Copy hilite region into buffer
- <shft-kpDot: runKey(normal-kpDot) >
- Copy hilite region into buffer, then delete hilite region
- <shft-kpMinus: runKey(normal-kpMinus) >
- Insert copied hilite region at cursor
- <shft-kpEnter: runKey(normal-kpEnter) >
-
- Find cursor and center it in window
- <alt-kp5: vScroll(atCursor) >
- Delete to start of line, storing it in Undo buffer
- <alt-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- if (is(curFile,sLine)) runKey(shft-kp7)
- else {
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sLine)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- } >
- Delete to end of line, storing it in Undo buffer
- <alt-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- if (is(curFile,eLine)) runKey(shft-kp9)
- else {
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eLine)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- } >
- %% use sPage
- Move cursor to start of page
- <alt-kp8: moveCursor(curFile,sPage) vScroll(atCursor)>
- %% use ePage
- Move cursor to end of page
- <alt-kp2: moveCursor(curFile,ePage) >
- Move cursor to start of line
- <alt-kp4: moveCursor(curFile,sLine) >
- Move cursor to end of line
- <alt-kp6: moveCursor(curFile,eLine) >
- Set start of hilite region at cursor
- <alt-kp1: runKey(normal-kp1) >
- Set end of hilite region at cursor
- <alt-kp3: runKey(normal-kp3) >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <alt-kp0: runKey(normal-kp0) >
- Copy hilite region into buffer
- <alt-kpDot: runKey(normal-kpDot) >
- Copy hilite region into buffer, then delete hilite region
- <alt-kpMinus: runKey(normal-kpMinus) >
- Insert copied hilite region at cursor
- <alt-kpEnter: runKey(normal-kpEnter) >
-
- Find cursor and center it in window
- <ctl-kp5: vScroll(atCursor) >
- Delete from cursor to start of page, storing it in Undo buffer
- <ctl-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sPage)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- vScroll(atCursor)
- updateDisplay >
- Delete from cursor to end of page, storing it in Undo buffer
- <ctl-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,ePage)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- updateDisplay >
-
- %% use sForm
- Move cursor to start of form
- <ctl-kp8: moveCursor(curFile,sForm) vScroll(atCursor) >
- %% use eForm
- Move cursor to end of form
- <ctl-kp2: moveCursor(curFile,eForm) vScroll(atCursor) >
- Move cursor to start of line
- <ctl-kp4: moveCursor(curFile,sLine) >
- Move cursor to end of line
- <ctl-kp6: moveCursor(curFile,eLine) >
- Set start of invert region at cursor
- <ctl-kp1: equateLoc(curFile,sInvert,atCursor) refreshDisplay >
- Set end of invert region at cursor
- <ctl-kp3: equateLoc(curFile,eInvert,atCursor) refreshDisplay >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <ctl-kp0: runKey(normal-kp0) >
- Copy invert region into buffer
- <ctl-kpDot: runKey(virtual-kpDot)
- if (gtLoc(curFile,eInvert,sInvert))
- { freeBuf(buf46) insertRgn(buf46,sFile,curFile,invert)
- equateLoc(buf46,sPage,sFile) }
- else returnFalse >
-
- Copy invert region into buffer, then delete invert region
- <ctl-kpMinus: runKey(virtual-kpDot)
- runKey(ctl-kpDot) clearRgn(curFile,invert) >
-
- Insert copied invert region at cursor
- <ctl-kpEnter: runKey(virtual-kpDot)
- if (is(curFile,sFile)) {
- equateLoc(curFile,sInvert,atCursor)
- equateLoc(curFile,eInvert,sInvert)
- } else {
- equateLoc(curFile,sInvert,atCursor)
- decLoc(curFile,sInvert)
- equateLoc(curFile,eInvert,atCursor)
- }
- insertRgn(curFile,atCursor,buf46,all)
- if (eqLoc(curFile,atCursor,sInvert))
- equateLoc(curFile,sInvert,sFile)
- else incLoc(curFile,sInvert)
- if (getFlag(curFile,columnar)) flipFlag(curFile,columnar)
- if (not onScreen(atCursor)) vScroll(atCursor) >
-
- ------------------------- miscellaneous keys -------------------------------
-
- Set new line-length
- <ctl-return: putMsg("Enter new line-length:")
- if (inputNum(n54))
- { setLocal(curFile,lineLength,n54) equateNum(lineLength,n54) } >
-
- %% new
- Transparent tab forward
- <shft-tab: moveCursor(curFile,eTab) >
-
- %% new
- Transparent tab backward
- <alt-tab: moveCursor(curFile,sTab) >
-
- %% new
- Untab - delete white space back to previous tab column
- <ctl-tab: equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,sTab)
- while (nothing) {
- if (is(curFile,space)) goto label(1)
- if (is(curFile,9)) goto label(1) .. a TAB
- return
- label(1)
- clearChar(curFile)
- if (eqLoc(curFile,atCursor,locA)) return
- }>
- %% new
- Switch to/from using spaces for tabs or using real tabs
- <altCtl-tab: flipFlag(curFile,trueTabs)>
-
- %% new
- Show tab ruler above cursor line
- <shftAlt-tab: seeRuler>
-
- %% new
- Set tab ruler using mouse or keys
- <shftCtl-tab:
- putMsg(
- "Use mouse click/drag, Tab, Space, BS, Del (anykey=quit,lAmi-Esc=abort)")
- setRuler putMsg(" ") >
-
- %% these are new - slow! Make thousands of column calculations
- Convert tabs in document to spaces
- <lAmiga-t: equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,sFile)
- putMsg("TABs to spaces...busy")
- while (not is(curFile,eFile)) {
- if (is(curFile,9)) { .. a TAB
- swapChar(curFile,32) .. a space
- moveCursor(curFile,eChar)
- while (not is(curFile,tabColumn))
- insertChar(curFile,32) .. a space
- } else moveCursor(curFile,eChar)
- }
- equateLoc(curFile,atCursor,locA)
- putMsg(" ")>
- %% new
- Convert spaces in document to TABs
- <rAmiga-t: equateLoc(curFile,locA,atCursor) .. store cursor loc
- moveCursor(curFile,sFile)
- putMsg("Spaces to tabs...busy")
- while (not is(curFile,eFile)) {
- equateNum(n0,0)
- if (is(curFile,space)) { .. a space
- equateLoc(curFile,sInvert,atCursor)
- moveCursor(curFile,eChar)
- incNum(n0)
- while (nothing) {
- if (is(curFile,space)) goto label(3) .. a space
- if (is(curFile,9)) goto label(3) .. a TAB
- goto label(1)
- label(3)
- if (is(curFile,tabColumn)) goto label(1)
- moveCursor(curFile,eChar)
- incNum(n0)
- }
- label(1)
- if (gtNum(n0,1)) if (is(curFile,tabColumn)) {
- equateLoc(curFile,eInvert,atCursor)
- moveCursor(curFile,sInvert)
- swapChar(curFile,9) .. a TAB
- moveCursor(curFile,eChar)
- while (not eqLoc(curFile,eInvert,atCursor))
- clearChar(curFile)
- } else moveCursor(curFile,eChar)
- } else moveCursor(curFile,eChar)
- }
- putMsg(" ")
- moveCursor(curFile,locA) >
-
- %% new
- Set TAB table number (0-4) to use for TAB spacing
- <shftAltCtl-tab:
- putMsg("Enter new tab table # (0-4):")
- if (inputNum(n54)) if (geNum(n54,0)) if (gtNum(4,n54))
- { setLocal(curFile,tabTable,n54) equateNum(tabTable,n54) } >
-
- %% NEW ===== split window commands
- Erase current split window
- <lAmiga-0: splitWindow(curFile,0)>
- Split window to show current file
- <lAmiga-c: splitWindow(curFile,splitSize)>
- Split window to show Undo buffer
- <lAmiga-1: splitWindow(buf45,splitSize)>
- Split window to show search buffer
- <lAmiga-2: splitWindow(buf49,splitSize)>
- Split window to show replace buffer
- <lAmiga-3: splitWindow(buf48,splitSize)>
- Split window to show copied-hilite buffer
- <lAmiga-4: splitWindow(buf47,splitSize)>
- Split window to show copied-invert buffer
- <lAmiga-5: splitWindow(buf46,splitSize)>
- Split window to show copied-columnar buffer
- <lAmiga-6: splitWindow(buf37,splitSize)>
- Split window to show current directory name
- <lAmiga-7: splitWindow(buf38,splitSize)>
- Set split window size
- <lAmiga-8: putMsg("# lines in split window (2 or more):")
- if (inputNum(n54)) if (geNum(n54,2)) equateNum(splitSize,n54)
- putMsg(" ")>
- Switch to next window split
- <lAmiga-9: toggle(windowSplit)>
-
- Toggle "busies" setting - when turned on, it shows buffers being worked on
- <ctl-b: flipFlag(curFile,busies) >
-
- Trim spaces between the next two words after cursor
- <alt-c: while (not is(curFile,space))
- { moveCursor(curFile,eChar) if (is(curFile,eFile)) returnTrue }
- moveCursor(curFile,eChar)
- while (is(curFile,space)) clearChar(curFile) >
-
- Let next character typed be a CTRL-character, such as formfeed, etc
- <ctl-c: putMsg("Input a control character:") inputctlChar >
-
- Count number of times the next command is successfully executed
- <shftAlt-c: equateNum(n54,0)
- putMsg("Input command to execute & count:")
- if (getKey(n53)) {
- while (runKey(n53)) incNum(n54)
- freeBuf(buf54)
- insertRgn(buf54,sFile,"Times executed = ",all)
- toWord(buf54,n54)
- putMsg(buf54)
- } >
-
- Delay the amount of time (tenths of seconds) stored using shftAlt-d
- <alt-d: delay(n46) >
- %% run virtual-x
- Delete cursor line, storing it in Undo buffer. (See keypad-0/7/9.)
- <ctl-d: runKey(virtual-x)
- >
- %% protect line delete from swaps
- <virtual-x:
- if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- if (not eqLoc(curFile,locB,atCursor)) {
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- clearRgn(curFile,loc)
- } else equateLoc(curFile,locA,atCursor)
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Set the delay variable to some value in tenths of seconds
- <shftAlt-d: putMsg("Input # tenths of seconds (used in delays)")
- inputNum(n46) >
-
- Change end-of-line character
- <alt-e: putMsg("Input new end-of-line value (usually 10 or 13):")
- inputNum(n54)
- setEol(n54)
- refreshDisplay >
-
- Change current document's end-of-line character
- <ctl-e:
- putMsg("Input file's current end-of-line value (usually 10 or 13):")
- inputNum(n54)
- if (not gtNum(n54,0)) returnFalse
- putMsg("Input new end-of-line value (usually 10 or 13):")
- inputNum(n53)
- if (not gtNum(n53,0)) returnFalse
- setEol(n54)
- moveCursor(curFile,sFile)
- putMsg("Changing eol characters ... hit Amiga-ESC to abort.")
- while (moveCursor(curFile,eLine))
- if (is(curFile,n54)) swapChar(curFile,n53)
- setEol(n53)
- vScroll(sFile)
- putMsg(" ")
- refreshDisplay >
- %%new
- Input the number of buffer to free
- <alt-f: putMsg("Input buffer # to free:")
- if (inputNum(n54)) freeBuf(buf[n54]) >
-
- Flip upper/lower case of char under cursor
- <ctl-f: if (is(curFile,alpha)) {
- if (is(curFile,lowerCase)) toUpper(curFile)
- else toLower(curFile)
- }
- moveCursor(curFile,eChar) >
-
- Toggle the mark-gadgets setting. When "off", the gadget names don't show
- <ctl-g: flipFlag(curFile,markGadgets) >
-
- Input a new lines/page value
- <alt-g: putMsg("Enter new lines/page:")
- inputNum(n54)
- if (gtNum(n54,0))
- { setLocal(curFile,pageLines,n54) equateNum(pageLines,n54) } >
-
- Uncolor the hilite region
- <alt-h: equateLoc(curFile,sHilite,eHilite) refreshDisplay >
-
- Erase hilite region. No Copy is made!
- <ctl-h: clearRgn(curFile,hilite) >
-
- Uncolor the invert region
- <alt-i: equateLoc(curFile,sInvert,eInvert) refreshDisplay >
-
- Erase the invert region. No Copy is made!
- <ctl-i: clearRgn(curFile,invert) >
-
- Scan index buffer, build an index. (See shftAlt-buttonDown/buttonUp.)
- <shftAlt-i:
- if (isEmpty(buf41)) returnFalse
- runKey(alt-g)
- freeBuf(buf54)
- label(1)
- moveCursor(buf41,sFile)
- while (is(buf41,whiteSpace)) clearChar(buf41)
- if (is(buf41,eFile)) {
- swapBuf(buf54,buf41)
- freeBuf(buf54)
- setFileName(buf41,"Index")
- equateLoc(buf41,sPage,sFile)
- equateLoc(buf41,atCursor,sFile)
- putMsg("Press ctl-w to see Index")
- return
- }
- freeBuf(buf49)
- insertRgn(buf49,sFile,buf41,line)
- clearRgn(buf41,line)
- putMsg(buf49)
- moveCursor(buf54,eFile)
- insertRgn(buf54,eFile,buf49,all)
- insertRgn(buf54,eFile," ",all)
- insertChar(buf54,eLine)
- moveCursor(buf54,sChar)
- equateNum(n53,0)
- moveCursor(curFile,sFile)
- label(2)
- while (search(curFile,sInvert,eInvert,buf49,eChar)) {
- moveCursor(curFile,sChar)
- if (is(curFile,alpha)) {
- label(3)
- moveCursor(curFile,eInvert)
- goto label(2)
- }
- if (is(curFile,digit)) goto label(3)
- moveCursor(curFile,eInvert)
- if (is(curFile,alpha)) goto label(2)
- if (is(curFile,digit)) goto label(2)
- locToLine(curFile,n54,atCursor)
- div(n54,n54,pageLines)
- incNum(n54)
- if (not eqNum(n54,n53)) {
- if (not eqNum(n53,0)) insertChar(buf54,",")
- toWord(buf54,n54)
- equateNum(n53,n54)
- }
- }
- goto label(1)
- >
- Toggle the "make icons" flag. When "on", Workbench icons are created
- <altCtl-i: flipFlag(curFile,icons)>
-
- %% new
- Enter idle-timer value (seconds) after which idle command executed
- <shftAltCtl-i: putMsg("Input idle time (seconds)")
- if (inputNum(n54)) equateNum(idleTime,n54)>
-
- Toggle the right-justify typing mode
- <alt-j: flipFlag(curFile,rightJustify) >
- %% use insertChar
- Join next line to cursor line
- <ctl-j: if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- equateLoc(curFile,locA,atCursor)
- label(1)
- moveCursor(curFile,eChar)
- if (is(curFile,space)) goto label(1)
- if (is(curFile,9)) goto label(1) .. a TAB
- equateLoc(curFile,locB,atCursor)
- clearRgn(curFile,loc)
- insertChar(curFile," ") >
-
- Move the hilite to the left by one character (space or tab)
- <alt-l: moveCursor(curFile,sHilite)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- label(1)
- if (is(curFile,whiteSpace)) clearChar(curFile)
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- if (gtLoc(curFile,eHilite,atCursor)) goto label(1) >
-
- Convert the character under the cursor to lower case and move cursor fwd
- <ctl-l: toLower(curFile) moveCursor(curFile,eChar) >
-
- Set bottom margin
- <lAmiga-l: putMsg("Input bottom margin lines (0-200):")
- if (inputNum(n54)) equateNum(bottomMargin,n54)
- setLocal(curFile,bottomMargin,bottomMargin)>
-
- Set command multiplier to use for next command
- <ctl-m: putMsg("Input command multiplier:") inputNum(cmdMultiplier) >
-
- Swap the mouse's button-Up operation with the next key-command pressed
- <alt-m: putMsg("Will swap mouse buttonUp with your next input:")
- if (getKey(n53)) if (swapKey(n53,normal-buttonUp))
- { putMsg("Swapped - to undo, do it again") return }
- putMsg(" ") >
-
- Map illegal ASCII (0 thru 5) characters into safe ones. (See top of Config!)
- <shftAlt-m: flipFlag(curFile,mapChars)>
-
- Rename the document in the window
- <alt-n: putMsg("Input new filename:")
- getFileName(buf43,curFile)
- if (inputString(buf43))
- setFileName(curFile,buf43) >
-
- Input a text line number to go to
- <ctl-n: putMsg("Input line number:")
- if (inputNum(n54))
- { lineToLoc(curFile,atCursor,n54) vScroll(atCursor) } >
-
- Open the cursor line for typing
- <ctl-o: insertChar(curFile,eLine) moveCursor(curFile,sChar) >
-
- Print the hilite region. (See alt-p.)
- <ctl-p: print(curFile,hilite) >
-
- Switch between printing thru parallel port and through Amiga Preferences
- <alt-p: putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
- if (inputNum(n54))
- if (geNum(n54,0))
- if (gtNum(4,n54)) equateNum(prefPrint,n54)
- putMsg(" ") >
-
- Print entire document
- <altCtl-p: print(curFile,all)>
-
- Stop the current print
- <lAmiga-a: abortPrint abort>
-
- Stop all prints that are stored up
- <rAmiga-a: while (abortPrint) nothing
- abort >
-
- Restart current print
- <lAmiga-s: restartPrint>
-
- Move the hilite region to the right by one space
- <alt-r: moveCursor(curFile,sHilite)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- label(1)
- if (gtLoc(curFile,eHilite,atCursor)) {
- insertChar(curFile,32)
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- goto label(1)
- } >
- Terminate Learn Mode or run whatever is stored in learn-buffer. (See ctl-s.)
- <ctl-r: runLearn >
-
- Speak the hilite region, a line at a time
- <alt-s: if (gtLoc(curFile,eHilite,sHilite)) {
- equateLoc(curFile,locA,atCursor)
- equateLoc(curFile,sInvert,sHilite)
- equateLoc(curFile,atCursor,sHilite)
- while (gtLoc(curFile,eHilite,sInvert)) {
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- if (gtLoc(curFile,atCursor,eHilite))
- equateLoc(curFile,eInvert,eHilite)
- else equateLoc(curFile,eInvert,atCursor)
- if (gtLoc(curFile,eInvert,sInvert)) {
- freeBuf(buf50)
- insertRgn(buf50,sFile,curFile,invert)
- speak(buf50)
- }
- equateLoc(curFile,sInvert,atCursor)
- }
- equateLoc(curFile,atCursor,locA)
- } >
-
- Start/abort Learn Mode. (Use ctl-r to finish & to run it.)
- <ctl-s: if (not getFlag(curFile,learnMode)) putMsg("LEARN MODE ACTIVE!")
- else putMsg("Learn Mode cancelled.")
- flipFlag(curFile,learnMode) >
-
- %% new
- Show key-help message on next key pressed. Copy key-help to RAM: on first
- <ctl-t: putMsg("Input a key, gadget, click etc to get Help msg")
- getKey(n54)
- teachOne(n54)>
-
- Toggle between using printable keys for commands or for normal typing input
- <alt-u: flipFlag(curFile,useKeys)>
-
- Load UStar config
- <virtual-u: loadConfig("S:UStarData!")>
-
- Convert char under cursor to upper case
- <ctl-u: toUpper(curFile) moveCursor(curFile,eChar) >
-
- Set top margin
- <lAmiga-u: putMsg("Input top margin lines (0-200):")
- if (inputNum(n54)) equateNum(topMargin,n54)
- setLocal(curFile,topMargin,topMargin)>
-
- Switch flag that makes CTRL chars vis/invis
- <ctl-v: flipFlag(curFile,spooks) refreshDisplay >
-
- Swap the current document in window with buffer 41
- <ctl-w: swapBuf(curFile,buf41) >
-
- %% new
- Swap current buffer to buffer 0 (the "home" buffer of Uedit)
- <alt-w: swapBuf(buf0,curFile) editBuf(buf0)>
-
- For programmers: Toggle number under cursor between hex/decimal
- <ctl-x: hexDecimal(curFile) >
-
- Execute an AmigaDOS command, but don't collect the results
- <ctl-y: putMsg("Enter AmigaDOS command")
- freeBuf(buf40)
- if (inputString(buf40)) execute(" ",buf40) >
-
- Execute an AmigaDOS command and show the results
- <ctl-z: putMsg("Enter AmigaDOS command")
- freeBuf(buf40)
- if (not inputString(buf40)) returnFalse
- freeBuf(buf39)
- if (not execute(buf39,buf40)) returnFalse
- if (not isEmpty(buf39))
- { putMsg("Result of AmigaDOS command:")
- flipFlag(buf39,changed)
- editBuf(buf39)
- vscroll(sFile)
- } else
- { putMsg("No message from AmigaDOS.") freeBuf(buf39) } >
-
- Get directory listing. (Also sets directoryname used in ctl-buttonDown.)
- <alt-z: putMsg("Enter directory: ")
- freeBuf(buf38)
- inputString(buf38)
- freeBuf(buf54)
- insertRgn(buf54,eFile,"Dir ",all)
- insertRgn(buf54,eFile,buf38,all)
- if (not execute(buf39,buf54)) returnFalse
- moveCursor(buf38,eFile)
- moveCursor(buf38,sChar)
- if (not isEmpty(buf38)) if (not is(buf38,":"))
- insertRgn(buf38,eFile,"/",all)
- insertRgn(buf39,sFile,"
- ",all)
- insertRgn(buf39,sFile,buf38,all)
- newFile
- swapBuf(buf39,curFile)
- freeBuf(buf39)
- vScroll(sFile)
- putMsg("To load files, ctrl-click names with mouse.")
- setFileName(curFile,buf54)
- flipFlag(curFile,changed) >
-
- Change the current working directory
- <altCtl-z: putMsg("Change current directory to (won't work in Workbench):")
- freeBuf(buf54)
- if (inputString(buf54)) changeDir(buf54)>
-
- %% alt-0 and alt-7 REMOVED
-
- %% store loc
- Clear leading white space in cursor line
- <alt-1: equateLoc(curFile,locA,atCursor)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- while (is(curFile,whiteSpace)) {
- if (is(curFile,eLine)) goto label(1)
- if (is(curFile,12)) goto label(1) .. formfeed
- clearChar(curFile)
- }
- label(1)
- equateLoc(curFile,atCursor,locA) >
-
- Center text in the line. (Uses current line length.)
- <alt-2:
- runKey(alt-1) .. clear leading white space
- if (is(curFile,blankLine)) returnFalse
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- locToCol(curFile,n53,atCursor)
- equateNum(n54,lineLength)
- incNum(n54)
- if (gtNum(n54,n53)) {
- moveCursor(curFile,sLine)
- sub(n53,n54,n53)
- div(n53,n53,2)
- do (n54,2,n53) insertChar(curFile," ")
- } >
-
- %% use typeChar
- Match indent of cursor line to previous line
- <alt-4: equateNum(n54,0)
- if (not getFlag(curFile,autoIndent)) {
- flipFlag(curFile,autoIndent)
- equateNum(n54,1)
- }
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- clearChar(curFile)
- typeChar(eLine)
- if (eqNum(n54,1)) flipFlag(curFile,autoIndent) >
-
- %% use locToCol etc
- Right-align the cursor line from cursor rightward
- <alt-5: runKey(alt-6)
- locToCol(curFile,n45,atCursor)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eLine)
- locToCol(curFile,n54,atCursor)
- moveCursor(curFile,locA)
- sub(n54,lineLength,n54)
- if (gtNum(n54,0)) {
- while (decNum(n54)) insertChar(curFile," ")
- } else if (gtNum(0,n54)) {
- while (incNum(n54)) if (is(curFile,space)) clearChar(curFile)
- }>
-
- %% use locToCol
- Store the cursor line's length in number variable n45
- <alt-6: equateLoc(curFile,locA,atCursor)
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- locToCol(curFile,n45,atCursor)
- equateLoc(curFile,atCursor,locA) >
-
- %% alt-7 REMOVED
-
- Show the value of a number variable
- <alt-8: putMsg("n-variable #: ")
- inputNum(n54)
- freeBuf(buf54)
- insertChar(buf54,"n")
- toWord(buf54,n54)
- insertRgn(buf54,eFile," is ",all)
- toWord(buf54,n[n54])
- putMsg(buf54) >
-
- Set the value of a number variable
- <alt-9: putMsg("Set n-variable #:")
- inputNum(n54)
- putMsg("To value:")
- inputNum(n[n54])>
-
- Show the ASCII value of the character under the cursor
- <ctl-/: copyChar(curFile,n54)
- freeBuf(buf54)
- toWord(buf54,n54)
- insertRgn(buf54,sFile,"Character value under cursor was ",all)
- putMsg(buf54)
- moveCursor(curFile,eChar) >
-
- Show the current document size
- <ctl-1: fileSize(curFile,n54)
- freeBuf(buf54)
- insertRgn(buf54,sFile,"File size in bytes: ",all)
- toWord(buf54,n54)
- putMsg(buf54)>
-
- Switch displaying of cursor row-column off/on
- <ctl-2: flipFlag(curFile,rowCol) >
-
- Reformat cursor paragraph, starting at cursor line
- <ctl-3: if (reformat) moveCursor(curFile,downLine) >
-
- %% check for tabs
- Delete all trailing white-space in current document
- <ctl-4: equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,sFile)
- label(1)
- if (is(curFile,eFile))
- { equateLoc(curFile,atCursor,locA) return }
- moveCursor(curFile,eLine)
- moveCursor(curFile,sChar)
- label(2)
- if (is(curFile,space))
- { clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
- if (is(curFile,9)) .. a TAB
- { clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
- moveCursor(curFile,eLine)
- goto label(1) >
-
- Save a learn-sequence to disk, saving it under a number 1 to 2 billion
- <ctl-5: putMsg("Save Learn under what #?")
- if (inputNum(n54)) saveLearn(n54) >
-
- Load a learn-sequence stored on disk
- <ctl-6: putMsg("Load what Learn #?")
- if (inputNum(n54)) loadLearn(n54) >
-
- Load and run learn-sequence stored on disk
- <ctl-7: putMsg("Input learn # to load & run:")
- if (inputNum(n54)) if (loadLearn(n54)) runLearn >
-
- Toggle case-sensitivity of search
- <ctl-8: flipFlag(curFile,searchCaps) >
-
- --------------------------- arithmetic commands --------------------
-
- Set running arithmetic total to zero
- <ctl-0: equateNum(n49,0) >
-
- Type the running arithmetic total into text at cursor
- <ctl-\: freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- if (gtNum(0,n49)) mul(n52,n49,-1)
- else equateNum(n52,n49)
- mod(n52,n52,100)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(curFile,atCursor,buf54,all)
- insertRgn(buf54,sFile,"Inserted total into text ",all)
- putMsg(buf54) >
-
- Add the next word (if a number) to arithmetic total & display total
- <ctl-=: if (not is(curFile,digit)) returnFalse
- moveCursor(curFile,eWord)
- moveCursor(curFile,sWord)
- toNumber(n54,curFile)
- moveCursor(curFile,eWord)
- if (is(curFile,".")) {
- moveCursor(curFile,eChar)
- if (not is(curFile,digit)) goto label(1)
- toNumber(n53,curFile)
- moveCursor(curFile,eChar)
- if (not is(curFile,digit)) {
- mul(n53,n53,10)
- moveCursor(curFile,sChar)
- }
- moveCursor(curFile,eWord)
- } else { label(1) equateNum(n53,0) }
- mul(n54,n54,100)
- if (gtNum(0,n54)) mul(n52,n53,-1)
- else equateNum(n52,n53)
- add(n54,n54,n52)
- add(n49,n49,n54)
- freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- mod(n52,n49,100)
- if (gtNum(0,n49)) mul(n52,-1,n52)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(buf54,sFile,"Running total is ",all)
- putMsg(buf54) >
-
- Subtract the next word (if a number) from arithmetic total & display total
- <ctl--: if (not is(curFile,digit)) returnFalse
- moveCursor(curFile,eWord)
- moveCursor(curFile,sWord)
- toNumber(n54,curFile)
- moveCursor(curFile,eWord)
- if (is(curFile,".")) {
- moveCursor(curFile,eChar)
- if (not is(curFile,digit)) goto label(1)
- toNumber(n53,curFile)
- moveCursor(curFile,eChar)
- if (not is(curFile,digit)) {
- mul(n53,n53,10)
- moveCursor(curFile,sChar)
- }
- moveCursor(curFile,eWord)
- } else { label(1) equateNum(n53,0) }
- mul(n54,n54,100)
- if (gtNum(0,n54)) mul(n52,n53,-1)
- else equateNum(n52,n53)
- add(n54,n54,n52)
- sub(n49,n49,n54)
- freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
- if (gtNum(0,n49)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- mod(n52,n49,100)
- if (gtNum(0,n52)) mul(n52,n52,-1)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(buf54,sFile,"Running total is ",all)
- putMsg(buf54) >
-
- ------------------ These are for columnar data -------------------------
-
- <virtual-`: if (not getFlag(curFile,columnar)) flipFlag(curFile,columnar)>
-
- Toggle between columnar display and regular hilite/invert display mode
- <shftCtl-`: flipFlag(curFile,columnar) refreshDisplay>
-
- Copy and then clear the hilited columnar data
- <shftCtl-1: freeBuf(buf37)
- runKey(virtual-`)
- copyColData(buf37,sFile,curFile,hilite,1)
- clearColData(curFile,hilite,0) >
-
- Space-fill the hilited columnar data, overlaying the original text. No copy
- <shftCtl-2: runKey(virtual-`)
- clearColData(curFile,hilite,1) >
-
- Copy the hilited columnar data into a buffer
- <shftCtl-3: runKey(virtual-`)
- if (geLoc(curFile,sHilite,eHilite)) returnFalse
- freeBuf(buf37) copyColData(buf37,sFile,curFile,hilite,1)>
-
- Insert copied columnar data at the cursor
- <shftCtl-4: runKey(virtual-`)
- copyColData(curFile,atCursor,buf37,all,1)>
-
- Overlay copied columnar data onto existing text at the cursor
- <shftCtl-5: runKey(virtual-`)
- copyColData(curFile,atCursor,buf37,all,0)>
-
- Insert the columnar hilite region at the cursor. (No intermediate copy.)
- <shftCtl-6: runKey(virtual-`)
- copyColData(curFile,atCursor,curFile,hilite,1)>
-
- Overlay the columnar hilite region onto existing text at the cursor
- <shftCtl-7: runKey(virtual-`)
- copyColData(curFile,atCursor,curFile,hilite,0)>
-
- ----------------- Interlace Mode -------------------------
-
- Switch to/from interlace display mode
- <shft-esc: flipFlag(curFile,lace)>
-
- Tune the RGB colors in interlace using mouse. (See alt-Help also.)
- <alt-esc: laceColor>
-
- Assign a name to one of the 4 gadgets (1-4)
- <ctl-esc: putMsg("Enter gadget number (1-4):")
- if (not inputNum(n54)) returnFalse
- if (gtNum(n54,4)) returnFalse
- if (gtNum(1,n54)) returnFalse
- putMsg("Enter gadget name (one Space to clear):")
- freeBuf(buf54)
- inputString(buf54)
- if (not isEmpty(buf54)) {
- gadgetName(n54,buf54)
- putMsg(" ")
- } >
-
- This is Uedit's "About..." shareware message
- <shftAltCtl-a:
- getBufNum(n54)
- freeBuf(buf54)
- insertRgn(buf54,sFile,
- "
-
- : Uedit :
- : Copyright (C) 1986-87, Rick Stiles :
- : P.O. Box 666 :
- : Washington, IN 47501 :
-
- Uedit is SHAREWARE. Feel free to copy and distribute the Shareware (only)
- version to friends and associates, club members, and bulletin boards.
-
- Try it and see how you like it.
-
- If you use Uedit, you must buy it. (See Uedit-Policy.)
-
- In return, you will get the Non-Shareware version which allows you to compile
- new commands and can be fully customized to suit your needs or match your
- favorite editor or word processor. You'll get the latest the Shareware Uedit
- which you can distribute freely, many Extras to use with Uedit, and the full
- documentation. Plus you will earn $15 commissions for getting others to use
- and buy Uedit.
- ",all) equateLoc(buf54,sPage,sFile)
- moveCursor(buf54,eFile)
- do (n52,1,35) insertChar(buf54,eLine)
- moveCursor(buf54,sFile)
- do (n52,1,5) moveCursor(buf54,eLine)
- equateLoc(buf54,eHilite,atCursor)
- do (n52,1,3) moveCursor(buf54,upLine)
- do (n52,1,38) moveCursor(buf54,sChar)
- equateLoc(buf54,sHilite,atCursor)
- moveCursor(buf54,eFile)
- if (getFlag(curFile,columnar)) equateNum(n51,0)
- else { flipFlag(curFile,columnar) equateNum(n51,1) }
- editBuf(buf54)
- vScroll(sFile)
- setFileName(buf54," About Uedit...")
- putMsg(" ")
- getKey(n53)
- editBuf(buf[n54])
- putMsg(" ")
- if (eqNum(n51,1)) flipFlag(curFile,columnar)
- freeBuf(buf54)
- >
-
- ======== PRINTER CMDS ========
-
- %% mostly new
-
- <virtual-p: freebuf(buf54)
- putMsg(" ")
- insertRgn(buf54,sFile,
- "Press lAmiga-p and then one of the letter keys below. For boldface,
- italics, etc, the cursor-word is bracketed with printer codes:
-
- i = italics
- u = underline
- b = boldface
- c = condensed
- e = elite
- l = enlarged
- s = shadow
- d = double strike
- n = NLQ
- x = superscript
- y = subscript
- 6 = 6 lines/inch
- 8 = 8 lines/inch
- Other code keys:
- rAmiga-g = find next printer code in document
- lAmiga-g = input a printer code # (0-75. See table in documentation.)
- \"Print select\" must be 2 or 3 for these codes to control your printer.
- Select \"Show vals\" to see what print-select is. Select your printer in
- Preferences.
-
- ",all)
- flipFlag(buf54,readOnly)
- getBufNum(n53)
- editBuf(buf54)
- vScroll(sFile)
- updateDisplay
- getKey(n54)
- editBuf(buf[n53])
- freeBuf(buf54) >
-
- Get a key and reduce it to lower case.
- <virtual-g: putMsg("Enter prtr code (b c d e i l n s u x y 6 8 h=help):")
- if (getKey(n54)) { mod(n54,n54,104) putMsg(" ") returnTrue }
- putMsg(" ")
- returnFalse >
-
- Bracket a word with printer codes using n54
- <virtual-c: if (not is(curFile,sWord)) moveCursor(curFile,sWord)
- printerCode(curFile,n53,0,0)
- incNum(n53)
- moveCursor(curFile,eWord)
- printerCode(curFile,n53,0,0) >
-
- Printer codes: Next letter key brackets word for boldface, italics etc.
- <lAmiga-p:
- if (runKey(virtual-g)) {
- if (eqNum(n54,normal-6)) printerCode(curFile,56,0,0)
- else if (eqNum(n54,normal-8)) printerCode(curFile,55,0,0)
- else if (eqNum(n54,normal-h)) runKey(virtual-p)
- else {
- equateNum(n53,-1)
- if (eqNum(n54,normal-i)) equateNum(n53,6)
- if (eqNum(n54,normal-u)) equateNum(n53,8)
- if (eqNum(n54,normal-b)) equateNum(n53,10)
- if (eqNum(n54,normal-e)) equateNum(n53,15)
- if (eqNum(n54,normal-c)) equateNum(n53,17)
- if (eqNum(n54,normal-l)) equateNum(n53,19)
- if (eqNum(n54,normal-s)) equateNum(n53,21)
- if (eqNum(n54,normal-d)) equateNum(n53,23)
- if (eqNum(n54,normal-n)) equateNum(n53,25)
- if (eqNum(n54,normal-x)) equateNum(n53,27)
- if (eqNum(n54,normal-y)) equateNum(n53,29)
- if (eqNum(n53,-1)) returnFalse
- runKey(virtual-c)
- }
- } >
-
- Find next printer code (can delete it with ctl-h)
- <rAmiga-g: freeBuf(buf54)
- insertChar(buf54,"")
- insertChar(buf54,"?")
- insertChar(buf54,"")
- insertChar(buf54,"$")
- insertChar(buf54,"")
- insertChar(buf54,"?")
- insertChar(buf54,"?")
- insertChar(buf54,"")
- if (search(curFile,sInvert,eInvert,buf54,eChar))
- putMsg("Press ctl-i to delete the code") >
-
- Insert printer code. (See printer code table for meaning of numbers 0-75.)
- <lAmiga-g: putMsg("Enter printer code (0-75, see printer-codes):")
- equateNum(n53,0)
- equateNum(n52,0)
- if (inputNum(n54)) {
- if (geNum(n54,0)) if (geNum(75,n54)) {
- if (eqNum(n54,12)) {
- putMsg("Enter foreground color (30-39)")
- goto label(2) }
- if (eqNum(n54,13)) {
- putMsg("Enter background color (40-49)")
- goto label(2) }
- if (eqNum(n54,48)) returnFalse
- if (eqNum(n54,57)) {
- putMsg("Enter form length")
- goto label(2) }
- if (eqNum(n54,58)) returnFalse .. perf skip n
- if (eqNum(n54,64)) returnFalse .. t&b margins
- if (eqNum(n54,65)) returnFalse .. l&r margins
- if (eqNum(n54,75)) returnFalse .. extended cmd
- goto label(1)
- label(2)
- if (not inputNum(n53)) return
- label(1)
- printerCode(curFile,n54,53,52)
- }
- }>
-
- ======== PAGING CMDS ======
-
- %% mostly new
-
- Erase next page number
- <lAmiga-y:
- if (not is(curFile,eForm)) movecursor(curFile,eForm)
- if (is(curFile,12)) return
- if (not is(curFile,eLine)) moveCursor(curFile,eLine)
- if (is(curFile,12)) runKey(alt-kp7)
- >
-
- %% use gotoPage()
- Input page number to go to
- <alt-3: putMsg("Go to page #:")
- if (inputNum(n3)) gotoPage(curFile,n3) >
-
- Insert a formfeed character
- <lAmiga-f: insertChar(curFile,12) >
-
- Go to top of page
- <lAmiga-h: moveCursor(curFile,sForm) >
-
- Go to end of page
- <lAmiga-b: moveCursor(curFile,eForm) >
-
- Insert page-division at cursor
- <lAmiga-v:
- equateNum(n0,1)
- if (is(curFile,blankLine)) equateNum(n0,2)
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- getPageRowCol(n50,n51,n52)
- getLocal(curFile,n53,bottomMargin)
- getLocal(curFile,n49,pageLines)
- div(n53,n53,2)
- add(n51,n51,n53)
- while (gtNum(n49,n51)) { incNum(n51) insertChar(curFile,eLine) }
- getLocal(curFile,n49,lineLength)
- div(n49,n49,2)
- while (gtNum(n49,0)) { insertChar(curFile," ") decNum(n49) }
- toWord(curFile,n50)
- insertChar(curFile,12)
- getLocal(curFile,n54,topMargin)
- while (gtNum(n54,0)) { decNum(n54) insertChar(curFile,eLine) }
- >
-
- Delete next page-division
- <lAmiga-d:
- label(1)
- if (not is(curFile,sForm)) moveCursor(curFile,sForm)
- if (not is(curFile,eForm)) moveCursor(curFile,eForm)
- if (not is(curFile,eLine)) moveCursor(curFile,eline)
- if (not is(curFile,12)) {
- moveCursor(curFile,eChar)
- if (not is(curFile,eFile)) goto label(1)
- returnFalse
- }
- if (not is(curFile,sLine)) moveCursor(curFile,sLine)
- getPageRowCol(n49,n50,n51)
- getLocal(curFile,n54,topMargin)
- getLocal(curFile,n53,bottomMargin)
- equateLoc(curFile,locA,atCursor) .. start of ff line
- moveCursor(curFile,downLine)
- while (gtNum(n54,0)) { .. del tm lines
- if (not is(curFile,blankLine)) goto label(2)
- decNum(n54)
- moveCursor(curFile,downLine)
- }
- label(2)
- equateLoc(curFile,locB,atCursor)
- equateLoc(curFile,atCursor,locA)
- moveCursor(curFile,upLine)
- while (gtNum(n50,0)) {
- decNum(n50)
- if (not is(curFile,blankLine)) {
- moveCursor(curFile,downLine)
- goto label(3)
- }
- moveCursor(curFile,upLine)
- }
- label(3)
- equateLoc(curFile,locA,atCursor)
- clearRgn(curFile,loc)
- >
-
- Auto-insert page-divisions and page-numbers in document
- <lAmiga-r:
- putMsg("Scanning")
- equateLoc(curFile,locA,atCursor)
- freeBuf(buf54)
- insertChar(buf54,12)
- if (search(curFile,sInvert,eInvert,buf54,eChar)) {
- putMsg("Delete old paging divisions first using lAmiga-d")
- returnFalse
- }
- putMsg(" ")
- equateLoc(curFile,atCursor,locA)
- if (not is(curFile,sForm)) moveCursor(curFile,sForm)
- while (nothing) {
- moveCursor(curFile,eForm)
- getLocal(curFile,n53,bottomMargin)
- getPageRowCol(n50,n51,n52)
- getLocal(curFile,n52,pageLines)
- if (gtNum(n52,n51)) {
- sub(n55,n52,n51) .. page lines - real line
- while (gtNum(n52,n51)) {
- insertChar(curFile,eLine)
- incNum(n51)
- }
- do (n54,1,n53) moveCursor(curFile,upLine)
- runKey(lAmiga-v)
- moveCursor(curFile,eFile)
- while (not is(curFile,sFile)) {
- moveCursor(curFile,sChar)
- if (is(curFile,12)) { moveCursor(curFile,eFile) return }
- clearChar(curFile)
- }
- return
- }
- do (n54,1,n53) moveCursor(curFile,upLine)
- runKey(lAmiga-v)
- moveCursor(curFile,downLine)
- updateDisplay
- }
- >
-
- =========
-
- %% New. Uses userlocalA in a menu entry & command up above
- Save changed files during idle periods, if their idle-save flag is set
- <idle: getMaxFiles(n52)
- decNum(n52)
- do (n54,0,n52)
- if (not inputWaiting)
- if (getflag(buf[n54],changed))
- if (getflag(buf[n54],userLocalA)) saveFile(buf[n54]) >
-
- -------------------------- end of Config! ----------------------------------
-
-