1 Primer
    The command VECCE (or just V) invokes the VAX version of the
 screen-oriented implementation of the editor ECCE which is also available
 on EMAS and the Computer Science Department's Advanced Personal Machines.
 
 The Editor is invoked by commands of the form:
    V*ecce  old       to update an existing file 'old', creating a new version
    V*ecce  old new   to edit an existing file 'old' to a new file 'new'
    V*ecce  .N new    to create a new file 'new'
    V*ecce  new             "
    V*ecce  old .N    just to inspect an existing file 'old'
    V*show  old            "
   { NL: may be used in place of .N }
 
 Full Help information is available within the Editor through the %H command
 
2 Getting_Started
    Try editing an old file by (for example)

         $ Ve old.for nl:

    This will throw away the changed file. You will see a command line with
 a prompt ">>" at the bottom of the screen and the first 20 lines of the
 file in the rest. There will be a "file pointer" at the top left which
 marks the current position within the file. 

    If you have ever used ECCE you are off to a good start since  VECCE is
 a superset of ECCE and  almost all ECCE commands will work. To get a list
 of commands, type %H from within VECCE (which gives you comprehensive
 on-line  help information) and read section 5.
 
    At first try using a simple subset such as:

   Mn      move down n lines          M-n      up n lines
   Rn      move right n characters    Ln       Left n characters
   Kn      Kill n lines               Gn       Get (enter) n lines of text
   I/text/ inserts "text"             En       Erase (delete) n characters 
   F/text/ finds (moves file          S/text1/ Substitutes "text1"
           pointer to) "text"                  for "text" last Found.
   %c      Close the edit             %a       Abandon edit
   %H      Give full help information
   %B      Backup (save edit)
2 Control_Keys
   There will be several keys on the terminal which act as "control keys",
 but holding down "Ctrl" and pressing any other key or pressing "ESC"
 followed by any key have the same effect.

   They perform VECCE  commands as if they  had been typed as a normal
 command string except that the editing command takes effect immediately
 without the need to press RETURN. The effect of each key varies from
 terminal to terminal, although many are common to all. 

    Most commonly used are the "arrow keys" which move the file pointer. A
 most useful command when used in conjunction with these is 'H', usually
 available via the the key marked 'HOME'. This moves as far as possible in
 the direction of the last 'arrow' key, that is to the beginning or end of
 the line or to the top or bottom of the screen. Further, if the file
 pointer is at the top/bottom of the screen it will move up/down one full
 screen.

   There is also a key which toggles the editor into and out of DATA ENTRY
 mode. Any text typed in this mode becomes part of the file at the position
 of the cursor and any text or blank lines already present are overwritten.
 Thus you can not type commands when in DATA ENTRY mode but  access to
 editor functions is still available through the control keys, which will
 work as they did in command mode. With practice, almost all simple editing
 can be done using control keys in DATA ENTRY mode.

    The following section list the standard key definitions for each
 terminal as well as ones common to all. The control and escape sequences
 are for the most part the same for all terminals.  Only the VECCE command
 is shown; it is assumed that you know the meaning of the symbols. Refer to
 section 5 of the full help info for an explanation of these commands.

3 CONTROL_KEYS
 Hold 'CTRL' down while pressing key

 A   : ^m^iX - Duplicate current line
 C   : C     - Change CASE of next character
 E   : E*    - ERASe to end of line
 F   : F!S!(F"S")0 - Global 'FIND and substitite'
 L   : L0    - Go to start of line
 Q   : I-1   - Get back 1 erased character
 R   : R0    - Go to end of line
 S   : i/ /  - Insert SPACE ***** ON A PAD CTRL s cannot be used as it is XOFF**
 W   : I-0   - Get back ALL erased characters
