SCAME (part 2 of 5)

Leif Samuelsson leif at erix.UUCP
Sat Feb 16 12:01:35 AEST 1985


# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by erisun!leif on Sat Feb  9 18:11:59 MET 1985
# Contents:  lib/ tmp/ lib/tut2 lib/helpmenu lib/changedfile lib/queryrep
#	lib/basic lib/instring lib/tut1 lib/summary lib/aproposlist lib/news
 
echo mkdir - lib
mkdir lib
chmod u=rwx,g=rx,o=rx lib
 
echo x - lib/tut2
sed 's/^@//' > "lib/tut2" <<'@//E*O*F lib/tut2//'
	*** SCAME ***	(the SCreen-oriented Anti-Misery Editor)

Welcome to part two of the SCAME tutorial.


EXTENDING THE COMMAND SET
-------------------------

There are many, many more SCAME commands than could possibly be put
on all the control and meta characters.  SCAME gets around this with
the X (eXtend) command.  This comes in two flavors:

        C-X     Character eXtend.  Followed by one character.
        M-X     Named command eXtend.  Followed by a long name.

These are commands that are generally useful but used less than the
commands you have already learned about.  You have already seen two
of them: the file commands C-X C-V to Visit and C-X C-S to Save.
Another example is the command to tell SCAME that you'd
like to stop editing.  The command to do this is C-X C-Z. Think of
it as Z for zapping yourself.

There are many C-X commands.  The ones you need immediately are:

        C-X C-V         Visit file.
        C-X C-S         Save file.
        C-X C-Z         Quit SCAME.  This does NOT save your file.  The
                        standard way to save and exit is C-X C-S C-X C-Z.

Named eXtend commands are commands which are used even less
frequently, or commands which are used only in certain modes.
These commands are usually called "functions".  An example the
function Replace String which globally replaces one string with
another.  When you type M-X, SCAME prompts you at the bottom of
the screen with M-X and you should type the name of the function
you wish to call; in this case, "Replace String".  Just type
"Replace String<Return>".  Then you type the string that you want
to replace, a return, the string you want to replace it with, and
a return.

>> Move the cursor to the blank line two lines below this one.
   Then type M-X replace string<Return>changed<Return>altered<Return>.

   Notice how this line has changed: you've replaced
   the word c-h-a-n-g-e-d with "altered" wherever it occurs
   after the cursor.



MODE LINE
---------

If SCAME sees that you are typing commands slowly it shows them to you
at the bottom of the screen in an area called the echo area.  The echo
area contains the bottom line of the screen.  The line immediately
above it is called the MODE LINE.  The mode line says something like

   SCAME (Fundamental) Main: filename          --nn%-- *

This is a very useful "information" line.

You already know what the filename means - it is the file you have
visited.  What the --nn%-- means is that nn percent of the file is
above the top of the screen.  If the top of the file is on the screen,
it will say --TOP-- instead of --00%--.  If the bottom of the file is
on the screen, it will say --BOT--.  If you are looking at a file so
small it all fits on the screen, the --nn%-- will simply not be there.

The star means that you have made changes to the text.  Right after
you visit or save a file, there is no star.

The part of the mode line inside the parentheses is to tell you what
modes you are in.  The default mode is Fundamental which is what you
are in now.  It is an example of a "major mode".  There are several
major modes in SCAME for editing different languages and text, such as
Pascal Mode, Swedish Mode, etc.  At any time one and only one major mode 
is active, and its name can always be found in the mode line just where
"Fundamental" is now.  Each major mode makes a few commands behave
differently.  For example, there are commands for creating comments in
a program, and since each programming language has a different idea of
what a comment should look like, each major mode has to insert comments
differently.  Each major mode is the name of an extended command, which
is how you get into the mode.  For example, M-X Fundamental Mode is how
to get into Fundamental mode.

If you are going to be editing Swedish text, you should probably use
Swedish Mode.

>> Type M-X Swedish Mode<Return>.

