























	 Title:        THE RAND EDITOR, E__________________

	 Author:       Robert Grotz      __________________

	 Date:         August 21, 1980   __________________








































                                 -iii-



                                _C_O_N_T_E_N_T_S






Section

   I.  THE RAND EDITOR, E .........................................    1
         INTRODUCTION .............................................    1
         KEY SYNTAX ...............................................    2

  II.  MAJOR DIFFERENCES BETWEEN NED AND E ........................    4
         INVOKING THE EDITOR ......................................    4
         CREATING A NEW FILE ......................................    4
         COMMAND MODE .............................................    4
         EXITING FROM THE EDITOR ..................................    6
         RECOVERY .................................................    6
         THE MARK FUNCTION ........................................    6
         CLOSING, PICKING, AND PUTTING ............................    7
         REPLACE COMMAND ..........................................    7
         GOTO .....................................................    8
         FILL, CENTER, JUSTIFY ....................................    8
         BRINGING UP AN ALTERNATE FILE ............................    9
         WINDOWS ..................................................    9
         STATE FILE, CHANGE FILE, AND KEYS FILE ...................    9
         USE OF STATE, CHANGE, AND KEYS FILE ......................   10

 III.  A BRIEF REFERENCE MANUAL TO E ..............................   12
         INTRODUCTION .............................................   12
         KEYSTROKE SYNTAX.  .......................................   12

THE RAND EDITOR E, VERSION 10, AUGUST 21, 1980. ...................   13
         ABORTING A COMMAND .......................................   13
         ABORTING A SESSION .......................................   13
         ALTERNATE FILE ...........................................   13
         AREA .....................................................   13
         ARG ......................................................   14
         <ARROW KEYS> .............................................   14
         BACKSPACE ................................................   14
         BACKUP FILE ..............................................   15
         BACKWARD SEARCH ..........................................   15
         <BRK> ....................................................   15
	 <BS> .....................................................   16
         BUFFERS ..................................................   16
         cat ......................................................   16
         center ...................................................   16
         CHANGE FILE ..............................................   17
         CHANGING FILES ...........................................   17
         CHANGING WINDOWS .........................................   17
         <CHG WIN> ................................................   17










                                  -iv-



         close ....................................................   17
         <CLOSE> ..................................................   18
         CLOSE BUFFER .............................................   18
         COMBINING FILES ..........................................   18
         COMBINING LINES ..........................................   18
         COMMAND MODE .............................................   19
         COPYING FILES ............................................   19
         COPYING TEXT .............................................   19
         cp .......................................................   19
         CRASHES, RECOVERY FROM ...................................   20
         CREATING FILES ...........................................   20
         CREATING WINDOWS .........................................   20
         <CTRL> ...................................................   20
	 |CTRL+A| .................................................   21
	 |CTRL+B| .................................................   21
	 |CTRL+C| .................................................   21
	 |CTRL+S| .................................................   21
	 |CTRL+Z| .................................................   21
	 |CTRL+[| .................................................   21
	 |CTRL+\| .................................................   21
         CURRENT WINDOW ...........................................   21
         CURSOR ...................................................   22
         <CURSOR MOVEMENT> ........................................   22
         <DEL CHAR> ...............................................   22
         delete ...................................................   22
         DELETING FILES ...........................................   22
         DELETING TEXT ............................................   23
         DELETING WINDOWS .........................................   23
         e ........................................................   23
         EDIT MODE ................................................   23
         <DOWN ARROW> .............................................   23
         EFFICIENCY ...............................................   23
         .ec1 .....................................................   24
         .ek1 .....................................................   24
         .ek1b ....................................................   24
         .es1 .....................................................   24
         erase ....................................................   24
         -erase ...................................................   24
         ERASING EXTRANEOUS CHARACTERS ............................   25
         ERASING TEXT .............................................   25
         EXECUTE A FUNCTION .......................................   25
         EXIT .....................................................   25
         FILENAME .................................................   26
         FILES ....................................................   26
         fill .....................................................   26
         FORMAT PACKAGE ...........................................   26
         FUNCTION KEYS ............................................   27
         goto .....................................................   27
         <GOTO> ...................................................   27
         <HOME> ...................................................   27
         <INSERT MODE> ............................................   28
         INTERACTIVE REPLACE ......................................   28










				  -v-



         join .....................................................   28
         justify ..................................................   28
         KEYSTROKE FILE ...........................................   28
         <LEFT> ...................................................   29
         <LEFT ARROW> .............................................   29
         <+LINE> ..................................................   29
         <-LINE> ..................................................   29
         LINE MANIPULATION ........................................   30
         LONG LINES ...............................................   30
         MACROS ...................................................   30
         MARGIN CHARACTERS ........................................   30
         MARGINS ..................................................   31
         MARKING ..................................................   31
         MOVING LINES .............................................   31
         MOVING TEXT BETWEEN FILES ................................   31
         MOVING THE WINDOW ........................................   32
         MULTIPLE WINDOWS .........................................   32
         name .....................................................   32
         open .....................................................   32
         <OPEN> ...................................................   33
         <+PAGE> ..................................................   33
         <-PAGE> ..................................................   33
         PAGINATION ...............................................   33
         PARAGRAPHS ...............................................   34
         pick .....................................................   34
         -pick ....................................................   34
         <PICK> ...................................................   34
         PICK BUFFER ..............................................   35
         PRINT ....................................................   35
         PUTTING TEXT .............................................   35
         <PUT> ....................................................   36
         QUITTING .................................................   36
         RECOVERY .................................................   36
         RECTANGULAR AREAS ........................................   37
         redraw ...................................................   37
         RENAMING FILES ...........................................   37
         replace ..................................................   38
         REPLAYING A SESSION ......................................   39
         <RETURN> .................................................   39
         <RIGHT> ..................................................   40
         <RIGHT ARROW> ............................................   40
         RUN ......................................................   40
         save .....................................................   40
         SAVING FILES .............................................   40
         <+SCH> ...................................................   41
         <-SCH> ...................................................   41
         SCRATCH FILE .............................................   41
         SEARCHING ................................................   41
         SETTING TABS .............................................   41
         split ....................................................   41
         <S/R TAB> ................................................   42
         STATE FILE ...............................................   42










				  -vi-



         tab ......................................................   42
         -tab .....................................................   42
         <+TAB> ...................................................   42
         <-TAB> ...................................................   43
         tabfile ..................................................   43
         TABS, THE TOPIC ..........................................   43
         tabs .....................................................   43
         -tabs ....................................................   43
         UNDERLINING ..............................................   44
         UNMARK ...................................................   44
         UP ARROW .................................................   44
         USING A FILE .............................................   44
         WIDE FILES ...............................................   45
         width ....................................................   45
         WINDOW ...................................................   45
         .ec1 .....................................................   45
         .ek1 .....................................................   45
         .ek1b ....................................................   45
         .es1 .....................................................   46
         # ........................................................   46









































                                  -1-



                         _I_.___T_H_E__R_A_N_D__E_D_I_T_O_R_,__E


                  (Version I.  For users of Ann Arbor
                     terminals with Ned keyboards.)






_I_N_T_R_O_D_U_C_T_I_O_N

     The Rand Editor, E, is an editor designed and written by David
Yost, based on the Rand Editor, NED.  A comprehensive guide to E has
been written by David Yost and Judith Westbury and will be published
soon.  In the meantime, to answer the many questions being asked about
E, this writeup has been prepared.

     Section I of this writeup introduces the editor, E, and describes
the keystroke syntax used throughout this document.  Section II
describes the major differerences between E and Ned.  Section III lists
the functions of E in alphabetic order in the form of a brief reference
manual to E.

     E came into existence because Ned had a number of limitations built
into it that were difficult to remove.  E is a more efficient editor,
has more capabilities and fewer bugs, and is designed such that addi-
tional functions can be added to it.  In a few months E will be renamed
"ned", and Ned will be renamed "oldned." Oldned will remain available
for those users who are familiar with the current Ned and who do not
wish to change editors.  Since users can use Ned or E interchangeably to
edit any file, and since E will be thoroughly documented and supported,
most users will probably soon migrate to E.

     This document will be available in three versions, each version
written for a different  keyboard.  Version I is written for users of
Ann Arbor terminals with Ned keyboards, that is, keyboards with Ned
labels on the keys.  Version II is written for users of Ann Arbor termi-
nals that have E keyboards, that is, keyboards with E labels on the
keys.  Version III is written for the newer Ann Arbor terminals.  The
newer terminals can be identified by two keys in the upper left hand
corner that control the baud rate and the duplex and are labeled
"9600/1200" and "FULL/HALF." These terminals also have E labels on the
keyboard, but operate somewhat differently from the older Ann Arbor ter-
minals.

     All three versions will soon be available in the Computer Services
Documentation Center and also online on the Text Processor.  These docu-
ments can be printed on the laser printer as follows:











                                  -2-



     % lprint /doc/ref.I        Prints version I for users of E
                                working on keyboards with Ned labels.
     % lprint /doc/ref.II       Prints version II for users of E
                                working on keyboards with E labels.
     % lprint /doc/ref.III      Prints version III for users of E
                                working on new Ann Arbor terminals.



_K_E_Y__S_Y_N_T_A_X

     Both Ned and E use combinations of keystrokes and text to perform
editing functions.  A description of these keystrokes and text has
always been a difficult matter.  For example, to describe the simultane-
ous pressing of the key labeled CTRL and the S key, a keystroke combina-
tion that shifts the window to the right, the following descriptions
have been used in recent publications:

     <CTRL-S>
     RIGHT
     RIGHT (CTRL-S)
     <RIGHT>
     <CTRL>s


     To reduce descriptive ambiguity, the following syntax will be used
in this document to describe keystrokes for both Ned and E:

     1.  If a single key is to be typed, that key will be indentified by
         putting the label that is currently on top of the key in this
         enclosure, < >.  For example, the carriage return key is
         labeled on top with "RETURN".  In this writeup we describe the
         pressing of that single key as <RETURN>.

         Similiarly, the pressing of the backspace key is <BS>.  And,
         the pressing of Ned's argument key (which is E's command key)
         is <BRK> because BRK is currently on top of the key.

     2.  Text that is entered as part of keystroke sequences will be
         presented in lower case enclosed in brackets.  For example, to
         begin editing a file using Ned, the user types [ned], and to
         begin editing a file using E, the user types [e].

     3.  Certain text strings are used to represent text that the user
         is to type according to his own particular use of that command.
         Those text strings are:

         _f_i_l_e_n_a_m_e: the name of the file the user is working with.  This
         term is used in examples such as [e filename].  The user would,
         of course, replace this term with the name of the file he is
         actually working with.











                                  -3-



         _n: this represesents a decimal number between 1 and 32767.  For
         example, [fill n] may represent [fill 7] or [fill 43].

         _t_e_x_t: the user is to type in whatever text string is appropri-
         ate to his use.  That text string may or may not include blanks
         and special characters depending on the actual command being
         used.  For example, <BRK> [text] <+SCH> initiates a search for
         a string of text which may one character in length, several
         characters in length, or several words in length.

         _a_r_e_a: represents a number of consecutive lines or paragraphs or
         a marked area.  An area is entered by the user (usually option-
         ally) as part of the command such as [fill 20], which fills 20
         lines.  An area can also be defined by cursor movements.  Such
         an area can be a series of lines or paragraphs or a rectangular
         area.

     4.  Certain characters are used in abbreviated form with some fre-
         quency.  Those characters are:

         _p: this is an abbreviation for paragraph and paragraphs.  For
         example, [fill 2p], which fills 2 paragraphs.

         _l: this is the letter "ell". It is an abbreviation for line and
         lines.  For example, [fill 3l], which fills 3 lines.

     5.  Most commands can be abbreviated.  Those abbreviations will
         be mentioned here whenever the command is long and the abbrevi-
         ation would truly be preferred.  The shortest abbreviation of
         any command can be found by executing the command first as a
         single letter, then as two letters, etc.  At some point the
	 number of characters become sufficient to distinguish the com-
         mand.

     6.  There are occasions when two keys must be pressed simultane-
         ously.  For example, to type a capital H, the shift key and the
         H key must be pressed at the same time.  To describe a key
         sequence in which two keys must be pressed at the same time,
         those keys will be placed in this enclosure |  | and separated
         by a plus sign.

         For example, a capital H would be typed |SHIFT+H| exactly as on
         a typewriter.

	 And, for example, to shift the window to the right, a user would
         press the CTRL key and the S key at the same time, |CTRL+S|.
















                                  -4-



                _I_I_.___M_A_J_O_R__D_I_F_F_E_R_E_N_C_E_S__B_E_T_W_E_E_N__N_E_D__A_N_D__E