3 ESCAPE_KEYS
 Press 'ESC' followed by key                 

 A  :  %a - Abandon edit                     
 B  :  b  - Break line                       
 C  :  %c - Close edit                       
 J  :  j  - Join line to next                
 P  :  P20- print 20 lines                   
 S  :  I/ /-Insert space
 U  :  U! - Uncover text                     
 1  :  O-*- Undo last change                 
 #  :  #! - Go to line                       
 O  :  |n|- Delete next word                 
 $  :  $  - Switch to/fro sec. input         
 ^  :  ^  - Set marker                       
 =  :  =  - Move cursor to marker            
 ESC:  G- - Get back deleted line            
 "  :  I" - Insert same text last inserte    
 X  :  iX - Insert text macro X (defined by ^)
3 VT_200
 ---------------------------------       VT 220 Keypad Definitions
 |  I-0  |  E0   |  G-   |   K0  |
 ---------------------------------       
 --------------------------------- 
 |   I!  |   E   |L0BM- a|   K   | 
 |-------|-------|-------|-------|    a - L0BM-  get new line above FP
 |   F!  |   F"  |  F-!  |  F-"  |       
 |-------|-------|-------|-------|    b - Toggle INSERT/REPLACE data mode
 |   S!  |  S"   |   B   |  ~   b|
 |-------|-------|-------|-------|       
 |   J   |  M-0  |  M0   | DATA  |       
 |-------|-------|-------| ENTRY |       
 | R0B (new line)|  %D   | MODE  |       
 ---------------------------------       
3 Esprit
 ---------------------------------       Hazeltine Keypad Definitions
 |       |   <   |   >   | G (K) |
 |-------|-------|-------|-------|         The commands in brackets 
 | H (m0)|   {   |   }   |I! (E1)|         are generated by the
 |-------|-------|-------|-------|         'shifted' function key.
 |   F!  |   F"  |  F-!  |  F-"  |       
 |-------|-------|-------|-------|
 |  N-   |  S"   |  I!   |       |
 |-------|-------|-------|-------|       
 |  S!   |  M-0  |   K   | DATA  |       
 |-------|-------|-------| ENTRY |       
 | R0B (new line)|  %D   | MODE  |       
 ---------------------------------       
3 Newbury
   -----------------------------------------------------------------------
   |DEL |INS |DEL |INS |DEOL|SEND|    |    |    |HOME| <  | ^  |    | >  |
   |CHAR|CHAR|LINE|LINE|    |LINE|    |    |    |    |    |    |    |    |
   -----------------------------------------------------------------------
   -----------------------------------------------------------------------
E+K| F! | F" | F-!|F-" | S! | S" |    |    |    | M0 |    |    |    |    |
S E|    |    |    |    |    |    |    |    |    |    |    |    |    |    |
C Y-----------------------------------------------------------------------
 K | E1 | I! | K  |L0B{|DATA| %D |    |    |    | H  | <  | {  |  } | >  |
 E |    |    |    |    |ENT.|    |    |    |    |    |    |    |    |    |
 Y -----------------------------------------------------------------------
      Pressing the key shown gives the command on the lower line while
  pressing 'ESC' followed by the key gives the upper line.
3 BBC/VT52 emulator
      -------------------------------------------------------------
 Ctrl |  F" | F-" |  S" |L0BM-|  I! | O-0 | R0  | M0  | {H  |%D22 |
 +fn  |     |     |     |     |     |     |     |     |     |     |
      |-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
 Fn   |  F! | F-! |  S! |  K  |  E  | I-0 | L0  | M-0 | }H  |DATA |
 0-9  |     |     |     |     |     |     |     |     |     |ENTRY|
      -------------------------------------------------------------
   Press 'Ctrl' with the function key to give the upper line of commands.

     ************************************************************
     !   MAKE SURE THAT THE TERMINAL IS IN VT52 EMULATION MODE  !
     !          BEFORE ATTEMPTING TO ENTER THE EDITOR           !
     ************************************************************
3 BBC/XTALK
      -------------------------------------------------------------
 Fn   |  F! | F"  | F-! | F-" | I!  |  E  |L0BM-|  K  | %D  |DATA |
 0-9  |     |     |     |     |     |     |     |     |     |ENTRY|
      -------------------------------------------------------------

     ************************************************************
     !   MAKE SURE THAT THE TERMINAL IS IN XTALK MODE           !
     !          BEFORE ATTEMPTING TO ENTER THE EDITOR           !
     ************************************************************
