                  IE - The Reference Manual


IE is a screen editor, based on single keystroke commands, 
and immediate entry of text.  It is very simple to use, but can 
provide many advanced features.

!<Getting started

To edit a file on any system that supports IE just say:

      IE file

Then, any text you type will be inserted into the file where the
cursor is on the screen.   The RETURN key has a similar effect as when
used outside the editor, that is it terminates the current line, and
moves onto a new one.  The DEL key deletes the character to the left 
of the cursor, including new lines. The ARROW keys move around the 
screen.   To close the edit and write back the modified file, press 
the COMMA (,) key on the numeric keypad at the right hand side of 
the keyboard.   If you do NOT want to keep what changes you have 
made the edit can be ABORTED by typing Ctrl-Y, when you will be asked 
if you really want to abort, typing Y or Ctrl-Y in response to this
leaves the editor without writing back the modified file.

The commands listed above are the simplest forms of insertion,
movement and deletion.  There are many more commands in these classes,
as well as others classes. They are all described in the remainder of
this manual.
!>

!<Terminal types
The following terminals are supported:

   Visual 200     (V200)
   Visual 55      (V55)
   Wyse 75        (WY75)         *
   VT100                         **
   VT220

   Wyse 50        (WY50)         ***
   Freedom 100                   ***

* As Wyse 75 terminals are very close to VT100s it is normal for the
  operating system to believe that these are VT100s.  For editing
  purposes there are a few differences, and it is important to specify
  to IE that you are using a Wyse 75, for example use the /WY75
  qualifier on VAX/VMS.

** Most terminals provide this as an emulation mode.

*** These terminals were only added as experiments, they not covered by
    this manual.
!>
!<Keys

The following types of terminal keys will be referred to in this
manual:

Standard:      ordinary letters, plus main function control keys which
               now have long names, such as RETURN.

Control:       written as Ctrl- plus the letter.

Function:      these are labelled F0 upwards, many now terminals 
               start at F1 , or even F6 rather than F0.  VT100oid 
               terminals also have a set of keys PF1 to PF4, these 
               are not treated as function keys by IE, but as 
               oddities, see below.  True VT100s do not have function 
               keys, which is rather restrictive, so IE interprets PF1
               followed by a digit as being F0 to F9.

Keypad:        these are the numeric keys on the right hand of the
               keyboard.  These are either normal, when written as
               Keypad followed by a number, or shifted, when written
               as Function Keypad and then a number.  
               
               To obtain the Function Keypad values on Visual 200
               press the CONVERT FUNCTION key with the keypad digit. 
               On the Visual 55s this key is labelled FUNCTION.  On
               VT100oid terminals PF1 must be pressed once, before-
               hand.

Oddities:      Terminal manufacturers like to put all sorts of bizarre
               extra keys on their products.  This is a pain for
               editors, but IE tries to cope.  Visual 200s have
               extra keys galore, such as CP and CL.  VT100oid
               terminals have PF1 to PF4, IE uses PF1 as a shift, but
               PF2-4 can be used, as can PF1 followed by PF2-PF4 which 
               is the same as Function PF2-Function PF4.

Any key on the terminal can be attached to an IE command, or a
character; this process is called binding.  For each command the
standard key bindings for each of the main terminals is given, but the
user can redefine any of these keys, see the section on Keyboard
Files.  If a command is not normally bound to any key by default the
not available symbol N/A is used.
!>
!<Display

IE reads files into buffers, which the user then looks at through 
a window, which is a portion of the terminal screen.  This window 
is always the full width of the screen, and is normally the full 
height of the screen.  It is possible to reduce the window's height 
using the WINDOW TOP and WINDOW BOTTOM profile options.   

On VAX/VMS systems broadcast messages are trapped and displayed 
in a special one line Broadcast Window at the top of the screen 
in FEATURE MODE and stay there until cancelled.

FEATURE MODE is a terminal independent method of highlighting text. 
On Visual 200 and Visual 55 terminals feature mode appears dimmer
than surrounding text; on VT100 and VT220s in inverse video; on
Wyse 75 whatever the current setting of the Attribute setup value is,
this is recommended to be either INVERSE or UNDERLINE for IE, but not
DIM, as this does not look so good.

The top line of the window is also used for reporting error
messages.  These appear on the top line of the window, or the line
below the Broadcast Window, in FEATURE MODE, and remain until the next
key is pressed, when the line is restored.  This line is called the 
message line.  All prompts for extra information also appear on this
line.

If a line is longer than the width of the terminal (normally 80
characters) a graphics character like a T turned on its side is
displayed in the rightmost column on the screen.  If the cursor is
standing on this character it means that it is in fact some number of
characters off the right hand side of the screen.

To allow the creation of empty buffers, which are in effect new files,
a special line is added to the end of the file during the edit.  This
means that an empty file does in fact have this one virtual line in
it.  By default it is displayed as a graphics line.

Control characters are displayed in a helpful fashion.  The ASCII HT
character is interpreted as being an 8 character position TAB, as
presented by VAX/VMS and VAX/UNIX.   Normally the space occupied by
TAB filling is simply blank (spaces) but the TAB SHOW option can be
set to print a graphics character in each column position that the TAB
moves accross.  On Visual 200 and Visual 55 terminals this is a double
dot character, on VT100, VT220 and Wyse 75 it is represented by a
single character position HT symbol.

Other control characters are displayed as ^<letter> in FEATURE MODE,
and occupy two character positions on the screen, but appear for 
editing purposes as one.  Characters with the eighth bit set are
displayed with a degrees sign before them, including control
characters which then take up three character positions.

Bugs:  Long lines:  The Delete Word and Change Text command do not
                    update the long line marker correctly.
                    If the cursor is on the last character of the
                    line and text is inserted before it off the end of
                    the line, the end of line marker is not inserted
                    until the screen is refreshed.
       HT display:  This does not interact well with the end of line
                    marker, use shorter lines!
!>
!<Calling IE

IE is currently mounted on the following systems:

   VAX/VMS
   VAX UNIX 4.2bsd
   APM

!PAGE
To simply edit a file use the command:

   IE file

Or to edit one file onto another, use the command

   IE file1 file2             on VAX/VMS and UNIX
   IE file1/file2             on the APM

!PAGE
The following command line switches are available.  
On VAX/VMS the switch is proceeded by a /, on UNIX and the APM a -.

!<NOCONFIRM

This means that when you abort the edit you are not asked if your
really mean it.
!>
!<CREATE

Ignore any existing file of the given name; always start with an empty
buffer.
!>
!<IGNORE

This qualifier is used in association with the RECOVER switch to
indicate that any differences in editing environment between the
original edit and the recovery edit should be ignored.  See the
section on Journalising for further details.
!>
!<JOURNAL

The qualifier JOURNAL=<file name> can be used to override the default
journal file name, see the section of Journalising for further
details.
!>
!<KEYBOARD

The qualifier KEYBOARD=<file name> can be used to override the default
keyboard file.
!>
!<LAST

Edit the file that was last edited.
!>
!<MEMORY

This sets the edit memory to be the file being edited.  If the editor
is invoked with no file name after this the remembered file will be
edited.   The position within the file when the last edit was closed
is remembered between edit sessions, unless the NOSAVE_POSITION
qualifier is used.  The TOP switch can be used to override the saved
position when starting an edit.
!>
!<PROFILE

On VAX/VMS the /NOPROFILE switch may be used to cause any profile file
that is in use to be ignored.

On all systems PROFILE=<file name> can be used to set up a value for
the profile file.
!>
!<READ

This is used to prevent files being written out, thus avoiding
accidental damage.
!>
!<RECOVER

This invokes the edit recovery mechanism, see the section on 
Journalising.
!>
!<NOSAVE_POSITION

This switch indicates that the last used position in a memory edit
should not be remembered.  See the qualifier MEMORY for further
details.
!>
!<SILENT

This suppress the printing of the "Reading from ..." messages at the
start and finish of edits.  This is very useful in command files and
when calling the editor as a subroutine.
!>
!<TOP

The saved memory edit position should not be used; at the start of the
edit the cursor will be at the top of the file.  See the switch MEMORY
for more details.
!>
!<WIDTH