_I_N_V_O_K_I_N_G__T_H_E__E_D_I_T_O_R

     A user invokes Ned by typing [ned] or [ned filename].  A user
invokes E by typing [e] or [e filename].  If the user does not include
[filename], then E returns to the same file and the same place in the
file where editing was last performed.


_C_R_E_A_T_I_N_G__A__N_E_W__F_I_L_E

     To create a new file using Ned, a user types [ned filename] and is
then prompted with, "Hit <USE> <CTRL-B> to make: filename".  The user
then types |CTRL+B|.  To create a new file using E, a user types [e
filename] and is prompted with, "Do you want to create filename?"  The
user responds to this with [y].  All other answers put the user in a
null file with an informative message.


_C_O_M_M_A_N_D__M_O_D_E

     Ned uses the argument key, labeled on top <BRK>, to enter argu-
ments.  In E this function has been formalized by adding a "command
mode".  When the <BRK> key is typed, E prints "CMD:" below the screen.
As far as the actual keystrokes are concerned, there is frequently lit-
tle difference between what is done in Ned and what is done in E.  For
example:

     NED:  <BRK> 7 <CLOSE>           closes 7 lines.
     E:    <BRK> 7 <CLOSE>           closes 7 lines.

     NED:  <BRK> [text] <+SCH>       searches forward for the
                                     text string.
     E:    <BRK> [text] <+SCH>       searches forward for the
                                     text string.


     There are some important differences though.  One of these is the
use of <RETURN> to initiate a command.  For example:

     NED:  <BRK> [fill] |CTRL+X|     fill one paragraph.
     E:    <BRK> [fill] <RETURN>     fill one paragraph.


     In Ned, if the <BRK> key is accidentally pressed, it must be
pressed again to negate Ned's expectation of an argument.  In E, other
methods are used.  First, if the user has not typed anything on the com-
mand line (the line where CMD: appears), then the user can press










                                  -5-



<RETURN> to return to the edit mode.  If the user has typed some text on
the command line, the user may then backspace over the text and press
<RETURN>; or the user may type |CTRL+C|, which is the command interrupt.

     A number of new commands have been added to E.  These commands may
be typed after the <BRK> key is pressed.  Some of the more important new
commands with their Ned counterparts are:

     NED:  <US_DEL>                          exit from Ned.
     E:    <BRK> [exit] <RETURN>             exit from e.

     NED:    (none)
     E:    <BRK> [name filename] <RETURN>    change the name of
                                             the file being edited.
     NED:    (none)
     E:    <BRK> [redraw] <RETURN>           redraw the screen to clear
                                             "noise" characters.
     NED:    (none)
     E:    <BRK> [save filename] <RETURN>    save current changes as a
                                             new file named filename.


     A number of commands have been modified to allow more options or
more sensible syntax:

     NED:  <BRK> [rpl "texta" "textb"] |CTRL+X|      simple replacement
                                                     throughout file.
     E:    <BRK> [rep /texta/textb/] <RETURN>        same as above.


     The replace command is more powerful in E than in Ned, and will be
described later.

     A number of commands that can be done in Ned only through function
keys can be done in E either by function keys or by command:

     NED:  <BRK> 4 <CLOSE>               close 4 lines.
     E:    <BRK> 4 <CLOSE>               close 4 lines.
     E:    <BRK> [close 4] <RETURN>      close 4 lines.


     Another change affecting the command information is that a user in
E can use the editor to modify a command being entered.  That is, the
user can use the backspace key, insert mode key, delete key, and arrow
keys to edit the command before pressing <RETURN>.

     Also, the last command executed can be recovered to the command
line by pressing <BRK> <BRK> |CTRL+B|.  The last command can then be
edited and executed again.













                                  -6-



_E_X_I_T_I_N_G__F_R_O_M__T_H_E__E_D_I_T_O_R

     To exit from Ned, the user presses <US_DEL>.  To exit from E, the
user types <BRK> [exit] <RETURN>.

     To exit from Ned and abort the changes made to the file during that
session, the user types <BRK> [a] <US_DEL>.  To exit from E and abort
the changes made to the file during that session, the user types <BRK>
[exit abort] <RETURN>.  (This command may be abbreviated [ex a].)

     If a user aborts a session by typing [exit abort], the user has the
option of replaying all or part of that session.  The next time the user
enters the same directory and types [e], the editor will prompt the user
with four options, one of which is a visible replay.  The user can ini-
tiate the replay, watch it occur, and then interrupt it just before the
last fatal error.  To interrupt the replay the user types |CTRL+C|.


_R_E_C_O_V_E_R_Y

     In Ned, recovery from a software crash is a messy business.  In E,
recovery is automatic.  The user merely returns to the directory he was
working in and types [e].  The editor will prompt him with four options,
one of which is a silent, automatic recovery.


_T_H_E__M_A_R_K__F_U_N_C_T_I_O_N

     In Ned, vertical cursor movements can be used to define a series of
lines or paragraphs to be operated on by <OPEN>, <CLOSE>, or <PICK>.
Ned also allows vertical and horizontal cursor movements to define rec-
tangles for use with <CLOSE>, <OPEN>, and <PICK>.

     In E, this marking of an area, either one- or two-dimensional, has
been formalized.  The key used to initiate marking is currently labeled
PUT (a label that will soon be changed to MARK).  When the user types
<PUT>, a message appears below the window: MARK 1.  As the arrow keys
are used (or other cursor movement keys are pressed), the mark message
changes to reflect the size of the area marked in lines and columns, for
example, MARK 3 or MARK 5x7.

     Once the user has marked an area, he may then press <OPEN>,
<CLOSE>, or <PICK> as before.

     If the user has marked a one-dimensional set of lines or para-
graphs, he may use that marked set as the object of the [fill],
[justify], and [center] commands.  That is, the user may mark the area
and then type <BRK> [fill] <RETURN>.

     Also, once the user has started marking, he can use the other func-
tions of the editor to determine the marked area.  For example, the user
can type <PUT> <BRK> [text] <+SCH> <PICK>.  In this sequence of










                                  -7-



keystrokes, <PUT> initiates the marking process; <BRK> [text] <+SCH>
moves the cursor to the next occurrence of the desired text, thus marking
the area the cursor has moved over; and <PICK> copies the text to the
pick buffer.

     Normally, marking is ended when the <OPEN>, <CLOSE>, or <PICK> is
pressed, or when the [fill], [justify], or [center] command is entered.

     To negate the marking function (if the mark key, currently labeled
<PUT>, is accidentally typed), the user types <BRK> <PUT>.


_C_L_O_S_I_N_G_,__P_I_C_K_I_N_G_,__A_N_D__P_U_T_T_I_N_G

     The close function and pick function are the same in Ned as in E,
but the put function has been changed.  As mentioned above, the PUT key
is now used for marking lines and areas.  The put function is now
effected by pressing <BRK> <PICK> and <BRK> <CLOSE>.  A comparison is
listed below:

     NED:  <BRK> [5] <CLOSE>        closes 5 lines.
           <BRK> <PUT>              puts the last 5 lines closed.

     E:    <BRK> [5] <CLOSE>        closes 5 lines.
           <BRK> <CLOSE>            puts the last 5 lines closed.

     NED:  <BRK> [5] <PICK>         picks 5 lines.
           <PUT>                    puts the last 5 lines picked.

     E:    <BRK> [5] <PICK>         picks 5 lines.
           <BRK> <PICK>             puts the last 5 lines picked.



_R_E_P_L_A_C_E__C_O_M_M_A_N_D

     As mentioned earlier, the replace command in Ned, [rpl], is now the
[replace] command in E.  The replace command is used to replace strings
of characters or strings of words with other strings of characters or
words.

     In its simplest form the replace command, abbreviated "rep", is
used as follows:

     <BRK> [rep /texta/textb/] <RETURN>

This would replace every occurrence of [texta] with [textb], starting
where the cursor is to the end of the file.

     The replace command has a variety of options.  The specification of
the command with all its options is:











                                  -8-



     <BRK> [replace] [area] [show] /texta/textb/ <RETURN>
              or               or
           [-replace]       [interactive]


     The simplest form of the command is [replace], abbreviated [rep],
which directs the editor to search for occurrences of [texta] beginning
where the cursor is and proceeding toward the end of the file.  The
alternative form of the command is [-replace], abbreviated [-rep], in
which the editor searches for occurrences of [texta] proceeding toward
the front of the file.

     The two main options are [show] and [interactive].  The [show]
option allows the user to see the replacements as they occur.  The
[interactive] option allows the user to not only see the replacements
but also to control whether each replacement will occur.

     The replace command and its options are described in detail in Sec-
tion III of this writeup under _r_e_p_l_a_c_e.


_G_O_T_O

     As mentioned above, the <GOTO> key is no longer used for the goto
function.  The goto function is now performed on the command line.

     NED:   <BRK> [347] <GOTO>         moves the cursor to line 347.
     E:     <BRK> [goto 347] <RETURN>  moves the cursor to line 347.


The [goto] command may be abbreviated [g].


_F_I_L_L_,__C_E_N_T_E_R_,__J_U_S_T_I_F_Y

     There are some differences in the keystroke combinations necessary
to perform the fill, center, and justify commands:

     NED:   <BRK> [just] |CTRL+X|             justify 1 paragraph.
     E:     <BRK> [ju] <RETURN>

     NED:   <BRK> [1l center] |CTRL+X|        center 1 line.
     E:     <BRK> [ce] <RETURN>

     NED:   <BRK> [fill] |CTRL+X|             fill 1 paragraph.
     E:     <BRK> [fi] <RETURN>

     NED:   <BRK> [6 fill] |CTRL+X|           fill 6 paragraphs.
     E:     <BRK> [fi 6p] <RETURN>













                                  -9-



_B_R_I_N_G_I_N_G__U_P__A_N__A_L_T_E_R_N_A_T_E__F_I_L_E

     In Ned the user types <BRK> [filename] |CTRL+B| to cause a new file
to become the current file.  The previous file then becomes the alter-
nate file.  In Ned if |CTRL+B| is typed with no arguments, the current
file becomes the alternate file, and the alternate file becomes the
current file (the files are switched).

     In E the user types <BRK> [e filename] <RETURN> to cause a new file
to become the current file.  As before, the current file becomes the
alternate file.

     In E, pressing |CTRL+B| alternates the user between the current
file and the alternate file.  If there is no alternate file, the editor
writes an informative message on the screen.


_W_I_N_D_O_W_S

     In Ned the user creates a window by moving the cursor to the top or
left edge of the window and pressing |CTRL+Z|.  In E the user creates a
window by moving the cursor to the top or left edge of a window and
entering this command:

     <BRK> [window] [filename] <RETURN>   Creates a window with
                                          the optionally specified
                                          filename.

To delete a window the user types:

     <BRK> [-window] <RETURN>             Closes last made window.

These commands can be abbreviated [w] and [-w].

     In Ned, pressing |CTRL+C| moves the editor and the cursor from win-
dow to window.  In E, pressing |CTRL+Z| moves the editor and the cursor
from window to window.


_S_T_A_T_E__F_I_L_E_,__C_H_A_N_G_E__F_I_L_E_,__A_N_D__K_E_Y_S__F_I_L_E

     The editor, E, creates four files to help with editing and