2 Changing_Key_Definitions
   The command VECCE invokes the editor in its 'naked' form.  The terminal
 type is set by the SET TERMINAL/DEV= ? command and given by SHOW TERMINAL.
 The terminal type is set up at login according to your reply to the
 'Terminal' prompt.

    If this 'raw' form of VECCE is used, the key definitions for most
 terminals are somewhat arbitrary. The command V(ec)  avoids this problem
 by setting up pre defined control key macros.

  The default definitions may be overridden and new keys defined using the
 command %K{key}:{vecce command} and interrogated with %Q{key}. For full
 details see the VECCE manual, available online via %H. Using this
 mechanism you can tailor the editor to your requirements.

   The files of key definitions are accessed via the logical name ECCE_PRE
 which is initially set up to point to the file ECCE:PREDEFS. There are in
 fact several such files, one for each terminal type with the different
 extensions '.haz' {esprit}, '.new' {newbury'}, '.VT52', '.VT100', '.BBCX',
 '.VI200' {Visual 200}, '.VI50' {Visual 50/55} so that for (eg) a hazeltine
 esprit VECCE looks for the PRE file ECCE:PREDEFS.HAZ. However If you have
 generated a file of key definitions  using %P MYDEFS.HAZ, the statement

$ DEFINE ECCE_PRE USER:[MYNAME]MYDEFS

  will make the editor use the definitions in 'MYDEFS.HAZ' instead of the
  default ones for an ESPRIT terminal.  The command V(ec) for an ESPRIT
  is simply:

  V*EC == "VECCE/PREDEF_FILE=ECCE_PRE:.HAZ"

  and is set up by TERMSET when you login.  Similarly for other terminals.
2 Adding_New_Terminals

   VECCE will drive most terminals with an EMAS TERMINALTYPE number.
 Do not despair if your terminal does not work in screen mode as VECCE
 can set itself up from the terminal data in the system or private
 TERMTABLE database. How to write and compile a new entry is described
 in the VAX/VMS run time library manual. Once you have made a
 TERMTABLE.EXE file with the terminal definition for 'MYTERM', define
 the logical name TERM$TABLOC to point to the directory where it is
 found. Then
$ SET TERMINAL/DEVICE=MYTERM will work and so will VECCE.

3 Writing_a_TERMTABLE_entry_for_VECCE

   This section assumes that you have read the section on writing a
 TERMTABLE entry in the VAX/VMS RTL manual in the section dealing with
 the SMG$ routines.
 
   To work at all VECCE requires (in addition to the name) direct
 cursor addressing, defined by the capability SET CURSOR ABS. In this
 case the ROWS and COLUMNS attributes must also be set to the
 dimensions of the terminal.  At this level the performance is poor,
 but will be enhanced by the erase_to_end_display and
 erase_to_end_line capabilities.
 
   VECCE is much more effective when it can scroll parts of the
 screen. The preferred method of doing this is in a DEC VT100 like
 manner which requires that SET_SCROLL_REGION, SCROLL_FORWARD and
 SCROLL_REVERSE are defined. Alternatively scrolling may be achieved
 via the INSERT_LINE and DELETE_LINE commands. These functions may
 require padding which can be achieved by including '^@'s in the text
 string.
 
   The 'hilight' mode of displaying the file pointer is preferable to
 the 'mark' mode (see manual) which requires some stand-out  attribute
 to be set. Vecce looks for BEGIN_REVERSE, BEGIN_BOLD, BEGIN_UNDERLINE
 and BEGIN_BLINK in that order and uses BEGIN_NORMAL_RENDITION to
 switch off the attribute.
 
   The attributes SET_APPLICATION_KEYPAD and SET_NUMERIC_KEYPAD are
 used to set the keypad of your terminal in and out of special mode.
 If padding on newline is required, this is provided via SMG_LF_FILL
 and the pad  character (if non-zero) is set by SMG_PAD_CHAR. Finally
 the KEY_*_ARROW attributes are interrogated in order to set up the
 arrow keys.