If you are using a terminal that has a width other than 80 characters
the WIDTH=<number> qualifier can be used to specify the terminals
width.  This is most useful when using an option like 132 columns on
VT100oid terminals.

On VAX/VMS the value given using SET TERMINAL/WIDTH=<number> will be
used by default.

On the APM the operating system internal value is used, as is the
screen height.  This means that if the Level 1 graphics Visual 200
emulator is in use IE utilises all the available screen space.
!>
!<Terminal Types
!<On VAX/VMS

Normally the default terminal type is used, but this may be overridden
using the qualifiers /VT100 /VT220 /V200 /WY75 /V55.  For 
more exotic terminals the form /DEVICE_TYPE=<name> should be used.
!>
!<On VAX UNIX

This is normally taken from an environmental variable TERM, as with
normal UNIX programs.  This can be overridden with the symbol 
IE_TT_Type if the real terminal type differs from that know to the
existing termcap database.  An example of this is using a Wyse 75 or
VT220 terminal, which can both use TERM set to vt100, but benefit from
IE knowing exactly what type they are.
!>
!<On APM

The value of the symbol TERMINAL is translated for the default
terminal type, but the following qualifiers are provided:

   -V200
   -V55
   -VT100
   -VT220
   -Freedom100
   -WY50
   -WY75

!>
!>
!>
!<Insertion

Normally to insert text, just type.  This inserts at the current
position what you type just as you would expect.   The RETURN key is
bound to a function called Break Line which terminates the current 
line and moves onto a new one, also as you would expect.   Some other 
useful functions are described below.

!<Insert Line

Bindings:      All terminals: Keypad 7

This insert a new blank line above the current line.  The cursor is
moved to the same level of indentation as on the current line, but on
the new line.  The current line is unaffected.  If the AUTO INDENT
option is set to NO, then the cursor is moved to the start of the new
line.
                                       
!>
!<Break Line

Bindings:      All terminals: RETURN

This breaks the current line at the cursor position.  Any text after
the cursor is moved onto a new line indented as much as on the current
line.  The cursor is then moved to the start of the text on the new
line.  If the AUTO INDENT option is set to NO the text is moved to the
start of the new line.
!>             
!<Insert Literal

Bindings:      All terminals: Ctrl-P

This allows any typeable character to be inserted at the current
cursor position.  To do this, issue the command, and then type the key
that is to be inserted.  This is useful for inserting keys that are 
normally bound to other functions, such as RETURN, or Ctrl-P itself.

Notice that non-ASCII defined keys, such as function keys, are in fact
composites made up of, usually, what are called escape sequences.  
This means that Insert Literal followed by a function key will insert
an ESC character followed by some text characters which identify the
escape sequence, and once separated from their escape simply become
ordinary text.
!>
!<Insert ASCII

Bindings:      All terminals: Ctrl-A

This allows control characters to be inserted at the current cursor
position by ASCII value.  The prompt "ASCII: " appears on the top
line of the window and the ASCII code of the desired character can be
typed in decimal.

Bugs: The NUL character can not be inserted in this fashion, use
      Ctrl-P and Ctrl-@.
!>
!<Insert TAB

Bindings:      All terminals: TAB

This, by default, does not insert the ASCII HT character, but rather
inserts spaces until the next internal tab stop is reached.  The
TAB WIDTH option can be used to set the number of spaces  between tab
stops.

It is possible to define TAB to insert the ASCII HT character, see the
command Define Key.

In Overwrite Mode Insert TAB merely moves along to the next TAB stop
and does not alter the line.
!>
!<Typing Modes

By default text typed at the terminal is inserted into the text.  It
is also possible to select a mode whereby typed text overwrites
existing text.   The following commands manipulate this mode setting.

!<Insert Mode

Bindings:                Visual 55: N/A             
               All other terminals: Keypad 8

Enters text insertion mode.
!>
!<Overwrite Mode

Bindings:                Visual 55: N/A
               All other terminals: Function Keypad 8

Enters text overwrite mode.
!>
!<Toggle Mode

Bindings:                Visual 55: Keypad 8
               All other terminals: N/A

Swaps from insert mode to overwrite mode.
!>
!>
!<Formatting

Certain elementary formating facilities are provided by the editor. 
They all rely on the numeric options LEFT MARGIN and RIGHT MARGIN,
which default to 1 and 80.

In normal typing if AUTO INDENT is set to NO, then new lines will be 
started at the LEFT MARGIN character position.

If the AUTO LINE BREAK option is set to YES text will be automatically
broken before a word when the cursor goes beyond the RIGHT MARGIN
setting.  This means that RETURN need rarely be typed when entering
ordinary text.

If AUTO LINE BREAK is at YES and JUSTIFY is set to YES, then lines
will be padded with spaces until they fill the space between LEFT and
RIGHT MARGINs.  The padding alternates between left end and right end
first.

This can be used to type in ready justified text, and for typing
newspaper style columns of text.  The Justify Text command can be used
to rejustify a line after a correction.

This is a very rudimentary facility and not intended as a replacement
for text formatting programs, rather it is for short texts, such as 
mail or news items.
!>
!>
!<Movement

Horizontal movement is counted in characters, where HTs and control
characters count as one character.  Vertical movement is counted in
lines.  During vertical movement the editor always tries to keep one
line above or below the current line on the screen.  This is obviously
not possible at the begining and end of the buffer.

!<Left

Bindings:      All Terminals: Left Arrow

This moves the cursor one character to the left, unless at the start
of a line, in which case it has no effect.
!>
!<Right

Bindings:      All Terminals: Right Arrow

This moves the cursor one character to the right, unless at the end
of the line, in which case it has no effect.
!>
!<Up

Bindings:      All Terminals: Up Arrow

The cursor is moved onto the previous line, unless at the top of the
buffer, in which case it has no effect.

If there is text on the line above up to the point where the cursor is
then the horizontal position of the cursor is unchanged.  If however
the line above is shorter than the current one, the cursor is moved to
the end of the text on the line above, possibly the start of the line
if it is empty.

If the WIGGLE option is set to YES then the cursor will be moved back
out again when it moves onto a long enough line on a subsequent Up 
command.

If the option FREE CURSOR is set to YES, then the cursor does not move
its horizontal position at all.
!>
!<Down

Bindings:      All Terminals: Down Arrow

The cursor is moved onto the next line, unless at the bottom of the
buffer, in which case it has no effect.

If there is text on the line below up to the point where the cursor is
then the horizontal position of the cursor is unchanged.  If however
the line below is shorter than the current one, the cursor is moved to
the end of the text on the line below, possibly the start of the line
if it is empty.

If the WIGGLE option is set to YES then the cursor will be moved back
out again when it moves onto a long enough line on a subsequent Down 
command.

If the option FREE CURSOR is set to YES, then the cursor does not move
its horizontal position at all.

!>
!<End of Line

Bindings:      All Terminals: Keypad 1

This moves the cursor to the end of the current line.

This command drops a Magic Marker, see Last Position command for
further details.
!>
!<End of Page
Bindings:      All Terminals: Keypad 3

This moves the cursor to the end of the line currently the last one 
on the screen.  A new line is scrolled onto the screen unless at the 
end of the buffer.

This command can be used with the Scroll Page Down command to scan
through a buffer a screen full at a time.

This command drops a Magic Marker, see Last Position command for
further details.
!>
!<End of File

Bindings:      All Terminals: Keypad 2

This moves the cursor to the last line of the buffer.

This command drops a Magic Marker, see Last Position command for
further details.
!>
!<Start of Line

Bindings:      All Terminals: Keypad 0

The moves the cursor to the start of the current line.

This command drops a Magic Marker, see Last Position command for more
details.
!>
!<Start of Page

Bindings:      All Terminals: Function Keypad 3

The cursor is moved to the start of the line currently at the top of
the screen.  A new line is scrolled onto the top of the screen unless
at the top of the buffer.

This command can be used with Scroll Page Up to page backwards through
the buffer, screen at a time.

This command drops a Magic Marker, see Last Position command for more
details.
!>
!<Start of File