Don't worry, none of the commands you have learned changes in any
great way.  But you can now observe that the special swedish characters
}{| and ][\ are now part of words when you do M-F or M-B! Major modes
are usually like that: commands don't change into completely unrelated
things, but they work a little bit differently.

Major modes are called major because there are also minor modes.
They are called minor because they aren't alternatives to the major
modes, just minor modifications of them.  Each minor mode can be
turned on or off by itself, regardless of what major mode you are in,
and regardless of the other minor modes.  So you can use no minor
modes, or one minor mode, or any combination of several minor modes.
(At this moment there are no minor modes implemented in SCAME).


SEARCHING
---------

SCAME can do searches for strings (these are groups of contiguous
characters or words) either forward through the file or backward
through it.  To search for the string means that you are trying to
locate it somewhere in the file and have SCAME show you where the
occurrences of the string exist.  This type of search is somewhat
different from what you may be familiar with.  It is a search that is
performed as you type in the thing to search for.  The command to
initiate a search is C-S for forward search, and C-R for reverse
search.  BUT WAIT!  Don't do them now.  When you type C-S you'll
notice that the string "I-search" appears as a prompt in the echo
area.  This tells you that SCAME is in what is called an incremental
search waiting for you to type the thing that you want to search for.
A search is terminated by C-@ (Control-Space on some terminals).

>> Now type C-S to start a search.  SLOWLY, one letter at a time,
   type the word 'cursor', pausing after you type each
   character to notice what happens to the cursor.
>> Type C-S to find the next occurrence of "cursor".
>> Now type <Rubout> four times and see how the cursor moves.
>> Type C-@ (or C-Space) to terminate the search.

Did you see what happened?  SCAME, in an incremental search, tries to
go to the occurrence of the string that you've typed out so far.  To go
to the next occurrence of 'cursor' just type C-S again.  If no such
occurrence exists SCAME beeps and tells you that it is a failing
search.  C-G would also terminate the search.

If you are in the middle of an incremental search and type <Rubout>,
you'll notice that the last character in the search string is erased
and the search backs up to the last place of the search.  For
instance, suppose you currently have typed 'cu' and you see that your
cursor is at the first occurrence of 'cu'.  If you now type <Rubout>,
the 'u' on the search line is erased and you'll be repositioned in the
text to the occurrence of 'c' where the search took you before you
typed the 'u'.  This provides a useful means for backing up while you
are searching.

If you are in the middle of a search and happen to type a control
character (other than a C-S or C-R, which tell SCAME to search for the
next occurrence of the string), the search is terminated.

The C-S starts a search that looks for any occurrence of the search
string AFTER the current cursor position.  But what if you want to
search for something earlier in the text?  To do this one should
type C-R for Reverse search.  Everything that applies to C-S applies
to C-R except that the direction of the search is reversed.


GETTING MORE HELP
-----------------

In this tutorial we have tried to supply just enough information to
get you started using SCAME.  There is so much available in SCAME
that it would be impossible to explain it all here.  However, you
may want to learn more about SCAME since it has numerous desirable
features that you don't know about yet.  SCAME has a great deal of
internal documentation.  All of these commands can be accessed through
the HELP character.  If there is no key labelled "HELP" on your
keyboard, you can type the <HELP> character as C-_ (Control-Underscore).
Be warned: many terminals are faulty and do not allow you to type the
character C-_ in the logical way (hold down Control and type an
underscore). For example, on a VT-100 it works to hold down Control
and type "/" or "?".

To use the HELP features, type the <HELP> character, and then a
character saying what kind of help you want.  If you are REALLY lost,
type <HELP> ? and SCAME will tell you what kinds of help it can give.
If you have typed the <HELP> character and decide you don't want any
help, just type C-G to abort.

The most basic HELP feature is <HELP> B. Type <HELP>, a B, and
SCAME prints a short summary of its most important commands.

>> Type <HELP> B. When the summary has been printed, SCAME will wait
   for you to to type a space. When you have done that, the text in
   the text buffer (this text) will be restored on the screen.

Another simple HELP feature is <HELP> S.  Type <HELP>, an S, and SCAME
will print a summary of all commands available.

>> Type <HELP> S. It should print the command summary.  When it says
   "--MORE--" at the bottom of the screen, type a Space to see the 
   next screenful of the list.


CONCLUSION
----------

This tutorial is meant to be understandable to all new users, so if
you found something unclear, don't sit and blame yourself - complain!

This tutorial was adapted from <EMACS>TEACH-EMACS.TUTORIAL, a tutorial
file for EMACS, an advanced real-time screen editor of which SCAME is
but a faint shadow. If you have access to a DEC-20 or MULTICS computer,
you could benefit from all the wonders of EMACS, but otherwise you will
have to be satisfied with this! 

He, who useth SCAME, or any other EMACS-inspired editor, should
acknowledge the work of Richard M. Stallman of the M.I.T. Artificial
Intelligence laboratory, who conceived and implemented EMACS. 
@//E*O*F lib/tut2//
chmod u=rw,g=r,o=r lib/tut2
 
echo x - lib/helpmenu
sed 's/^@//' > "lib/helpmenu" <<'@//E*O*F lib/helpmenu//'
You are at top level.
Type a HELP option to say which kind of help you want:

A    tells something Apropos a keyword.  You supply the keyword.
B    lists the Basic commands you need to use SCAME.
C    says what a certain Command (character) does. You type the character.
L    tells you the Last 60 character you typed.
N    lists a file of SCAME News.
S    lists a Summary of all commands.
1    runs part 1 of the SCAME tutorial.
2    runs part 2.
Q or RubOut   Quit, you don't really want help.
@//E*O*F lib/helpmenu//
chmod u=rw,g=r,o=r lib/helpmenu
 
echo x - lib/changedfile
sed 's/^@//' > "lib/changedfile" <<'@//E*O*F lib/changedfile//'
Since SCAME last visited or saved this file
it has been changed on disk.
@//E*O*F lib/changedfile//
chmod u=rw,g=r,o=r lib/changedfile
 
echo x - lib/queryrep
sed 's/^@//' > "lib/queryrep" <<'@//E*O*F lib/queryrep//'
Space  => Replace this.
RubOut => Don't replace this.
!      => Go ahead with the rest.
@.      => Replace this and then stop.
Escape => Quit.

Now type a space to see text again
@//E*O*F lib/queryrep//
chmod u=rw,g=r,o=r lib/queryrep
 
echo x - lib/basic
sed 's/^@//' > "lib/basic" <<'@//E*O*F lib/basic//'
+---------------------- SUMMARY OF BASIC COMMANDS --------------------------+
!       C-B means "Control-B", i.e. press CTRL while you type B             !
!       M-X means "Meta-X", i.e. type ESC and then type X		    !
+---------------------------------------------------------------------------+
Editing:		C-X C-V		Visit file (choose a file to edit).
			C-X C-S		Save file.
			C-X C-Z		Zap (Leave SCAME).

Moving around:		C-B  Backwards			C-F  Forward
			C-P  Previous Line		C-N  Next Line
			M-V  Previous Screen		C-V  Next Screen
			M-<  Beginning of Buffer	M->  End of Buffer

Write and delete:	Ordinary characters are self-inserting.
			<RUB OUT> 	Delete the character left of the cursor
			C-D		Delete the character at the cursor
			C-K		Kill rest of the line (or empty line)
			C-Y		Insert text that was last killed

Other useful commands:	C-S  Incremental Search		C-L  Redisplay screen
	>>>>> Press <SPACE> when finished reading this!! <<<<<
@//E*O*F lib/basic//
chmod u=rw,g=r,o=r lib/basic
 
echo x - lib/instring
sed 's/^@//' > "lib/instring" <<'@//E*O*F lib/instring//'
You are typing the argument to a command.
These commands are available here:

Return	Enter the line.
Escape	Fill in the default string, if any, as shown within
	parentheses. Only works at the beginning of the line.
^F	Fill in the current filename.
^G	Abort this.
^Q	Insert the next character. (Quoting ^@ won't work).
^U	Rub out the whole line back to the prompt.
@//E*O*F lib/instring//
chmod u=rw,g=r,o=r lib/instring
 
echo x - lib/tut1
sed 's/^@//' > "lib/tut1" <<'@//E*O*F lib/tut1//'
	*** SCAME ***	(the SCreen-oriented Anti-Misery Editor)

You are looking at the SCAME tutorial.  Comments on this document
should be sent via "mail leif at erisun.UUCP".

SCAME commands generally involve the <CONTROL> key (sometimes labelled
<CTRL> or <CTL>) or the <ESCAPE> key (sometimes labelled <ESC> or <ALT>).
Rather than write out <ESCAPE> 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 (pronounced Control-F) would be: hold the <CONTROL>
	  key and type F.
 M-<chr>  stands for META-<chr>. If you don't have a <META>-key, you
	  must use the <ESCAPE> key.  Thus, M-F (pronounced Meta-F) would
	  be:  Type <ESCAPE>, release it, then type the character F.

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 (i e type
<ESCAPE>, release it, then type a V).

>>  Try typing M-V and then C-V to move back and forth a few times.
    Make sure you understand the difference between a Control-command
    and a Meta-command.


SUMMARY
-------

The following commands are useful for viewing screenfuls:

        C-V     Move forward one screenful
        M-V     Move backward one screenful
        C-L     Clear screen and redisplay everything
                 putting the text near the cursor at the 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.



WATCH OUT
---------

For the moment, some of the commands described here have not
been implemented yet. If you try to use them, you will get the 
"NYI Function is Not Yet Implemented?" error message. Also, some
commands do not yet function exactly as described here. When you
encounter one of those cases, have forbearance.


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
SCAME 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 C-P's.
   See what C-P does when the cursor is in the middle of the line.


Lines are separated by one character, called a Linefeed (or Newline).

>> Try to C-B at the beginning of this 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.

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 M-V's and C-V's.  These are
   the most often used commands.

Like all other commands in SCAME, 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 C-U and then the
digits before you type the command.

For instance, C-U 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 C-U 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.


WHEN SCAME IS HUNG
------------------

If you want to interrupt SCAME when it is waiting for input, you can
stop it safely by typing C-G.
You can also use C-G to discard a numeric argument or the beginning of
a command that you don't want to finish.

>> Type C-U 100 to make a numeric arg of 100, then type C-G.
   Now type C-F.  How many characters does it move?
   If you have typed an <ESCAPE> by mistake, you can get rid of it
   with a C-G.

Note that you can only use C-G to interrupt SCAME when it is waiting
for input. If SCAME is running, the only way to stop it is by logging
in on another terminal and killing the SCAME process. Note that this
is a dangerous procedure that may cause your text buffer to be lost!
Don't use it unless you absolutely have to.


INSERTING AND DELETING
----------------------

If you want to type text, just do it.  Characters which you can see,
such as A, 7, *, etc. are taken by SCAME as text and inserted
immediately.  Type <Return> (the carriage-return key) to insert a line
separator.

You can delete the last character you typed by typing <Rubout>.
<Rubout> is a key on the keyboard, which may be labelled "Delete"
instead of "Rubout" on some terminals.  More generally, <Rubout>
deletes the character immediately before the current cursor position.

>> Do this now, type a few characters and then delete them
   by typing <Rubout> a few times.  Don't worry about this file
   being changed; you won't affect the master tutorial.  This is just
   a copy of it.

>> Now start typing text until you reach the right margin, and keep
   typing.  When a line of text gets too big for one line on the
   screen, the line of text is "continued" onto a second screen line.
   The exclamation mark at the right margin indicates a line which has
   been continued.
>> Use <Rubout>s to delete the text until the line fits on one screen
   line again.  The continuation line goes away.

>> Move the cursor to the beginning of a line and type <Rubout>.  This
   deletes the line separator before the line and merges the line onto
   the previous line.  The resulting line may be too long to fit, in
   which case it has a continuation line.
>> Type <Return> to insert the separator again.

Remember that most SCAME commands can be given a repeat count;  Note
that this includes characters which insert themselves.

>>  Try that now -- type C-U 8 * and see what happens.

You've now learned the most basic way of typing something in
SCAME and correcting errors.  You can delete by words or lines
as well.  Here is a summary of the delete operations:

        <Rubout>     delete the character just before the cursor
        C-D          delete the next character after the cursor

        M-<Rubout>   kill the word immediately before the cursor
        M-D          kill the next word after the cursor

        C-K          kill from the cursor position to end of line
        M-K          kill to the end of the current sentence

Notice that <Rubout> and C-D vs M-<Rubout> and M-D extend the parallel
started by C-F and M-F (well, <Rubout> isn't really a control
character, but let's not worry about that).  C-K and M-K are like C-E
and M-E, sort of, in that lines are opposite sentences.

Now suppose you kill something, and then you decide that you want to
get it back?  Well, whenever you kill something bigger than a
character, SCAME saves it for you.  To yank it back, use C-Y.  Note
that you don't have to be in the same place to do C-Y; This is a good
way to move text around.  Also note that the difference between
"Killing" and "Deleting" something is that "Killed" things can be
yanked back, and "Deleted" things cannot.  Generally, the commands
that can destroy a lot of text save it, while the ones that attack
only one character, or nothing but blank lines and spaces, do not
save.

For instance, type C-N a couple times to postion the cursor
at some line on this screen.

>> Do this now, move the cursor and kill that line with C-K.

Note that a single C-K kills the contents of the line, and a second
C-K kills the line itself, and make all the other lines move up.  If
you give C-K a repeat count, it kills that many lines AND their
contents.

The text that has just disappeared is saved so that you can
retrieve it.  To retrieve the last killed text and put it where
the cursor currently is, type C-Y.

>> Try it; type C-Y to yank the text back.

Think of C-Y as if you were yanking something back that someone
took away from you.  Notice that if you do several C-K's in a row
the text that is killed is all saved together so that one C-Y will
yank all of the lines.

>> Do this now, type C-K several times.

Now to retrieve that killed text:

>> Type C-Y.  Then move the cursor down a few lines and type C-Y
   again.  You now see how to copy some text.


FILES
-----

In order to make the text you edit permanent, you must put it in a
file.  Otherwise, it will go away when your invocation of SCAME goes
away.  You put your editing in a file by "visiting" the file.  What
visiting means is that you see the contents of the file in your SCAME;
and, loosely speaking, what you are editing is the file itself.
However, the changes still don't become permanent until you "save" the
file.  This is so you can have control to avoid leaving a half-changed
file around when you don't want to.  Even then, SCAME really makes a
new version of the file and saves the old version under a slightly
different name (so that you can verify or throw away your changes later
if you like).

If you look near the botton of the screen you will see a line that
starts with "SCAME  (Fundamental)  tut1:" and continues with the
filename tut1, which is the name of the SCAME tutorial; the file
you are now visiting.  Whatever file you visit, that file's name will
appear in that precise spot.

The commands for visiting and saving files are unlike the other
commands you have learned in that they consist of two characters.
They both start with the character Control-X.  There is a whole series
of commands that start with Control-X; many of them have to do with
files, buffers, and related things, and all of them consist of
Control-X followed by some other character.

Another thing about the command for visiting a file is that you have
to say what file name you want.  We say the command "reads an argument
from the terminal" (in this case, the argument is the name of the
file).  After you type the command

        C-X C-V   Visit a file

SCAME will ask you for the file name.  You should end the name with
the Return key.  After this command, you will see the contents of the
file in your SCAME and you can start editing edit its contents.

If you are editing a file in SCAME and type the command C-X C-V to visit
another file, you will lose whatever changes you did to the first file.
If you wish to make the changes permanent, you must issue the command

        C-X C-S   Save the file

A new version of the file will be created.  When the operation is
finished, SCAME prints the name of the file saved.  You should save
fairly often, so that you will not lose very much work if the system
should crash.

Note that there are two ways to visit a file in SCAME. Either you
can start SCAME with the file's name as an argument to the shell,
($ scame foo.p), or you can use the C-X C-V command inside SCAME.

To make a new file, just visit it "as if" it already existed.  Then
start typing in the text.  When you ask to "save" the file, SCAME
will really create the file with the text that you have inserted.
@From then on, you can consider yourself to be editing an already
existing file.

>> Try it: Type C-X C-V and then the name of a file, "foo" for 
   instance. Put some text in it, and save it; then exit from
   SCAME and look at the file to be sure that it worked.
   Then continue with part two of the tutorial.
@//E*O*F lib/tut1//
chmod u=rw,g=r,o=r lib/tut1
 
echo x - lib/summary
sed 's/^@//' > "lib/summary" <<'@//E*O*F lib/summary//'
SCAME Command Chart as of 27-Oct-1982
=====

To get a C-A (Control-A) hold down the 'Ctrl'-key and type an 'A'.

If your terminal has a 'Meta'-key:
To get a M-A (Meta-A) hold down the 'Meta'-key and type an 'A'.
To get a C-M-A (Control-Meta-A) hold down both the 'Ctrl'-key and
the 'Meta'-key and type an 'A'.

If your terminal lacks 'Meta'-key:
To get a M-A (Meta-A) first type an 'Esc' and then an 'A'.
To get a C-M-A (Control-Meta-A) first type a C-Z and then an 'A'.

C-@		Set/Pop Mark
C-A		Beginning Of Line
C-B		Backward Character
C-C		Exit To Shell
C-D		Delete Character
C-E		End Of Line
C-F		Forward Character
C-G		Cancel                              >>type SPACE to see more<<
C-H (Backspace)	Backward Character
C-I (Tab)	Indent According to Mode
C-J (Linefeed)	Indent New Line
C-K		Kill Line
C-L		Reposition Window
C-N		Down Line
C-O		Open Line
C-P		Up Line
C-Q		Insert Next Character
C-R		Reverse Incremental Search
C-S		Incremental Search
C-T		Transpose Characters
C-U		Universal Argument	(Must be in the range 0..32767)
C-V		Next Screen
C-W		Kill Region
C-X		is a prefix character. See below
C-Y		Un-Kill
C-Z		Prefix Control-Meta
C-[ (Escape)	Prefix Meta
C-\		Prefix Meta
C-_		Help
C-^		Prefix Control
RubOut		Backward Delete Character
C-X C-B		List Buffers
C-X C-D		Directory Display
C-X C-F		Find File
C-X Tab		Indent Region
C-X C-L		Lowercase Region
C-X C-S		Save File
C-X C-U		Uppercase Region
C-X C-V		Visit File
C-X C-W		Write File
C-X C-X		Exchange Point and Mark
C-X C-Z		Exit
C-X (		Start Kbd Macro
C-X )		End Kbd Macro
C-X .		Set Fill Prefix
C-X 1		One Window
C-X 2		Two Windows
C-X ;		Set Comment Column
C-X =		What Cursor Position
C-X B		Select Buffer
C-X D		Dired
C-X E		Execute Kbd Macro
C-X H		Mark Whole Buffer
C-X L		Count Lines Page
C-X K		Kill Buffer
C-X M		Send Mail
C-X O		Other Window
C-X R		Read Mail
C-X ^		Grow Window

M-Return	Back to Indentation
M-!		Execute Shell Command
M-%		Query Replace
M-(		Make ()
M-+		Push to Shell
M-0 .. M-9	Auto Argument
M-;		Indent for Comment
M-<		Goto Beginning
M-=		Count Lines Region
M->		Goto End
M-@		Mark Word
M-A		Backward Sentence
M-B		Backward Word
M-C		Capitalize Word
M-D		Kill Word
M-E		Forward Sentence
M-F		Forward Word
M-G		Fill Region
M-K		Kill Sentence
M-L		Lowercase Word
M-U		Uppercase Word
M-V		Previous Screen
M-W		Copy Region
M-X		Instant Extended Command (see below)
M-\		Delete Horizontal Space
M-^		Delete Indentation
M-~		Buffer Not Modified
M-RubOut	Backward Kill Word

C-M-%		Query Replace
C-M-M		Back to Indentation
C-M-T		Display Date and Time
C-M-Z		Exit
C-M-V		Scroll Other Window
C-M-W		Append Next Kill

Most printable characters are self-inserting.






Extended commands:	(T means toggle)
------------------
M-X Ada Mode			A Major mode for editing ADA programs
M-X Auto Fill Mode	(T)	A minor mode useful when writing in text
M-X C Mode			For editing C programs
M-X Change Directory		Change the working directory
M-X Check Mail			Tell if there is new mail
M-X Delete Matching Lines	Delete all lines containing a pattern.
M-X Fundamental Mode		When nothing else applies
M-X Insert Character		Given an argument, inserts the character
					with the corresponding ASCII code
M-X Insert File			Asks for a file to insert at point
M-X Load Kbd Macro		Read keyboard macro from a file.
M-X Lisp Mode			For editing LisP code
M-X Overwrite Mode	(T)	A minor mode for overwrite instead of insert.
M-X Pascal Mode			For editing Pascal programs
M-X Replace String		Replace from point to end of buffer (not query)
M-X Revert File			Restore file from disk
M-X Rot 13 Region		Encrypt/decrypt offensive text.
M-X Save Kbd Macro		Write keyboard macro to a file.
M-X Set Key			Put a function on a key
M-X Set Variable		Given an argument, will change the value
					of a variable
M-X Sort Buffer			Sort all lines in alphabetical order.
M-X Stop			Stop SCAME temporarily.
M-X Swedish Mode		For editing swedish text
M-X Tabify			Convert spaces into tabs where possible,
					starting from point
M-X Undo			Try to undo the last command. Only some
					commands may be undone.
M-X View File			Show a file without creating a new buffer.
M-X View Working Directory      Type out the current working directory
M-X View Variable		Show the value of a named variable
M-X Write Region		Write out the region to a file. Does not change
				the current filename.


Variables:	(Default values in parentheses)
----------
Auto Fill Mode		(0)	Controls the Auto Fill Mode

Auto Push Point Option	(500)	When to set mark after I-Search

Bottom Display Margin	(100)	Maximum percentage of screen 
to keep above cursor

Comment Column		(33)	Used by M-; to decide where to start a comment.

Fill Column		(72)	Used by Fill Region and Auto Fill Mode to
				decide where to break lines.

Hackmatic			Will be nonzero if the terminal has a META-key.

Mail Check Interval	(100)	How often to check for new mail.

Overwrite Mode		(0)	Controls the Overwrite Mode

System Output Holding	(0)	If nonzero, will make scame ignore ^X and ^Q,
				using C-] for C-S and C-^ for C-Q instead.

Tab Self Insert		(0)	Controls the action of TAB when in Pascal
				or C Mode.

Terminal types:
---------------
You can specify what kind of terminal you are using by putting
the following two lines in your file .profile (which is executed
every time you log in):

TERM=<terminal type>
export TERM

where <terminal type> is one of the names listed in the file
/etc/termcap

If you are using the C shell , i.e. the one with the % prompt,
you should put "setenv TERM <terminal type>" in the file .login
instead.


Please report bugs via "mail leif_s"
				/Leif Samuelsson

@//E*O*F lib/summary//
chmod u=rw,g=r,o=r lib/summary
 
echo x - lib/aproposlist
sed 's/^@//' > "lib/aproposlist" <<'@//E*O*F lib/aproposlist//'
C-@		Set/Pop Mark;set mark
C-A		Beginning Of Line
C-B		Backward Character
C-C		Exit To Shell
C-D		Delete Character
C-E		End Of Line
C-F		Forward Character
C-G		Cancel
C-H (Backspace)	Backward Character
C-I (Tab)	Indent According to Mode
C-J (Linefeed)	Indent New Line
C-K		Kill Line
C-L		Reposition Window
C-N		Down Line
C-O		Open Line
C-P		Up Line
C-Q		Insert Next Character
C-R		Reverse Incremental Search
C-S		Incremental Search
C-T		Transpose Characters
C-U		Universal Argument	(Must be in the range 0..32767)
C-V		Next Screen
C-W		Kill Region
C-X		is a prefix character. See below
C-Y		Un-Kill
C-Z		Prefix Control-Meta
C-[ (Escape)	Prefix Meta
C-\		Prefix Meta
C-_		Help
C-^		Prefix Control
RubOut		Backward Delete Character
C-X C-B		List Buffers
C-X C-D		Directory Display
C-X C-F		Find File
C-X Tab		Indent Region
C-X C-L		Lowercase Region
C-X C-S		Save File
C-X C-U		Uppercase Region
C-X C-V		Visit File
C-X C-W		Write File
C-X C-X		Exchange Point and Mark
C-X C-Z		Exit
C-X (		Start Kbd Macro;keyboard macro;define
C-X )		End Kbd Macro;keyboard macro
C-X .		Set Fill Prefix
C-X 1		One Window
C-X 2		Two Windows
C-X \;		Set Comment Column
C-X =		What Cursor Position
C-X B		Select Buffer
C-X D		Dired;edit directory
C-X E		Execute Kbd Macro;keyboard macro
C-X H		Mark Whole Buffer
C-X L		Count Lines Page
C-X K		Kill Buffer
C-X M		Send Mail
C-X O		Other Window
C-X R		Read Mail
C-X ^		Grow Window
M-Return	Back to Indentation
M-!		Execute Shell Command
M-%		Query Replace;substitute
M-(		Make ()
M-+		Push to Shell
M-0 .. M-9	Auto Argument
M-\;		Indent for Comment
M-<		Goto Beginning
M-=		Count Lines Region
M->		Goto End
M-@		Mark Word
M-A		Backward Sentence
M-B		Backward Word
M-C		Capitalize Word
M-D		Kill Word
M-E		Forward Sentence
M-F		Forward Word
M-G		Fill Region	(with argument it becomes Justify Region)
M-K		Kill Sentence
M-L		Lowercase Word
M-U		Uppercase Word
M-V		Previous Screen
M-W		Copy Region
M-X		Instant Extended Command (see below)
M-\		Delete Horizontal Space
M-^		Delete Indentation
M-~		Buffer Not Modified
M-RubOut	Backward Kill Word
C-M-%		Query Replace;substitute
C-M-M		Back to Indentation
C-M-T		Display Date and Time
C-M-Z		Exit
C-M-V		Scroll Other Window
C-M-W		Append Next Kill
M-X Ada Mode			A Major Mode for editing ADA programs
M-X Auto Fill Mode		A Minor Mode, useful when entering text
M-X C Mode			For editing C programs
M-X Change Directory		Change the working directory
M-X Check Mail			Tell if there is new mail
M-X Delete Matching Lines	Delete all lines containing a pattern;Flush lines
M-X Fundamental Mode		When nothing else applies
M-X Insert Character		Inserts the character with ASCII code arg
M-X Insert File			Asks for a file to insert at point
M-X Load Kbd Macro		Read keyboard macro from a file.
M-X Lisp Mode			For editing LisP code
M-X Overwrite Mode		Overwrite instead of insert typed characters.;replace mode
M-X Pascal Mode			For editing Pascal programs
M-X Replace String		Replace to end of buffer (not query);substitute
M-X Revert File			Restores file from disk
M-X Rot 13 Region		Encrypt/decrypt offensive text.;Rotate;rot13
M-X Save Kbd Macro		Write keyboard macro to a file.
M-X Set Key			Put a function on a key;bind key
M-X Set Variable		Given an argument, changes a variable's value
M-X Sort Buffer			Sort all lines in alphabetical order.
M-X Stop			Stop SCAME temporarily;suspend job
M-X Swedish Mode		For editing swedish text
M-X Tabify			Convert spaces into tabs, starting from point
M-X Undo			Try to undo the last command.
M-X View File			Show a file without creating a new buffer.
M-X View Working Directory      Type out the current working directory;pwd
M-X View Variable		Shows the value of a named variable
M-X Write Region		Write out the region to a file.
Auto Fill Mode		(0)	Controls the corresponding Minor Mode
Auto Push Point Option	(500)	When to set mark after I-Search
Comment Column		(33)	Used by M-\; to decide where to start a comment.
Fill Column		(72)	Used by fill commands when breaking lines.
Hackmatic			Will be nonzero if the terminal has a META-key.
Mail Check Interval	(100)	How often to check for new mail.
Overwrite Mode		(0)	Controls the corresponding Minor Mode
System Output Holding	(0)	If nonzero, will make scame ignore ^X and ^Q
Tab Self Insert		(0)	Controls the action of TAB in some modes
@//E*O*F lib/aproposlist//
chmod u=rw,g=r,o=r lib/aproposlist
 
echo x - lib/news
sed 's/^@//' > "lib/news" <<'@//E*O*F lib/news//'
		SCAME News Bulletin
		===================

1985-02-08	Truncated the newsfile		/LS

@...

1982-10-18	Introduced the newsfile.	/LS


End of file.
@//E*O*F lib/news//
chmod u=rw,g=r,o=r lib/news
 
echo mkdir - tmp
mkdir tmp
chmod u=rwx,g=rwx,o=rwx tmp
 
echo Inspecting for damage in transit...
temp=/tmp/shar$$; dtemp=/tmp/.shar$$
trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
cat > $temp <<\!!!
     208    1714    9729 tut2
      12      93     496 helpmenu
       2      14      73 changedfile
       7      34     178 queryrep
      21     132     952 basic
      10      65     364 instring
     363    2622   14875 tut1
     200     946    5604 summary
     130     711    4300 aproposlist
      11      18     145 news
     964    6349   36716 total
!!!
wc  lib/tut2 lib/helpmenu lib/changedfile lib/queryrep lib/basic lib/instring lib/tut1 lib/summary lib/aproposlist lib/news | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
if [ -s $dtemp ]
then echo "Ouch [diff of wc output]:" ; cat $dtemp
else echo "No problems found."
fi
exit 0



More information about the Comp.sources.unix mailing list