home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
PROGRAMS
/
WSTAR
/
KEYSTOWS.ART
< prev
next >
Wrap
Text File
|
2000-06-30
|
30KB
|
668 lines
==============================================================================
[ THE KAY*FOG RBBS | KEYSTOWS.ART | published 22/12/85 | 665 lines 30k]
KEYS TO WORDSTAR: The Use of Macros
by Dick Ezzard
Copyright (C) 1985
__________INTRODUCTION__________
WHY USE MACRO COMMANDS?
Macros make WordStar into a much more powerful tool than
most people realize. To speed up your text editing automate
strings of WordStar commands with a keyboard enhancer such as
Xtra-Key, SmartKey, ProKey, ManyKey, QuikKey, SuperKey or the
public domain FK.COM. Then the touch of a single key can cascade
several WordStar commands, speeding up the performance of some
desirable process which would be slow and cumbersome if you had
to enter each command separately. (The WordStar command buffer
can receive and store a number of commands faster than any human
can type.)
Accuracy is an important benefit: pre-set strings of
commands eliminate typographical errors when keying-in complex
sequences -- no small advantage since mistakes made when entering
complex WordStar commands can damage important files.
While the number of potential combinations is astronomical,
you'll probably come up with a small set of favorites that you
know well and use often. I keep these tools in "sets" which are
appropriate to particular kinds of activities, one set for use
during high speed text entry, another set for editing existing
text. I find especially useful a set I use for re-arranging
mishmash text files.
OTHER IMPROVEMENTS
In addition to macros, there are two more ways to
supercharge WordStar: Using a ram disk, and eliminating some of
WordStar's files. Both are discussed below.
MACRO OVERVIEW
Let's take a look at some of my favorite macro types:
* Text entry keys (reversing two transposed letters, fetching
special ruler lines, deleting a word to the left);
* Editing keys used when traversing a file (jumping cursor to the
next paragraph, jumping a given number of lines, jumping a given
number of paragraphs);
* Massive deletions (delete from cursor to beginning of file,
delete from cursor to end of file, delete to end of paragraph,
delete to beginning of paragraph, delete a block with retrieval
option);
* Re-arranging text (mark current sentence as a block, mark
paragraph as a block, move block to cursor and swap, move line to
end of file, move block to end of file, install several sorting
bins, move block to bin);
* Indexing a file (copy line to end of file, copy block to top of
file);
* Multiple file editing (view another file, add a note to another
file);
* Other editing aids (tag marked block for later re-marking, re-
mark a tagged block)
* Miscellaneous keys (remove ghost lines from screen, print
marked block, remove carriage returns not followed by line
feeds);
* Formatting keys (re-form current paragraph, underline a single
word);
* Finally, supercharging WordStar: Using a ramdisk to get the
most out of these macros; eliminating WordStar's WSMSGS.OVR,
MAILMERG.OVR overlays; and removing WS.COM to make space on a
disk.
__________TEXT ENTRY KEYS__________
REVERSE TWO TRANSPOSED LETTERS ^Kk^S^Kb^S^Kv^Kh
This reverses two letters entered in transposed fashion, a
common occurrence. For example, if you type the sequence teh,
you can use this key to correct it to "the." It may be useful
during high speed text entry if this is one of your common
mistakes. However, it is probably more trouble than it is worth
since it requires that you position the cursor carefully just to
the right of the two transposed letters.
The quickest ways to correct errors detected during text
entry:
If you are still in the word where the error occurred, use
your deleting backspace to erase back to the error is and retype
the error.
If the error is several words back on the same line, use ^A
to jump back to the beginning of the word which contains the
error, then retype the whole word (unless it is a monster like
Brzeniski or something) inserting it in front of the error, then
use ^T to delete the word with the error.
If you notice an error back further on your screen, let it
go till you go through on your proof read. Especially if you are
going to do a spell check anyway.
FETCH SPECIAL RULER LINES ^Qs^Kb<CR>^KK^Qb^KrR<CR>
This baby marks a tiny empty block, then reads in a file called
R which is where you keep formatting stuff like special ruler
lines. This is very useful to people who have to adjust their
tabs and margin settings often, like script-writers and people
who make up highly formatted tables and lists. Also useful if
you edit directly on data base files which have to line up.
Your collection of ruler lines comes in as a marked block.
Place the cursor on the example ruler line of your choice and do
^Of to reset your margins and tabs. Then do ^Ky to erase the
ruler line collection out of your current file until you need 'em
again.
DELETE WORD LEFT ^A^T
Another error corrector for use during text entry. Will
"eat up" words to the left, as many times as you hit it. If you
want to start over just a little way back, comes in handy.
__________EDITING KEYS__________
JUMP CURSOR TO NEXT PARAGRAPH ^Qf^N^N<CR><CR>
This actually does a find of two cr/lf line endings in a
row, so it jumps to the next paragraph only if your standard
format is to include a blank line between paragraphs. As a
matter of policy it is quite useful to standardize a format for
your own "manuscript" files, to work in conjunction with a
collection of special function keys. Postpone matters of
formatting for printing until the last thing you do to a file.
When doing text entry and conceptual editing, leave justification
off, and hyphen help off -- those "features" will just slow you
down.
After you have used this key once to jump to the top of the
next paragraph, you can just hit ^L to repeat and traverse your
file paragraph by paragraph.
JUMP N LINES ^Qf^N<CR>
This is the front stub of a FIND command that looks for line
endings. After hitting the key, you enter a number to tell
WordStar how many lines to find, then hit the <RETURN> key again.
For example, after hitting the defined function key enter
55<RETURN> and you will jump 55 lines, the normal length of a
WordStar page. To go to the 10th page enter 550. After one use,
if you want to jump the same number of lines use ^L.
JUMP N PARAGRAPHS ^Qf^N^N<CR>
Similar to the previous two keys, this one jumps paragraphs
if they are delimited by double carriage return/ line feed
sequences. After hitting the defined key, enter the number and
<CR>. Repeat by ^L.
__________MASSIVE DELETIONS__________
There are two useful ways to make deletions so that the
deleted material can be retrieved later if needed. The first is
simply to shift the "deleted" material to the end of the file.
At the end of the editing process, it's a simple matter to clean
up the end of the file. The second method: Set up a "delete"
macro so that the file is first saved before the deletion takes
place. Use another macro to yank back the earlier version if the
deletion proves unsatisfactory. Both methods are described
below.
DELETE FROM CURSOR TO BEGINNING OF FILE ^Kk^Qr^Kb^Ky
Dangerous. It picks out a small section of text or data for
retention, from a larger file. For example, say you have
captured a log of messages from KAY*FOG and there is one in there
you want to keep for future reference. You could use WordStar to
browse down to the file until your cursor is at the top of the
material you want to retain. Hit this key and everything above
it in the file disappears.
This key is so dangerous that I have taken it off my
keyboard, preferring to in the command sequence myself when I
really want to do a massive delete. An accidental delete from
the bottom of a valuable file could be trouble, when you haven't
yet backed up the fresh work.
DELETE FROM CURSOR TO END OF FILE ^Kb^Qc^Kk^Ky
This cleans out everything in a file below the material you
want to retain. Another example of a useful application for
massive deletion is boilerplating. You keep a monster file of
all the paragraphs you might use in a business letter. Open a
new file in which to write a current letter. Then read in the
file which is your collection of boilerplates. Select the few
paragraphs you want to use this time, move them to the top of the
file, and delete the rest using this special function key.
Like its sister which deletes everything to the top of the
file, I find this too dangerous to have around. I use the
command sequence a lot, but don't want to be able to do it with
one key! Would rather just type the commands as fast as I can.
DELETE TO END OF PARAGRAPH ^Kb^Qf^N^N<CR><CR>^Kk^Ky
This will get everthing from where the cursor is to the end
of the paragraph, if you format your paragraphs with double <CR>s
as recommended. Note that it uses both block operations and find
operations which are in separate incompatible parts of the
WordStar overlay file, so your disk will be accessed a couple of
times with this one. However, it is not bad with a RAM disk.
Note also that where your cursor lands after a find operation
differs slightly between versions of WordStar.
Probably more trouble than it's worth. I get the same
effect just as fast with a sequence of ^Qy to lop off the current
line, followed by repositioning the cursor down and hitting ^Y
the required number of times.
Paul St. John notes that ^Kb^B^Kk^Ky does the same thing
just as effectively.
DELETE TO BEGINNING OF PARAGRAPH ^Kb^Qf^N^N<CR>B<CR>^Kk^Ky
Similar to the just preceding key, only the FIND operation
searches with the B for backwards option to find the double
<CR>'s which define a paragraph. Again, maybe not worth the
trouble in most cases.
DELETING A BLOCK, WITH RETRIEVAL OPTION ^Ks^Qp^Ky ^KqYD^R<CR>
When performing a block-delete, it's nice to have the
ability to yank back the deleted portion if you change your mind.
These two macros give you just this ability.
The first macro, ^Ks^Qp^Ky, first saves the file in its pre-
delete form before making the actual block deletion. If you
don't like the result, and want to return to the previous version
of the file, the second macro, ^KqYD^R<CR>, takes you out of the
file and back in so fast that the effect is nearly like yanking
back the deleted text.
This nifty key was added to the collection by David Lewiston
who says he picked it up from a Kaypro User's Group file.
__________RE-ARRANGING TEXT__________
MARK CURRENT SENTENCE AS BLOCK ^Qf <CR>B^D^D^Kb^Qf <CR><CR>^Kk
Note that there are two spaces after each ^Qf. This key is
dependent on the user being consistent in ending each sentence
with two space characters. Does not work on the first sentence
in a paragraph. Probably more of a stunt than anything useful.
MARK PARAGRAPH AS BLOCK ^Qf^N^N<CR>B<CR>^X^X^Qf^N^N<CR><CR>^Kk
The lazy man's block marker. Provided your paragraphs are
configured separated with double carriage returns as recommended,
place the cursor anywhere in a paragraph and hit this key. The
paragraph will be blocked for you, ready to move.
Some cautions: Won't work unless the paragraph is preceded
and followed by double <CR>, which is usually not the case for
the first and last paragraphs in a file. And may not be the case
at all if you don't format your manuscript files the same way I
do. Then re-design of this key may be necessary. Also, this key
works with WordStar version 2.26. The positioning of the cursor
after a find operation differs slightly for some other versions
of WordStar so some tinkering will be required.
I don't use this one anymore because I am proficient enough at
block marking to make better time just zinging the cursor up and down
to mark blocks.
MOVE BLOCK TO CURSOR ^Kv^Qv
Proceeding through a file you can mark and move blocks in
sequence. After you mark the first block, you prowl around
moving the cursor till you find where you want the block to
light. Hit this key and the block comes to the cursor location,
the cursor snaps back to where the block was and you are ready to
mark your next block.
You may not wish to tie up a special function key for a
command sequence as simple as ^Kv^Qv which is easy to type.
MOVE LINE TO END OF FILE (HOLD OFF ERASE) ^Qs^Kb^X^Kk^Qr^Kv^Qv^Kh
Provides an option on erasing lines: Marks the current line
as a block and moves the marked line to the end of the file, for
later consideration, instead of permanently obliterating the
line, as with ^Y. It then returns the cursor to where you are
working.
This jewel is the prototype for text re-arrangement. If
your file is short enough to exist entirely in RAM, it is very
quick indeed, and you can move several lines by hitting this key
several times in quick succession.
Since each line goes to the end of the file, it appears under
the one which was previously moved. Since you return to the
place you just came from, you are on the very next line. So hit
this key five times in a row and you move a five line paragraph
to the bottom of the file.
About five or six lines seems to be the limit of WordStar's
command buffer and you will be signaled that the buffer is full
by a beep and the appearance of some !!!!! marks at the top of
the screen. Not to worry. Just slow down a little and then you
can move some more lines.
One of WordStar's stickiest pitfalls is the ^Y erase key.
David Giunti has an ingenious solution to this problem if you use
a full-fledged keyboard redefiner: program this sequence to the
^Y key so that the line is moved to the end of the file and Word
Star never finds out that a ^Y was entered! This can save the
day for the heavy-handed typist, because holding ^Y down for just
a little too long results in WordStar deleting more than one
line.
When you end your edit, use ^Qc to go to the end of file,
and delete the really unwanted lines from the bottom of the file
(with Block mark and delete). First you throw stuff in the
wastebasket, later on you get a chance to reconsider before you
irrevocably burn it up.
MOVE BLOCK TO END OF FILE ^Qr^Kv^Qv^Kh
Used after you manually mark a block, this will move that
block to the end of the file. And bring you back to where you
are working. Aids tremendously in the re-arrangement of text.
For example, let's say you have a file which is a mishmash
of notes on roughly the same subject, but in no particular order.
Starting at the top of the file, mark blocks that you think
belong in the middle of the file and use this key to send them to
the end. When you get done with the first pass, go back to the
top and go through again sending down stuff that you think
belongs to the end of the file. You have just done a rough sort.
The stuff that "belongs to the beginning" you never touched
so it is in the front of the file. The middle stuff went down
first but was bumped back up to the middle when you sent the end
stuff down on the second pass. Now you can do the same kind of
sort on just the beginning stuff. Pretty soon you will see some
kind of sequence.
Use this one as an alternative to deletion. As you edit a
file throwing stuff to the bottom is equivalent to putting it in
the wastebasket. Use this technique as the poor man's "UNDO"
command.
SETTING UP SORTING BINS ^K1 ^K2 ^K3 ^K4 ^K5
All this key does is post a sequence of WordStar's place
markers. This is preparatory to using the markers as targets for
text block movements. Note that there is a space between each of
the markers.
MOVE BLOCK TO A BIN ^Q1^Kv^Qv^Kh ^Q2^Kv^Qv^Kh
This set of keys moves marked blocks to pre-designated place
markers. I have these key definitions installed on some of my
number keys. When I want to move text to more locations than
just the top or bottom of the file, I set up place markers, then
move through the file marking blocks as I go. After a block is
marked (by the lazy man's block marker key if you like) just hit
the appropriate dispatcher key and the block will be moved to the
corresponding place marker and the cursor will snap back to where
you are working.
__________INDEXING A FILE__________
COPY LINE TO END OF FILE ^Qs^Kb^X^Kk^Qr^Kc^Qv^Kh
This very useful key is sister to the key which moves lines
to the end of file. This one sends a copy of the current cursor
line to the end of file and leaves you ready to continue prowling
the file.
Why copy lines to the bottom of the file? It is an easy way
to make a table of contents for a text file. Every so often I
signpost my manuscript files with headlines (usually using
WordStar's double dot comment line format). After a file is more
or less complete I start at the top and place the cursor on each
heading line, hit this key and send a copy to the bottom of the
file. After browsing through the entire file I find a collection
of the headings at the bottom. When they are moved to the top
they become a table of contents for the file and help me to jump
down to a specific location by use of the ^Qf find operation, by
showing me what I'm looking for.
COPY BLOCK TO TOP OF FILE ^Qr^Kv^Qv
After markig a block, this key will send it to the top of
the file. Often used to move a collection of redundant headings
to the top of the file to serve as a table of contents for the
file.
__________MULTIPLE FILE EDITING__________
These macros create "window shades." The first, View Another
File, uses O as the name for the Outline file relating to the
project in progress. The second, Add a Note to Another File,
uses N as the name of the file containing Notes, to which
additional material can be added. The same techniques can be
used with other files, omitting O and N from the macros, and
simply entering the wanted filename.
VIEW ANOTHER FILE ^Kb<CR>^Kk^Qb^KrO<CR>
This key pulls down a "window shade" into a pre-marked
block. The shade it pulls down is a file called, by convention,
"O". I always keep my outline for my current project in a file
called O so when I use this key I get to glance at my outline.
It appears in the text file in which I am working and is
distinguished from the current text by being pre-marked as a
block. When I am done looking at the outline, I hit ^Ky and the
outline goes away until I want to glance at it again.
ADD A NOTE TO ANOTHER FILE ^Qb<CR>^KrN<CR>^KwN<CR>Y^Ky
This allows writing to the tag end of a file different than
the one you are working in. By convention the other file is
called N. If I am working away and think of something not
pertinent to my current project, or if I get a phone call and
want to remember something about it, I make a note right in the
file I am working in. Mark the note, whatever it is, as a block
and then hit this key.
The file N will be read into the block at the top, and the
file N will be written out again, as an entire block and
therefore encompassing the new note. It happens so fast you
won't see file N come in, just the blocked note will disappear.
But when you later look at File N, all notes will be in there in
the order you sent them out.
There must be a file N in existence before you use this key
the first time, even if that file consists of only one <CR>.
You need not send just "odd notes" to that N file. I often
use this key in culling operations, to run through a copy of a
mishmash file and extract the paragraphs which pertain to a
particular topic. After extracting all material on one topic,
you can rename N, start a new N, and go through the mishmash to
cull out notes on a second topic.
__________OTHER EDITING AIDS__________
TAG MARKED BLOCK FOR LATER REMARKING ^Qb^K0^Qk^K9^Kh
This key gets around the fact that WordStar only permits one
"active" marked block at a time. Sometimes you will want
WordStar to be able to "remember" the current marked block while
you do something with another block. This often arises for me
when I read in an outline as a marked block, then want to move
some text around to conform to the outline, but know I will want
to erase the outline again in a little while.
Hit this key and the block markings are removed, but the
"old block" is tagged with place marker 0 at the beginning of the
block, place marker 9 at the end. I select these place markers
because I often use the lower place markers, 1, 2, 3, 4, as
targets for block moves when re-arranging text. Thanks to Ed
Greenberg of MicroPro for this "chipping off the old block"
capability.
RE-MARK A TAGGED BLOCK ^Q0^Kb^K0^Q9^Kk^K9
This key is the sister to the previous one, re-marks the
previously marked old block, after you are done with block
operations elsewhere in the file. If the old block was an
outline or notes which have now served their purpose, they are
now ready for a ^Ky delete.
__________MISCELLANEOUS KEYS__________
GHOSTBUSTER--CLEAR GHOST LINES ^K0^Qe^Qs^Kb^Qx^Qd^Kk^Q0^K0 or
^K0^Qe^Qs^Kb^Qx^Qd^Kk^Q0^K0^KH
This key marks the entire screen as a block, moving the
cursor to the top left, then to the bottom right, but remembering
where it was in the beginning and going back there after marking
the block.
Once in a while when WordStar is being run fast, its screen
display buffer will get caught with a duplicate line in it.
These extra characters are _not_ in the file, they are just in
the stuff that WordStar is showing on the screen, and will
disappear if the area they are in is marked as a block -- an
operation which modifies the contents of the screen buffer (on
most systems).
To unmark the block, either hit ^KH or hit the ghostbuster
SFK a second time; it works as a toggle. The same idea can be
used to delete an entire screenful, or to dump a screenful to the
printer.
PRINT MARKED BLOCK ^KwP<CR>Y^KpP<ESC>^X
This will send a marked block to the file called P and then
print the file called P. Unless you have included formatting dot
commands in the block, the block will print as a page in WS's
default format.
Note that if you use this one in conjunction with the
previous full screen block marking, you get what amounts to a
screen dump to the printer at the touch of two keys, while in
WordStar.
REMOVE CRs NOT FOLLOWED BY LFs ^Qa^P^M^P^O^P^J<CR><CR>GN<CR>
This is an example of the highly specialized filtering which
can be accomplished from within WordStar. This was the answer to
a guy who had to process some files which had been downloaded
from a remote system in a format which did not include linefeeds
on many lines. By knocking off the odd carriage returns he was
ready to re-form the files in a more standard manner. This
solution came from Mojo Jones of MicroPro.
__________FORMATTING KEYS__________
REFORM CURRENT PARAGRAPH ^Qf^N^N<CR>B<CR>^X^X^B
This will re-form the paragraph you are working in. Often
when editing text you will add new words, delete something so
that the lines have changed in length and the paragraph needs
reformation. This key will do it.
Presupposes you follow the convention to separate paragraphs
with two CR/LF sequences (blank line between paragraphs).
This one is for WordStar version 2.26. Some versions of
WordStar may put the cursor in a different location after a
backwards Find operation looking for two CR/LF. If so, the
number of ^X's in the key definition may vary.
UNDERLINE A WORD ^A^P^S^F^P^S
This puts the printer control codes ^S for underscore at the
beginning and end of a word just typed. A variation might be to
put the underscore or boldface or alternate type size controls at
the beginning and end of a marked block -- left as an exercise
for the reader. Thanks to Ted Silveira for this formatting key.
A note concerning formatting in general: this is often best
left to be the final task before a file is output for printing.
Such matters as justification, hyphen-help and underscoring or
boldfacing, just slow you down during the "manuscript" drafting
phases of word processing. My standard manuscript files are
configured to be easy to work with, standardized so I can use
certain special function keys I find useful (especially block
marking and moving to place marker targets), and jam as much
context as possible onto the limited screen window.
It is only later that I bother to make a copy of the file
which is then gussied up for display with printer control gadgets
like underlining and boldfacing, centering, justification, etc.
__________SUPERCHARGING WORDSTAR__________
RAM DISKS AND WORDSTAR
Because WordStar was originally built for use on computers
with limited memory space for holding programs, it consists of
the COM file (the program proper) and some overlay files. The
COM file holds the basic nut of WordStar, the most-used
functions. The overlay files hold auxiliary routines and
materials portions of which are loaded into memory when needed.
For example, many of the help menus are located in the file
called WSMSGS.OVR.
Due to this overlay construction, WordStar makes frequent
disk accesses. When you use a sequence of commands that come
from different parts of the overlay file, you will be subjected
to annoying disk accesses. The FIND or FIND AND REPLACE
functions are incompatible with BLOCK MOVE functions, and if you
are continually finding, then block moving, then finding and
moving again, you will be listening to a lot of disk accesses.
On top of that, although WordStar is very fast (especially
on 8-bit CP/M computers), and can buffer a sequence of commands
for later execution, as fast as you can type them in, it is NOT
able to receive commands while an actual disk access, a read or a
write, is going on. So although you can usually type ahead a
sequence of commands for WordStar to perform in turn (no, you
don't have to wait for each step to be completed before giving
the next command) pauses for disk access will slow you down.
The solution to this disk access problem is a RAM disk--
either a portion of memory configured as a disk or an add-on
piece of hardware. Macros really shine when you operate them on
a RAM disk.
NAKED WORDSTAR RUNS FASTER
Make yourself a lightweight working WordStar disk using only
WSOVLY1.OVR and WS.COM. If you are accustomed to WordStar you
don't need WSMSGS.OVR file which contains only help menus,
command menus, and messages which are posted during execution of
some commands.
Leaving out WSMSGS.OVR speeds WordStar operations
considerably. After the first attempt to access that file,
WordStar modifies itself to remember that the messages are not
available and will not go to the disk for that particular kind of
stuff during the rest of the session. If you make a cribsheet of
common WordStar commands and keep it and a WordStar book close to
your computer, you will soon have the most-used commands well
memorized. Continuing to rely on the menus will only train you
to use menus. The practiced WordStar user no more looks at menus
than a touch-typist looks at typewriter keycaps.
Okay, the WordStar expert is down to two files for booting:
WS.COM and WSOVLY1.OVR. If you really need all the disk space
you can find, you can erase the MailMerge file MAILMRGE.OVR, and
even erase WordStar itself! After WordStar is booted up and
esconced in RAM, use the WordStar command Y at the main WordStar
menu and instruct the system to erase the file WS.COM. Now you
are down to the nub: WordStar is in RAM and the one file it
needs, WSOVLY1.OVR is on the disk. And you are still in the word
processing business.
The ability to run WordStar without WordStar may just save
your neck if a drive goes bad and you are forced to operate on a
single drive temporarily. Also, if you ever back yourself into a
corner and end up with a "disk full" error or a bad disk, and
have to save some new work, you can create some emergency space
by erasing that WS.COM file. (To erase WS.COM from within a
file, use the ^KJ command.) This trick should be especially
useful to people who are operating with single density disks.
A final tip: WordStar is powerful. The power requires many
commands to control, so many that the new user can be overwhelmed
at first. Even the well versed WordStar user forgets commands she
hasn't used for a while. Take a clue from high performance
sports: the best batters take the most batting practice. Before
a WordStar session, take a few minutes to think ahead about what
operations you will be using for the task in mind. Then take a
few cuts at the ball before the game. To groove any skill takes
practice and what we know how to do best is what we practiced
most recently. It pays to warm up.
------------------------- End of KEYSTOWS.ART Text ------------------------