home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
lib
/
jove
/
teach-jove
< prev
Wrap
Text File
|
1995-01-12
|
39KB
|
903 lines
J O V E T U T O R I A L
Welcome to JOVE - an advanced, easy-to-use, user-friendly environment
for editing text, programs or anything else you may like to type.
JOVE commands generally involve the CONTROL key (sometimes labelled
CTRL or CTL) or the META key (generally labelled ESCAPE). Rather than
write out META or CONTROL each time we want you to prefix a character,
we'll use the following abbreviations:
C-<chr> means hold the CONTROL key while typing the character <chr>
Thus, C-F would be: hold the CONTROL key and type F.
M-<chr> means type the META (ESCAPE) key and release it, then type
the character <chr>. The <chr> can be upper or lower case
and it will have the same meaning.
Important note: if you must exit at some point, type C-X C-C.
The characters ">>" at the left margin indicate directions for you to
try using a command. For instance:
>> Now type C-V (View next screen) to move to the next screen.
(go ahead, do it by depressing the control key and V together).
From now on, you'll be expected to do this whenever you finish
reading the screen.
Note that there is an overlap when going from screen to screen; this
provides some continuity when moving through the file.
The first thing that you need to know is how to move around from
place to place in the file. You already know how to move forward a
screen, with C-V. To move backwards a screen, type M-V (depress the
META key and type V, or type <ESC>V if you don't have a META or EDIT
key).
>> Try typing M-V and then C-V to move back and forth a few times.
SUMMARY
-------
The following commands are useful for viewing screenfuls:
C-V Move forward one screenful
M-V Move backward one screenful
C-L Center the current line--clear screen and redisplay
everything if current line is already at center.
>> find the cursor and remember what text is near it.
Then type a C-L.
Find the cursor again and see what text is near it now.
BASIC CURSOR CONTROL
--------------------
Getting from screenful to screenful is useful, but how do you
reposition yourself within a given screen to a specific place? There
are several ways you can do this. One way (not the best, but the most
basic) is to use the commands previous, backward, forward and next.
As you can imagine these commands (which are given to JOVE as C-P,
C-B, C-F, and C-N respectively) move the cursor from where it
currently is to a new place in the given direction. Here, in a more
graphical form are the commands:
Previous line, C-P
:
:
Backward, C-B .... Current cursor position .... Forward, C-F
:
:
Next line, C-N
You'll probably find it easy to think of these by letter. P for
previous, N for next, B for backward and F for forward. These are the
basic cursor positioning commands and you'll be using them ALL the
time so it would be of great benefit if you learn them now.
>> Do a few C-N's to bring the cursor down to this line.
>> Move into the line with C-F's and then up with several C-P's. See
what C-P does when the cursor is in the middle of the line.
Lines are separated by a single Linefeed character, which is what Unix
calls a Newline.
>> Try to C-B at the beginning of a line. Do a few more C-B's.
Then do C-F's back to the end of the line and beyond.
When you go off the top or bottom of the screen, the text beyond the
edge is shifted onto the screen so that your instructions can be
carried out while keeping the cursor on the screen.
>> Try to move the cursor off the bottom of the screen with C-N and
see what happens.
If moving by characters is too slow, you can move by words. M-F
(Meta-F) moves forward a word and M-B moves back a word.
>> Type a few M-F's and M-B's. Intersperse them with C-F's and C-B's.
Notice the parallel between C-F and C-B on the one hand, and M-F and
M-B on the other hand. Very often Meta characters are used for
operations related to English text whereas Control characters operate
on the basic textual units that are independent of what you are
editing (characters, lines, etc). There is a similar parallel between
lines and sentences: C-A and C-E move to the beginning or end of a
line, and M-A and M-E move to the beginning or end of a sentence.
>> Try a couple of C-A's, and then a couple of C-E's.
Try a couple of M-A's, and then a couple of M-E's.
See how repeated C-A's do nothing, but repeated M-A's keep moving
farther. Do you think that this is right?
Two other simple cursor motion commands are M-< (Meta Less-than),
which moves to the beginning of the file, and M-> (Meta Greater-than),
which moves to the end of the file. You probably don't need to try
them, since finding this spot again will be boring. If you need the
shift key to type a "<", then you must also use the shift key to type
M-<. Otherwise, you would be typing M-, .
The location of the cursor in the text is also called "point". To
paraphrase, the cursor shows on the screen where point is located in
the text.
Here is a summary of simple moving operations including the word and
sentence moving commands:
C-F Move forward a character
C-B Move backward a character
M-F Move forward a word
M-B Move backward a word
C-N Move to next line
C-P Move to previous line
C-A Move to beginning of line
C-E Move to end of line
M-A Move back to beginning of sentence
M-E Move forward to end of sentence
M-< Go to beginning of file
M-> Go to end of file
>> Try all of these commands now a few times for practice. Since the
last two will take you away from this screen, you can come back
here with the command C-X C-X (which will be explained later).
These are the most often used commands.
Like all other commands in JOVE, these commands can be given arguments
which cause them to be executed repeatedly. The way you give a
command a repeat count is by typing META and then the digits before
you type the command. (Remember META is ususally called ESCAPE)
For instance, META 8 C-F moves forward eight characters.
>> Try giving a suitable argument to C-N or C-P to come as close
as you can to this line in one jump.
The only apparent exception to this is the screen moving commands, C-V
and M-V. When given an argument, they scroll the screen up or down by
that many lines, rather than screenfuls. This proves to be much more
useful.
>> Try typing M-8 C-V now.
Did it scroll the screen up by 8 lines? If you would like to scroll
it down you can give an argument to M-V.
THE UNIVERSAL ARGUMENT
----------------------
Almost every command in JOVE takes a so-called Universal Argument.
This argument, although it is interpreted differently in some cases,
usually means REPEAT. One important exception to this is with the screen
moving commands. In this case, the number refers to the number of LINES
to scroll, not the number of screens.
The way you give a command a universal argument is by typing ESC and
then the number. For example, ESC 10 C-F would move you forward ten
characters.
>>> Try giving a suitable argument to C-N or C-P to come as close as you
can to this line in one jump. Then try giving the same command,
except make the number negative.
Another count-giving command is C-U. This command, when you first type
it, gives you an argument of 4 (four). If you type C-U C-U, you will get
an argument of 16. Each time C-U is typed, the argument is multiplied by
four.
>>> Try typing ESC 8 C-V now.
THE GOTO COMMAND
----------------
Now that we've learned about the universal argument, we can introduce
another cursor positioning command, the command to move to a specific
line. This command is given by giving a line number via ESC, and then
typing M-G.
>>> Try using the M-< and M-> commands to move to the beginning and the
end of the file. Then come back here using the M-G command (this is
line 206, so you'd type ESC 206 M-G.)
QUITTING FROM COMMANDS
----------------------
The character in JOVE used to quit out of all commands which request
input is C-G. For example, you can use C-G to discard a numeric
argument or the beginning of a command that you don't want to finish.