recovery.  These four files are the state file, the change file, the
keys file, and the backup keys file.

     1.  The state file contains such information as the name of the
         last file edited, the place in the file where the cursor was
         when editing was done last, the line length established in the
         last fill, justify, or center command, the state of Insert
         Mode, and the last search string.  The name of this file,
         assuming the user owns the directory and is the only user work-
         ing in the directory, is ".es1".










                                  -10-



     2.  The second editor file, the change file, contains all of the
         material that has been entered, closed and picked during the
         session.  The name of this file, assuming the user owns the
         directory and is the only user working in the directory, is
         ".ec1".  The editor allows the user to access parts of this
	 file by creating a pseudo file labeled,"#", which the user can
         edit as an alternate file, a subject that will be discussed
         below.

     3.  The third editor file is the keys file.  The keys file contains
         the history of all of the keystrokes the user enters during the
         session.  The name of this file, assuming the user owns the
         directory and is the only user working in the directory, is
         ".ek1".

     4.  The fourth and last editor file is a backup keys file created
         and used only during recovery or replay.  It is usually named
         ".ek1b", and it will not be discussed further in this document.


_U_S_E__O_F__S_T_A_T_E_,__C_H_A_N_G_E_,__A_N_D__K_E_Y_S__F_I_L_E

     If a user types [e], the editor uses the state file to call up the
last file edited, and position the cursor, arm the search string, etc.
If a user types [e filename], the editor initializes the state file with
the name, [filename], and with default values for such things as line
length, search string, cursor position, etc.

     When a user exits normally by typing [exit], the editor updates the
state file with new information, including the cursor position at exit,
the new line length (if the line length has changed), the last search
string, etc.  If the user aborts the session by typing [exit abort], or
if the editor crashes, then the state file is left as it was when the
editing session was first initiated.

     The second editor file, the change file, is maintained for the
benefit of the user.  This file contains all of the text that has been
entered, closed, and picked.  A user can access this file via a pseudo
file labeled, "#".  The user can edit this pseudo file as an alternate
file by typing <BRK> [e #] <RETURN>. (Note that the file is actually
referenced by the name "#".) This brings the text from the change file
into the editing window as an alternate file from which text can be
picked.  The user can then return to the original file by pressing
|CTRL+B|, and can restore the text that was picked by pressing <BRK>
<PICK>.

     The main use of the # file is to restore text that has been
accidentally closed from the file.

     The change and the # files are deleted when the user exits from the
editor by typing [exit] or by typing [exit abort].











                                  -11-



     The third editor file, the keys file, contains all of the key-
strokes typed during the session.  This file is kept so that replays can
be performed.  To understand the use of this file, it is important to
understand how the editor actually edits a file.

     The editor does not actually change a file during the editing ses-
sion.  Instead, the editor builds a complex map of changes so that an
edited version of the file can be displayed on the screen.  The actual
editing of the file is done when the user exits normally by typing
[exit].  At this point the file being edited is replaced by the edited
version of the file, and the keys file, which is no longer needed, is
deleted.

     If a user makes a serious mistake and wants to abort the editing
session, the user can exit by typing [exit abort].  In this case the
file being edited would be left unchanged.  The keys file though, would
not be deleted as is normally done, but would be kept for the purpose of
a possible replay.  The next time the user called up the editor in that
directory, the user would be prompted with four options, one of which is
a visual replay.  The user could initiate the replay, watch it occur,
and then interrupt it just before the fatal error by typing |CTRL+C|.

     The prompt displayed by the editor after a system crash or after an
[exit abort] is described in detail in Section III of this writeup under
_R_E_C_O_V_E_R_Y.

     Note that a replay can be requested only if the user exited with
[exit abort].

     The keys file is also saved if the system or the editor crashes.
In this case, the user merely has to return to the same directory and
type [e], and the editor will offer four options, one of which is a
silent, automatic recovery.





























                                  -12-



                  _I_I_I_.___A__B_R_I_E_F__R_E_F_E_R_E_N_C_E__M_A_N_U_A_L__T_O__E_.




_I_N_T_R_O_D_U_C_T_I_O_N

     This reference manual presents a large subset of the functions and
commands that are available under the editor, E.  The level of descrip-
tion used here assumes some prior experience with an editor, preferably
Ned or E.  Individuals without experience should first read the _T_e_x_t
_P_r_o_c_e_s_s_o_r _L_e_a_r_n_e_r'_s _G_u_i_d_e.  A final version of the learner's guide will
be available soon.


_K_E_Y_S_T_R_O_K_E__S_Y_N_T_A_X_.

     Before using this reference manual, please read the introductory
section of this document, describing the keystroke syntax being used.
To summarize that section briefly:

     1.  If a single key is to be typed, that key will be identified by
         putting the label that is currently on top of the key in this
         enclosure, < >.  For example, the carriage return key is
         <RETURN>.

     2.  When two keys are to be typed simultaneously, the labels on the
         top of those keys will be placed in this enclosure | | and
         separated by a plus sign.  For example, to type the CTRL key
         and the S key at the same time, the user types |CTRL+S|.

     Once again, this version of this document has been prepared for
users of E who are working on Ann Arbor terminals that have keyboards
labeled for Ned use.




























                                  -13-



            _T_H_E__R_A_N_D__E_D_I_T_O_R__E_,__V_E_R_S_I_O_N__1_0_,__A_U_G_U_S_T__2_1_,__1_9_8_0_.




_A_B_O_R_T_I_N_G__A__C_O_M_M_A_N_D

     An active command can be aborted by pressing |CTRL+C|.  This method
is effective for aborting commands that take some time to execute, such
as fill and justify.  Command that execute instantaneously, such as open
and close, usually cannot be aborted.

     A command that has been typed but not executed (i.e., <RETURN> has
not been yet been pressed), can be aborted by backspacing over the com-
mand and erasing it.  The command mode can then be turned off by press-
ing <RETURN>.


_A_B_O_R_T_I_N_G__A__S_E_S_S_I_O_N

     To abort a session, a user types <BRK> [exit abort] <RETURN>, where
[exit abort] can be abbreviated [ex a].  Exiting with the abort option
negates all editing done during the session.

     If a user aborts a session and then returns to the same directory
and types [e], the editor will prompt the user with four options, one of
which is a visible replay.  The user can initiate the replay, watch it
occur, and interrupt it before the end by typing |CTRL+C|.  (See also,
_E_X_I_T and _R_E_C_O_V_E_R_Y.)


_A_L_T_E_R_N_A_T_E__F_I_L_E

     An alternate file can be created, while in the editor, by typing:
<BRK> [e filename] <RETURN>.  This causes the current file to become the
alternate file, and "filename" to become the current file.  To alternate
between these two files, a user presses |CTRL+B|.  A user can also
alternate between these two files by typing <BRK> [e] <RETURN>.


_A_R_E_A

     An area is any part of a file; it can be as small as one character
and as large as the entire file.  The area may be a default area such as
the default area for the fill command (1 paragraph), or the area may be
explicitly defined in the instruction as, for example, [fill 2l], which
requests filling 2 lines.  In defining an area, the letter "p" defines
paragraphs and the letter "l" (ell) defines lines.

     An area can also be defined by cursor movements.  An area defined
by cursor movements must be marked to be useful.  The marked area can be
a few words, a single line, several paragraphs, or a rectangle.  An area










                                  -14-



is marked by pressing <PUT> [cursor movement], where "cursor movement"
is accomplished by <arrow keys>, <RETURN>, <+PAGE>, <-PAGE>, <+LINE>,
<-LINE>, and certain sequences involving <+SCH> and <-SCH>.  A marked
area can be used as the area for <OPEN>, <CLOSE>, and <PICK>.  If that
marked area is a series of lines or paragraphs, the marked area can also
be used as the area for [fill], [justify], [center], and [replace].


_A_R_G

     This label is for Ned use.  In Ned this key is pressed to initiate
an "argument" to the quarrelsome editor.  In this writeup, <BRK> is used
to indicate the pressing of this key, which is E's command mode key.


_<_A_R_R_O_W__K_E_Y_S_>

     The arrow keys are represented in this publication as <left arrow>,
<right arrow>, <up arrow>, and <down arrow>.  These keys move the cursor
without changing the text the cursor moves past (as opposed to <space
bar> and <BS>).

     When the cursor is at the right side of the window, and <right
arrow> is pressed, the window is moved such that the cursor remains
visible.  Similarly when the cursor is at the top, bottom, or left edge
of the window.  At the left edge though, the cursor (and the window)
cannot go to the left of column 1.  At the top, the cursor cannot go
higher than line 1.

     When <BRK> is pressed and then an arrow key is pressed, the cursor
moves to the edge of the window in the direction desired.  For example,
<BRK> <left arrow> moves the cursor to the left edge of the window.  The
keystroke sequence <BRK> <right arrow> first moves the cursor to the end
of the text on the line, and if typed a second time, moves the cursor to
the right edge of the window.  The keystroke sequence <BRK> <down arrow>
stops at the bottom of the window if the file extends to the bottom of
the window.  If the file does not extend to the bottom of the window,
<BRK> <down arrow> first stops at the end of the file, and if pressed
again, then goes to the bottom edge of the window.  (See also <_L_E_F_T
_A_R_R_O_W>, <_R_I_G_H_T _A_R_R_O_W>, <_U_P _A_R_R_O_W>, and <_D_O_W_N _A_R_R_O_W>.)


_B_A_C_K_S_P_A_C_E

     To backspace and erase a character, press <BS>.  To backspace the
cursor without erasing, press <left arrow>.  (Note that the backspace
key is not the "H" key, which has a small label, "BS", because pressing
|CTRL+H| backspaces the cursor the same as <left arrow>.)

     Backspace characters are imbedded in a text line by typing |CTRL+\|
|SHIFT+H|.  The first keystroke combination generates a small, bright
block that indicates to the editor that a control character is coming










                                  -15-



next.  The second keystroke combination signals the editor to put a
backspace character in the text.  This backspace character can be part
of an underlining process.  (See also <_B_S>, |_C_T_R_L+\|, and _U_N_D_E_R_L_I_N_I_N_G.)


_B_A_C_K_U_P__F_I_L_E

     If a user edits a file and exits normally from the editor, a copy
of the file as it existed before the editing session is created by the
editor.  The editor does this by copying the existing file and renaming
the copy with the same name as the original but with a comma in front of
it.  For example, a file named "memo", is backed up as a file named
",memo".  If the user exits with the abort option, [exit a], or if the
system crashes, no backup file is created (and any previous backup file
is left untouched).  A backup file is made in the same user directory
that the original file is in.  All backup files ("comma" files) on the
Text Processor are deleted automatically at midnight.

     A backup file is created to protect the user from inadvertent mis-
takes.  For example, if a user begins to edit the same file again later
in the day and discovers that the previous editing session contained a
serious error, the user would have several choices.  First, the user
could exit with the abort option and copy the backup file into the
current file.  For example, [% cp ,memo  memo].  Or the user, without
exiting from the editor, could call up the backup file as the alternate
file and restore that section of the file that contained the editing
error. (See _M_O_V_I_N_G _T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S.)

     (If the editing error occurred on a prior day, then the backup file
could not be used because all backup files are deleted at midnight each
night.  But all files that are edited during the day are copied to a
backup location in the system at midnight, so some older copies of a
file are available for recovery work.)


_B_A_C_K_W_A_R_D__S_E_A_R_C_H

     To search backward in the file for an occurrence of a text string,
type <BRK> [text string] <-SCH>.  To find additional occurrences of the
text string, continue pressing <-SCH>.


_<_B_R_K_>

     This key puts the editor in the command mode so that commands may
be typed to the editor followed by <RETURN>.  This key is also used as
part of many keystroke sequences that perform special editor functions.













                                  -16-


_<_B_S_>

     This is the backspace key.  This key has different functions
