home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
gal210a4.arc
/
GALCH5.GAL
< prev
next >
Wrap
Text File
|
1987-08-11
|
18KB
|
538 lines
.a lp=12,js=y,ct=n bo=51 te=12 to=90 pn=1 nm=1
.st3,14,1
&dChapter%Five:%%Using%the%Special%Function%Keys .jc
&d[%Chapter%Five%] .hc
.t36 5 - .zl
&d5.1%SPECIAL%EDITING%AND%DISK%FUNCTIONS .jr
.st3,11,1 .x-5
This chapter covers the special functions for editing, directories,
printing, and disk file maintenance. Some new function and special/numeric
keys are introduced and others are reviewed.
.st3,12,1
&dReturning%to%the%COMMAND%Mode:
.t10 &d<%SHIFT%>%<%RETURN%>%and%<CTRL>%<C>
.st3,11,1 .x-5
Most of the functions discussed in this chapter can be invoked by simply
pressing the appropriate keys. Galahad has many functions which are not
assigned to any key. To use these commands you must return to the Command mode
from the Edit mode by pressing <%CTRL%> <%C%> (or press <%SHIFT%>%<%RETURN%> as
discussed in Chapter One.)
Appendix E describes all Galahad functions. A few of the ones which
might be of interest, and which are not available on function keys are:
.i10
Immediate .t30 ClearImmeds
NewBuffer .t30 RenameFile
Options .t30 GotoLine
ChDirectory .t30 ReplaceToBottom
CDirectory .t30 CompareWindows
.i
You should take time to read Appendix E. You will find may functions
which may save you time preparing your documents.
.st3,12,1
&dThe%META%Key:%%%<%ESC%>
.st3,11,1 .x-5
The <%ESC%> key works in the Galahad EDIT mode only. Pressing <%ESC%>
begins a Meta-key sequence.
The Meta key allows one to extend the number of function keys available.
The notion of a Meta Key is to tell the computer that the key which is pressed
after the Meta Keys has a different meaning than it normally has.
To use a Meta-key sequence, go into the EDIT mode, and press the <%ESC%>
key. The message "Meta Active - Press Companion Key" will appear on the bottom
left of the screen. Then press the second key in the <%ESC%> sequence, say
<k>. Now, try pressing <%ESC%> <f> for another example of a Meta-key sequence.
The previous chapters have discussed Meta-key sequences, without using the
name. They are mainly used to provide help and to configure Galahad for
different printers.
Almost any key on the keyboard can be defined in such meta sequences so
that it can perform Galahad commands. (See Chapter Six for re-assigning keys.)
.st3,14,1
&d5.2%SPECIAL%EDITING%FUNCTIONS .jr
.st3,11,1 .x-5
Three of the function keys are especially useful in editing: these are
keys <%ALT%>%<%F7%>, <%ALT%>%<%F8%>, and <%ALT%>%<%F9%>.
.st3,12,1
&dUser-Defined%Phrases:
.t10 &d<%ALT%>%<%F7%>,%<%ALT%>%<%F8%>,%and%<%ALT%>%<%F9%>
.st3,11,1
Some documents contain long words or phrases that occur repeatedly. A
shortcut to typing in these lengthy items is to define them with special
function keys, and then you can call them up very easily whenever they occur in
your text. Galahad allows you to define (enter into memory) any three such
phrases at one time with <%ALT%>%<%F7%>, <%ALT%>%<%F8%>, and <%ALT%>%<%F9%>.
To enter a phrase use the following procedure.
.std3,12,1
PROCEDURE FOR ENTERING A USER-DEFINED PHRASE .jc
.st3,11,1
.i10
.u3 1. .t10 Make sure that you are in the EDIT mode.
.u3 2. .t10 Hold down the <%CTRL%> key and press keypad key <%F7%> (or <%F8%>
or <%F9%>).
(The computer will print &dUser%Phrase at the bottom of the screen.)
.u3 3. .t10 Enter a phrase of no more than one line and press <%RETURN%>. (The
phrase will now be stored in the computer.)
.u3 4. Whenever you wish to use the phrase, press <%ALT%>%<%F7%> (or
<%ALT%>%<%F8%> or <%ALT%>%<%F9%> according to which key you used to store the
phrase).
.i
Consider the following example. In typing a paper on Voltaire's &iCandide
you find that you must repeat several times the name of Cunegonde's brother.
His name is Don Fernando d'Ibaraa y Figueora y Mascarenes y Lampourdos y Souza.
Instead of retyping the name each time it occurs, simply press <%CTRL%> <%F7%>
(or <%F8%> or <%F9%>) and enter the name once. Then each time the name occurs
simply press keypad key <%ALT%>%<%F7%> (or <%ALT%>%<%F8%> or <%ALT%>%<%F9%>).
.sto3,11,1
Exercise #5.1
.st3,11,1
Use one of the user-defined keys to enter the following phrase:
I won't misspell deoxyribonucleic acid anymore.
Now repeat the phrase 20 times.
.st3,12,1
&dRecording%Keystrokes:
.t10 &d<%ESC%>%<%F7%>,%<%ESC%>%<%F8%>,%and%<%ESC%>%<%F9%>
.st3,11,1
The user-defined phrase function works well for strings, but some word
processing functions require repetitive actions that include carriage returns,
deletions, and cursor movement. The record key function preserves a record of
such actions under a single key. Any of the Galahad functions, including
Saving, Printing, and invoking the Command mode prompt can be preserved and
recalled with record key. Of course, record key cannot call itself, nor can it
record an exit from Galahad -- BYE, <%KP-%>. As you become sophisticated in
using Galahad you will want to take advantage of the capabilities of the record
key functions.
.std3,12,1
PROCEDURE FOR RECORDING KEYSTROKES .jc
.st3,11,1
.i10
.u3 1. .t10 Press <%ESC%> <%F7%>, <%ESC%> <%F8%>, or <%ESC%> <%F9%>
.u3 2. .t10 Begin editing (Keystrokes will be recorded and any changes made on
the screen will become an actual part of the text.)
.u3 3. .t10 When keystrokes have been entered, press <%ESC%> <%F7%> again (or
<%ESC%> <%F8%>, or <%ESC%> <%F9%>
.u3 4. .t10 When you want the sequence of keys repeated, press <%ALT%>%<%F7%>
(or <%ALT%>%<%F8%> or <%ALT%>%<%F9%> according to which key you used to record
the keystrokes)
.i
.sto3,11,1
Example:
.st3,11,1
With record key, a number of pains-taking tasks can be included in a
single keystroke. For instance, suppose you needed to highlight a number of
warning messages for the procedures in a laser lab. The record key could be
set to put lines above and below any single line message. This could be done
as follows:
.n6
&h7 Write the message:
Put on safety goggles, now.
&h7 Then press <%ESC%> <%F8%> to begin the sequence
.i10
.u3 1. .t10 Press <%SHIFT%> LeftArrow to move the cursor to the far left
.u3 2. .t10 Press <%RETURN%> to create a line above the message
.u3 3. .t10 Press <UP ARROW> to move to the new blank line
.u3 4. .t10 Enter the following using the space bar and dashes
--------------------------WARNING------------------------------
.u3 5. .t10 Press <DOWN ARROW> once and press <%RETURN%> to move below the
message
.u3 6. .t10 Enter the following using the space bar and dashes
------------------------------------------------------------------------
.u3 7. .t10 Press <%RETURN%>
.i
&h7 Press <%ESC%> <%F8%> to end the sequence.
The warning lines will be above and below your original message, and they
will be recorded under <%ALT%>%<%F8%>. The next time that you write a warning
message, you need only press <%ALT%>%<%F8%> to construct the warning message
lines. For instance, write
Turn off the power switch before adjusting the laser.
While the cursor is still on the line press <%ALT%>%<%F8%>. The message now
appear as follows:
---------------------------WARNING-----------------------------
Turn off the power switch before adjusting the laser.
------------------------------------------------------------------------
.sto3,11,1
Exercise #5.2
.st3,11,1
Recreate and test the above example on your own screen.
.g
.st3,14,1
&d5.3%DIRECTORIES,%STATUS,%AND%OPTIONS .jr
.st3,11,1 .x-5
.st3,12,1
&dDIR,%DIR%A:,%and%DIR%B:
.t10 &d<%ALT%>%<%F4%>,<%ALT%>%<%F5%>,%and%<%ALT%>%<%F6%>
.st3,11,1
To obtain the directory of your Galahad files, press <%ALT%>%<%F4%>. This
gives a directory of the default drive and the default extension. The default
extension can be changed with the Galahad command DefaultExtension. To change
it you would, for example, press <%CTRL%>%<%C%> then enter: DefaultExtension
=.INI%. Then the default for the <%ALT%>%<%F4%> directory becomes =.INI. (It
also becomes the default for loading and saving files).
To obtain the directory of all files in drive A, press <%ALT%>%<%F5%>.
To obtain the directory of all files in drive B, press <%ALT%>%<%F6%>.
.st3,12,1
&dFILE%Status:%%%<%CTRL%>%<%F4%>
.st3,11,1
To obtain information on the status of your current file, use <%CTRL%>
<%F4%>. You will receive a status report that looks something like this:
.i8
Sample Status Report
Current filename: CHAPTER5.GAL
Text Size: 10760 bytes
Insert buffer is holding: 354 bytes
Current time: 08:42 .i
.st3,12,1
&dOPTION:%%%<%CTRL%>%<%F5%>
.st3,11,1
To change the default Galahad printing options use <%CTRL%> <%F5%>. These
options will control printer margins when LISTing text to a printer.
When you press <%CTRL%> <%F5%>, the options will appear one at a time.
You enter new default numbers and press <%RETURN%> or press <%RETURN%> to
accept the numbers that are presented to you. The following example shows the
screen after two changes (to left margin and line length) were made.
.i8
Sample Options
Printer Left Margin Width (%14): 12
Text Line Length (%80): 72
Lines Skipped at Fanfold (%12):
Command (B:):
.i
.st3,12,1
&dSCRATCH:%%%<%CTRL%>%<%F6%>
.st3,11,1
To clear, that is empty, the text from a text buffer you can use the
SCRATCH command. This can be invoked by pressing <%CTRL%> <%F6%>. You may
wish to scratch a file in order to start an entirely new one (see Chapter One).
Scratching a file from the computer memory (a text buffer) will not affect the
file as it was last saved on disk.
.st3,14,1
&d5.4%PRINTING .jr
.st3,11,1 .x-5
.st3,12,1
&dPRINT%and%PRINT%PRN:
.t10 &d<%ALT%>%<%F1>%and%<%CTRL%>%<%F1>
.st3,11,1
Instructions for printing were explained in Chapter One. These included
the following:
To print your file to the screen, press <%ALT%>%<%F1>
To print your file to a printer, use <%CTRL%>%<%F1>.
.st3,12,1
&dLIST%and%LIST%PRN:%%%<%ALT%>%<%F2%>%and%<%CTRL%>%<%F2%>
.st3,11,1
The LIST function puts the file on the screen complete with the editing
commands and without executing the dot letter or dot A formatting commands.
To List your file to the screen, press <%ALT%>%<%F2%>
It is frequently desirable to list your file on paper. For instance, when
you write a computer program using Galahad as your editor you will want each
line listed as you wrote it. You do not need to have it formatted into
paragraphs.
To List your file to a printer, use <%CTRL%>%<%F2%>
From the Command prompt you can list to paper any part of a file using the
following command.
List prn: n m
The n represents the number of the first line of text to be printed. The m
represents the number of the last line to be printed. If only one line number
is entered, the printer will start at that line and print to the end of the
file. To print just one line enter the line number twice.
Consider the following examples:
.t7,33
.t List prn: 5 5 .t Prints line 5 on paper
.t List 7 7 .t Prints line 7 on the screen
.t List prn: 20 30 .t Prints lines 20-30 on paper
.t List prn: 400 .t Prints line 400 to end of file on paper
.st3,14,1
&d5.5%DISK%AND%FILE%MAINTENANCE .jr
.st3,11,1 .x-5
.st3,12,1
&dSave:%%%<%SHIFT%><%KP+%>
.st3,11,1
When you are ready to save your file, you can type in SAVE or press
<%SHIFT%><%KP+> and Galahad will type in the word SAVE for you, and supply the
filename associated with the current text buffer. When you press <%RETURN%>
the file will be saved, unless the file already exists on the disk. In that
case you will get the message:
A:\<filename> already exists - Replace, Backup or Cancel?
Responding with <R> will save a text file under a name that has already
been used; the old file of that name disappears. It is replaced by the new
text you are saving.
Responding with <B> will make a backup file of your old file and your new
text is saved too. Both files will have the same name, but the old file is
given the special extension name =.BAK%; the new file is given the extension
=.GAL. To retrieve the old file be sure to use the =.BAK extension (see LOAD,
below in this section).
Responding with <C> will do nothing. Galahad will go back into the Edit
mode.
.st3,12,1
&dBYE:%%%<%KP-%>
.st3,11,1
To exit from Galahad, you can use the hyphen key on the keypad.
.st3,12,1
&dLoadBuffer,%Load,%and%Append:
.t10 &d<%KP+%>,%<%CTRL%>%<%F3%>,%and%<%SHIFT%>%<%KP-%>
.st3,11,1
You can write LOADBUFFER to the COMMAND mode prompt simply by pressing the
<%KP+%>. When the prompt LoadBuffer: appears write in the name of the file you
wish to load.
The LoadBuffer command allows you to load a specified file into a new text
buffer. This means that you can work on multiple files without reloading.
Your can write LOAD to the COMMAND mode prompt by pressing
<%CTRL%>%<%F3%>. You would use Load when you wanted to erase the text in the
current buffer and replace it with a new text file.
You can write APPEND next to the COMMAND mode prompt simply by pressing
<%SHIFT%>%<%KP-%>. When the word appears you can then write in the name of the
file you wish to load. The APPEND command appends the specified file to the
end of the current text.
.st3,12,1
&dEntering%Edit:
.t10 &d<%CTRL%>%<%RETURN%>%and%<%ALT%>%<%F3%>
.st3,11,1
You can use <%ALT%>%<%F3%> to write the word Edit on the screen next to
the Command mode prompt. It will appear as shown below:
Edit:
The <%CTRL%>%<%RETURN%> key on the keypad does about the same thing, but it
moves you directly into the edit mode. <%ALT%>%<%F3%> waits for you to press
RETURN. If you enter a file name after the word EDIT, then Galahad will load
the file from the disk and display the file in the edit mode. This feature can
save you a step or two over using LoadBuffer and then EDIT to access a file.
.sto3,11,1
CAUTION: If you have just edited a file, be sure to save it before using Edit
or Load to move to a new file.
.st3,12,1
&dDisplaying%Next%File:%%%<%SHIFT%>%<%BACKSPACE%>
.st3,11,1
Press <%SHIFT%>%<%BACKSPACE%> to move between files, when several files
are loaded into the buffers. Each time you press <%SHIFT%>%<%BACKSPACE%> the
next buffer is displayed. When the last buffer is displayed, the next time you
press <%SHIFT%>%<%BACKSPACE%> the first buffer is displayed.
.st3,12,1
&dReview%5.1
.st3,11,1
Review the numeric keypad keys and commands.
.t2,19,41
.t4 _Command .t22 _Key* .t45 _Comment
.t MetaKey .t <ESC> .t Allows for special key assignments
.t .t .t (see Chapter Six)
.t SAVE [filename] .t <SHIFT><KP+> .t Saves current file under "filename"
.t LOAD filename .t <CTRL><F3> .t Loads the "filename" file
.t LOADBUFFER filename
.t .t <KP+> .t Loads "filename" file into new text buffer
.t APPEND filename .t <SHIFT><KP-> .t Appends the "filename" file to current
file
.t NEXTBUFFER .t <SHIFT><BACKSPACE> .t Displays next file in file buffer
.t PRINT .t <ALT><F1> .t Prints file on screen
.t P PRN: .t <CTRL><F1> .t Prints file on attached printer
.t P [n n] .t .t Prints to screen pages n to n
.t P PRN: [n n] .t .t Prints to printer pages n to n
.t List .t <ALT><F2> .t Lists file on screen
.t L PRN: .t <CTRL><F2> .t List prints file on paper
.t L [n n] .t .t Lists lines n through n
.t L PRN: [n n] .t .t List prints lines n through n
.t EDIT .t <CTRL><RETURN> .t Moves from Command to Edit mode
.t Edit: [name] .t <ALT><F3> .t Invokes Edit mode (with filename as
.t .t .t an argument, loads and enters Edit)
.t.t <CTRL><C> .t Move from Edit mode to Command mode
.t .t <SHIFT><RETURN> .t Move from Edit mode to Command mode
.t DIR .t <ALT><F4> .t Directory of extension =.GAL files
.t DIR A: .t <ALT><F5> .t Directory of all files on Disk A:
.t DIR B: .t <ALT><F6> .t Directory of all files on Disk B:
.t FileInfo .t <CTRL><F4> .t Shows name and size of file
.t Options .t <CTRL><F5> .t Allows user to change left margin, line
.t .t .t length, and lines skipped for list printing
.t Scratch .t <CTRL><F6> .t Clears screen, changes filename to NONAME.GAL
.g
.t4 _Command .t22 _Key* .t45 _Comment
.t UserPhrase .t <CTRL><F7> .t | Stores a phrase for printing to
.t UserPhrase .t <CTRL><F8> .t | file when key is pressed again
.t UserPhrase .t <CTRL><F9> .t |
.t RecordKey .t <ESC><F7> .t | Records a series of keystrokes for
.t RecordKey .t <ESC><F8> .t | executing when key is pressed
.t RecordKey .t <ESC><F9> .t |
Arrows (for cursor movement):
.t MoveLeft .t LeftArrow .t Moves left one column; if end of line,
.t .t .t moves up a line
.t MoveToLeft .t <SHIFT> LeftArrow .t Moves to column 1
.t MoveRight .t RightArrow .t Moves left one column; if end of line,
.t .t .t moves down a line
.t MoveToRight .t <SHIFT> RightArrow .t Moves to right end of line
.t MoveUp .t UpArrow .t Moves up one line
.t PageUp .t <SHIFT> UpArrow .t Moves up 15 lines
.t .t <PgUp> .t Moves up 15 lines
.t MoveDown .t DownArrow .t Moves down one line
.t PageDown .t <SHIFT> DownArrow .t Moves down 15 lines
.t .t <PgDn> .t Moves down 15 lines