home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / express.lbr / EXPRESS3.DZC / EXPRESS3.DOC
Encoding:
Text File  |  1993-10-26  |  14.1 KB  |  395 lines

  1. .brp
  2. .inb -4
  3. .fif
  4. MACRO KEY COMMANDS - defining macro keys and managing macro key files
  5. ------------------
  6. .fin
  7.  
  8. The Macro Key Commands allow you to redefine any sequence of typed keys
  9. to output a sequence of characters or commands, and to save these key
  10. redefinitions in a disk file for later recall. Macro keys can
  11. dramatically increase productivity and decrease boredom and frustration (and
  12. besides that, they're just plain fun.)
  13.  
  14. After a macro key has been defined, typing that key, or sequence of
  15. keys, will have the same results as typing the characters or commands
  16. the key was redefined to. For instance, if the <LF> (^J) key has been
  17. redefined to type 'this is the linefeed key', then typing <LF> will
  18. cause 'this is the linefeed key' to be entered on the screen (and in the
  19. file) just as if you had typed the entire string yourself. This can be
  20. handy in many obvious ways (like defining macro keys for common words
  21. like 'write', 'read', 'begin', etc.) and in many not-so-obvious ways
  22. that are described in Appendix ???.
  23.  
  24. When you are done using a macro key, you can 'undefine' the key (by
  25. redefining it to a blank string) and it will regain its original meaning.
  26. You can also enter the original valueof a key into the file by using the
  27. Insert Control Character (actually 'literal next') command ^C (____)
  28. followed by the key; you can redefine normal printable characters without
  29. losing the ability to enter them into the text.
  30.  
  31. A macro key can be any character, or sequence of characters, that you
  32. can type on the keyboard; each macro 'key' can be up to 10 keystrokes
  33. long. For instance, the following could be redefined as macro keys:
  34.  
  35.     ^U^B      (control+U followed by control+B)
  36.     t         (the letter 't')
  37.     T         (the letter 'T', separate from the letter 't')
  38.     <ESC>BGG  (the <ESC> key followed by 'BGG'
  39.         .
  40.         .
  41.  
  42. The redefinition of a macro key can be any mixture of characters and
  43. commands entered just as you would type them at the keyboard; each macro
  44. 'redefinition' can be up to 256 keystrokes in length. Macro
  45. redefinitions can be used to execute any command you can execute from
  46. the keyboard. For instance, a macro key to go to Command Mode and save
  47. the current text block to the file 'TEMP.$$$', then return to Edit Mode
  48. is defined as:
  49.  
  50.     <ESC>bs temp.$$$<CR><ESC>
  51.  
  52. assuming that you are using the command keys originally installed in
  53. EXPRESS. Notice that when the macro redefinition is typed in, you
  54. actually type the <ESC> key, not the sequence of characters '<ESC>'.
  55. Another example is the following command that will move to the beginning
  56. of the last word on the current line and place you in partial insert
  57. mode:
  58.  
  59.     ^U^L^A^Q    (end of line, prev word, partial insert on)
  60.  
  61. again, this is assuming you have not reinstalled the command keys with
  62. CONFIG; if you have, just use the commands you have defined as 'end of
  63. line', 'prev word', and 'partial insert on' when entering the
  64. redefinition string.
  65.  
  66. .unl 4
  67. MDefine
  68.  
  69. When this command is entered, you are prompted for 'input keys' (the key
  70. sequence you will type to execute the macro). Type the exact key sequence
  71. you want to use followed by a <CR>. Then you will be asked for the
  72. 'redefinition'; type the characters and editing commands that you want to be
  73. executed when you type the 'input keys' followed by <CR>. If you make a
  74. mistake while defining either the input keys or the redefinition string, use
  75. the <RUB> (DEL) key to correct the line (all other editing keys are disabled
  76. so they can be part of macro definitions).
  77.  
  78. To 'UnDefine' a macro command, enter the input keys that you wish to be
  79. undefined, then enter a blank line for the redefinition. You can 'redefine'
  80. an existing key without worrying about undefining it first.
  81.  
  82. If you want to use <CR> and <RUB> in macro definitions, you can either avoid
  83. the problem by using 'NextLine, Start of Line' for <CR> and 'Backspace,
  84. Delete Character' for <RUB> or you can follow the MD on the command line
  85. with the keys you wish to use for <RUB> and <CR>. For instance, the command:
  86.  
  87.     MD:-
  88.  
  89. will allow you to define a new macro key using ':' as the <RUB> key and '-'
  90. as the <CR> key.
  91.  
  92.  
  93. .unl 4
  94. MClear
  95.  
  96. Mclear is a quick way to clear out the entire macro table. All previously
  97. defined macro key will be 'forgotten'.
  98.  
  99.  
  100. .unl 4
  101. MSave du:fid.ext
  102.  
  103. Saves all current macro definitions to the named file. The definitions
  104. are not cleared from the macro table.
  105.  
  106.  
  107. .unl 4
  108. MRestore du:fid.ext
  109.  
  110. Loads the named macro key file into the macro table. A check is made to see
  111. if the file actually does contain macro definitions.
  112.  
  113. The new macro definitions are added to the current definitions (the current
  114. ones are not deleted). You can concatenate two (or several) macro files by
  115. MRestoring them all and then MSaving them all at once.
  116. .brp
  117. .fif
  118. BUFFER COMMANDS - Managing the edit buffer contents
  119. ---------------
  120. .fin
  121.  
  122.  
  123. These commands operate directly on the file that is being edited and on
  124. the contents of the edit buffer.
  125. .inb +4
  126.  
  127.  
  128. .unl 4
  129. PRead [n]
  130.  
  131. Writes n screens full (if n is not specified then it writes one screen
  132. full) of the current edit buffer to the disk and reads as many more as
  133. will fit in the buffer, if any of the file is left on the disk.
  134.  
  135. If the entire file has already been read, n pages are still written to
  136. disk and the buffer is left partially empty.
  137.  
  138.  
  139. .unl 4
  140. BRead
  141.  
  142. If there is still a portion of the file remaining on the disk, this
  143. command writes the current edit buffer contents to disk and reads in
  144. more until the buffer is full or the end of the file is reached.
  145.  
  146. If there is no more of the file remaining on disk, this command is
  147. ignored.
  148.  
  149.  
  150. .unl 4
  151. End
  152.  
  153. This command saves all changes made to the file during this editing
  154. session and returns to the operating system. If the file is larger than
  155. memory and has not all been read through the edit buffer yet, this will
  156. be done automatically upon issuing this command. Also, the original file
  157. will be saved as d:fid.BAK before the new copy of the file is named to
  158. d:fid.ext.
  159.  
  160.  
  161. .unl 4
  162. Quit
  163.  
  164. Use this command to terminate the editing session without saving the
  165. changes that have just been made to the file. This is handy when you are
  166. just examining the contents of a file or when you suddenly realize that
  167. a large number of changes that you have just made to the file are
  168. inappropriate.
  169.  
  170.  
  171. .unl 4
  172. SAve
  173.  
  174. Use this command if you have a system prone to memory errors or power
  175. failures, or if you just happen to have common sense. It saves all
  176. changes that have been made to the file and then places you back exactly
  177. where you were in the file at the time you issued the save command.
  178.  
  179.  
  180. .unl 4
  181. Head
  182.  
  183. This is the same as the SAve command except that it places you at the
  184. beginning of the file instead of where you were when the command was
  185. given. It is functionally the same as Ending and then calling up EXPRESS
  186. again to edit the same file, it is just faster.
  187. .brp
  188. .inb -4
  189. .fif
  190. SYSTEM COMMANDS - CP/M surrogate
  191. ---------------
  192. .fin
  193.  
  194.  
  195. The following commands operate on any file on a disk currently on the
  196. computer system. They provide you with most of the commands of the CP/M
  197. Console Command Processor and PIP without requiring you to end the edit
  198. and exit to the operating system.
  199.  
  200. On all commands, if a given filename is invalid or does not exist, an
  201. appropriate error message is displayed and the cursor is placed at the
  202. beginning of the command line, with the line you just typed still intact
  203. for editing.
  204.  
  205. Remember that anywhere a filename is requested, you can optionally
  206. specify a disk and user area different from the current defaults
  207. (displayed on the command screen immediately preceding 'Editing').
  208. .inb +4
  209.  
  210.  
  211. .unl 4
  212. Dir [du:fid.ext]
  213.  
  214. Displays a listing with filesizes (in kilobytes) of the directory of the
  215. given disk or files matching the filename given. '?' (single character)
  216. and '*' (multiple letters) wildcards are allowed in the file name. For
  217. instance:
  218.  
  219.             DIR C:*.COM
  220.  
  221. will list all files of type .COM on drive C in the current user area.
  222.  
  223.             D A11:
  224.  
  225. lists all files on drive A in user area 11.
  226.  
  227.             di d4:the?.*
  228.  
  229. lists all files on drive D, user area 4, with a four letter filename
  230. starting with 'THE' and any extension.
  231.  
  232.             DIR
  233.  
  234. prints the directory of the current default drive and user area.
  235.  
  236.  
  237. .unl 4
  238. TYpe du:fid.ext
  239.  
  240. This command is used to display a file on the screen, similar to CP/M's
  241. TYPE command (with a few enhancements). The command:
  242.  
  243.     ty myfile.txt
  244.  
  245. will display the file 'myfile.txt' on the screen (if the file exists).
  246.  
  247. TYPE simply sends the contents of a file to the screen. It does not stop
  248. after each screen (type a <space> or some other character to momentarily
  249. suspend output).
  250.  
  251. The speed at which the file scrolls past the screen may be controlled
  252. with the number keys in the same fashion as auto-scroll, with the
  253. exception of the '-' key (you cannot scroll backwards with the TYPE
  254. command). See the Continuous Scroll commands in the Edit Mode section
  255. for more details.
  256.  
  257. Typing any character other than a number suspends output until another
  258. character is typed; typing <ESC> stops the display and immediately
  259. returns you to Command Mode.
  260.  
  261. When the entire file has been displayed, the message [EOF] is displayed
  262. at the bottom of the screen. At this time you must type <ESC> (______)
  263. to return to the command screen.
  264.  
  265. Wildcarded file names are NOT allowed for the TYPE command.
  266.  
  267.  
  268. .unl 4
  269. ERase du:fid.ext
  270.  
  271. Functionally the same as the CP/M ERA command. This command erases the
  272. named file if it exists, or prints an error message if it doesn't.
  273.  
  274. The '?' (single character) wildcard character and the '*' (multiple
  275. character) wildcard are both allowed when specifying the file to ERASE.
  276. This means that you can ERASE several files with a single command. For
  277. example:
  278.  
  279.     era *.bak
  280.  
  281. will ERASE all files with file extension BAK on the current drive/user
  282. (this is a very handy thing to do when you get a Disk Full Error).
  283.  
  284.     era b12:the*.*
  285.  
  286. will ERASE all files on drive B, user 12 with names that begin with
  287. 'the'.
  288.  
  289.     erase a:dis?
  290.  
  291. ERASEs all files on drive A in the current user area that have a four
  292. character file name beginning with 'dis' and a blank file extension.
  293.  
  294. As a rule, any selected group of files that would include the file being
  295. edited (source.ext) or the temporary file used by EXPRESS during the
  296. editing session (source.$$$) cannot be operated on by this command (to
  297. avoid lawsuits and suicides).
  298.  
  299.  
  300. .unl 4
  301. REName du:fid.ext > du:fid.ext
  302.  
  303. This is identical to CP/M's REN command except that it recognizes the
  304. '>' character (ala UNIX) as well as the '=' (like PIP). You may also use
  305. the '<' redirection symbol (more UNIX) or simply a space (MSDOS, VMS).
  306. This way, no matter what operating system you are used to, the command
  307. will execute and you won't get frustrated trying to remember 25
  308. different types of command lines. So there is no confusion, the
  309. following command lines all have the same effect, they RENAME a file
  310. called 'OLDNAME' to 'NEWNAME':
  311.  
  312.     ren newname=oldname
  313.     ren newname < oldname
  314.     ren oldname > newname
  315.     ren oldname newname
  316.  
  317. Note that blanks between filenames and the 'director' characters are
  318. ignored (except in the case where the 'director' IS a blank).
  319.  
  320. If the file to be RENAMED is in a different drive/user than the current
  321. default, you only need to include it in the first filename on the line.
  322. For example, all of the following commands rename 'B21:OLD' to
  323. 'B21:NEW':
  324.  
  325.     rename b21:new=old
  326.     rename b21:new <old
  327.     rename b21:old >b21:new
  328.     rename b21:old new
  329.  
  330. Remember: when in doubt, just type the same command you would use in
  331. CP/M (or MSDOS, or whatever you are used to)
  332.  
  333. Wildcarded file names are NOT allowed for this command and it is not
  334. allowed to operate on the files source.ext or source.$$$.
  335.  
  336. (* NOTE: You cannot change the drive that a file is on with the rename
  337. command! You must first COPY the file to the other drive and then ERAse
  338. it from the source drive)
  339.  
  340. (* NOTE for UNIX purists: Yes, I realize that the UNIX command is 'mv'
  341. and that it doesn't use the redirection symbols, but they do have an
  342. intuitive appeal about them in this context, don't you think?)
  343.  
  344.  
  345. .unl 4
  346. Copy du:fid.ext > du:fid.ext
  347.  
  348. This command copies the contents of a file into a new file. Both files
  349. can be on any drive in any user area. The same flexible command
  350. interpretation used for the rename command is used for COPY. To
  351. illustrate:
  352.  
  353.     copy exist > new
  354.     copy new = exist
  355.     copy exist new
  356.     copy new < exist
  357.  
  358. all copy the contents of the file 'EXIST' into the new file called
  359. 'NEW'. The '>' form of the command becomes very understandable when
  360. the '>' is thought of as the word 'to'; this way the command would read
  361. as 'COPY exist TO new'.
  362.  
  363. Wildcarded file names are NOT allowed for this command.
  364.  
  365. If the file being copied does not exist, or the file you wish to create
  366. already exists, an appropriate error message is printed and the command
  367. is ignored. If you want to copy over an existing file, ERASE it first,
  368. then COPY into it.
  369.  
  370.  
  371. .unl 4
  372. LOg du:
  373.  
  374. This command allows you to change the current 'default' drive and user
  375. area (displayed on the third line of the Command Screen, preceding
  376. 'Editing'). This is handy if you entered the editor in one area and then
  377. decided to work on something in another area. While you could just type
  378. the new drive and user area preceding all the file names you enter, it
  379. is much more convenient to LOG into the new area and just type the file
  380. names from then on, letting EXPRESS figure out the drive and user for
  381. you.
  382.  
  383. After this command is entered, the new 'default' will be displayed at
  384. the beginning of the third line on the screen:
  385.  
  386.             C12:Editing B3:THIS.FIL
  387.             ^-- new default drive/user area
  388.  
  389. This new default is in effect until you return to the operating system,
  390. when the original default drive and user area are restored.
  391.  
  392. You MUST type the colon ":" at the end of the drive/user area or you
  393. will receive an error message. Remember that you can specify a drive
  394. without a user area, but you cannot give a user area without a drive.
  395.