home *** CD-ROM | disk | FTP | other *** search
- .brp
- .inb -4
- .fif
- MACRO KEY COMMANDS - defining macro keys and managing macro key files
- ------------------
- .fin
-
- The Macro Key Commands allow you to redefine any sequence of typed keys
- to output a sequence of characters or commands, and to save these key
- redefinitions in a disk file for later recall. Macro keys can
- dramatically increase productivity and decrease boredom and frustration (and
- besides that, they're just plain fun.)
-
- After a macro key has been defined, typing that key, or sequence of
- keys, will have the same results as typing the characters or commands
- the key was redefined to. For instance, if the <LF> (^J) key has been
- redefined to type 'this is the linefeed key', then typing <LF> will
- cause 'this is the linefeed key' to be entered on the screen (and in the
- file) just as if you had typed the entire string yourself. This can be
- handy in many obvious ways (like defining macro keys for common words
- like 'write', 'read', 'begin', etc.) and in many not-so-obvious ways
- that are described in Appendix ???.
-
- When you are done using a macro key, you can 'undefine' the key (by
- redefining it to a blank string) and it will regain its original meaning.
- You can also enter the original valueof a key into the file by using the
- Insert Control Character (actually 'literal next') command ^C (____)
- followed by the key; you can redefine normal printable characters without
- losing the ability to enter them into the text.
-
- A macro key can be any character, or sequence of characters, that you
- can type on the keyboard; each macro 'key' can be up to 10 keystrokes
- long. For instance, the following could be redefined as macro keys:
-
- ^U^B (control+U followed by control+B)
- t (the letter 't')
- T (the letter 'T', separate from the letter 't')
- <ESC>BGG (the <ESC> key followed by 'BGG'
- .
- .
-
- The redefinition of a macro key can be any mixture of characters and
- commands entered just as you would type them at the keyboard; each macro
- 'redefinition' can be up to 256 keystrokes in length. Macro
- redefinitions can be used to execute any command you can execute from
- the keyboard. For instance, a macro key to go to Command Mode and save
- the current text block to the file 'TEMP.$$$', then return to Edit Mode
- is defined as:
-
- <ESC>bs temp.$$$<CR><ESC>
-
- assuming that you are using the command keys originally installed in
- EXPRESS. Notice that when the macro redefinition is typed in, you
- actually type the <ESC> key, not the sequence of characters '<ESC>'.
- Another example is the following command that will move to the beginning
- of the last word on the current line and place you in partial insert
- mode:
-
- ^U^L^A^Q (end of line, prev word, partial insert on)
-
- again, this is assuming you have not reinstalled the command keys with
- CONFIG; if you have, just use the commands you have defined as 'end of
- line', 'prev word', and 'partial insert on' when entering the
- redefinition string.
-
- .unl 4
- MDefine
-
- When this command is entered, you are prompted for 'input keys' (the key
- sequence you will type to execute the macro). Type the exact key sequence
- you want to use followed by a <CR>. Then you will be asked for the
- 'redefinition'; type the characters and editing commands that you want to be
- executed when you type the 'input keys' followed by <CR>. If you make a
- mistake while defining either the input keys or the redefinition string, use
- the <RUB> (DEL) key to correct the line (all other editing keys are disabled
- so they can be part of macro definitions).
-
- To 'UnDefine' a macro command, enter the input keys that you wish to be
- undefined, then enter a blank line for the redefinition. You can 'redefine'
- an existing key without worrying about undefining it first.
-
- If you want to use <CR> and <RUB> in macro definitions, you can either avoid
- the problem by using 'NextLine, Start of Line' for <CR> and 'Backspace,
- Delete Character' for <RUB> or you can follow the MD on the command line
- with the keys you wish to use for <RUB> and <CR>. For instance, the command:
-
- MD:-
-
- will allow you to define a new macro key using ':' as the <RUB> key and '-'
- as the <CR> key.
-
-
- .unl 4
- MClear
-
- Mclear is a quick way to clear out the entire macro table. All previously
- defined macro key will be 'forgotten'.
-
-
- .unl 4
- MSave du:fid.ext
-
- Saves all current macro definitions to the named file. The definitions
- are not cleared from the macro table.
-
-
- .unl 4
- MRestore du:fid.ext
-
- Loads the named macro key file into the macro table. A check is made to see
- if the file actually does contain macro definitions.
-
- The new macro definitions are added to the current definitions (the current
- ones are not deleted). You can concatenate two (or several) macro files by
- MRestoring them all and then MSaving them all at once.
- .brp
- .fif
- BUFFER COMMANDS - Managing the edit buffer contents
- ---------------
- .fin
-
-
- These commands operate directly on the file that is being edited and on
- the contents of the edit buffer.
- .inb +4
-
-
- .unl 4
- PRead [n]
-
- Writes n screens full (if n is not specified then it writes one screen
- full) of the current edit buffer to the disk and reads as many more as
- will fit in the buffer, if any of the file is left on the disk.
-
- If the entire file has already been read, n pages are still written to
- disk and the buffer is left partially empty.
-
-
- .unl 4
- BRead
-
- If there is still a portion of the file remaining on the disk, this
- command writes the current edit buffer contents to disk and reads in
- more until the buffer is full or the end of the file is reached.
-
- If there is no more of the file remaining on disk, this command is
- ignored.
-
-
- .unl 4
- End
-
- This command saves all changes made to the file during this editing
- session and returns to the operating system. If the file is larger than
- memory and has not all been read through the edit buffer yet, this will
- be done automatically upon issuing this command. Also, the original file
- will be saved as d:fid.BAK before the new copy of the file is named to
- d:fid.ext.
-
-
- .unl 4
- Quit
-
- Use this command to terminate the editing session without saving the
- changes that have just been made to the file. This is handy when you are
- just examining the contents of a file or when you suddenly realize that
- a large number of changes that you have just made to the file are
- inappropriate.
-
-
- .unl 4
- SAve
-
- Use this command if you have a system prone to memory errors or power
- failures, or if you just happen to have common sense. It saves all
- changes that have been made to the file and then places you back exactly
- where you were in the file at the time you issued the save command.
-
-
- .unl 4
- Head
-
- This is the same as the SAve command except that it places you at the
- beginning of the file instead of where you were when the command was
- given. It is functionally the same as Ending and then calling up EXPRESS
- again to edit the same file, it is just faster.
- .brp
- .inb -4
- .fif
- SYSTEM COMMANDS - CP/M surrogate
- ---------------
- .fin
-
-
- The following commands operate on any file on a disk currently on the
- computer system. They provide you with most of the commands of the CP/M
- Console Command Processor and PIP without requiring you to end the edit
- and exit to the operating system.
-
- On all commands, if a given filename is invalid or does not exist, an
- appropriate error message is displayed and the cursor is placed at the
- beginning of the command line, with the line you just typed still intact
- for editing.
-
- Remember that anywhere a filename is requested, you can optionally
- specify a disk and user area different from the current defaults
- (displayed on the command screen immediately preceding 'Editing').
- .inb +4
-
-
- .unl 4
- Dir [du:fid.ext]
-
- Displays a listing with filesizes (in kilobytes) of the directory of the
- given disk or files matching the filename given. '?' (single character)
- and '*' (multiple letters) wildcards are allowed in the file name. For
- instance:
-
- DIR C:*.COM
-
- will list all files of type .COM on drive C in the current user area.
-
- D A11:
-
- lists all files on drive A in user area 11.
-
- di d4:the?.*
-
- lists all files on drive D, user area 4, with a four letter filename
- starting with 'THE' and any extension.
-
- DIR
-
- prints the directory of the current default drive and user area.
-
-
- .unl 4
- TYpe du:fid.ext
-
- This command is used to display a file on the screen, similar to CP/M's
- TYPE command (with a few enhancements). The command:
-
- ty myfile.txt
-
- will display the file 'myfile.txt' on the screen (if the file exists).
-
- TYPE simply sends the contents of a file to the screen. It does not stop
- after each screen (type a <space> or some other character to momentarily
- suspend output).
-
- The speed at which the file scrolls past the screen may be controlled
- with the number keys in the same fashion as auto-scroll, with the
- exception of the '-' key (you cannot scroll backwards with the TYPE
- command). See the Continuous Scroll commands in the Edit Mode section
- for more details.
-
- Typing any character other than a number suspends output until another
- character is typed; typing <ESC> stops the display and immediately
- returns you to Command Mode.
-
- When the entire file has been displayed, the message [EOF] is displayed
- at the bottom of the screen. At this time you must type <ESC> (______)
- to return to the command screen.
-
- Wildcarded file names are NOT allowed for the TYPE command.
-
-
- .unl 4
- ERase du:fid.ext
-
- Functionally the same as the CP/M ERA command. This command erases the
- named file if it exists, or prints an error message if it doesn't.
-
- The '?' (single character) wildcard character and the '*' (multiple
- character) wildcard are both allowed when specifying the file to ERASE.
- This means that you can ERASE several files with a single command. For
- example:
-
- era *.bak
-
- will ERASE all files with file extension BAK on the current drive/user
- (this is a very handy thing to do when you get a Disk Full Error).
-
- era b12:the*.*
-
- will ERASE all files on drive B, user 12 with names that begin with
- 'the'.
-
- erase a:dis?
-
- ERASEs all files on drive A in the current user area that have a four
- character file name beginning with 'dis' and a blank file extension.
-
- As a rule, any selected group of files that would include the file being
- edited (source.ext) or the temporary file used by EXPRESS during the
- editing session (source.$$$) cannot be operated on by this command (to
- avoid lawsuits and suicides).
-
-
- .unl 4
- REName du:fid.ext > du:fid.ext
-
- This is identical to CP/M's REN command except that it recognizes the
- '>' character (ala UNIX) as well as the '=' (like PIP). You may also use
- the '<' redirection symbol (more UNIX) or simply a space (MSDOS, VMS).
- This way, no matter what operating system you are used to, the command
- will execute and you won't get frustrated trying to remember 25
- different types of command lines. So there is no confusion, the
- following command lines all have the same effect, they RENAME a file
- called 'OLDNAME' to 'NEWNAME':
-
- ren newname=oldname
- ren newname < oldname
- ren oldname > newname
- ren oldname newname
-
- Note that blanks between filenames and the 'director' characters are
- ignored (except in the case where the 'director' IS a blank).
-
- If the file to be RENAMED is in a different drive/user than the current
- default, you only need to include it in the first filename on the line.
- For example, all of the following commands rename 'B21:OLD' to
- 'B21:NEW':
-
- rename b21:new=old
- rename b21:new <old
- rename b21:old >b21:new
- rename b21:old new
-
- Remember: when in doubt, just type the same command you would use in
- CP/M (or MSDOS, or whatever you are used to)
-
- Wildcarded file names are NOT allowed for this command and it is not
- allowed to operate on the files source.ext or source.$$$.
-
- (* NOTE: You cannot change the drive that a file is on with the rename
- command! You must first COPY the file to the other drive and then ERAse
- it from the source drive)
-
- (* NOTE for UNIX purists: Yes, I realize that the UNIX command is 'mv'
- and that it doesn't use the redirection symbols, but they do have an
- intuitive appeal about them in this context, don't you think?)
-
-
- .unl 4
- Copy du:fid.ext > du:fid.ext
-
- This command copies the contents of a file into a new file. Both files
- can be on any drive in any user area. The same flexible command
- interpretation used for the rename command is used for COPY. To
- illustrate:
-
- copy exist > new
- copy new = exist
- copy exist new
- copy new < exist
-
- all copy the contents of the file 'EXIST' into the new file called
- 'NEW'. The '>' form of the command becomes very understandable when
- the '>' is thought of as the word 'to'; this way the command would read
- as 'COPY exist TO new'.
-
- Wildcarded file names are NOT allowed for this command.
-
- If the file being copied does not exist, or the file you wish to create
- already exists, an appropriate error message is printed and the command
- is ignored. If you want to copy over an existing file, ERASE it first,
- then COPY into it.
-
-
- .unl 4
- LOg du:
-
- This command allows you to change the current 'default' drive and user
- area (displayed on the third line of the Command Screen, preceding
- 'Editing'). This is handy if you entered the editor in one area and then
- decided to work on something in another area. While you could just type
- the new drive and user area preceding all the file names you enter, it
- is much more convenient to LOG into the new area and just type the file
- names from then on, letting EXPRESS figure out the drive and user for
- you.
-
- After this command is entered, the new 'default' will be displayed at
- the beginning of the third line on the screen:
-
- C12:Editing B3:THIS.FIL
- ^-- new default drive/user area
-
- This new default is in effect until you return to the operating system,
- when the original default drive and user area are restored.
-
- You MUST type the colon ":" at the end of the drive/user area or you
- will receive an error message. Remember that you can specify a drive
- without a user area, but you cannot give a user area without a drive.