Bindings:      Visual 200: HOME           
                Visual 55: HOME
                  Wyse 75: HOME and PF2
                    VT100: PF2                
                    VT220: PF2

The cursor is moved to the start of the first line of the buffer.

This command drops a Magic Marker, see Last Position Command for more
details.
!>
!<Word Left

Bindings:               Visual 200: F0                     
                             VT220: F6
               All Other Terminals: F1

This moves the cursor to the start of the next word to the left,
unless at the start of the line in which case it has no effect.

A word is defined to be a group of letters, a group of numbers, or a
single punctuation mark.  White space (i.e. spaces and HTs) are
ignored.
!>
!<Word Right

Bindings:               Visual 200: F1                     
                             VT220: F7
               All Other Terminals: F2

This moves the cursor to the start of the next word to the right,
unless at the end of the line in which case it has no effect.

A word is defined to be a group of letters, a group of numbers, or a
single punctuation mark.  White space (i.e. spaces and HTs are
ignored).
!>
!<Up to Start

Bindings:               Visual 200: F2
                             VT220: F8
               All Other Terminals: F3

This moves the cursor to the start of the line above.

This command has no effect at the top of the bufer.

This command drops a Magic Marker, see Last Position command for more
details.
!>
!<Down to Start

Bindings:               Visual 200: F3
                             VT220: F9
               All Other Terminals: F4

This moves the cursor to the start of the line below.

This command has no effect at the end of the buffer.

This command drops a Magic Marker, see Last Position command for more
details.
!>
!<Move to Line

Bindings:                    VT220: F10
               All Other Terminals: LINE FEED

This prompts "Line: " and expects a number.  If RETURN is pressed
immediately then the command has no effect.

If a number is typed (followed by RETURN) then the cursor is moved to
the line with that number.   This is an absolute move, it is also
possible to specify relative moves by using + or - before the number,
for example the sequence

   LINE FEED + 1 0 RETURN

will move 10 lines further on in the buffer.

To find out the number of the current line, and the number of lines in
the buffer, press ? in response to the prompt.  No RETURN is needed.
!>
!<Move to Column

Bindings:                    VT220: Ctrl-Space
               All Other Terminals: Ctrl-@

This prompts "Column: " and expects a number.  If RETURN is pressed
immediately then the command has no effect.

If a number is typed (followed by RETURN) then the cursor is moved to
the column with that number.   This is an absolute move, it is also
possible to specify relative moves by using + or - before the number,
for example the sequence

   Ctrl-@ - 1 5 RETURN

will move 15 characters to the left.

To find out the number of the current column, and the length of the
current line, press ? in response to the prompt.  No RETURN is needed.
!>
!<Scroll Page Up

Bindings:                Visual 55: N/A
               All Other Terminals: Function Keypad .

This redraws the screen with the current line as the second bottom
line, unless at the end of the buffer, when it will be the bottom of 
the screen.

This command is normally used with the Start of Page command to page
backwards through the buffer.  On VT220 and Wyse 75 terminals the Prev
Scrn key is defined to be a macro which performs this function.
!>
!<Scroll Page Down

Bindings:      All Terminals: Keypad .

This redraws the screen with the current line as the second top
line, unless at the start of the buffer, when it will be the top of 
the screen.

This command is normally used with the End of Page command to page
forwards through the buffer.  On VT220 and Wyse 75 terminals the Next
Scrn key is defined to be a macro which performs this function.
!>
!<Last Position

Bindings:      All Terminals: Ctrl-L

This command is used to move back to the place you were before the
last major move command.  This very useful if you have accidently used
the Start of File or End of File commands.  Each command listed above
as dropping a Magic Marker can be recovered.  A record is kept of all
Magic Markers from the start of the edit, but as the Last Position
command is used they are eaten up.

If a line which had a Magic Marker on it is deleted then that Magic
Marker is also deleted.

Magic Markers are buffer specific: each buffers has its own list.
!>
!>
!<Searching

It is possible to look for texts within a buffer, in different
directions, and to replace the located text with a different one.

!<Search

Bindings:                   VT220: Find
               All Other Terminal: Keypad 9      
         
This command prompts "Search: " and the text to be located should 
be typed in, terminated with RETURN.   The buffer is then searched
starting at the current cursor position, and working fowards to the
end.   For every hundred lines searched a dot is displayed on the top
line of the window.
               
When the text is found the cursor is positioned at the start of it. 
On VT100 and VT220 terminals the located text is underlined.
If the text is not found an error message is put up on the 
message line, and the cursor is not moved.

If you want to interrupt a long search, this can be done with Ctrl-C. 
Notice that this is used as an operating system interrupt character
rather than an IE command, and this results in an overloading of the
key.  On VAX/VMS V4 systems Ctrl-C is echoed as CANCEL in feature
mode, but it is not echoed on other systems.

This command drops a Magic Marker, see Last Position command for more
details.

Normally the case of letters does not matter in searching, but if the
CASE SIGNIFICANCE option is set to YES then exact case matching is
used.

By default the search terminates at the end of the buffer, but if the
WRAP SEARCH option is set to YES then the search will wrap round to
the begining of the buffer down to the position that the search was
started from.   Or if the BACK SEARCH option is set, the text before
the starting point is searched backwards up to the top of buffer.
If either of these steps is taken a message is displayed on the top
line of the screen.
!>
!<Backwards Search

Bindings:      Visual 200: Ctrl-^      
                Visual 55: Back Space
                  Wyse 75: Back Space
                    VT100: Ctrl-^          
                    VT220: Remove

This command prompts "hcraeS: " and the text to be located should 
be typed in, terminated with RETURN.   The buffer is then searched
starting at the current cursor position, and working backwards to the
begining.   For every hundred lines searched a dot is displayed on the 
message line.
               
When the text is found the cursor is positioned at the start of it. 
On VT100 and VT220 terminals the located text is underlined.
If the text is not found an error message is put up on the 
message line.

If you want to interrupt a long search, this can be done with Ctrl-C. 
Notice that this is used as an operating system interrupt character
rather than an IE command, and this results in an overloading of the
key.  On VAX/VMS V4 systems Ctrl-C is echoed as CANCEL in feature
mode, but it is not echoed on other systems.

This command drops a Magic Marker, see Last Position command for more
details.

Normally the case of letters does not matter in searching, but if the
CASE SIGNIFICANCE option is set to YES then exact case matching is
used.

By default the search terminates at the top of the buffer, but if the
WRAP SEARCH option is set to YES then the search will wrap round to
the end of the buffer up to the position that the search was started
from.   Or if the BACK SEARCH option is set, the text below the
starting point is searched backwards down to the end of the buffer.
If either of these steps is taken a message is displayed on the top
line of the screen.
!>
!<Search Again

Bindings:                    VT220: Keypad 9
               All Other Terminals: Function Keypad 9

This repeats the last Search or Backwards Search.  It is exactly 
like retyping the command.
!>
!<Change Text

Bindings:                    VT220: Insert Here
               All Other Terminals: Keypad 6

This command prompts "Change: " for a search string, and then 
"To: " for a replacement string.  The text is searched for the 
string, and if it is found then it is replaced with the second 
string.

The search is  carried out in the same manner as Search, and all the
options that are relevant to it are relevant to this.

If the SEARCH BEFORE REPLACE option is set to NO, then Change Text
becomes a substitution command.  The prompt "Change To: " is issued
and the text typed in response to this is used to replace the text
found wth the last Search or Backwards Search command.

Bugs: This does not reset the end of line marker correctly on lines
      longer than the width of the terminal.
!>
!<Change Again

Bindings:                    VT220: Keypad 6
               All Other Terminals: Function Keypad 6

This repeats the last Change Text.  It is exactly like retyping the
previous Change Text command.
!>
!<Match Bracket

Bindings:      All Terminals: Ctrl-B

This command can be used for checking the match of all sorts of
brackets and delimiters.  An example of its use is moving to a (
character, and then issuing the Match Bracket command.  The cursor
will be moved onto the matching ), taking account of all the nested
brackets, and ignoring line terminations.

If there is no matching bracket then an error message is displayed on
the message line.  If the Match Bracket command is issued when the
cursor is NOT on a valid character there is no effect.