depending on whether the editor is in Edit Mode or Insert Mode and
whether the <BRK> key is pressed.  The functions are:

     Edit Mode:

             <BS>                   Moves the cursor to the left one
                                    column and blanks out any character
                                    there.

             <BRK> <BS>             Blanks out all characters between
                                    the cursor and the left margin.
                                    Leaves the cursor where it is.
                                    (Deleted characters enter the
                                    erase buffer.)
     Insert Mode:

             <BS>                   Moves the cursor to the left one
                                    column and deletes any character there.
                                    The text to the right of the cursor
                                    is moved over one character.

             <BRK> <BS>             Deletes all of the characters
                                    between the cursor and the left
                                    margin.  Moves the cursor and
                                    the text on the right of the cursor
                                    to the left margin.  (Deleted char-
                                    acters enter the close buffer.)

(See also _B_A_C_K_S_P_A_C_E.)


_B_U_F_F_E_R_S

     See <_P_I_C_K>, <_C_L_O_S_E>, and _e_r_a_s_e.


_c_a_t

     The cat command is a Unix command that copies several files into
one file.  The format of the command is [cat file1 file2 > file3].  This
command is given in response to the Unix "%" prompt.  Note that file1
and file2 cannot appear on both sides of the ">".  For more information,
use the Unix list command "l" to list /doc/cat.


_c_e_n_t_e_r

     The center command moves the text contained in a line into the
center of the line such that the number of blanks on either side of the
text is the same.  The line length by which the center is determined is
the "width" specified in the last center, fill, or justify command, or







                                  -17-



the default width of 75.  The format of the command is, <BRK> [center]
[n] <RETURN>, where [n] is the optional number of lines to center.  If
[n] is omitted, one line is centered, the line where the cursor is.

     The center command centers each line individually.  Consequently, if
the user wants to center several lines as a group, he should first jus-
tify those lines so that the words in each line occupy the same amount
of space between the margins.  (See also _j_u_s_t_i_f_y, <_O_P_E_N>, and _F_O_R_M_A_T
_P_A_C_K_A_G_E.)


_C_H_A_N_G_E__F_I_L_E

     The change file is maintained for the benefit of the user.  It con-
tains all of the text that has been entered, closed and picked.  A user
can access the text in this file by referencing a pseudo file labeled,
#, as an alternate file, i.e., typing <BRK> [e #] <RETURN>. (Note that
the file is actually referenced by the name "#".)  This brings the text
from the change file into the editing window, and text can then be
picked using the <PICK> key.  The user can then return to the original
file by pressing |CTRL+B|, and can restore the text that was picked by
pressing <BRK> <PICK>.


_C_H_A_N_G_I_N_G__F_I_L_E_S

     To alternate between the current file and the alternate file, press
|CTRL+B|.  (See also _A_L_T_E_R_N_A_T_E _F_I_L_E.)


_C_H_A_N_G_I_N_G__W_I_N_D_O_W_S

     If there are two windows, then pressing |CTRL+Z| moves the editor
from window to window.  If there are more than two windows, then press-
ing |CTRL+Z| moves the editor from window to window in the same order as
the windows were created.  To move to a specific window, type <BRK> [n]
|CTRL+Z|, where [n] is the window number.  (See also _W_I_N_D_O_W_S.)


_<_C_H_G__W_I_N_>

     This key is labeled for use by Ned.  In E this key is the command
interrupt key, |CTRL+C|.  To change windows, see _C_H_A_N_G_I_N_G _W_I_N_D_O_W_S.


_c_l_o_s_e

     The close command may be used instead of <CLOSE> to close space.
To close out an area, the user types <BRK> [close area] <RETURN>, where
[close] may be abbreviated [clo].  The default area is one line.












                                  -18-



     Text closed with either the close command or the close key may be
placed anywhere in the file by moving the cursor to that place and typ-
ing <BRK> [-c] <RETURN>.

     Note that pressing <BRK> <BS> while in the Insert Mode replaces the
contents of the close buffer with the newly deleted text.  (See also
<_C_L_O_S_E>.)


_<_C_L_O_S_E_>

     The close key removes a line or lines from the file and places
those lines in the close buffer.  The most recently closed line or lines
can be restored to the file by pressing <BRK> <CLOSE>.

     Pressing the close key by itself results in the closing of one
line.  More than one line can be closed by typing <BRK> [n] <CLOSE>,
where n is the number of lines to close.  The mark function can be used
with the close function to close a few characters, a few words, a few
lines, a few paragraphs, or a rectangle.  To mark and close, type: <PUT>
<cursor movements> <CLOSE>.

     The close function can also be entered on the command line by typ-
ing <BRK> [close] [n] <RETURN>, where n is an optionally entered number
of lines.

     Material flushed out of the close buffer is placed in the change
file.

     Note that pressing <BRK> <BS> while in the Insert Mode replaces the
contents of the close buffer with newly deleted text.  (See also _c_l_o_s_e
and _C_H_A_N_G_E _F_I_L_E.)


_C_L_O_S_E__B_U_F_F_E_R

     The close buffer is a place in the editor where the last closed
text is saved.  Text is also placed in the close buffer when <BRK> <BS>
is typed while in the Insert Mode.  (See also _c_l_o_s_e and <_C_L_O_S_E>.)


_C_O_M_B_I_N_I_N_G__F_I_L_E_S

     Files can be combined using the Unix cat command.  Files can also
be combined using the editor to pick text from an alternate file.  See
_c_a_t and _M_O_V_I_N_G _T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S.


_C_O_M_B_I_N_I_N_G__L_I_N_E_S

     Two adjacent lines can be combined using the [join] command.  More
than two lines can be combined using the mark and close functions.  See
_j_o_i_n, <_M_A_R_K>, and <_C_L_O_S_E>.









                                  -19-




_C_O_M_M_A_N_D__M_O_D_E

     The command mode is initiated by typing <BRK>.  The prompt "CMD:"
appears below the window, and a command can be entered.  Some of the
functions of the editor can be used to edit the text being entered on
the command line, including <INSERT MODE>, <BS>, and <arrow keys>.

     The last command executed can be recovered to the command line by
pressing <BRK> <BRK> |CTRL+B|.  The last command can then be edited and
executed again.

     To negate a command, the user can backspace over the command, thus
erasing it, and then cancel the command mode by pressing <RETURN>.  To
cancel a command, either a partially typed command or an executing com-
mand, the user types |CTRL+C|.


_C_O_P_Y_I_N_G__F_I_L_E_S

     A file can be copied by use of the Unix copy command, "cp".  The
format of this command is "cp fromfile tofile".  This command is given
in response to the Unix prompt of "%".  When the copy command ends, both
files are identical.

     While in the editor, information can be copied from one file to
another by editing the first file, bringing up the second file as an
alternate file, picking information via the <PICK> key, and then alter-
nating files and pressing <BRK> <PICK> to put that information into the
first file.

     A copy of the current file can be saved with a different name (as a
new file) by typing <BRK> [save filename] <RETURN>.  (See also _s_a_v_e and
_M_O_V_I_N_G _T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S.)


_C_O_P_Y_I_N_G__T_E_X_T

     Text can be copied within the same file by using the <PICK> key.
Text can also be copied from one file to another.  See <_P_I_C_K>, _M_O_V_I_N_G
_T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S and _C_O_P_Y_I_N_G _F_I_L_E_S.


_c_p

     This is the Unix copy command.  The format is [cp fromfile tofile].
This command is given in response to the Unix "%" prompt.  When this
command ends, both files are identical.  For more information use the
Unix "l" command to list /doc/cp.











                                  -20-



_C_R_A_S_H_E_S_,__R_E_C_O_V_E_R_Y__F_R_O_M

     If the editor, E, crashes while editing, then the user, while in
the same directory, types (in response to the Unix prompt of "%"), [e]
<RETURN>.  The editor will prompt the user with four options, one of
which is a silent, automatic recovery.  See _R_E_C_O_V_E_R_Y.


_C_R_E_A_T_I_N_G__F_I_L_E_S

     If a file does not exist, it can be created by typing [e filename]
<RETURN> in response to the Unix prompt of "%".  Then in response to the
E prompt of "Do you want to create filename?", type [y].  (File names of
12 characters and less are recommended.)  See _F_I_L_E_N_A_M_E.)

     A file can be given a new name by typing <BRK> [name filename]
<RETURN>.  See _n_a_m_e.

     A copy of the current file can be saved with a different name (as a
new file) by typing <BRK> [save filename] <RETURN>.  See _s_a_v_e.

     Files larger than 1200 lines should be divided into several files.
This improves the efficiency of the editor and provides the user with at
least partial insurance in case the file inadvertently gets destroyed.


_C_R_E_A_T_I_N_G__W_I_N_D_O_W_S

     A new window can be created with the current file in it by typing
<BRK> [window] <RETURN>, where [window] can be abbreviated [w].  A new
window can be created with a different file in it by typing <BRK> [w
filename] <RETURN>.  To create a window, the cursor must be at the top
or left edge of the current window.


_<_C_T_R_L_>

     This key is the "control" key.  It shifts the keyboard into a third
case, a case in which many of the keys generate special codes.  Pressing
this key by itself does not generate a code; another key must be pressed
with it.  For example, |CTRL+A| requires that the <CTRL> key be pressed
and held and then the <A> key be pressed.  (This command will move the
window to the left.)  Those keys that require the <CTRL> key to effect a
function are on the left hand side of the Ned keyboard.

     The control key can also be used with the "\" key to generate a
special control character that can be included in an edited file to sig-
nal the editor that a control character such as a formfeed or underline
character is coming next in the text.  (See also _P_A_G_I_N_A_T_I_O_N and _U_N_D_E_R_-
_L_I_N_I_N_G.)










                                  -21-



|_C_T_R_L+_A|

     This key shifts the window 16 columns to the left.  To shift the
window such that the left edge is at column one, press <BRK> |CTRL+A|.
The window cannot be shifted left past column one.

|_C_T_R_L+_B|

     This key alternates current and alternate files.  If there is no
alternate file, the editor displays an error message below the window.

|_C_T_R_L+_C|

     This key interrupts commands. If the command has been typed but
<RETURN> has not been pressed, this keystroke erases the command and
negates the command mode.  If the command is executing, this keystroke
halts the command.

|_C_T_R_L+_S|

     This key shifts the window 16 columns to the right.  To shift the
window to the right such that the left edge of the window is where the
cursor is, type <BRK> |CTRL+S|.

|_C_T_R_L+_Z|

     This key changes to the next window.  If there are only two win-
dows, this key alternates windows.  If there are more than two windows,
this key moves the editor from window to window in the same order as the
windows were created.  To move to a specific window, type <BRK> [n]
|CTRL+Z|, where [n] is the window number.

