home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d770
/
uedit.lha
/
Uedit
/
Ustar.LZH
/
UstarTutor
< prev
Wrap
Text File
|
1989-05-10
|
26KB
|
547 lines
UstarTutor
Being a Brief History and Quick Tutorial about WordStar & Ustar
A Companion Document to the Ustar Documentation
Copyright (c) 1987 by Kurt Wessels. v0.90
WordStar is a trademark of MicroPro International Corp.
If you are using Uedit/Ustar for the first time, click on the "Down Scroll"
gadget near the top of the screen to go through and read this tutorial. If
you scroll too far, click on the "Up Scroll" gadget (which usually shows the
page:row,column counters, but is still an active gadget).
Introduction
This tutorial does not start at the "this is a keyboard" level - it assumes
that you basically know how to use the Amiga, how to use diskettes, and how
to start up programs. You should be familiar and comfortable with running
Amiga programs, and it is helpful to have used other editors or word
processors (e.g. NotePad).
This will cover the basics of Ustar/WordStar. Any intricate details on how
commands work are not discussed; for details, see UstarDoc and UstarDetails.
History
WordStar was designed in the late 1970's. Considering the hardware
limitations it ran under, it was and still is a very impressive piece of
software. It grew to popularity on CP/M-80 systems, including Apple II's
with CP/M cards in them. It was later ported directly (with virtually no
changes) to MS-DOS.
One reason for the popularity of WordStar is that the key commands for
editing are very efficient once you have learned them, as they let your hands
stay on or close to the "home row" of keys for fast typing. The catch-phrase
here is "once you have learned them". WordStar is notorious for being
difficult to learn. This is because of a large set of commands, and usually
non-intuitive key assignments. However, the basic editing actions are easily
and quickly learned, and I have tried to provide mnemonics (ways of
remembering a key or action) whenever possible.
The advantages to learning the WordStar key-sequences for editing commands
are that you can use them almost everywhere. You can use it on CP/M and MS-
DOS systems under WordStar itself, NewStar, and other editors. If you have
Turbo Pascal, it (and I believe, the other Turbo languages) use a subset of
WordStar commands. All of the dBASE series, and their clones, also use a
subset of these key sequences. On the Amiga, Scribble! implements a small
subset of the keys, as do some other editors.
Until now (as far as I know), Amiga owners have not had available an editor
with complete WordStar text-editing functions. Being a long-time WordStar
user on CP/M machines, I was frustrated at the lack of this environment on my
Amiga.
Some may ask, "Why are you interested in an emulation of such an old
editor?". Sure, this machine has great capabilities, and I use its graphics
and audio capabilities in many ways. But when it comes to processing words,
you want capability, not flashy & hard to use features; power, not gloss. I
wanted the ability to do word processing without even thinking about it. For
me, this meant either spending a year becoming expert on some other powerful
text editor, which didn't seem very feasible (this was well before Word
Perfect ((tm) Word Perfect Corp.) was available), or write my own, which
would take years.
Then, I found Uedit. It is an extremely powerful editor in its own right,
but it is also programmable! I quickly realized its capabilities to do what
I wanted to do. So, I sat down and wrote Ustar.
Ustar makes Uedit act like WordStar as far its text editing functions go.
The design philosophy of Uedit is to be an excellent text editor, not
sacrificing performance and flexibility to be a full word processor. So,
Ustar doesn't do everything that WordStar does, and some things it does
differently, but I'd say about 90% of it is implemented. Primarily,
Mailmerge isn't implemented, and the spelling function is very raw.
Note that Uedit is capable of doing these things in many ways - ALWAYS
remember it is programmable! - but I felt it was unwieldy and difficult to
try to implement these particular functions within Uedit's current
capabilities. If you need to do Mailmerge, Uedit's manual (which you receive
when you register) has an example of how to do it.
WordStar
OK, let's get an overview of WordStar from the standpoint of editing text.
WordStar evolved on machines with only a basic keyboard. There were no
function keys, number keypads, cursor keys, or even Alt keys. Keep in mind
that this was a decade ago! Also that video displays varied wildly, and most
were plain - no underlining, no color, etc.
The designers knew a good word processor would need to do a lot of functions,
probably over 100. There aren't 100 keys on a keyboard, especially a basic
one. So, they looked at their options.
The scheme they came up with is to use the control key in conjunction with
one or two letter keys to perform editing functions.
These control-key actions are done by holding down the Control (CTRL) key,
then pressing a letter or number key, then releasing both. The control key
is often abbreviated to the caret symbol, "^", and is shown adjacent to the
key pressed along with it. So, "^K" means "while holding down the control
key, press and then release the K key, then release the control key".
While editing a document, experienced WordStar users typically just keep the
control key held down (with their left little finger), and hit the
appropriate letter keys to move around, delete, and do other stuff, releasing
the control key if they need to type. For most actions, this can be done
without moving either hand from its normal typing position. The location of
the Caps Lock key between the CTRL and A keys on the Amiga A1000 keyboard
cause a bit of stretching for the CTRL key, but it's not too bad (some
machines' keyboard location of the CTRL key is ridiculous and virtually
unusable).
Anyway, the designers organized the various editing functions into groups of
related commands. The prefixes for these groups, the use of which is
introduced farther below after discussion of the more basic keys, are:
-- (no prefix) Basic editing functions like cursor movement
^K Block and File commands
^Q Quick commands - extending basic actions & miscellaneous items
^O On-Screen commands - setting display & format options
^P Print commands - set print attributes
^J Help
(The Ustar menus aren't organized this way; they are grouped into related
actions. The menus include virtually every command available.)
They also came up with dot commands, where a dot (period) in column 1 of any
line, followed by a command code, would activate yet more formatting and
printing functions. Some of these are implemented for printing, see UstarDoc
for details.
Basic movements
Set-up
It's best to learn "hands-on". So if you're not already reading this using
Ustar, first load up Ustar (which is the Uedit editor running in the Ustar
configuration). See UstarREADME for how to get it running.
Be sure you are running the Ustar, and not the standard Uedit, configuration.
Standard Uedit works totally different than what this document describes.
Once it has loaded, you should see a requester reminding you to pay for
Uedit. Click on the Okay box to continue. At the top of the screen is the
title bar saying Uedit; the line below it is for messages and gadgets. The
cursor will be sitting on the next line; it and the rest of the screen are
the active window of the editor, where you do your work.
We need some text on screen to mess around with. If you are already reading
this with Ustar, you're all set (use a backup of your Uedit/Ustar disk, not
the original). Otherwise, type a few lines of anything, just like you would
on a typewriter.
Cursor Movement - the cursor diamond
For basic cursor movement, there is the "cursor diamond". This refers to the
(sort of) diamond shape made by the E, S, D, and X keys.
Hold down the control key and press the S key a few times. The cursor moves
left. If you keep pressing it, and reach the start of the line, note how it
jumps to the end of the previous line. Basically, this moves up towards the
top of the document one character at a time.
Now, do ^D. The cursor moves similarly, but the other direction - right and
toward the bottom of the document.
Now, do ^E. This move up one line. Try ^X. This moves down one line.
Notice how these directions of travel correspond to the points on the "cursor
diamond". You might also think of it as points on a compass. Try moving
around some more with these keys.
Cursor movement - related keys
Now we'll learn some related keys close to the diamond.
Use ^F to go forward a word at a time. It's easy to remember as it is next
to the D key, which moves by one character, and is easy mnemonically as the F
in Forward (or maybe For Word?).
Use ^A to go backward a word at a time. This is also easy to remember, being
adjacent to the S key. Perhaps you can think of it as the A in bAckward.
You will need more text on the screen to see the effect of the next actions.
If necessary, type a bunch more lines (they don't need to be long; include
some blank lines) so you have a couple of screenfulls of text.
Now try ^R to go upwards in a document by about a half-screenful at a time.
Use ^C to go downwards in the same fashion. Notice that these keys are near
E and X, respectively, so they're easy to remember as extensions of going up/
down by one line.
What if you want to see some text that's just beyond the upper or lower edge
of the display, but don't want to move the cursor from where it is in the
text? Use ^W to scroll up, and ^Z to scroll down the document without moving
the cursor (until the cursor reaches the edge of the window). "Up" and
"down" here refer to the direction of movement of the display window (screen)
OVER the text as if it were a viewing window moving over a long scroll.
(Older WordStar versions used it to mean the opposite, the movement of the
text THROUGH the display window. Think of it however you wish.) Note that
again, these are near the E and X keys, lending a hand to remembering them.
Two-key cursor movements
Now we will learn the first of the two-key commands. Remember, to do these,
hold down the control key, type the first character, type the second
character, then you can release the control key.
What if you press a prefix key such as ^Q, then decide that's not really what
you wanted to do? The spacebar means "forget it" and cancels the effect of
any prefix key.
Following are some of the "Quick" keys. As you will see, they extend the
basic cursor keys to work as if you had pressed them a bunch of times; they
make actions "Quick".
Do ^QD. This sends the cursor to the end of the current line. You can see
how this is a logical extension to the ^D key, moving right to the end of the
line instead of just one character.
Do ^QS. This likewise puts the cursor at the beginning of the current line.
Do ^QX. This takes the cursor to the bottom of the current display screen.
^QE does it in the opposite direction.
^QC takes you all the way to the bottom (end) of the document. ^QR takes you
to the top.
^QW and ^QZ do continuous line by line scrolling up or down. (You can use
the Down Scroll and Up Scroll gadgets for smoother, faster scrolling).
In Ustar, the cursor (arrow) keys are set up to do the same as the cursor
diamond, and various shift/alt/control combinations do similar actions to the
above WordStar ones. I'd recommend learning and using the control-keys,
though, for efficiency and standardization.
Also, you can just point the mouse to the text where you want it, and click
to place the cursor there.
Deleting
Now for some basic editing. Move the cursor to a word. You can delete the
character the cursor is on with ^G. Try it. This deletes the character at
the cursor, leaving the cursor where it was, and moving the rest of the line
past the cursor to the left to take up the space. If you do it right at the
end of a line (the invisible last character on a line), it will move the line
below up to join the current line. This ^G key does the same as the DEL key
of the keyboard.
For mistakes made while typing, you'd be more likely to use the Backspace
key. It deletes the character to the left of the cursor, then moving the
cursor and all the characters at and beyond it to the left. Try this too.
To delete a word, use ^T. This deletes from the cursor to the start of the
next word, including the character the cursor is on. But, if you are on
space between words, it only deletes up to the next word, getting rid of the
space(s).
To delete a line, use ^Y. This deletes the line that the cursor is on,
leaving the cursor at that same line position and moving all lines below up
to take up the space.
To delete from the current cursor position to the end of a line, use the two-
key Quick sequence of ^QY.
A couple of less-used deletes are ^QDEL (^Q then the ^DEL key) to delete from
the current cursor position to the beginning of the line; and I added a
delete-word-backwards function as ^Backspace (Control key with Backspace
key). See also tab keys (below).
You can undo any deletes, other than single characters, with ^U or ^KU. See
UstarDoc for details.
Modes & Basic Keys
^V toggles between oVerstrike and insert modes. Overstrike is where you type
over existing text, replacing it. Insert is where text is inserted at the
cursor position, pushing the cursor, and any text to the right of the cursor,
off to the right.
You may have noticed that you can't move all over the entire screen with the
cursor keys. Uedit uses one of the two basic ways that an editor can let you
move around the screen - it only lets you go where there is actually
something in the document. This "something" is usually text, but can also be
spaces. This is the same way that WordStar works. The last character in a
line, which is also the last character that you can move the cursor to, is
the invisible end-of-line character.
Don't worry if your sentence goes off-screen to the right as you type in
insert mode - the text is still there. Also, don't worry if the cursor
disappears - for performance reasons, screen refreshing isn't totally
automatic in Uedit; to find where the cursor is at any time and center the
screen on it, use ^Return. I added the ability (not in WordStar) to insert a
space while in overstrike mode. Use ^spacebar to do this. It leaves the
cursor where it is and inserts a space in front of it.
You can start a new line (enter an end-of-line character) by simply pressing
Return. (If you are in Overstrike mode, this will just move to the start of
the next line - you must be in Insert mode for it to insert an end-of-line.)
The Enter key on the numeric keypad does the same thing, as does ^M.
You can also insert an end-of-line WITHOUT moving the cursor down a line by
pressing ^N. This is better than Return for inserting new lines between
others.
Tabs
The tab key will tab over to the next tab position. If you are in insert
mode, tabbing will push text ahead; if in overtype mode, it will
transparently tab over any existing text. Note that ^I is the same as the
Tab key.
You can view the current tab stops ("tab ruler" settings) with ^OT. Choose
one of several tab tables to use with ^OV. Set your own tabs with ^OI or ^ON
by clicking on the tab ruler.
I added some tabbing functions (not part of WordStar). You can transparently
tab over text regardless of the insert/overtype mode by using Shift-Tab. You
can transparently back-tab with Alt-Tab. And you can destructively back-Tab
with Alt-Control-Tab.
Formatting
The editor starts up in word-wrap mode. This means that when you reach the
end of a line, as defined by the current line length, the text that you are
typing will be wrapped down to start a new line below the one you were typing
on. This eliminates the need to press Return all the time like you must do
on a typewriter, letting you flow your words onto the screen; you can easily
format them later. You can turn word wrap off if desired - it is toggled via
^OW. If off, you can type lines as long as you like - even thousands of
characters long.
If you are typing indented items like outlines, turn on the Auto Indent mode
via ^OG. This works quite different from the way WordStar does it, but is
the same basic idea - as you type along, when you reach the end of a line and
Uedit wraps around to start the next line, the indent will match the first
printable character on the line you were on.
So as I type this line, when it reaches the end of the
line, there, it wrapped to start just below the "So"
above. See UstarDoc for more details.
You can manually match the indent of an already-typed line to that of the
line above it via Shift-Return (added by me - not a WordStar capability).
You can reformat paragraphs and outlines via ^B. See UstarDoc for details on
how this is used.
The Right-Justification toggle, ^OJ, controls whether reformatting produces a
ragged right margin, or an even right margin (achieved by putting spaces
between words within each line).
You can center lines within the current line width with ^OC.
Blocks
Blocks in WordStar are what you use for doing operations on blocks of text.
Other editors often call this "cut and paste", but it is somewhat different
under the WordStar method; I like it better.
First, you define a block. The start of a block is marked with ^KB (think of
it as the Beginning, or the B in Block); the end is marked with ^KK (think of
it as the ending K in blocK). Once a block is defined, it becomes
highlighted.
(In Ustar, I have also made the mouse usable to mark a block. Put the mouse
pointer at the start of the block, click and hold the left button, drag to
the end of the block, and release. The screen will scroll if you move the
mouse to the bottom or top. The block will be highlighted once you release
the button.)
Second, you choose the operation to do to the block.
To Copy it somewhere else, move the cursor to where you want the start of the
copy to be, and do ^KC (for Copy).
To Move it somewhere else, place the cursor where you want the start of the
block to be, and do ^KV (for moVe).
To Delete it (doesn't matter where the cursor is), do ^KY (for Yank, as in
pull).
There are mouse equivalents for the above 3 actions - see UstarDoc on this
and other Block commands not listed here.
There are variations on the normal block mode. You can put it into column
mode, handy for reformatting tables - moving columns of text around, instead
of lines or paragraphs. You toggle this with ^KN. Note that for a column to
be visible, the column of the end of the block must be greater than the
column of the start of the block.
When in Column mode, there is an additional mode choice you can make. ^KI
toggles whether the block will insert or overwrite, or if you are deleting a
block, whether it will be deleted or space-filled.
^KU or just ^U (Undelete or Undo) will bring back the last block that was
deleted (assuming you haven't deleted some lines or words in the meantime).
A Uedit-specific feature I added is ^KG to Get a block to the Undo buffer.
This is needed because WordStar only works with one file at a time - it has
no key for getting a block without doing anything else with it.
In Uedit/Ustar, you typically have several files in use at one time. To
transfer between them, you mark the block you want, do ^KG, use F1 to get to
the file you want it to go into, put the cursor where you want it, and do ^KU
to "paste" it in.
The above actually give you a way to do Cut & Paste in addition to blocks.
In Cut & Paste terms, you use ^KY to Cut a block, or ^KG to Copy it, into the
scratch buffer. Then you use ^KU to Paste it.
To hide (unhilite) a block, do ^KH (Hide).
Use ^KR to Read a disk file into your document at the current cursor
position, that is, to insert the file. This is handy for "boilerplate" text,
such as a standard letter header; and for bringing in a bunch of small
documents or pieces to make a big one. Use ^KW to Write a marked block to a
file. This is useful in the opposite way.
Both the above commands, and any others that need you to specify a filename
or other string, use Uedit's Primitive mode input. Normal editing keys don't
work in this mode; you use only shift-spacebar and shift-BackSpace to move
transparently over text, and DEL and backspace to delete characters. In most
cases, pressing Return without doing anything else will cause nothing to
happen, cancelling the action.
Due to the way the Primitive mode works, I find it handy to set a fairly high
key-repeat rate with Preferences, so I can quickly move over text or delete
it when in Primitive mode.
An Amiga feature I added is to speak a block. Use ^K] (^K then ^], the right
bracket symbol; think of it as a sideways smile :-] ). The Say command will
need to be in your current C directory for this to work; and your Workbench
disk (for libraries and devices) will need to be available to the system.
Files
Files are something like blocks, so they also use the ^K prefix. Briefly:
Use ^KD to load a Document. You will need to type in the filename, including
(if necessary) the drive and path.
You can also load via the mouse - point at a filename in any document and
hold down the Control key while clicking the left mouse button.
Use ^KS to Save a document. This will save without quitting the buffer. If
the document hasn't changed, it won't save it - this saves you time (waiting
for useless disk activity).
Use ^KQ to Quit (discard from Ustar) a document. If the file has changed, it
will tell you so and ask if you want to save it before throwing it away.
See UstarDoc for complete info on all the file and mouse commands; refer to
the menus and the UstarHelp file (Help key) for quick reference.
Find & Replace
^QF is the Find (search) command. It will prompt you for the string to find.
^QA is the find & replAce command. It will prompt you for the string to
find, then for the string to replace it with.
Both of these commands then prompt you for options. You can enter several
options, or none.
The U option causes searches to be case-insensitive; if the U option isn't
present, then your string will have to match upper and lower case exactly to
be found. Ustar starts up with the U option present, 'cause that's how I
like it.
The B option causes Backward searches, otherwise they are forward.
The G option causes Global operation.
For Finds, the G option means that the search begins at the beginning of the
file (end of the file if the B option is active). Otherwise, searches
commence from the cursor location.
For Find & Replace, the G option means that the entire file is searched.
Otherwise, only the first search match is acted on.
Instead of G, you can specify a specific number of times to do a Find or Find
& Replace. For instance, if you know that you want to replace only the next
7 instances of "Amiga" with "Amiga 2000", put a number "7" in the options.
The N option is for No-ask. It is used only when doing Find & Replace. If
this option is not present, you will be asked on each Find whether to do the
replacement or not. If this option is present, you won't be asked.
Be careful - you might accidentally change things you don't want changed if
you use this N option. For instance, if you did the "Amiga" replacement
noted above with the N and G options, it will go through the whole file and
replace any occurrence of the "LeftAmiga" key name with "LeftAmiga 2000",
which is probably not what you want!
To stop a search at anytime, or while entering options or strings, use the
general-purpose abort key sequence of LeftAmiga-ESC or RightAmiga-ESC.
You can repeat the last Find or Find & Replace command with the ^L key.
Conclusion
That about covers this quick run-through of WordStar commands. They should
suffice for 90% of your needs. There are dozens of other features, some of
which are part of WordStar, and many (such as Split Windows and multiple
files open at once) that aren't. See the menus and UstarHelp! files for all
the commands. BE SURE to read UstarDoc for extensive information on Ustar.
Mainly, play with and use the editor to see how it works.
There are details of WordStar, Uedit, and Ustar that aren't documented. For
example, the definition of just exactly what is considered to be a "word"
when moving forward with ^F or deleting with ^T. You will just need to find
out little things like this on your own, otherwise these documents would be
many times as large. You can look at the UstarConfig! file to see what each
command is actually doing. If you are a registered Uedit user, you have the
version of Uedit that includes the programming language and can change
anything about it that you don't like it.
Now go and start using and enjoying the world's most popular word processor
interface in the world's best editor on the world's best personal computer!!!