Bracket matching also takes place backwards.  For example placing the
cursor on a ) results in the cursor being moved backwards to the
matching (.

!PAGE
Valid brackets and their match are listed below:

      (     ->    )
      )     ->    (           backwards
      [     ->    ]
      ]     ->    [           backwards
      {     ->    }
      }     ->    {           backwards
      <     ->    >
      >     ->    <           backwards
      "     ->    "
      '     ->    '
      `     ->    `
      %     ->    %

Notice that the single quotes do not match in pairs like `' as they
would in true typography.  Rather each kind matches the other as this
makes more sense for programming language editing.
!>
!>
!<Deletion

The following commands related to removing items from the buffer, and
then with restoring them again.   These are divided into horizontal
operations on characters, and vertical operations on lines.  The
character operations are all called Erase operations, while the line
commands are Delete operations.

!<Delete Line

Bindings:      All Terminals: Keypad 4

This deletes the current line, unless it is the last line of the
buffer.   The cursor is moved onto the next line, at the same
horizontal position.

The deleted line is added to the deleted line list.
!>
!<Delete to End

Bindings:      All Terminals: Function Keypad 2

This deletes all the lines, including the current line, up to the end
of the file.  It provides three options, one to throw the lines away,
one to keep them on the deleted line list, or to not perform the
deletion at all.  A prompt appears with this information, and typing T
will throw away the lines, K will keep them and any other key will
abandon the command.
!>
!<Delete to Start

Bindings:      Visual 200: N/A            
                Visual 55: N/A
                  Wyse 75: Function PF2
                    VT100: Function PF2       
                    VT220: Function PF2

This deletes all the lines above the current line.  It provides three 
options, one to throw the lines away, one to keep them on the 
deleted line list, or to not perform the deletion at all.  A prompt 
appears with this information, and typing T will throw away the lines, 
K will keep them and any other key will abandon the command.
!>
!<Erase Char

Bindings:      All Terminals: Keypad 5

This deletes the character under the cursor and moves the cursor onto
the character to right.

Deleted characters are put into the Character Binand can be rescued
with the Undo Erasure command.   Multiple uses of Delete Char result in 
all the characters deleted being put into a package in the bin, which
is sealed when any other command is issued.   This means that whole
strings of characters can be deleted and undeleted easily.
!>
!<Erase Left

Bindings:      All Terminals: DEL

This deletes the character to the left of the cursor.  This also
can be used to join lines together, as using DEL at the start of the
line joins the current line onto the end of the previous line.

Characters, but not line breaks, are put into the Character Bin and
can be rescued with the Undo Erasure command.  Multiple uses of Erase
Left result in the deleted characters being enterer in the reverse
order to that which they were typed in, which means that string
undoing results in the reversal of text.

In Overwrite Mode, Erase Left moves to the character on the left and
then overwrites it with a space character.
!>
!<Back Tab

Bindings:      Visual 200: BTAB (Shift TAB)   
                Visual 55: BTAB (Shift TAB)
                  Wyse 75: Function TAB
                    VT100: Function TAB           
                    VT220: Function TAB

This command deletes back to the last internal TAB stop.  The
TAB WIDTH option can be used to set the number of spaces between tab
stops.

In Overwrite Mode this command moves back to last TAB stop without
changing the line.

This command has no effect at the start of a line.
!>
!<Erase to Start

Bindings:      All Terminals: Ctrl-X
                  Plus:
                     Wyse 75: Function Keypad 0
                       VT100: Function Keypad 0 
                       VT220: Function Keypad 0

This deletes all the characters to the left of the cursor from the
current line.

All the deleted characters are dropped in the Character Bin in a
sealed package, and can be undeleted with one use of Undo Erasure.
!>
!<Erase to End

Bindings:      All Terminals: Function Keypad 1

This deletes all the characters from under the cursor to the end of
the current line.

All the deleted characters are dropped in the Character Bin in a
sealed package, and can be undeleted with one use of Undo Erasure.
!>
!<Restore Line

Bindings:                    VT220: Keypad -
               All Other Terminals: Function Keypad 4

This restores the most recently deleted line, to above the current
line, and moves the cursor onto it at the same horizontal position.
!>
!<Clone Line

Bindings:      Visual 200: CL       
                Visual 55: F12
                  Wyse 75: PF4
                    VT100: PF4          
                    VT220: PF4

This is a variation on Restore Line, except that the most recently
deleted line is copied into the buffer, AND left on the deletion list.
This means that a line can be duplicated many times over by first
deleting it, then using Clone Line to restore it in each time it is
needed.

This rather strange arrangement has arisen by historical accident, a
more systematic method is described in the section on Duplication.
!>
!<Restore All

Bindings:      All Terminals: Function Keypad 7

This restores all the deleted lines to above the current line, leaving
the cursor in the same place.

The command requires confirmation by pressing Y after issuing the
command.
!>
!<Undo Erasure

Bindings:      All Terminals: Ctrl-U

This inserts the last package from the character bin before the
cursor.
!>
!>
!<Admin

The following miscellaneous commands manipulate the editor state.

!<Close Edit

Bindings:      All Terminals: Keypad ,

This causes the main buffer to be written out to the file name
specified on the command line.  If any other buffers have been
modified prompts appear to ask whether or not to write each one back.
Setting the WRITE BACK option to NO prevents this.

The command line qualifier READ suppresses the writing out of any
buffer, allowing edits free from fear of accidental damage.

Normally the edit can only be closed while in buffer MAIN, but setting
the option FORBID EXIT to NO allows the edit to be closed from any
buffer.
!>
!<Abort Edit

Bindings:      All Terminals: Ctrl-Y

This causes the edit to be abandoned completely.   After issuing the
command a prompt saying "Do you really want to abort? (Y/N)" appears. 
Typing either Y or Ctrl-Y in response to this aborts the edit,
anything else returns to the edit.

The command line qualifier NOCONFIRM removes the safety net.

Normally the edit can only be aborted while in buffer MAIN, but setting
the option FORBID EXIT to NO allows the edit to be closed from any
buffer.
!>
!<Interact

Bindings:                    VT220: Help
               All Other Terminals: Keypad -

This terminal performs various house keeping functions, which are
selected by typing the first letter of the appropriate menu entry.

!<Profile Operations

This presents the option of either Setting the options of this current
edit from a file, or Dumping the currently set options into a file for
later use.

Profile files are ordinary text files and are suitable for editing.

See the section on Profile Files for more details.
!>
!<Keyboard Operations

This presents the option of either Setting up the key to command
mapping from a file or Dumping the current mapping into a file for
later use.

Note that the keyboard file is a binary file and is not suitable for
editing.

Note also that keyboard files are generally terminal specific as most
terminals feature some keys that other terminals do not have, which
is the reason for having keyboard files in the first place!
!>
!<Set Modes

This allows the interactive manipulation of the profile options.  A
list of the options is displayed and the Up and Down Arrow keys can be
used to select which option to change.

For the YES and NO option either Y, N or D will change the value.  D
returns to the default setting.  For the numeric parameters, numbers
may be typed, terminated with RETURN.

Pressing RETURN goes back to the edit.

For a complete list of Profile Options, see the section on Profile
Files.
!>
!<Files

This prompts "File Spec: ".  If RETURN is pressed in response to this
the files in the current directory will be listed, in a system
specific manner.  If a file specification is given, then only the
files corresponding to this will be listed.

Bugs: On APM: Wild cards are not supported, the only valid file spec
              is a directory name.
!>
!<Display Keys

This allows a display of what keys are mapped to what functions.  The
classes of keys described in the section Keys can all be called up.

Pressing RETURN goes back to the edit.
!>
!<Operating System Specifics

All operating systems have their peculiarities and IE provides some
facilities that are dependent on these.

!<Under VAX/VMS

Notify

This allows the user to send broadcasts to other users, it prompts for
first the user name or the intended recipient, and then for the
message.
!>
!<On the APM

Quote Password

This allows the user to quote a password to the filestore, enabling
access to other directories.
!>
!<On VAX/UNIX

None at present.
!>
!>
!>
!<Define Key

Bindings:      All Terminals: Keypad Enter

This key is used to bind functions to keys.  It prompts for the key to
be defined and then provides a variety of options:

!<Letter

This prompts for the letter that the key is to map to.  This
command can be used for binding the TAB key to the ASCII HT character
by typing the TAB key to the "Press Letter: " prompt.  It is also
possible to move the letters around the keyboard if you do not like
the terminal's normal arrangement.
!>
!<Command

This allows the binding of keys to commands.  Note that ANY key,
including the letters, can be bound to a command.

A large menu of all the commands is presented divided up into sections
similar to those in this manual.  The four cursor keys can be used to
select the desired command, with movement wrapping at the edges of the
menu.

Pressing RETURN asssigns the command that is highlighted to the key.
Pressing Ctrl-Y leaves the key Undefined.
!>
!<K and Macro

This allows for sequences of keystrokes to be bound to one key.  There
are two methods of doing this.

The first is the KEYBOARD MACRO, selected by K.  Once this has been
selected the user performs the edit that is to be stored just as it
would be done normally, and any changes will happen.  When the
sequence is finished issue the Define Key command again to indicate
termination.

The second is an older and no longer recommended method for doing
anything other than tying keys to simple texts. The mapping for the 
macro is prompted for and must be typed on the message line.
!>
!<Query

This prints out the current key binding on the message line.
!>
!>
!<Panic!

Bindings:                    VT220: PF1 PF1
               All Other Terminals: ESC ESC

This resets all terminal modes, re-enables the keypad and redraws the
screen.  In case of corruption or using the terminal on another system
in the middle of an edit.
!>
!<Redraw

Bindings:      All Terminals: Ctrl-R

This redraws the screen should it become corrupt.
!>
!<Clear Broadcast

Bindings:      All Terminals: Ctrl-C

This command is only useful on VAX/VMS systems, where broadcast
messages are displayed on the top line of the window, in the Broadcast
Window.  This command cancels the broadcast window and returns the
line to useful editing service.
!>
!<Repeat Command

Bindings:                    VT220: Do
               All Other Terminals: Ctrl-N

This prompts for a command string, which should be typed in as if it
were being used to perform an edit.  This is terminated with RETURN,
if you wish to include RETURN keys in the repeated command, use Ctrl-P
before them.  After this is entered the prompt "Times: " appears an
either a *, meaning "until it fails" or a number may be typed here. 
The command is executed that many times.

Repeat executions may be interrupted using Ctrl-C.  This is not an IE
command but an operating system interrupt.  On VAX/VMS systems it is
echoed CANCEL in feature mode.
!>
!<NoOp

Bindings:                     VT220: Ctrl-S and Ctrl-Q
               All Others Terminals: N/A

This command is "No Operation", and is provided to bind to keys which
you type accidentally a lot and you do not want to have any effect. 
Setting them to Undefined will result in the terminal bell being
sounded when they are pressed.
!>
!<Debug

Binding:       All Terminals: Ctrl-\

This is a magic command used by the editor maintainers.  Mere mortals
will not be able to use it, or even bind keys to it.
!>
!<Shell Escape

Binding:    All Terminals: Ctrl-Z

This suspends the editor, allowing the user to perform other
operations and then return to the edit.

This is not supported on VAX/VMS.
!>
!<Shell Buffer

Binding:    All Terminals: Ctrl-D

This uses the contents of the current buffer as a "shell script" or
command file on the host system.    It is possible to specify
parameters to the script, and a name for an output buffer.  If a name
is given, then the output that would go to the terminal is sent to a
buffer of that name, otherwise the output is sent to the terminal.

This is not supported on VAX/VMS.
!>                              
!>
!<Duplication

IE uses the concept of a COPY POSITION for moving and copying lines
about a buffer, or between buffers.  The COPY POSITION is a buffer 
independent marker.

To use the facilities, set the COPY POSITION on the line below where
the insertion is to take place  and then move back to the source
position.

!<Set Copy Position

Bindings:      Visual 200: CP       
                Visual 55: F11
                  Wyse 75: PF3
                    VT100: PF3          
                    VT220: PF3

This sets the COPY POSITION on to the current line.
!>
!<Move Line

Bindings:      All Terminals: Function Keypad 5


This transfers the current line to above the COPY POSITION.  The
cursor moves to the next line at the same horizontal position.
!>
!<Duplicate Line

Bindings:      All Terminals: Ctrl-T


This duplicates the current line to above the COPY POSITION.  The
cursor moves to the next line at the same horizontal position.
!>
!>
!<Character Operations

The following commands operate on the characters in a line

!<Lower Case

Bindings:      Visual 200: F4       
                Visual 55: F5
                  Wyse 75: F5
                    VT100: F5           
                    VT220: F12

This converts the character under the cursor from UPPER CASE to lower
case.  The cursor is then moved to the right.

This command has no effect at the end of lines, but it performs the
cursor move on characters that are not letters 
!>
!<Upper Case

Bindings:      Visual 200: F5       
                Visual 55: F6
                  Wyse 75: F6
                    VT100: F6           
                    VT220: F11

This converts the character under the cursor from lower case to UPPER
CASE.  The cursor is then moved to the right.

This command has no effect at the end of lines, but it performs the
cursor move on characters that are not letters 
!>
!<Flip Case

Bindings:      Visual 200: F6       
                Visual 55: F7
                  Wyse 75: F7
                    VT100: F7           
                    VT220: F13

This converts the character under the cursor from lower case to UPPER
CASE or from UPPER CASE to lower case.  The cursor is then moved to 
the right.

This command has no effect at the end of lines, but it performs the
cursor move on characters that are not letters 
!>
!<Swap About

Bindings:      Visual 200: F7       
                Visual 55: F8
                  Wyse 75: F8
                    VT100: F8           
                    VT100: F14

This command swaps the two letters before the cursor around.  This is
useful for correcting typing mistakes like:

   Hosue          ->      House

In this case the cursor would be positioned on the 'e'.

This command has no effect if it appears at the start of the line, or
one character in on the line.
!>
!<Justify Line

Bindings:      NO DEFAULT BINDING

This command inserts spaces to justify the current line between the
settings of LEFT MARGIN and RIGHT MARGIN.

If the line is too long, then the line is unaffected.
!>
!>
!<Markers

Markers are a method of keeping track of places within a buffer. 
Markers are buffer specific; each buffer has its own list of markers.

!<Set Marker

Bindings:      Visual 200: F8             
                Visual 55: F9
                  Wyse 75: F9
                    VT100: Function PF3       
                    VT220: Function PF3
   
This prompts "Set Marker: " and the name of the marker, should be
typed after this.  The current line is then tagged with that name.
Names may be reused, with the old definitions being replaced.
!>
!<Jump to Marker

Bindings:      Visual 200: F9             
                Visual 55: F10
                  Wyse 75: F10
                    VT100: Function PF4       
                    VT220: Function PF4

This causes a list of markers and the lines to which they are attached
to be displayed, and then the Up Arrow or Down Arrow keys can be used 
to select which marker to jump to, then press RETURN.  Alternatively the 
name of the marker can be typed.   

If no markers exist an error message is displayed.

Bugs: If more than about 20 markers exist, not all are displayed.
!>
!>
!<Buffers

As mentioned in the introductory sections, files are stored as buffers
in IE.  The first file edited, given on the command line, is stored
in a buffer called MAIN.  However it is possible to load other files
and edit them concurrently.

When an edit is Closed the user is asked whether to write back each
modified buffer.  This can be prevented by setting the WRITE BACK
option to NO.

!<Select Buffer

Bindings:      Visual 200: F10         
                Visual 55: Ctrl-S
                  Wyse 75: F13
                    VT100: Ctrl-S          
                    VT220: Select

This displays a list of buffers and the names of the files they were
loaded from.  The Up Arrow or Down Arrow keys can be used to select
the desired buffer, then press RETURN to enter it.  Alternatively the
name of the buffer can be typed.  Editing is resumed at the point the 
buffer was left at.

Bugs: More than about 20 buffers are not displayed correctly.
!>
!<Get Buffer

Bindings:      Visual 200: F11      
                Visual 55: Ctrl-G
                  Wyse 75: F14
                    VT100: Ctrl-G       
                    VT220: F18

This command is used to load a file into a buffer.   The prompt
"Buffer Name: " appears first.  This is the name for use in Select and
Include Buffer.   Either you can invent a new name, or you can use the
name of the file to be loaded.  If the buffer name is given as the
name of a file that exists then the prompt "File Name (<FILE>): "
appears.  Pressing RETURN in response to this results in <FILE> being
loaded, where <FILE> is the expanded version of the buffer name.

If the buffer name is not a valid file name, however, the prompt is
simply "File Name: " and pressing RETURN returns to the edit.  Giving
a file name results in that being loaded.  If the given file does not
appear a report is given and the prompt is reissued.

To create an empty buffer use the system specific null device name as
the file name.  On VAX/VMS this is NL:, on the APM it is :N and on
VAX/UNIX it is /dev/null.
!>
!<Put Buffer

Bindings:      Visual 200: F12         
                Visual 55: Ctrl-O
                  Wyse 75: F15
                    VT100: Ctrl-O          
                    VT220: F19

This command is used to output the current buffer into a file. 
Applications of this are keeping backup copies or producing extracts. 
The prompt "File name for output (from <file>): " will appear, where
<file> is the name of the file that the buffer was read from.  If the
buffer was created then the part in brackets is omitted.   This is
NOT the default file name for output as this might case accidental
overwriting of files.  If RETURN is pressed at this point the edit
continues unaffected.   If a valid file name is given, followed by 
RETURN the buffer will be writen to that file.

On VAX/VMS systems all that is needed to write the buffer back to the
source file is to give the file name [], which results in all the
fields being filled in by default.
!>
!<Include Buffer

Bindings:      Visual 200: F13      
                Visual 55: Ctrl-]
                  Wyse 75: F16
                    VT100: Ctrl-]       
                    VT220: F20

The prompt "Buffer name: " is issued, and the buffer that is named is
copied into the current buffer above the current line.

This command cannot be used to include a buffer within itself.

Bugs: It does not provide a list of buffers to be selected with cursor
      keys, like Select Buffer.
!>
!>
!<Profile Files

It is impossible to please everyone, and very hard to please anyone! 
To this end IE has a number of options that can be set, either
interactively, or at the start of each edit via the Profile File
mechanism.  These can either be set up permanently, or set dynamically
either via the Interact/Profile Operations command, or by the 
PROFILE=<file> command line qualifier.

!<The File Itself

Profile files are simple text files, containing statements like:

   Show TAB = Yes
   TAB Width = 2

and comments, either introduced with ! or {, and terminated at the end
of the line.  Some options can be given the boolean values of YES or
NO, whereas some take numbers.

!<SHOW TAB

Default: NO

If this is set to NO then the positions that ASCII HT characters fill
on the screen are occupied with spaces.  If it is set to yes they are
filled with a graphics character: on the Visual 200 and Visual 55 
a small double dot character, on the others it is a composite HT
character.
!>
!<AUTO INDENT

Default:  YES

This controls whether new lines are automatically filled with spaces
out to the level of the surrounding lines.  This is most useful set to
YES for computer program writing, but is best at NO for plain text.
!>
!<AUTO LINE BREAK

Default: NO

This is used with the the RIGHT MARGIN option to allow the typing of
plain text without the necesity of pressing RETURN at the ends of
lines.  When it is switched to YES lines are automatically broken at
the start of the last word on the line.  For editing programming
language files this should be NO
!>
!<JUSTIFY

Default: NO

Used in conjunction with AUTO LINE BREAK at YES this causes lines 
typed in to be padded with spaces to file the space between LEFT 
MARGIN and RIGHT MARGIN.
!>
!<CASE SIGNIFICANCE

Default: NO

This determines whether the case of a search string matters, if it is
set to YES an exact match between the string and the text is required.
!>
!<SEARCH BEFORE REPLACE

Default: YES

This controls the behaviour of the Change Text command.  With the
deafult value of YES, then the Change Text command prompts for a
search string and a replacement string.  Setting the SEARCH BEFORE
REPLACE option to NO means that the command only needs a replacement
string and replaces the last Search or Backwards Search string.
!>
!<FREE CURSOR

Default: NO

This affects the horizontal movement of the cursor when it is moved
vertically.  If FREE CURSOR is set to YES then the cursor will move
straight up and down without being constrained to be within the text,
which is the case with the default value of NO.
!>
!<WRITE BACK

Default: YES

This affects the fate of buffers when the edit is closed.  If WRITE
BACK is set to NO then the contents of the buffers is thrown away if
changed.  The normal value of YES means that the user will be prompted
per changed buffer as to whether it should be written back or not.
!>
!<BEEP MUTE

Default: NO

This is a bizarre option put in at the request of Anti-Noise-
Pollutionists.  Normally IE beeps on errors, but if this option is set
to YES it is as quiet as the tomb.
!>
!<FORBID EXIT

Default: YES

The default state of this option prevents edits from being closed or
aborted from any buffer but the main one.
!>
!<WIGGLE MODE

Default: NO

This controls the horizontal motion of the cursor while it moves
vertically.  If the line it moves to is shorter, then the cursor is
constrained to within the text on that line, but will jump back to
the further out position when moved agin onto a longer line.
!>
!<WRAP SEARCH

Default: NO

This controls the behaviour of the Search and Backwards Search
commands.  If the text is not found in the normally searched section
of the text, the search wraps round the end of the buffer and works
towards the starting point.

If both WRAP SEARCH and BACK SEARCH are enabled, WRAP SEARCH takes
place.
!>
!<BACK SEARCH

Default: NO

This controls the behaviour of the Search and Backwards Search
commands.  If the text is not found in the normally searched section
of the text, the other half is search backwards from the starting
point.

If both WRAP SEARCH and BACK SEARCH are enabled, WRAP SEARCH takes
place.
!>
!<TAB WIDTH

Default: 3

This controls the width of the internal TAB settings, as used by the
Insert TAB and Back TAB commands.
!>
!<BEEP COLUMN

Default: Terminal Width less 5 characters

Like a typewriter IE gives a beep to warn oh the end of the line
approaching.   This option specifies the column number at which
to go beep.
!>
!<LEFT MARGIN

Default: 1

This is used when AUTO INDENT is NO to determine where to put the
cursor when starting a new line.
!>
!<RIGHT MARGIN

Default: Terminal Width

This is used by the AUTO LINE BREAKing and JUSTIFYing facilities to
determine where to break the line.
!>
!<JOURNAL FREQUENCY

Default: 0

This controls the frequency of Journalising.  If it is set to 0 then
journalising is disabled.  See the section on Journalising for more
details.
!>
!<WINDOW TOP

Default: 0

This tells the editor which line to use as the top of the display
window.
!>
!<WINDOW BOTTOM

Default: 23

This tells the editor which line to use as the bottom of the display.

On the APM the default value is set from the operating system height
setting.
!>
!<EOF MARKER

Default: Terminal Dependent

Cascade sells things like personalised golf tees, pound coin holders,
etc.  In this rather silly vain IE allows the user to change the
symbol used at the end of buffers.

This string is TERMINAL DEPENDENT, as it is output, raw, in the
terminals graphics mode.  If you are a terminal oriented hacker then
go right ahead and have a different marker for each profile file!

Control characters are NOT displayed.
!>
!>
!<Setting up your profile under VMS

There are three ways of telling IE about where to find your profile
file:

Qualifier:     The qualifier /PROFILE=<file name> can be used at 
               each edit.  It overrides other methods.  Note that 
               /NOPROFILE can also be useful if there is a problem 
               with the defined profile file.

Logical Name:  Defining the logical name IE_PROFILE to point to your
               profile file is a method that avoids typing it with
               every command.  It is also independent of default 
               directory.

Default File:  If a file called PROFILE.IE exists in the current
               default directory then this is used, unless either of
               the two previous methods have been employed.  This is
               useful if you flit from directory to directory and
               perform different activities in each, for example
               programming and documenting.
!>
!<Setting up your profile on the APM

Qualifier:     The -PROFILE=file qualifier can be used to specify the
               profile file for an edit.  All edits after this will
               employ the same profile.

Default File:  If a file called PROFILE.IE exists in the current
               directory then that is used, or if not a file called
               PROFILE.IE in your login directory will be used.
!>
!<Setting up your profile under UNIX

Qualifier:     The -PROFILE=<file> switch can be used to specify the
               profile for a one off edit.

Default File:  If a file called .IE_PROFILE exists in your working
               directory this is used.  If not, then the file
               .IE_PROFILE in your login directory is used.
!>
!>
!<Keyboard Files

Keyboard files are used to map terminal keys to editor functions. 
Each terminal type must have its own keyboard file.  In addition
users can tailor their keyboard files, and then keep them.  

These are binary data files and as such are not suitable for editing,
they should be created using the Dump Keyboard command within the 
Interact command.

!<Setting up your own keyboard file under VAX/VMS

Qualifier:     The command line qualifier /KEYBOARD=<file> can be used
               to specify a one off keyboard file usage.

Logical Name:  If you only ever use one terminal then the logical name
               IE_KEYBOARD can point to the keyboard file.  If however
               you use different terminals a further mechanism is
               provided.

               IE uses the 3-L terminal type support to determine
               what model is in use.  This is an extension to the
               existing VMS terminal types that allows "oid" terminals
               to be fully supported.  For example a Visual 200 is a
               VT52oid terminal, so VMS believes that it is a VT52. 
               Defining the logical TT_MAP_VT52 to be VISUAL200 tells
               IE that all VT52 terminals are in fact Visual 200s on
               this system.  Similarly with TT_MAP_VT100 set to 
               WY75.  For standard DEC terminals, such as VT100s, 
               no TT_MAP_ name is set up.
               
               To set up a keyboard file, the terminal map name is 
               used in another logical name to point to the keyboard 
               file.  For the Visual 200 example the name would be 
               IE_VISUAL200_KEYBOARD.  The complete list is as
               follows:

                  IE_VISUAL200_KEYBOARD
                  IE_VISUAL55_KEYBOARD
                  IE_WY75_KEYBOARD
                  IE_VT100_KEYBOARD
                  IE_VT220_KEYBOARD

Default File:  If the file KEYBOARD.KIE exists in the current
               directory then this is used.
!>
!<Setting up your own keyboard file on the APM

Qualifier:     The command line qualifier -KEYBOARD=<file> can be used
               to specify the keyboard file once.  All subsequent
               edits will use this keyboard file.

Default File:  The file KEYBOARD.KIE in the current directory will be
               used, or if that does not exist the file KEYBOARD.KIE in
               the login directory.
!>
!<Setting up your own keyoard file under UNIX

Qualifier:     The command line switch -KEYBOARD=<file> can be used to
               give a one off keyboard file setting.

Environmental Variable:
               The environmental variable IE_KEYBOARD is the name of
               a directory which contains keyboards files called by
               the terminal mnemonic: V200, VT220, WY75 etc.
!>             
!>
!<Journalising

It is a sad fact of computer life that things will always gow rong
(sic).  Various things can be at fault: lightning, disk crashes,
operating systems failures, roadworks digging up networks or even bugs
in the editor.

When any such nasty event takes place there is potential for loosing
edits, so IE provides a method of recovering an edit.  This is called
journalising, and when enabled a record of all the commands and text
typed to the editor is stored, and can be played back later.

To switch journalising on the option JOURNAL FREQUENCY should be set
to a non-zero value.   The number you choose is in fact the number of
key strokes that are buffered up before writing them out to disk.  If
the value 1 is used then ever key stroke will be kept, however this
will have a very high serious effect on performance with long pauses
between key strokes on a loaded system.  A typical value is 16 or 32,
which means that an edit will be recoverable up to worst 16 or 32 key
strokes behind.

When an edit is closed normally the journal file is deleted, but on an
abort it is kept so that if you REALLY did not mean to say Ctrl-Y and
then Y you can recapture the edit.

The command line qualifier RECOVER is used to rerun the edit, but it
is a good idea to perform some system dependent wizardry first.

!<Recover under VAX/VMS

The logical name IE_JOURNAL gives the name of the journal file, which
is normally SYS$LOGIN:JOURNAL.IE.  If you wish to move this redefine
the logical name, but it is ESSENTIAL that there is no version number
on the file name.  The command line qualifier /JOURNAL=<file> can be 
used to specify a one off journal file.

Before invoking the recover edit it is a good idea to copy the journal
file to a safe place:

   $ COPY IE_JOURNAL;2  Safe_Directory:SAVED.IEJ

It is very easy to make mistakes recovering edits!  Notice that the ;2
is ESSENTIAL after the IE_JOURNAL in this copy statement

Now use EXACTLY the same command line for the edit as before, except
add the qualifier /RECOVER.

A check is made to see if the source file, profile file and keyboard
file are the same as before to prevent running the wrong journal on a
file.  If you do actually want to use a different configuration use 
the /IGNORE qualifier to do this.

If the first recovery does not succeed for some reason, copy the saved
journal back to the original site:

   $ COPY Safe_Directory:SAVED.IEJ IE_JOURNAL;2

and try again.  You will probably have figured out what the difference
was.
!>
!<Recover on the APM

The journal file is normally kept in a file IE_JOURNAL in the current
directory, but the command line qualifier -JOURNAL=<file> can be used
to change this.  The new value will be used for each edit after the
first automatically.

Before invoking the recover edit it is a good idea to copy the journal
file to a safe place:

   } T IE_JOURNAL/SAVED_JOURNAL

It is very easy to make mistakes recovering edits!

Now use EXACTLY the same command line for the edit as before, except
add the qualifier -RECOVER.

A check is made to see if the source file, profile file and keyboard
file are the same as before to prevent running the wrong journal on a
file.  If you do actually want to use a different configuration use 
the -IGNORE qualifier to do this.

If the first recover does have problems the copy the saved version
back to the original file:

   } T SAVED_JOURNAL/IE_JOURNAL

and try again - you will probably have worked out what was wrong last
time.
!>
!<Recover under UNIX

This is not yet supported.
!>
!<Problems with journalising

The two items are not so much bugs as problems inherent to the concept
of journalising.  Why not use a better scheme you cry, well suggest
one please.

!<Multiple Users

If several people are logged in as the same user or are working in
the same directory then each one, except the first, will have to make
provision for using a differently named journal file.
!>
!<Writing out buffers

If the Put Buffer command is used to write buffers back on top of the
original file all hell will be let loose if you try and rerun the edit
as some changes will already have been made.  This is normally only
used as a backup method.  If you really do want the belt and braces of
both journalising and backup copies, put the backups somewhere else.
!>
!>
!>
!<Calling IE from programs
IE is an %external %routine and may be called from other programs that need to
perform editing.   

It is also possible to get IE to display a message in the Broadcast Window when 
the edit starts up - very useful for displaying error reports when calling IE
from a compiler.

The following declarations are in an include file:

!PAGE
%constant %integer abort
      ! If the user aborts his edit or a fatal condition arises IE
      ! %signals abort.
   
%constant %string (15) Version
      ! This is the version code of the editor that you will be using.

%constant %integer Silent
%constant %integer Confirm
%constant %integer Deaf
%constant %integer Reset Heap
%constant %integer Recover Edit
%constant %integer Ignore Differences
%constant %integer Adopt Defaults
   ! These are options for use when calling IE
   !    Silent     - suppresses the printing file loading/writing messages
   !    Confirm    - asks if the user really wants to before Aborting
   !    Deaf       - suppresses any broadcast messages appearing
   !*   Reset Heap - this causes IE to restore its claimed heap space         *
   !*                at the end of an editing session.  When used stand alone *
   !*                it does not bother but any other program using the heap  *
   !*                or likely to call the editor more than once MUST supply  *
   !*                this option.                                             *
   !     Recover Edit         \
   !     Ignore Differences    |    These are used for recovering edits
   !     Adopt Defaults       /

!PAGE
%external %routine %spec IE editor %alias "IE_EDITOR" %c
                                   (%string (127) in file, out file,
                                    %integer window top, window bottom,
                                    %integer %name start line, start pos,
                                    %string (127) profile,
                                                  keyboard,
                                    %integer options)
   ! This is the editor itself, the parameters aree as follows:
   !    In File       - The source file, creates output if null
   !    Out File      - The output file, read only if null
   !    Window Top    - Top line of the screen to use 0 to 12
   !    Window Bottom - Bottom line of the screen to use
   !    Start Line    - Line of file to start on, returns line at end (starts at
   !                    line 1.
   !    Start Pos     - Column of line to start on, returns position at end
   !                    (starts at 1)
   !    Profile       - Profile file - no profile if null
   !    Keyboard      - Keyboard File - this MUST be filled in.
   !    Options       - Bits set as above

%external %string (255) %function %spec Default Profile %alias "IE_DEF_PRO"
%external %string (255) %function %spec Default Keyboard %alias "IE_DEF_KEY"
   ! These provide values for the Profile and Keyboard parameters for
   ! IE as they would be filled in by the editor called as a command.

!PAGE

! Terminal model control:

%external %integer %function %spec Default Terminal %alias "IE_DEF_TER"
%external %byte %spec Terminal Model %alias "IE_TT_MODEL"
   ! The variable Terminal Model must be assigned the value of Default
   ! Terminal, or one of the following values:

%constant %integer Visual 200      
%constant %integer Visual 55
%constant %integer VT100
%constant %integer VT220
%constant %integer Freedom 100
%constant %integer WY 50
%constant %integer WY 75

%external %routine %spec set up terminal %alias "IE_SET_UP_TERMINAL"
   ! This routine must be called before calling IE.

%external %routine %spec reset terminal  %alias "IE_RESET_TERMINAL"
   ! This routine must be called after calling IE. 

!PAGE
%external %string (255) %spec Journal File %alias "IE_J_FILE"
%external %string (255) %function %spec Default Journal %alias "IE_DEF_JOU"
   ! If journalising is to be used the string must be filled in with a
   ! valid file name, normally provided by this routine.

!PAGE
%external %routine %spec Receive Broadcast %alias "IE_BROADCAST" %c
                                           (%string (255) Message)
   ! If this is called before IE Editor itself the Message will appear as a
   ! broadcast message at the top of the screen when the edit starts up.
   ! Very useful when integrating the editor into a compiler.

%external %integer %spec Main Buffer Changed %alias "IE_CHANGED_FLAG"
   ! This variable is set to non-zero if the main buffer of the edit
   ! has been altered.

%record %format Preload fm (%string (32) Buffer Name,
                            %string (255) File Name,
                            %record (Preload fm) %name Next)
%external %record (Preload fm) %name %spec Preloads %alias "IE_PRELOADS"
   ! It is possible to have IE automatically preload buffers.  To do
   ! this create a list of Preload fm records and point this name at
   ! them.
!<On VAX/VMS

The include file is in ECS_TEXT:[IE]IE.INC, and it is  necesary to
link with ECS_TEXT:[IE]IE/Lib.
!>
!<On the APM

The file INC:IE.IMP provides the above declartions.  All the routines
are already Installed.
!>
!<Under UNIX

It is not part of the UNIX karma to call editors as subroutines,
rather they are envoked as subprocesses, and the user can select which
editor to use.
!>
!>
!<Keypad Layouts

The following graphical plans are provided as a help to remembering
the location of the various functions in the standard keyboard
definitions.

!<Visual 200

                  +------------+-------------+------------+
                  |Restore All |Overwrite Mod|Search Again|
                  |            |             |            |
                  |Insert Line |Insert Mode  |Search      |
                  +------------+-------------+------------+
                  |Restore Line|Move Line    |Change Again|
                  |            |             |            |
                  |Delete Line |Delete Char  |Change Text |
                  +------------+-------------+------------+
                  |Erase To End|Delete To End|Start Of Pag|
                  |            |             |            |
                  |End Of Line |End Of File  |End Of Page |
                  +------------+-------------+------------+
                  |            |Abort Edit   |Scroll Up   |
                  |            |             |            |
                  |Start Of Lin|Close Edit   |Scroll Down |
                  +------------+------+------+------------+
                  |                   |                   |
                  |                   |                   |
                  |Interact           |Define Key         |
                  +-------------------+-------------------+
!>
!<Visual 55

         +------------+------------+------------+------------+
         |Restore All |            |Search Again|            |
         |            |            |            |            |
         |Insert Line |Toggle Mode |Search      |Interact    |
         +------------+------------+------------+------------+
         |Restore Line|Move Line   |Change Again|            |
         |            |            |            |            |
         |Delete Line |Delete Char |Change Text |Close Edit  |
         +------------+------------+------------+------------+
         |Erase To End|Delete To En|Start Of Pag|            |
         |            |            |            |            |
         |End Of Line |End Of File |End Of Page |            |
         +------------+------------+------------+            |
         |                         |            |            |
         |                         |            |            |
         |Start Of Line            |Scroll Down |Define Key  |
         +-------------------------+------------+------------+
!>
!<Wyse 75
         +------------+------------+------------+------------+
         |            |Delete To St|            |            |
         |FUNCTION    |            |            |            |
         |            |Start Of Fil|Set Copy Poi|Clone Line  |
         +------------+------------+------------+------------+
         |Restore All |Overwrite Mo|Search Again|            |
         |            |            |            |            |
         |Insert Line |Insert Mode |Search      |Interact    |
         +------------+------------+------------+------------+
         |Restore Line|Move Line   |Change Again|            |
         |            |            |            |            |
         |Delete Line |Delete Char |Change Text |Close Edit  |
         +------------+------------+------------+------------+
         |Erase To End|Delete To En|Start Of Pag|            |
         |            |            |            |            |
         |End Of Line |End Of File |End Of Page |            |
         +------------+------------+------------+            |
         |Erase To Start           |Scroll Up   |            |
         |                         |            |            |
         |Start Of Line            |Scroll Down |Define Key  |
         +-------------------------+------------+------------+
!>
!<VT100
         +------------+------------+------------+------------+
         |            |Delete To St|            |            |
         |FUNCTION    |            |            |            |
         |            |Start Of Fil|Set Copy Poi|Clone Line  |
         +------------+------------+------------+------------+
         |Restore All |Overwrite Mo|Search Again|            |
         |            |            |            |            |
         |Insert Line |Insert Mode |Search      |Interact    |
         +------------+------------+------------+------------+
         |Restore Line|Move Line   |Change Again|            |
         |            |            |            |            |
         |Delete Line |Delete Char |Change Text |Close Edit  |
         +------------+------------+------------+------------+
         |Erase To End|Delete To En|Start Of Pag|            |
         |            |            |            |            |
         |End Of Line |End Of File |End Of Page |            |
         +------------+------------+------------+            |
         |Erase To Start           |Scroll Up   |            |
         |                         |            |            |
         |Start Of Line            |Scroll Down |Define Key  |
         +-------------------------+------------+------------+
!>
!<VT220
         +------------+------------+------------+------------+
         |            |Delete To St|            |            |
         |FUNCTION    |            |            |            |
         |            |Start Of Fil|Set Copy Poi|Clone Line  |
         +------------+------------+------------+------------+
         |Restore All |Overwrite Mo|            |            |
         |            |            |            |            |
         |Insert Line |Insert Mode |Search Again|Restore Line|
         +------------+------------+------------+------------+
         |Restore Line|Move Line   |            |            |
         |            |            |            |            |
         |Delete Line |Delete Char |Change Again|Close Edit  |
         +------------+------------+------------+------------+
         |Erase To End|Delete To En|Start Of Pag|            |
         |            |            |            |            |
         |End Of Line |End Of File |End Of Page |            |
         +------------+------------+------------+            |
         |Erase To Start           |Scroll Up   |            |
         |                         |            |            |
         |Start Of Line            |Scroll Down |Define Key  |
         +-------------------------+------------+------------+
!>
!>
!<Trademarks

UNIX is a trademark of AT&T Bell Laboratories.

VAX, VMS, DEC, VT52, VT100, VT220 are trademarks of the Digital
equipment corporation.

3-L is a trademark of Lattice Logic Ltd.
!>