|_C_T_R_L+[|

     This key sets and removes tabs. See <_S/_R _T_A_B>.

|_C_T_R_L+\|

     This keystroke represents pressing <CTRL> and <\> at the same time.
This keystroke generates a small, bright block on the screen.  The
bright block is used to signal the editor that the next character typed
is to be treated as a control character.  This sequence can be used to
insert a backspace character if a capital "H" is typed next, or a page
eject (form feed) character if a capital "L" is typed next.  (See also
_U_N_D_E_R_L_I_N_I_N_G and _P_A_G_I_N_A_T_I_O_N.)


_C_U_R_R_E_N_T__W_I_N_D_O_W

     The current window contains the cursor and is the window in which
editing can be done. The current window is outlined in bolder lines and
characters; the alternate windows are outlined in dots. (See also _C_H_A_N_G_-
_I_N_G _W_I_N_D_O_W_S and _W_I_N_D_O_W_S.)









                                  -22-



_C_U_R_S_O_R

     The cursor is the character similar to an underline character that
the editor uses to mark locations on the screen.  The cursor marks the
position where the next character typed will be placed (and where it
will print).  To emphasize the cursor position, the editor prints four
bright blocks at the four edges of the screen.  These four bright blocks
"target" the cursor.


_<_C_U_R_S_O_R__M_O_V_E_M_E_N_T_>

     The notation <cursor movement> is used to indicate any movement of
the cursor.  This movement can be performed by pressing <-PAGE>,
<+PAGE>, <-LINE>, <+LINE>, <up arrow>, <down arrow>, <left arrow>,
<right arrow>, <RETURN>, <BS>, and <space bar>, and by some command
sequences which include the <+SCH> and <-SCH> keys.  Most frequently
<cursor movement> is used in marking a series of lines or paragraphs or
a rectangular area.


_<_D_E_L__C_H_A_R_>

     This key deletes the character the cursor is under and moves the
characters on the right of the cursor one character to the left.

     To delete the character above the cursor and all of the characters
to the right on the same line, press <BRK> <DEL CHAR>.  Characters
deleted in this fashion enter the erase buffer.


_d_e_l_e_t_e

     This command deletes the current file, that is, the file being
edited.  This is useful when creating and editing multiple windows and
files.  The current file is deleted (not only within the editor but
within the file system) by typing <BRK> [delete] <RETURN>.  This command
takes effect upon normal exit from the editor.  To negate this command
(and the entire editing session), the user must exit with the abort
option [exit -a].


_D_E_L_E_T_I_N_G__F_I_L_E_S

     The user can delete the current file, while in the editor, by typ-
ing, <BRK> [delete] <RETURN>.

     The user can delete any file he owns (and in which he has normal
write permission), by typing [delete filename] in response to the Unix
prompt of "%".  If the user is not in the proper directory, he must type
the full pathname of the file.  (See also _d_e_l_e_t_e.)











                                  -23-



_D_E_L_E_T_I_N_G__T_E_X_T

     Single characters can be deleted by using the <DEL CHAR> key.  This
key deletes the character above the cursor.  The character above the
cursor and all the characters to the right can be deleted by pressing
<BRK> <DEL CHAR>.  Characters can be blanked over by using the space bar
or the <BS> key.  (The backspace key has several deleting functions; see
<_B_S>.)  Characters deleted using <BRK> <DEL CHAR> enter the erase
buffer.

     A line of text can be deleted by pressing <CLOSE>.  Several lines
of text can be deleted by pressing <BRK> [n] <CLOSE>, where [n] is the
number of lines to delete.  The most recent line or sets of lines
deleted in this fashion may be returned to the file (in the same place
or in other places) by pressing <BRK> <CLOSE>.

     A rectangular area can be deleted by first marking the area and
then pressing <CLOSE>.  An area is marked by moving the cursor to one
corner of the area, pressing <PUT>, and then moving the cursor to the
other corner of the area.  At this point the <CLOSE> key can be pressed.


_D_E_L_E_T_I_N_G__W_I_N_D_O_W_S

     The last window created can be deleted by typing <BRK> [-window],
where [-window] can be abbreviated [-w].


_e

     The name of the editor is E.  To edit a file, a user types [e] or
[e filename].


_E_D_I_T__M_O_D_E

     Edit mode is the mode of the editor in which new text that is typed
overlays any existing text.  Edit mode is the default mode of the edi-
tor, the mode the editor is in after the user types [e filename].  (See
also _C_O_M_M_A_N_D _M_O_D_E and _I_N_S_E_R_T _M_O_D_E.)


_<_D_O_W_N__A_R_R_O_W_>

     See <_A_R_R_O_W _K_E_Y_S>.


_E_F_F_I_C_I_E_N_C_Y

     The editor works most efficiently if it is exited every half
hour.  This practice is also recommended as a precaution against massive
system failures in which all editing during a session is destroyed.










                                  -24-



     Files larger than about 1200 lines are best divided into smaller
files.  The editor works more efficiently with small files, and the user
is provided with some insurance in case the file is accidentally de-
stroyed.


_._e_c_1

     See _C_H_A_N_G_E _F_I_L_E.


_._e_k_1

     See _K_E_Y_S_T_R_O_K_E _F_I_L_E.


_._e_k_1_b

     See _K_E_Y_S_T_R_O_K_E _F_I_L_E.


_._e_s_1

     See _S_T_A_T_E _F_I_L_E.


_e_r_a_s_e

     A line or area can be erased (blanked out) by typing <BRK> [erase]
[area] <RETURN>, where [erase] can be abbreviated [er].  The default
area is one line.  The erased text from the last erase command is held
in the erase buffer from where it can be retrieved using the [-erase]
command.

     Note that <BRK> <DEL CHAR>, and <BRK> <BS> while in edit mode,
replace the contents of the erase buffer with newly deleted text.


_-_e_r_a_s_e

     The last text erased using the [erase] command can be inserted into
the file by typing <BRK> [-erase] <RETURN>, where [-erase] may be abbre-
viated [-er].  This insertion moves existing text to the right, and con-
sequently entering the command [erase] followed by the command [-erase]
may not restore the text to its original position.

     Note that <BRK> <DEL CHAR>, and <BRK> <BS> while in edit mode,
replace the contents of the erase buffer with newly deleted text.














                                  -25-



_E_R_A_S_I_N_G__E_X_T_R_A_N_E_O_U_S__C_H_A_R_A_C_T_E_R_S

     Occasionally extraneous characters appear in the editing window,
characters that are not part of the edited file (for example, a message
from the system operator).  To remove these characters, type, <BRK>
[redraw] <RETURN>, where [redraw] can be abbreviated [red].  This com-
mand redraws the window and clears it of extraneous characters.


_E_R_A_S_I_N_G__T_E_X_T

     Normally text is erased by spacing over it with the space bar or
backspacing over it with <BS>.  The backspace key has several options.
Text can also be erased using the erase command.  Text to the right of
the cursor can be erased using <BRK> <DEL CHAR>.  (See also <_B_S>, <_D_E_L
_C_H_A_R>, _D_E_L_E_T_I_N_G _T_E_X_T, and _e_r_a_s_e.)


_E_X_E_C_U_T_E__A__F_U_N_C_T_I_O_N

     A function can be executed by typing:

     <BRK> [run] [area] [command] <RETURN>
                   or
                 [options]

For example, to run the Unix command "who" and have the output included
in the file being edited, type <BRK> [run who] <RETURN>.

     Note that the output from a command can vary depending on when it
is run, and consequently a replay of the editing session that includes a
command can produce disastrous results.

     For knowledgeable Unix users only: [area] is passed to the standard
input of the command and is replaced by the output of the command.


_E_X_I_T

     A user can exit from the editor by typing <BRK> [exit] <RETURN>.  A
user can exit from the editor and abort the editing session aborted by
typing, <BRK> [exit abort] <RETURN>.  A user can then replay that ses-
sion by returning to the same directory and typing [e].  The editor will
prompt the user with four options, one of which is a visible replay.
The user can initiate the replay, watch it occur, and then interrupt it
before it ends by typing |CTRL+C|.

     Note that a replay of a short session is difficult to interrupt
unless the user has good reflexes.













                                  -26-



_F_I_L_E_N_A_M_E

     A filename can be up to 14 characters long, but filenames of 12
characters and less are recommended for several practical reasons which
will not be detailed here.  Filenames can contain any character other
than a blank.  If a blank is placed in a filename, the characters up to
the blank are used as the filename; the characters after the blank may
be treated as another filename or treated as an argument, or ignored,
depending on how the filename is being used.  The Unix operating system
attaches special meaning to certain characters in the filenames.  A
filename beginning with a period (".") should be avoided, as well as a
filename beginning with a comma.

     It is highly recommended that filenames contain only numbers and
lower case letters.

     Filenames generated by the format package should be named the same
as the raw file with a ".n" appended to the end of the filename.


_F_I_L_E_S

     A file is a collection of text saved on a disk with an individual
name.  Filenames of 12 characters and less are recommended, composed of
only lower case alphabetic and numeric characters.  Files can be created
using the editor, [e filename], or by various Unix commands such as [cp
filea fileb].  (See also _A_L_T_E_R_N_A_T_E _F_I_L_E, _B_A_C_K_U_P _F_I_L_E, _C_R_E_A_T_I_N_G _F_I_L_E_S,
and _F_I_L_E_N_A_M_E.


_f_i_l_l

     The fill command moves words so that each line is filled with words
up to, but not beyond, the right margin.  (The right margin is set by
the "width" entered in the last fill, center, or justify command, or is
the default width of 75.) A paragraph is filled by moving the cursor to
the first line of the paragraph and typing <BRK> [fill] <RETURN>, where
[fill] can be abbreviated [fi].  The format of the fill command is:

     <BRK> [fill] [width=n] [area] <RETURN>

If the [width=n] option is specified, that width stays in effect until
another width is specified.  (See also _j_u_s_t_i_f_y, and _w_i_d_t_h.)


_F_O_R_M_A_T__P_A_C_K_A_G_E

     The format package is a routine that formats lines, paragraphs, and
pages, as well as footnotes, indices, etc.  To use the format package,
the user types macros interspersed in with text, and then processes the
file using the Unix command, [nroff filename > filename.n].  The format
package reads the text and the macros, and writes the formatted text as










                                  -27-



an output file which can then be "paged" and printed.  An introduction
to formatting is contained in _T_e_x_t _P_r_o_c_e_s_s_o_r _L_e_a_r_n_e_r'_s _G_u_i_d_e.  More com-
plete documentation is available in _t_m_a_c._e_R _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.


_F_U_N_C_T_I_O_N__K_E_Y_S

     A function key is a key that performs a function when pressed, for
example, <CLOSE>.  Many keys have their functions marked on the top of
the key.  Those keys with functions marked on the front face require an
additional key be pressed, usually the <CTRL> key.  Some functions
require that the <BRK> key be pressed first and then the function key.
For the use of any particular function key, see the name of that key.


_g_o_t_o

     The cursor can be moved to a specific line number in the file by
typing <BRK> [goto n] <RETURN>, where [goto] may be abbreviated [g] and
where n is the line number.  The [goto] command has a default line
number of 1, which allows the user to go to the beginning of the file.
The goto command also allows the use of [b] to go to the beginning of
the file, and [e] to go to the end of the file.  Consequently, [g], [g
b] and [g 1] all go to line one.  And [g e] goes to the last line in the
file.

     There is another mechanism for going to the front and the end of
the file.  Pressing <BRK> <+PAGE> moves the cursor to line 1.  Pressing
<BRK> <-PAGE> moves the cursor to the last line of the file. (See also
<_H_O_M_E> and <_A_R_R_O_W _K_E_Y_S>.)


_<_G_O_T_O_>

     In Ned this key performed the goto function; in E the goto function
is a command (see _g_o_t_o).  This key is labeled <REPL> on an E keyboard
and is used as part of the interactive replace function.

     Interactive replacement is initiated by typing, <BRK> [replace]
[area] [interactive] /texta/textb/ <RETURN>.  The editor searches for
the next occurrence of texta and moves the cursor to it.  At this point
the user can press <GOTO> to have the replacement occur.  Whether
replacement occurs or not, the user must press <+SCH> to have the editor
search for the next occurrence of the string (or press <-SCH> to search
for a previous occurrence. (See also _r_e_p_l_a_c_e, <+_S_C_H>, and <-_S_C_H>.)


_<_H_O_M_E_>

     Pressing <HOME> moves the cursor to the upper left corner of the
current window.  Pressing <BRK> <HOME> moves the cursor to the lower
left corner.










                                  -28-



_<_I_N_S_E_R_T__M_O_D_E_>

     This key is used to put the editor into and out of the Insert Mode.
When the editor is in Insert Mode, the word "INSERT" is printed below
the window as a reminder.  A number of functions behave differently in
the Insert Mode.  Most importantly, text typed while in the Insert Mode
is inserted into the line rather than replacing existing text.  The
Insert Mode is turned off by pressing <INSERT MODE> again.  (See also
_E_D_I_T _M_O_D_E, _C_O_M_M_A_N_D _M_O_D_E and <_B_S>.)


_I_N_T_E_R_A_C_T_I_V_E__R_E_P_L_A_C_E

     See _r_e_p_l_a_c_e.


_j_o_i_n

     The join command joins two lines together.  The line the cursor is
located on is enlarged by appending the line below to it.  The character
above the cursor and all characters to the right of the cursor are
deleted before the lines are joined.  The joined line is appended at the
exact point where the cursor is.  To use the command, the user types
<BRK> [join] <RETURN>, where [join] may be abbreviated [jo].  (See also
_s_p_l_i_t.)


_j_u_s_t_i_f_y

     The justify command moves words from line to line such that the
last word in each line ends exactly at the right margin.  (The right
margin is the "width" specified in the last fill, justify, or center, or
the default width of 75.)  The justify command usually adds blanks
between the words to spread the words out evenly on a line.

     A paragraph is justified by moving the cursor to the first line of
the paragraph and typing <BRK> [justify] <RETURN>, where [justify] may
be abbreviated [ju].  The full format of the justify command is:

     <BRK> [justify] [width=n] [area] <RETURN>

If the [width=n] option is specified, that width stays in effect until
another width is specified in a fill, justify, or center command. (See
also _f_i_l_l, and _w_i_d_t_h.)


_K_E_Y_S_T_R_O_K_E__F_I_L_E

     The keystroke file is named .ek1 for a user who owns the directory
and is the only user working in it.  The keystroke file is named
.ek1.user (where user is the user's logon id) for a user who is working
in someone else's directory.  The keystroke file is used to update the










                                  -29-



file being edited at the end of the session when the user exits nor-
mally.

     If the user exits with the abort option, [exit abort], or if the
editor crashes, the keystroke file is retained and the file being edited
is left unchanged.

     An aborted session ([exit abort]), can be replayed if the user
returns to the same directory and types [e].  The editor then presents
the user with four options, one of which is a visible replay.  The user
can initiate the replay, watch it occur, and interrupt it before it ends
by typing |CTRL+C|.

     After an editor crash, the user can return to the same directory
and type [e], and the editor will prompt the user with four options, one
of which is a silent, automatic replay.  (See also _s_t_a_t_e _f_i_l_e, _e_x_i_t,
_R_E_P_L_A_Y, _R_E_C_O_V_E_R_Y, and the writeup in Section II on this subject.)


_<_L_E_F_T_>

     This key is pressed along with the <CTRL> key to move the window 16
characters to the left.  The window cannot move to the left of column 1
of the text.  This keystroke combination is also defined as |CTRL+A|.
Pressing <BRK> |CTRL+A| moved the window to the left such that it
displays columns 1-78 of the file.  (See also <_R_I_G_H_T> and  <_A_R_R_O_W
_K_E_Y_S>.)


_<_L_E_F_T__A_R_R_O_W_>

     See <_A_R_R_O_W _K_E_Y_S>.


_<_+_L_I_N_E_>

     This key moves the window down 10 lines further into the file and
rewrites the screen.  The cursor stays at the same line number, or if
that line number is moved off the screen, the cursor stays at the top of
the window.


_<_-_L_I_N_E_>

     This key moves the window up 10 lines closer to the front of the
file and rewrites the screen.  The cursor stays at the same line number,
or if that line number is moved off the screen, the cursor stays at the
bottom of the window.  Pressing <-LINE> has no effect if the top of the
window is at line number 1.












                                  -30-



_L_I_N_E__M_A_N_I_P_U_L_A_T_I_O_N

     For splitting lines, see _s_p_l_i_t; combining lines, see _j_o_i_n; deleting
lines, see <_C_L_O_S_E>; inserting lines, see <_C_L_O_S_E> and <_P_I_C_K>; moving
lines, see <_C_L_O_S_E>.


_L_O_N_G__L_I_N_E_S

     The window normally shows columns 1-78.  When the user attempts to
type beyond column 78, the editor prints an error message and discards
characters typed at that point.  The window can be moved to the right 16
characters by pressing |CTRL+S|.  Another 16 characters can then be
added to the line.

     The window can be moved more than 16 characters to the right by
moving the cursor to the column that will become column 1 of the new
window, and then typing <BRK> |CTRL+S|.  The window will then move to
the right such that the cursor is at the left edge of the window.

     The window can be moved from a position on the right back to the
leftmost position (columns 1-78) by typing <BRK> |CTRL+A|.

     Lines longer than 132 characters cannot be printed on a line
printer, so text lines should be limited to 132 characters.  (See also
<_R_I_G_H_T>, <_L_E_F_T>, <_A_R_R_O_W _K_E_Y_S>.)


_M_A_C_R_O_S

     Formatting macros can be typed with the text for purposes of
automatic pagination, filling, underlining, etc.  The macros and their
use are described in an introductory manner in _T_e_x_t _P_r_o_c_e_s_s_o_r _L_e_a_r_n_e_r'_s
_G_u_i_d_e, and in a more complete manner in _t_m_a_c._e_R _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.


_M_A_R_G_I_N__C_H_A_R_A_C_T_E_R_S

     The character "-" is used to mark the top and bottom edges of the
window.  The character "|" is used to mark the right and left edges of
the window when all of the text is within the window.

     The character "<" is used to mark the left edge of the window when
the window has been moved right.  The character ">" is used to mark the
right edge of the window when text extends beyond the right edge of the
window.

     Bright rectangles are used to target the column and line where the
cursor is located.

     The character ";" is used to mark lines beyond the end of the file
that are in the window.










                                  -31-



     The character "." (period) is used to mark all windows other than
the current window.


_M_A_R_G_I_N_S

     The editor sounds a warning beep when the user types a character
into column 68 of the screen regardless of where the actual right margin
has been set.  The actual right margin for a fill, justify, or center
command is determined by the last "width=" issued in one of these com-
mands or by the default width of 75.

     A margin can be created on the left hand side by tabbing and then
typing text.  If a paragraph has already been typed beginning in column
1 and an additional indentation is desired, that indentation can be
achieved by marking the indentation (as a rectangle) and then pressing
<OPEN>.

     Normally text is typed beginning in column 1, interspersed with
formatting macros, and then the format package processes the file and
creates the requested indentations.  (See also _f_i_l_l, _j_u_s_t_i_f_y, _c_e_n_t_e_r,
<_M_A_R_K>, <_O_P_E_N>, and _F_o_r_m_a_t_t_i_n_g _P_a_c_k_a_g_e.)


_M_A_R_K_I_N_G

     See <_P_U_T>.


_M_O_V_I_N_G__L_I_N_E_S

     Moving lines is done by closing the lines and then putting them.
See <_C_L_O_S_E>.


_M_O_V_I_N_G__T_E_X_T__B_E_T_W_E_E_N__F_I_L_E_S

     Sections of text from one file can be moved or copied to another
file by editing both files, picking the text, alternating files, and
then putting text.

     The user initiates the process by typing [e filename] <RETURN> to
begin editing a file from which sections of text will be copied or
removed.  Once in that file, the cursor is moved to the first line of
text to be moved or copied and <PUT> is pressed to begin marking the
area.  The cursor is then moved to the last line of text to be moved or
copied, and <PICK> or <CLOSE> is pressed depending on whether the text
is to be copied or moved.

     The second file, the target file, is now brought up as the alter-
nate file by typing <BRK> [e secondfilename] <RETURN>.  The cursor is
moved to the location in this second file where the text is to be










                                  -32-



inserted, and then <BRK> <CLOSE> or <BRK> <PICK> is pressed depending on
whether the text was initially closed or picked.

     The second file can now be edited normally.  Upon normal exit, both
files are updated to reflect the editing performed.  (See also _M_U_L_T_I_P_L_E
_W_I_N_D_O_W_S, _A_L_T_E_R_N_A_T_E _F_I_L_E, <_C_L_O_S_E>, <_P_U_T>, and <_P_I_C_K>.)


_M_O_V_I_N_G__T_H_E__W_I_N_D_O_W

     See <_R_I_G_H_T>, <_L_E_F_T>, <+_P_A_G_E>, <-_P_A_G_E>, <-_L_I_N_E>, <+_L_I_N_E>, and <_A_R_R_O_W
_K_E_Y_S>.


_M_U_L_T_I_P_L_E__W_I_N_D_O_W_S

     Up to 10 windows can be edited at the same time.  Multiple windows
are useful for moving text between files, comparing files, and merging
files.  A new window is created by moving the cursor to the top or left
edge of a window and typing <BRK> [window] [filename] <RETURN>, where
[window] may be abbreviated [w].  The file [filename] becomes the
current file, and the new window becomes the current window.  If
[filename] is not specified, the current file also becomes the current
file in the new window.

     The windows are numbered in the order in which they were created.
To move the editor from window to window, the user types |CTRL+Z|.  To
move to a particular window, the user types <BRK> [n] |CTRL+Z|, where
[n] is the number of the window.

     To remove the last window created, the user types, <BRK> [-window]
<RETURN>, where [-window] may be abbreviated [-w].  (See also _A_L_T_E_R_N_A_T_E
_F_I_L_E.)


_n_a_m_e

     The file being edited can be renamed, while in the editor, by typ-
ing [name newfilename], where [name] can be abbreviated [n].  The naming
takes effect upon successful exit from the editor.  To negate the renam-
ing, the editing session must be aborted with [exit abort].  (See also
_F_I_L_E_N_A_M_E and _R_E_N_A_M_I_N_G _F_I_L_E_S.)


_o_p_e_n

     The open command may be used instead of <OPEN> to open space.  To
open an area, the user types <BRK> [open area] <RETURN>, where [open]
may be abbreviated [o].  The default area is one line.  (See also
<_O_P_E_N>.)












                                  -33-



_<_O_P_E_N_>

     This key inserts blank space into the file.  If <OPEN> is pressed
by itself, it inserts a blank line above the line where the cursor is.
In doing this it moves all of the remaining lines in the file down one
line.  Several lines can be opened by typing, <BRK> [n] <OPEN>, where n
is the number of blank lines to insert in the file.

     The open key will also operate on an area that has been marked with
the <PUT> key.  For example, to indent several lines of text, the cursor
is moved to the first line of text and the <PUT> key is pressed to begin
the mark process.  The cursor is then moved to the bottom line of text
to be indented and over to the right the number of columns of indenta-
tion required.  The <OPEN> key is pressed at this point and the text is
indented.  Note that the dimensions of the marked area are not saved by
the editor, so a subsequent press of a <CLOSE> key does not return the
area to its former state. (See also <_M_A_R_K> _a_n_d <_C_L_O_S_E>.)


_<_+_P_A_G_E_>

     This key moves the window toward the end of the file one page,
which is 36 lines.  The window can be moved more than one page by typ-
ing, <BRK> [n] <+PAGE>, where [n] is the number of pages to move toward
the end of the file.

     The key sequence <BRK> <+PAGE> moves the cursor to the last line of
the file and redraws the window if necessary. (See also <-PAGE>.)


_<_-_P_A_G_E_>

     This key moves the window toward the front of the file one page,
which is 36 lines.  The window can be moved more than one page by typ-
ing, <BRK> [n] <-PAGE>, where [n] is the number of pages to move toward
the front of the file.

     The key sequence <BRK> <-PAGE>, moves the cursor to line 1 of the
file and redraws the window if necessary. (See also <+_P_A_G_E>.)


_P_A_G_I_N_A_T_I_O_N

     Pagination of text is done on an Ann Arbor terminal on the basis of
36 sequential lines per page.  When this same text is printed on a line
printer using the Unix "print" command, 60 lines of text is printed per
page (the default page size).  The number of lines per page can be
specified by the user by using the "-pagesize=" (abbreviated "-p=")
option when using the Unix print command.  For more information on the
print command, use the Unix "l" command to list /doc/print.












                                  -34-



     Pagination of large documents is normally performed using the for-
matting package.  Detailed pagination can be performed by inserting page
eject (formfeed) characters at the beginning of each page of text
(assuming the formfeeds are less than the page size specified in the
Unix print command).  A formfeed is inserted in the text in column 1 by
typing |CTRL+\| |SHIFT+L|.  The first keystroke combination produces a
small, bright block that tells the editor a control character is to be
generated in the text.  The second keystroke combination tells the edi-
tor to insert a formfeed character.


_P_A_R_A_G_R_A_P_H_S

     Many editor commands deal with paragraphs.  For example, the fill
command, if no area is specified, fills one paragraph.  In most com-
mands, "paragraph" is abbreviated "p", for example, [fill 6p].  To the
editor a paragraph is a line or series of lines that ends with a blank
line or the end of the file.  That is, paragraphs are separated from one
another by a blank line.

     Paragraphs are most easily dealt with by use of formatting macros.
(See also _f_i_l_l, _j_u_s_t_i_f_y, and <_O_P_E_N>.)


_p_i_c_k

     The pick command may be used instead of the pick key to pick text
and place it in the pick buffer.  The format of the command is <BRK>
[pick] [area] <RETURN>, where [pick] may be abbreviated [pi]. If [area]
is not specified, the default area is one line.

     The information picked via the pick command or key may be placed
back in the file by pressing <BRK> <PICK> or entering the command <BRK>
[-pick] <RETURN>, where [-pick] may be abbreviated [-p].  (See also
<_P_I_C_K>.)


_-_p_i_c_k

     This command may be used to copy text from the pick buffer into the
file.  The format of the command is <BRK> [-pick] <RETURN>, where
[-pick] may be abbreviated [-p].

     Text may also be copied from the pick buffer into the file by typ-
ing <BRK> <PICK>.  (See also <_P_I_C_K>.)


_<_P_I_C_K_>

     The <pick> key copies characters, lines, and areas into a buffer
from which copies may be placed anywhere in the file.  The picked
material remains in the buffer until <PICK> is pressed again, or until










                                  -35-



the user logs off the system.  One line may be picked by moving the cur-
sor under that line and pressing <PICK>.  Several lines may be picked by
typing <BRK> [n] <PICK>, where [n] is the number of consecutive lines to
be picked.  These lines are picked beginning with the line where the
cursor is.

     A copy of the picked lines can be inserted into the file by moving
the cursor to where the lines are to be placed and typing <BRK> <PICK>.
The picked lines are inserted just above the line where the cursor is.
Copies of the picked lines may be inserted in an unlimited number of
places in the file.

     The pick function also works with marked lines and marked rectan-
gles.  To mark a rectangular area and then place a copy of it into the
pick buffer, the following keystrokes are necessary: move the cursor to
the upper left hand corner of the rectangular area and press <PUT>; move
the cursor to the lower right hand corner of the rectangular area and
press <PICK>.  The text will be copied into the pick buffer, and the
cursor will return to where it was at when <PUT> was pressed.

     (Picking may also be done right to left, and down to up.)

     Text flushed out of the pick buffer is placed in the change file.
(See also _p_i_c_k, _C_H_A_N_G_E _F_I_L_E, _M_O_V_I_N_G _T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S, and <_C_L_O_S_E>.)


_P_I_C_K__B_U_F_F_E_R

     The pick buffer is a special area in the editor that contains text
that is picked via the <PICK> key.  Picked text remains in this buffer
until the <PICK> key is pressed again.  (See also _p_i_c_k and <_P_I_C_K>.)


_P_R_I_N_T

     A file may be printed on the screen by typing "l filename" (where
"l" is an ell) in response to the Unix prompt of "%".  A file may be
printed on paper by means of the Unix [print] command.  For more infor-
mation, use the Unix "l" command to list /doc/print.


_P_U_T_T_I_N_G__T_E_X_T

     Text that has been closed with the <CLOSE> key may be put back into
the file in the same place or elsewhere by typing <BRK> <CLOSE>.  Text
that has been picked with the <PICK> key may be copied back into the
file by typing <BRK> <PICK>.

     Text can also be placed in the file by the use of commands.  Text
in the pick buffer can be copied to the file by typing <BRK> [-pick]
<RETURN>, where [-pick] may be abbreviated [-p].  Text in the close
buffer may be copied to the file by typing <BRK> [-close] <RETURN>,










                                  -36-



where [-close] may be abbreviated [-c].  (See also <_C_L_O_S_E>, _p_i_c_k and
<_P_I_C_K>.)


_<_P_U_T_>

     This key is used for marking, and on an E keyboard is labeled,
"MARK".  This key allows the user to mark characters, lines, and rectan-
gles and then operate on the marked area using a variety of commands and
key functions.  To mark several lines the user first moves the cursor to
the first line to be marked and presses <PUT>.  The user then moves the
cursor to the last line to be marked.  The number of lines marked is
indicated in the mark message below the window.  At this point the user
may press <PICK> to place the marked lines in the pick buffer, or press
<CLOSE> to place the lines in the close buffer, or press <OPEN> to open
a number of blank lines in the marked area, or type in a variety of com-
mands such as fill, justify, and replace.

     The mark function is normally terminated when the <PICK>, <CLOSE>,
or <OPEN> key is pressed, or when the user types in a command.

     An incomplete or unwanted mark function can be terminated by press-
ing <BRK> <PUT>.  (See also, <_P_I_C_K>, <_C_L_O_S_E>, <_O_P_E_N>, _f_i_l_l, _c_e_n_t_e_r, and
_j_u_s_t_i_f_y.)


_Q_U_I_T_T_I_N_G

     See _e_x_i_t (hopefully).


_R_E_C_O_V_E_R_Y

     There are a several situations from which a user would want to
recover.  First, there is the situation in which the editor, E, fails
and prints a "crash" message.  Recovery from this situation is performed
by entering the same directory and typing [e].  The editor will prompt
the user with four options, one of which is a silent, automatic replay.

     Another type of recovery involves material inadvertently closed out
via the <CLOSE> key.  Frequently a user wants to recover text that was
inadvertently closed.  That text may be found in the change file.  The
change file may be edited as an alternate file, the material picked from
it, and then placed in the original file. (See _C_H_A_N_G_E _F_I_L_E and _M_O_V_I_N_G
_T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S.)

     When a user makes a serious editing mistake and ruins a file, he
can negate the error and the editing session by typing [exit abort].  He
can then recover the editing session by typing [e].  The editor will
prompt him with four options, one of which is a visible replay.  The
user can initiate the replay, watch it occur, and just before the seri-
ous mistake is replicated, interrupt the replay by typing |CTRL+C|.  The










                                  -37-



replay is performed quickly, and some skill is required to interrupt it
at the desired point.

     The editor prints the following prompt when it is entered again in
the same directory after a crash or an aborted session:

  The last time you used the editor in this directory, you aborted.
  You have these choices:
    1. E will recover silently then update screen; then you should exit.
       (This is normally what you should do.)
    2. E will replay the last session on the screen; then you may exit
       or continue editing.
    3. E will ignore the aborted session and go ahead with a fresh session
       as per the command you typed.
    4. Abort now.
  Type the number of the option you want then hit <RETURN>:

Choices 1 and 2 are normally requested; choices 3 and 4 are presented to
allow for all possible alternatives.

     To circumvent this message after an aborted session, call the edi-
tor by typing [e -norecover].  This will completely eliminate an aborted
session and destroy any chance for a replay of that session.


_R_E_C_T_A_N_G_U_L_A_R__A_R_E_A_S

     Rectangular areas are defined by using the mark function.  See
<_P_U_T>.


_r_e_d_r_a_w

     To redraw the screen and eliminate superfluous characters (such as
system messages), the user types, <BRK> [redraw] <RETURN>, where
[redraw] may be abbreviated [red].


_R_E_N_A_M_I_N_G__F_I_L_E_S

     A file can be renamed using the Unix command [mv] in response to
the Unix "%" prompt.  The format of this command is [mv oldfilename
newfilename].  If "newfilename" already exists, it is deleted without
a warning message.

     The file being edited can be renamed while in the editor by typing,
<BRK> [name filename] <RETURN>, where [name] can be abbreviated [n].
The renaming takes place upon normal exit from the editor.  To negate
the renaming, the session must be aborted by typing [exit abort].













                                  -38-



_r_e_p_l_a_c_e

     The replace command is used to replace strings of characters or
strings of words with other strings of characters or words.  In its sim-
plest form the replace command is used as follows:

     <BRK> [replace /texta/textb/] <RETURN>

This would replace every occurrence of [texta] with [textb], starting
where the cursor is to the end of the file.

     The replace command has a variety of options.  The specification of
the command with all its options is:

     <BRK> [replace] [area] [show] /texta/textb/ <RETURN>
              or               or
           [-replace]       [interactive]


     The simplest form of the command is [replace], abbreviated [rep],
which directs the editor to search for occurrences of [texta] beginning
where the cursor is and proceeding toward the end of the file.

     If the command is prefaced with a minus sign, [-replace] or [-rep],
the editor searches for occurrences of [texta] beginning where the cur-
sor is and proceeding toward the front of the file.

     The two main options are [show] and [interactive].  The [show]
option allows the user to see the replacements as they occur.  The
[interactive] option allows the user to not only see the replacements
but also to control whether each replacement will occur.  Since
[interactive] includes [show], only one of these options can be typed
with the command at any one time.

     The [show] option displays the replacements on the screen as they
occur.  That is, each occurrence of "texta" is located, the screen is
redrawn to show that occurrence, and then the replacement is performed.

     Since replacement with the show option occurs slowly, the command
can easily be interrupted at any time using the command interrupt
sequence, |CTRL+C|.

     The [interactive] option, abbreviated [int], allows the user to
replace only selected occurrences of "texta" with "textb".  When the
first occurrence of "texta" is found, the cursor is moved to it.  At
this point, pressing <GOTO> (a key soon to be labeled "REPL") triggers
replacement of that occurrence of "texta" with "textb".  The user then
presses <+SCH> to search for the next occurrence of "texta".

     If the user does not want an occurrence of "texta" to be replaced,
the user types <+SCH>, and the editor skips that replacement and
proceeds to the next occurrence of "texta".  In this fashion the user
can replace just those occurrences of "texta" that he wants to.









                                  -39-



     The text searched for and the replacement text can be separated in
the command by a variety of delimiters including: /, *, ', ", $.

     The following examples illustrate variations of the command:

     <BRK> [rep /Smythe/Smith/] <RETURN>          Simple replacement
                                                  to end of file.
     <BRK> [rep 4p /Smythe/Smith/] <RETURN>       Same for 4 paragraphs.

     <BRK> [rep 4  /Smythe/Smith/] <RETURN>       Same for 4 lines.

     <BRK> [rep 4p int */____/*/..../*] <RETURN>  Replace "/____/" with
                                                  "/..../" in 4 paragraphs
                                                  interactively.
     <PUT> <cursor movements> <BRK> [rep int /AA/BB/] <RETURN>

This last example illustrates that a marked area can be used to limit
the area where replacment takes effect.  In this example, "AA" is to be
replaced by "BB" in the interactive mode in the area marked by the cur-
sor movements.  See also <+_S_C_H>, <-_S_C_H>, and <_M_A_R_K>.


_R_E_P_L_A_Y_I_N_G__A__S_E_S_S_I_O_N

     A session may be replayed if the session ended in a system crash or
an editor crash, or if the session was ended by the user typing [exit
abort].  In all of these cases the keys file, normally named ".ek1", is
preserved and can be used for a replay.

     After a system crash the user returns to the same directory and
types [e], and the editor prompts him with four options, one of which is
a silent, automatic replay.

     In the event of an aborted session ([exit abort]), the user also
returns to the same directory and types [e], and the editor prompts him
with four options, one of which is a visible replay.  The user initiates
the replay, watches it occur, and then interrupts it at a desired point
by typing |CTRL+C|.  (See also _R_E_C_O_V_E_R_Y, _K_E_Y_S _F_I_L_E, and Section II.)


_<_R_E_T_U_R_N_>

     Within the window, this key is pressed to move the cursor to column
1 of the next line.

     On the command line this key is pressed at the end of a command to
signal the editor that a command had been entered.













                                  -40-



_<_R_I_G_H_T_>

     This key is pressed along with the <CTRL> key to move the window 16
characters to the right.  This keystroke is also defined as |CTRL+S|.
Pressing <BRK> |CTRL+S| moves the window to the right such that the cur-
sor is displayed in column 1 of the new window.  (See also <_L_E_F_T> and
<_A_R_R_O_W _K_E_Y_S>.)


_<_R_I_G_H_T__A_R_R_O_W_>

     See <_A_R_R_O_W _K_E_Y_S>.


_R_U_N

     A function can be executed by typing:

     <BRK> [run] [area] [command] <RETURN>
                   or
                 [options]


     For example, to run the Unix command "who" and have the output
included in the file being edited, type <BRK> [run who] <RETURN>.

     Note that the output from a command can vary depending on when it
is run, and consequently a replay of the editing session that includes a
command may produce disastrous results.

     For knowledgeable Unix users only: [area] is passed to the standard
input of the command and is replaced by the output of the command.


_s_a_v_e

     A copy of the file being edited can be saved on disk with the
current changes by typing, <BRK> [save newfilename] <RETURN>.  where
[save] may be abbreviated [sa].  The [newfilename] must be specified and
cannot be the name of the file being edited.  This command is a con-
venient way of backing up a modified file before attempting some new,
dramatic editing.


_S_A_V_I_N_G__F_I_L_E_S

     A file is saved with the edited changes when the user exits nor-
mally with [exit].  A file can also be saved with the edited changes by
means of the save command.  (See also _s_a_v_e, _e_x_i_t, and _C_R_E_A_T_I_N_G _F_I_L_E_S.)











                                  -41-



_<_+_S_C_H_>

     This key is used to search for characters, strings of characters,
and strings of words.  The search begins where the cursor is and
proceeds toward the end of the file.  To search for a string of charac-
ters, the user types, <BRK> [texta] <+SCH>.  If the editor finds an
occurrence of [texta], the editor moves the cursor to that text and
redraws the window if necessary.  To continue searching the user presses
<+SCH> again.  The text string searched for is placed in a search
buffer, and consequently is available to be searched again after editing
has taken place.

     There is another method of placing text in the search buffer.  This
method is limited to text that does not contain blanks.  To use this
method, the user positions the cursor at the first character of the text
string and presses <BRK> <+SCH>.  The editor then copies the string of
characters up to but not including the next blank and into the search
buffer.  The search for the text string then proceeds normally. (See
also <-_S_C_H> and _r_e_p_l_a_c_e.)


_<_-_S_C_H_>

     This key is used to search for characters, strings of characters,
and strings of words.  The search begins where the cursor is and
proceeds toward the beginning of the file.  The method is the same as in
<+SCH>. (See also <+_S_C_H> and _r_e_p_l_a_c_e.)


_S_C_R_A_T_C_H__F_I_L_E

     Occasionally the editor finds itself with no file to work in when
the user expects to be working in a file.  The editor solves this
dilemma by creating a file named "scratch".  If the user does not want
to keep "scratch", he should [exit abort].


_S_E_A_R_C_H_I_N_G

     See <+_S_C_H> and  <-_S_C_H>.


_S_E_T_T_I_N_G__T_A_B_S

     See _t_a_b and _t_a_b_s.


_s_p_l_i_t

     This command splits one line into two lines at the point where the
cursor is.  The righthand side of the line, including the character just
above the cursor, is inserted as a new line on the line below, and then










                                  -42-



the window is redrawn.  To use this command, a user types, <BRK> [split]
<RETURN>, where [split] may be abbreviated [sp].  (See also _j_o_i_n.)


_<_S_/_R__T_A_B_>

     This key, used in combination with <CTRL>, sets and unsets tabs.
It is represented in this document as |CTRL+[|.  To set a tab using this
key, the user moves the cursor to the required column and types
|CTRL+[|.  To clear a tab using this key, the user moves the cursor to
the required column and types, <BRK> |CTRL+[|.  (See also _t_a_b, -_t_a_b,
_t_a_b_s, -_t_a_b_s, <+_T_A_B>, and <-_T_A_B_S>.)


_S_T_A_T_E__F_I_L_E

     The state file contains information about the last file edited in
the directory, including the file name, the place in the file where the
cursor was when the user exited, the line length established in the last
fill, justify, or center command, the state of Insert Mode, the tabs,
and the last search string.  The name of this file, assuming the user
owns the directory and is the only user working in the directory, is
".es1". (See also _K_E_Y_S_T_R_O_K_E _F_I_L_E, _C_H_A_N_G_E _F_I_L_E, and _R_E_C_O_V_E_R_Y, and the
description of these files in Section II.)


_t_a_b

     To set a tab using this command, a user types, <BRK> [tab] [column]
<RETURN>, where [column] is an optionally specified column number or
several column numbers separated by blanks.  If [column] is not speci-
fied, the tab is set where the cursor is.

     Note that this command does not clear tabs; it merely sets the tabs
where indicated.  (See also -_t_a_b, _t_a_b_s, -_t_a_b_s, <+_T_A_B>, <_S/_R _T_A_B>, and
<-_T_A_B_S>.)


_-_t_a_b

     To clear a tab using this command, a user types, <BRK> [-tab]
[column] <RETURN>, where [column] is an optionally specified column
number or several column numbers separated by blanks.  If [column] is
not specified, the tab is cleared where the cursor is.  (See also _t_a_b,
_t_a_b_s, -_t_a_b_s, <+_T_A_B>, <_S/_R _T_A_B>, and <-_T_A_B_S>.)


_<_+_T_A_B_>

     This key moves the cursor to the next tab going toward the right
margin.  Default tabs are set every 8 columns beginning in column 1 and
ending in column 73.  When the cursor is at the most right tab or beyond,










                                  -43-



pressing <+TAB> has no effect.  (See also -_t_a_b, _t_a_b_s, -_t_a_b_s, <_S/_R _T_A_B>,
and <-_T_A_B_S>.)


_<_-_T_A_B_>

     This key moves the cursor to the next tab going toward the left
margin.  The default tabs are set every 8 columns beginning in column 1
and ending in column 73.  When the cursor is at or before the most left
tab, pressing <-TAB> has no effect.  (See also -_t_a_b, _t_a_b_s, -_t_a_b_s, <_S/_R
_T_A_B>, and <-_T_A_B_S>.)


_t_a_b_f_i_l_e

     This command sets tabs according to a file containing a list of
column numbers separated by blanks.  To set tabs using this command, the
user types, <BRK> [tabfile filename] <RETURN>, where filename is the
name of a file containing the column numbers where the tabs are to be
placed.  Note that this command does not erase any existing tabs; it
merely adds tabs as specified.  (See also -_t_a_b, _t_a_b_s, -_t_a_b_s, <_S/_R _T_A_B>,
<+_T_A_B_S> and <-_T_A_B_S>.)


_T_A_B_S_,__T_H_E__T_O_P_I_C

     The editor sets default tabs in column 1 and every 8-th column
after that to column 73.  Additional tabs can be set using [tabfile],
[tab], and <S/R TAB>.  Tabs can be removed using [-tab] and <BRK> <S/R
TAB>, or E keyboard, <BRK> <S/R TAB>.  (See also -_t_a_b, _t_a_b_s, -_t_a_b_s, <_S/_R
_T_A_B>, <+_T_A_B_S> and <-_T_A_B_S>.)


_t_a_b_s

     This command sets tabs every n-th column.  To set tabs in this
fashion, the user types <BRK> [tabs n] <RETURN>, where n is every n-th
column beginning with column 1.  To set tabs every n-th column within an
area, the area must first be marked and then the tabs command issued.
(See also -_t_a_b, -_t_a_b_s, <_S/_R _T_A_B>, <+_T_A_B_S> and <-_T_A_B_S>.)


_-_t_a_b_s

     This command clears tabs.  To clear all tabs, the user types <BRK>
[-tabs] <RETURN>.  This command can also be used to clear tabs in every
n-th column by typing, <BRK> [-tabs n] <RETURN>, where n is the distance
between the columns.  Tabs can be cleared in every n-th column in an
area if the area is first marked and then the -tabs command issued.
(See also tab, tabs, <+TAB>, <-TAB>, and <S/R TAB>.)












                                  -44-



_U_N_D_E_R_L_I_N_I_N_G

     Printing text on the terminal screen with underline characters is
not possible on Ann Arbor terminals.  Underlining is possible on text
printed on hardcopy terminals and on text printed on line printers
(attached to the IBM computer).  Underlining is accomplished most easily
by use of the format package.  Underlining can be accomplished on a
character-by-character basis by adding a control backspace character and
an underline character to the text.

     To underline one character manually, the underline character must be
typed, and then a control character equal to a backspace character must
be entered in the text, and then the character itself must be typed.
The keystrokes required to underline the letter "t" are as follows:

     |SHIFT+US_DEL| |CTRL+\|  |SHIFT+H|  [t]

The first keystroke generates the underline character; the second keys-
troke generates a small, bright block on the screen that tells the edi-
tor that a control character is coming next.  The next keystroke,
|SHIFT+H|, generates the code for a control backspace character that is
to be entered into the text (not a backspace character used while edit-
ing); and finally the last keystroke generates the "t".

     (For a more instructional explanation of underlining using both the
method described here and the formatting package, see the _T_e_x_t _P_r_o_c_e_s_s_o_r
_L_e_a_r_n_e_r'_s _G_u_i_d_e.)


_U_N_M_A_R_K

     To negate marking, the user types <BRK> <PUT>.  (Also see <_M_A_R_K>.)


_U_P__A_R_R_O_W

     See <_A_R_R_O_W _K_E_Y_S>.




_U_S_I_N_G__A__F_I_L_E

     A file is edited by typing [e filename].  If the file to be edited
is the same file worked on in the last editing sesssion, then the user
can return to the same file in the same place by typing merely [e].
While editing one file, another file can be edited as an alternate file.
(See also _A_L_T_E_R_N_A_T_E _F_I_L_E and _M_O_V_I_N_G _T_E_X_T _B_E_T_W_E_E_N _F_I_L_E_S.)














                                  -45-



_W_I_D_E__F_I_L_E_S

     Files with long lines can be viewed by using <RIGHT> and <LEFT> to
shift the window.  Lines longer than 132 characters cannot be printed on
a line printer and are to be avoided.  (See also _L_O_N_G _L_I_N_E_S.)


_w_i_d_t_h

     The fill, justify, and center commands allow the user to specify a
width.   The [width=] specified as part of the command may be abbrevi-
ated [w=].  This width remains in effect until another fill, justify, or
center command is entered with a different width specification.  This
width is maintained as part of the information kept in the state file.

     When a file is created, the default width is 75.

     Line width is most adequately handled by use of formatting macros.


_W_I_N_D_O_W

     The editor uses the window concept to display a file.  The terminal
screen is viewed as a window that opens on part of the file.  The window
can be moved forward and backward through the file (and right and left)
to view different portions of the file.  When the user presses keys that
require the cursor to be moved out of the window, then the window is
moved such that the cursor remains in the window. (See also _C_R_E_A_T_I_N_G
_W_I_N_D_O_W_S, _D_E_L_E_T_I_N_G _W_I_N_D_O_W_S, _a_n_d _M_O_V_I_N_G _W_I_N_D_O_W_S.)


_._e_c_1

     This is the file name of the change file if the user owns the
directory and is the only person working in that directory.  See _C_H_A_N_G_E
_F_I_L_E.


_._e_k_1

     This is the file name of the keystroke file if the user owns the
directory and is the only person working in that directory.  See the
_K_E_Y_S_T_R_O_K_E _F_I_L_E.


_._e_k_1_b

     This is the file name of the backup keystroke file used during
recovery if the user owns the directory and is the only person working
in that directory.  See _K_E_Y_S_T_R_O_K_E _F_I_L_E.












                                  -46-



_._e_s_1

     This is the file name of the state file if the user owns the direc-
tory and is the only person working in that directory.  See _S_T_A_T_E _F_I_L_E.


_#

     This is the name of a pseudo file created by the editor so as to
allow the user to access the text in the change file.  (See _C_H_A_N_G_E
_F_I_L_E.)















































