From:	HENRY::IN%"GREGG%nemo.math.okstate.EDU%relay.cs.net@RCA.COM" 31-OCT-1987 19:22
To:	VI-TO@nemo.math.okstate.edu
Subj:	VI part 4 of 14

....................... Cut between dotted lines and save ......................
$!..............................................................................
$! VAX/VMS archive file created by VMS_SHAR V-4.03 05-Aug-1987
$! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au)
$! To unpack, simply save and execute (@) this file.
$!
$! This archive was created by GREGG
$!      on Tuesday 20-OCT-1987 22:24:01.46
$!
$! It contains the following 1 file:
$! VI.RNO
$!==============================================================================
$ Set Symbol/Scope=(NoLocal,NoGlobal)
$ Version=F$GetSYI("VERSION") ! See what VMS version we have here:
$ If Version.ges."V4.4" then goto Version_OK
$ Write SYS$Output "Sorry, you are running VMS ",Version, -
                ", but this procedure requires V4.4 or higher."
$ Exit 44
$Version_OK: CR[0,8]=13
$ Pass_or_Failed="failed!,passed."
$ Goto Start
$Convert_File:
$ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1: Define/User_Mode SYS$Output NL:
$ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' -
        VMS_SHAR_DUMMY.DUMMY
f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f);
o:=Get_Info(Command_Line,"Output_File");Set (Output_File,b,o);
Position (Beginning_of(b));Loop x:=Erase_Character(1); Loop ExitIf x<>"V";
Move_Vertical(1);x:=Erase_Character(1);Append_Line;Move_Horizontal
(-Current_Offset);EndLoop;Move_Vertical(1);ExitIf Mark(None)=End_of(b)
EndLoop;Exit;
$ Delete VMS_SHAR_DUMMY.DUMMY;*
$ Checksum 'File_is
$ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2: Return
$Start:
$ File_is="[.DOC]VI.RNO"
$ Check_Sum_is=477550908
$ if f$search("DOC.DIR;1") .eqs. "" then -
     CREATE/LOG/DIRECTORY [.DOC]
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X.ifnot system
X.! VI.RNO - Installation and help for VI emulation in TPU
X.! Written by Gregg Wonderly 22-JUL-1987
X.!
X.! RUNOFF operation instructions:
X.!
X.!     $ @VIDOC.COM
X.!
X.!   to create a document for printing.
X.!   
X.! We set the layout so that running page numbers are on the bottom
X.!
X.lo 1,2
X.st
X.!
X.! Initial right margin - sections should never set it higher than this.
X.! Set page size too.
X.ps 57,70 .rm 65
X.!
X.! Header level setup
X.sthl 6,0,0,8,9,1,1,9,2
X.dhl D,D,lu,d,ll,ll
X.!
X.!
X.flags bold
X.flags overstrike
X.!
X.c;                                             
X.sk 2
X.c;Guide for VI written in TPU
X.title Guide for VI written in TPU
X.sk 2
X.c;Gregg Wonderly
X.c;Mathematics Department
X.c;Oklahoma State University
X.sk 1
X.c;22-Jul-1987
X.else system
X.NO FLAGS ALL
X.P0
X.ap
X.NO NUMBER
X.NPA
X.LM1.RM70
X.I-1
X1 VI
X.s
XVI is a text editor written in TPU, for more background information,
Xsee "HELP VI Introduction".
X.s
X.endif system
X.!
X.ifnot system
X.pg
X.hl 1 ^*Table of contents\*
X.req "vi.rnt"
X.pg
X.send toc .ifnot global
X.hl 1 ^*Purpose of this document\*
X.send toc .endif global
XThis document provides an overview of this particular emulation
Xof the VI editor.  It does not provide information on learning to
Xuse the VI editor.  It is assumed that the reader knows how to use VI to a
Xreasonable extent, and/or has access to a VI manual or quick reference guide.
X.send toc .ifnot global
X.hl 1 ^*Introduction to VI\*
X.send toc .endif global
X.!
X.else system
X.!
X.i-1
X2 Introduction
X.s
X.endif system
X.!
XVI is an editor which was originally written by Bill Joy at the University
Xof Berkeley in California.  It was written to work on the UNIX (UNIX is a
Xtrademark of the American Telephone and Telegraph Corporation) operating
Xsystem, and until now, has not been widely available on other operating
Vsystems.  VI is an excellent editor, but its full potential can not be realize
Xd 
Xwithout a full understanding of the commands that are available.  Currently,
Xthis help file does not describe all of the keystrokes that are defined.
XYou should consult one of the many VI quick reference guides for that
Xinformation.  This version of VI should be close enough to the real version
Xthat the documentation of the additional features here, and a VI quick
Xreference guide should suffice.
X.s
XVI is a mode oriented editor, and has two modes.  One mode allows text entry by
Xsimply typing (called text entry mode), and the other allows text manipulation
Xby using the typing keys (called command mode).  This is a completely
Xdifferent approach to editing than used by most other text editors and word
Xprocessors.  However, it provides some incredible possibilities for speed
Xbecause one does not have to look to find function keys to perform certain
Xediting tasks.  Also, many more commands can be placed within reach of your
Xhands because all of the keys on the keyboard are available for use during
Xcommand mode operations. 
X.s
X.!
X.if system
X.i-1
X2 Author
X.s
XThis emulation of VI was written by
X.s
X.lm+5
XGregg Wonderly
X.br
XMathematics Department
X.br
XOklahoma State University
X.s
XInternet: gregg@nemo.math.okstate.edu
X.lm-5
X.s
X.endif system
X.!
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Extensions to VI\*
X.send toc .endif global
X.else system
X.i-1
X2 Extensions
X.s
X.endif system
XThis emulation of VI contains some extensions that were made possible by
Xthe existance of supporting primitives in TPU.  A partial list of these
Xextensions follows.
X.s
X.lm+5
XSelect regions are available and can be used to perform many operations such
Xas deleting, yanking, changing, shifting, changing/inverting case, compiling
XTPU procedures, filling regions of text to fit within a specified range of
Xcolumns and writing portions of buffers to files/devices.
X.s
XMultiple buffers are available as well as multiple windows to display
Xthe buffers in.  This allows you to edit/view many files at once.
X.s
XYou can force the editor to expand tabs as you type them, so that they are
Xreplaced by spaces in the text.
X.s
XYou can control the use of TPU's typeahead recognition so that you see
Xeach screen update action while you type (with ":set [no]update").
X.s
VThe EX mode commands, 'show buffers' and 'show files', display information abo
Xut
Xexisting buffers, and the current list of files to edit, respectively.
X.s
XThe EX mode command, sh, has an alias called 'dcl', which is a little more
Xindicative of the action taken.
X.s
XThe EX mode command, buffer, allows you to create a new buffer that may not
Xhave a file associated with it.  It also allows you to create a buffer by
Xa specific name, and associate an arbitrary file with that buffer.
X.s
VThe EX mode command, messages, allows you to map the TPU message buffer unto t
Xhe
Xcurrent window for viewing.
X.s
XThe EX mode command, delbuf, allows you to delete a buffer according to its
Xname.
X.s
XThe EX mode command, prev, allows you to move back to the previously edited
Xbuffer that you used the 'next' command to leave.
X.s
XThe EX mode command, tpu, allows you to execute arbitrary TPU statements from
Xthe editor.
X.lm-5
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Using an initialization file\*
X.send toc .endif global
X.else system
X.I-1
X2 Initialization
X.s
X.endif system
VVI allows you to use a file to initialize the options and settings that you wi
Xsh
Xto use, automatically, each time the editor is envoked.  Note that when you use
VVI in a subprocess, the initialization is done only when the subprocess is fir
Xst
Xcreated, and not on any subsequent attach operations. The file SYS$LOGIN:VI.INI
Xcan contain EX mode commands, one per line, that will be executed after the
Xfile(s) selected are loaded into buffers.  Alternatively, the file may be
Xlocated anywhere by defining the logical name, EXRC, to be the name of the file
Xyou wish to use for initialization (this name is the similar, minus a leading
X'.', to that used under UNIX).  Also, if you have only a single line of
Xinitialization, then the process logical, EXINIT (again a holdover from
XUNIX), can be defined to be the line
Xof initialization, and it will be translated, and the resulting text executed. 
XThis is generally faster than processing the EXRC file.
X.!
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Supported EX mode commands\*
X.send toc .endif global
X.else system
X.I-1
X2 Ex_mode
X.s
X.endif system
X.!
XEX mode is entered by typing a ":" (or the DO key).  From the ":" prompt, you
Xcan perform many different functions associated with changing the operation
Xof the editor.  EX mode also allows you to perform operations such as global
Xsearch and replace, block deletion of text, and many other operations that
Xare not easily described with a single keystroke.  Below is a list of the
Xcommands that can be performed from EX mode.  The term, l_spec, is a
Xspecification for a line of the current file, and takes the form of either a
Xsearch pattern, as in:
X.lm +5
X.s
X/foo/  or  ?foo?
X.s
X.lm -5
Xan explict line number as in "5", or perhaps a relative line number as in
X".+5" which means the current line, plus five lines.  There are two other
Xspecial characters, like ".", they are "$" which means the last line of the
Xfile, and "%" which means every line in the file. If you specify a range of
Xlines by separating two l_specs with a ",", the first specification must
Xindicate a line that preceeds the second specification.  If not, the message,
X"Bad range of lines!" will be displayed, and the command will be aborted. 
X.if system
X.I-1
X3 Abort_edit
X.else system
X.send toc .if global
X.hl 2 ^*Abort edit\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:q[uit][!]                  This command quits the editor.  If
X                            "!" is not specified, and there are
X                            modified buffers, then you will be
X                            told so, and the command will be
X                            aborted.  You must then either retype
X                            the command with a "!" (if you really
X                            want to ignore the modified buffers,
X                            and loose those changes), or you must
X                            write out the modified buffers. 
X.EL
X.if system
X.I-1
X3 Change_output_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Change output file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:file <file spec>           Changes the output file specification
X                            of the current buffer to the
X                            specified file. This will result in
X                            the buffer being written to the new
X                            file whenever a ":w", ":xit" or "ZZ"
X                            command is issued. 
X.EL
X.if system
X.I-1
X3 Compile_TPU
X.else system
X.send toc .ifnot global
X.hl 2 ^*Compile TPU\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:[l_spec][,l_spec]tpu       Compiles the indicated region,
X                            making the assumption, that the
X                            region contains TPU language code. 
X.EL
X.if system
X.I-1
X3 Copy_lines
X.else system
X.send toc .ifnot global
X.hl 2 ^*Copy lines\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec_1,l_spec_2 c[opy] l_spec_3
X                            The range of lines indicated by
X                            l_spec_1 and l_spec_2 are copied in
X                            their entirety, to the location after
X                            the line indicated by l_spec_3. 
X.EL
X.if system
X.I-1
X3 Create_buffers
X.else system
X.send toc .ifnot global
X.hl 2 ^*Create buffers\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:b[uffer] [<buffer name>] [<file spec>]
X                            This command maps the buffer named to
X                            the current window.  If there is no
X                            buffer by the name given, then a new
X                            buffer will be created.  If <file
X                            spec> is given, the named file will
X                            be read into any newly created
X                            buffer. 
X.EL
X.if system
X.I-1
X3 Create_key_macro
X.else system
X.send toc .ifnot global
X.hl 2 ^*Create key macro\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:map[!] <key> <key strokes> Allows you to establish a mapping
X                            or macro for a single keystroke.  If
X                            a "!" is specified then the
X                            mapping/macro is in effect during
X                            text entry mode, otherwise the
X                            mapping/macro is in effect during
X                            command mode. The next time that
X                            <key> is typed in the affected mode,
X                            the string of keystokes specified
X                            will be substituted for the single
X                            key typed.  ":map" with out any
X                            parameters displays the current
X                            mappings.
X.EL
X.if system
X.I-1
X3 Delete_buffers
X.else system
X.send toc .ifnot global
X.hl 2 ^*Delete buffers\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:de[lbuf][!] <buffer name>  This command allows you to delete a
X                            buffer by name so that it is no
X                            longer in existance.  This will
X                            destroy the contents of the buffer.
X                            If the buffer is modified you can
X                            specify the "!" to assure the the
X                            buffer is deleted. Otherwise when the
X                            buffer is modified you will be
X                            prompted to make sure that you wish
X                            to delete that buffer.  An unmodifed
X                            buffer will be deleted without any
X                            prompting, whether or not a "!" is
X                            specified. 
X.EL
X.if system
X.I-1
X3 Delete_lines
X.else system
X.send toc .ifnot global
X.hl 2 ^*Delete lines\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]d           Delete the line(s) specified.
X.EL
X.if system
X.I-1
X3 Edit_new_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Edit new file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:e[dit] <file spec>         This command allows you to switch to
X                            a different file that you want to
X                            edit.  File spec is first compared to
X                            the name of an existing buffer.  If
X                            there is a buffer by that name, then
X                            it is mapped to the current window.
X                            If not, then the indicated file will
X                            be read into a new buffer, which will
X                            be mapped to the current window. 
X.EL
X.if system
X.s
X.LT
X:vi <file spec>             This command is an alias for the
X                            e[dit] command.  For more information
X                            see the description of that command. 
X.EL
X.endif system
X.!
X.if system
X.I-1
X3 Execute_command_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Execute command file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:so <file spec>             The specified file will be read,
X                            line by line, and each line will be
X                            interpreted as an EX mode command. 
X.EL
X.if system
X.I-1
X3 Fill_text_region
X.else system
X.send toc .ifnot global
X.hl 2 ^*Fill text region\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]fill <left margin> <right margin>
X                            The indicated lines will be filled,
X                            wrapped, and joined so that they are
X                            as full as possible. the left and
X                            right margin values will determine
X                            how long the lines are, and where
X                            they start and begin. 
X.EL
X.if system
X.I-1
X3 Goto_Line
X.else system
X.send toc .ifnot global
X.hl 2 ^*Goto Line\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]            Goto the beginning of the line(s)
X                            specified.
X.EL
X.if system
X.I-1
X3 Goto_tag_in_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Goto tag in file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:ta [tag]                   The tag specified, or if none, then
X                            the tag following the cursor is
X                            located in one of the files specified
X                            by the "tags" value.  The associated
X                            file is loaded, or switched to, and
X                            the corresponding command executed.
X                            If the tag can not be located, then a
X                            diagnostic is issued. 
X.EL
X.if system
X.I-1
X3 Help
X.else system
X.send toc .ifnot global
X.hl 2 ^*Help\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:help <VI help topic>       Gives you access to this document as
X                            well as other VMS help topics from
X                            within VI. 
X.EL
X.if system
X.I-1
X3 Invert_case
X.else system
X.send toc .ifnot global
X.hl 2 ^*Invert case\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]in[vert]    The case of all alphabetic
X                            characters in the indicated region
X                            will be inverted. 
X.EL
X.if system
X.I-1
X3 Learn_Key_Strokes
X.else system
X.send toc .ifnot global
X.hl 2 ^*Learn Key Strokes\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:learn                      Initiates a remember of keystrokes
X                            that allows a particular sequence of
X                            key strokes to be repeated at at a
X                            later time by typing a single key.
X                            This facility is similar to that
X                            provided by the :map command. The
X                            difference being that you must "know"
X                            the keys you want to type for the
X                            :map command.  A learn sequence is
X                            remember as you type the keys and the
X                            associated actions are carried out.
X                            When you are done typing a learn
X                            sequence, then you should use CTRL-R
X                            to bind that sequence to the desired
X                            key.  Note that :set undomap also
X                            pertains to how learned sequence
X                            behave when undo is performed.
X.EL
X.if system
X.I-1
X3 Lower_case
X.else system
X.send toc .ifnot global
X.hl 2 ^*Lower case\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]lo[wer]     The case of all alphabetic
X                            characters in the indicated region
X                            will be changed to lower case. 
X.EL
X.if system
X.I-1
X3 Message_buffer
X.else system
X.send toc .ifnot global
X.hl 2 ^*Message buffer\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:me[ssages]                 This command simply maps the TPU
X                            messages buffer to the current window
X                            so that its contents can be viewed. 
X.EL
X.if system
X.I-1
X3 Move_lines
X.else system
X.send toc .ifnot global
X.hl 2 ^*Move lines\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec_1,l_spec_2 m[ove] l_spec_3
X                            The range of lines indicated by
X                            l_spec_1 and l_spec_2 are moved in
X                            their entirety, to the location after
X                            the line indicated by l_spec_3. 
X.EL
X.if system
X.I-1
X3 Next_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Next file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:n[ext]                     Moves the pointer in the list of
X                            files currently being edited to the
X                            next file.  The buffer associated
X                            with that file will be mapped to the
X                            current window. 
X.EL
X.if system
X.I-1
X3 Perform_Macros
X.else system
X.send toc .ifnot global
X.hl 2 ^*Perform Macros\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:@<a-z>                     Executes the first line of the
X                            indicated named buffers as command
X                            mode commands. 
X.EL
X.if system
X.I-1
X3 Previous_file
X.else system
X.send toc .ifnot global
X.hl 2 ^*Previous file\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:p[rev]                     Moves the pointer in the list of
X                            files currently being edited to the
X                            previous file.  The buffer associated
X                            with that file will be mapped to the
X                            current window. 
X.EL
X.if system
X.I-1
X3 Read_file_into_buffer
X.else system
X.send toc .ifnot global
X.hl 2 ^*Read file into buffer\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:[l_spec]r[ead] <file spec> Reads the contents of the specified
X                            file, and inserts it into the current
X                            buffer after the indicated line.  If
X                            no line is specified, then the
X                            current line is used. 
X.EL
X.if system
X.I-1
X3 Rewind_file_list
X.else system
X.send toc .ifnot global
X.hl 2 ^*Rewind file list\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:rew                        Will reset the pointer in the list
X                            of files being edit to the first one.
X                            The buffer associated with that file
X                            will be mapped to the current window. 
X.EL
X.if system
X.I-1
X3 Select_regions
X.else system
X.send toc .ifnot global
X.hl 2 ^*Select regions\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:select                     Toggles the status of the select 
X                            region that can be used in place of a
X                            range specified in one of the EX mode
X                            commands, as well as any of the,
X                            buffer altering, command mode editing
X                            commands. 
X.EL
X.if system
X.I-1
X3 Set_default_dir
X.else system
X.send toc .ifnot global
X.hl 2 ^*Set default dir\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:cd <default spec>          Changes the default directory that
X                            that the editor process is running
X                            in.  The new default directory is
X                            shown in the message window. 
X.EL .S .LT
X:chdir                      Same as the cd command.
X.EL
X.if system
X.I-1
X3 Set_options
X.else system
X.send toc .ifnot global
X.hl 2 ^*Set options\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]option[=value] [...]
X                            Sets one or more options that dictate
X                            the behavior of the editor these
X                            options are described in full later.
X                            If the option is boolean in nature as
X                            is "wrapscan", then you must either
X                            specify "wrapscan" or "nowrapscan".
X                            If the option is variable in nature,
X                            as is "scroll", then you should
X                            specify "option=value" as in
X                            "scroll=21". 
X.EL
X.if system
X.I-1
X3 Show_buffers
X.else system
X.send toc .ifnot global
X.hl 2 ^*Show buffers\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:show buffers               Displays the list of currently active
X                            buffers that you have created for
X                            editing files. 
X.EL
X.if system
X.I-1
X3 Show_file_list
X.else system
X.send toc .ifnot global
X.hl 2 ^*Show file list\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:show files                 Displays the list of one or more
X                            files that matched the file spec that
X                            you last gave as the parameter to a
X                            "vi" or "edit" command.  This list of
X                            files is used by the ":next", ":prev"
X                            and ":rew" EX commands to allow you
X                            to cycle through a list of files in a
X                            logical sequence.  You can change the
X                            line that the cursor is on to change
X                            which file :next and :prev display by
X                            using, ^D ^U, h, j, k, and l key
X                            strokes. 
X.EL
X.if system
X.I-1
X3 Show_tags
X.else system
X.send toc .ifnot global
X.hl 2 ^*Show Tags\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:show tags                  Displays the contents of the buffer
X                            that is used to resolve "tag"
X                            references.  This can be used to make
X                            sure that you are specifying the
X                            proper tags. 
X.EL
X.if system
X.I-1
X3 Spawn_command
X.else system
X.send toc .ifnot global
X.hl 2 ^*Spawn command\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:!<DCL command>             Spawns a subprocess to run the given
X                            DCL command in.  Note that due to
X                            limitations of TPU, there is no
X                            prompt asking you to "[Hit ENTER to
X                            continue]" before the screen is
X                            redrawn when the command finishes.
X                            Therefore, you will have to use ^S/^Q
X                            or HOLD SCREEN to pause the display. 
X.EL
X.if system
X.I-1
X3 Spawn_subprocess
X.else system
X.send toc .ifnot global
X.hl 2 ^*Spawn subprocess\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:sh (:dcl)                  Spawns a DCL subprocess that you can
X                            use to perform some DCL related task
X                            with, and then LOGOUT of. 
X.EL
X.if system
X.I-1
X3 Substitution
X.else system
X.send toc .ifnot global
X.hl 2 ^*Substitution\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]s/from_re/to_re/[g][q]
X                            Perform the indicated substitution on
X                            the indicated line(s) of text. Note
X                            that '&' is a single character alias
X                            for the last substitution made (not
X                            including line specs or options). The
X                            [g] option causes every occurence on
X                            a line to be replaced. By default,
X                            only the first is replaced.  The [q]
X                            option will cause the editor to pause
X                            and display the text matching the
X                            from_re, before each substition. You
X                            are given the opportunity to say
X                            whether or not the substitution is to
X                            be performed. 
X.EL
X.if system
X.I-1
X3 Text_Abbreviations
X.else system
X.send toc .ifnot global
X.hl 2 ^*Text Abbreviations\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:abbr <short> <long>        Creates an abbreviation for the text
X                            given by <long>.  <short> is a simple
X                            string of characters, e.g. ATT, and
X                            <long> is a more complicated string
X                            as in, American Telephone and Tele-
X                            graph.  ":abbr" by itself displays a
X                            list of the current abbreviations. 
X
X:unabbr <short>             Removes a previously defined abbrev-
X                            iation that was defined with ":abbr".
X.EL
X.if system
X.I-1
X3 Unmap_key_macros
X.else system
X.send toc .ifnot global
X.hl 2 ^*Unmap key macros\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:unmap[!]                   Removes a previously established map.
X                            The "!" must be present if you wish
X                            to unmap a map that was made
X                            specifying the "!". 
X.EL
X.if system
X.I-1
X3 Upper_case
X.else system
X.send toc .ifnot global
X.hl 2 ^*Upper case\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:l_spec[,l_spec]upper       The case of all alphabetic characters
X                            in the indicated region will be
X                            changed to upper case. 
X.EL
X.!
X.if system
X.I-1
X3 Write_buffer
X.else system
X.send toc .ifnot global
X.hl 2 ^*Write buffer\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:[l_spec][,l_spec]w[rite][!] [<file spec>]
X                            The indicated line(s) will be written
X                            to a file.  The name of the file can
X                            either be specified, or will default
X                            to the current buffer.  There are
X                            certain operations that are not
X                            permitted unless the "!" is typed
X                            following "w[rite]".  If "!" is not
X                            present, you can NOT write all or
X                            portions of the buffer to a file that
X                            already exists, unless it is the file
X                            associated with the current buffer.
X                            Also, you can not write out a portion
X                            of the current buffer to it's
X                            associated file without specifying
X                            the "!". This protects you from
X                            unknowingly clobbering a file. 
X
X:[l_spec][,l_spec]wq[!] [<file spec>]
X                            This command is identical to typing a
X                            ":w" command followed by typing a
X                            ":q" command.  See the descriptions
X                            of those commands for more details. 
X.EL
X.if system
X.I-1
X3 Write_and_exit
X.else system
X.send toc .ifnot global
X.hl 2 ^*Write and exit\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:x[it]                      Is synomous with typing "ZZ" while
X                            in command mode.  The contents of the
X                            current buffer will be written out if
X                            they are modified.  All other buffers
X                            will then be examined, and you will
X                            be asked whether or not you wish to
X                            write out any other modified buffer.
X                            The ":set nowrite" command will force
X                            a modifed buffer to be ignored during
X                            this search. 
X.EL
X.if system
X.I-1
X2 Set_options
X.else system
X.send toc .ifnot global
X.hl 1 ^*Set options\*
X.send toc .endif global
X.endif system
X.s
XThe ":set", EX, command allows you to change the behavior of VI under certain
Xcircumstances.  There are several characteristics that you may or may not
Xwish to make use of.  Therefore, these can be altered by setting options.
XBelow is a list of options that you can set using the ":set" command.
XSome of these options are either ON or OFF, and some have values.  The
Xproper syntax for changing the option therefore varies, and is outlined
Xwith each option.
X.s
X.if system
X.I-1
X3 Auto_Send_to_DCL
X.else system
X.send toc .ifnot global
X.hl 2 ^*Auto Send to DCL\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]senddcl            Determines whether or not pressing
X                            <RETURN> while in the DCL buffer, and
X                            while in insert mode, causes the
X                            current line to be sent to the DCL
X                            subprocess.  If senddcl is in effect,
X                            then pressing return while you are in
X                            the DCL buffer will cause the current
X                            line to be sent to the DCL
X                            subprocess.  The line typed, as well
X                            as the output from the DCL command is
X                            part of the undo region that is
X                            deleted if you use undo after the DCL
X                            command output appears in the DCL
X                            buffer.  See the HELP section on the
X                            DCL process for more information.
X.EL
X.if system
X.I-1
X3 Auto_line_wrap
X.else system
X.send toc .ifnot global
X.hl 2 ^*Auto line wrap\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set wrapmargin=integer     Sets the number of columns from the
X                            right margin at which VI will wrap
X                            text to the beginning of the next
X                            line.  Normally, no wrapping is done,
X                            i.e. wrapmargin=0 is in effect. 
X.EL
X.if system
X.I-1
X3 Auto_write
X.else system
X.send toc .ifnot global
X.hl 2 ^*Auto write\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]autowrite          Determines whether or not modified
X                            buffers are automatically written out
X                            when you map a different buffer to
X                            the window that a modified buffer is
X                            mapped to. 
X.EL
X.if system
X.I-1
X3 Case_insensitive_search
X.else system
X.send toc .ifnot global
X.hl 2 ^*Case insensitive search\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]ignorecase         Determines whether or not case is
X                            ignored during string search
X                            operations.  Normally, case is
X                            ignored. 
X.EL
X.if system
X.I-1
X3 Change_file_list
X.else system
X.send toc .ifnot global
X.hl 2 ^*Change file list\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set file[s] <file spec>    Changes the list of files to edit to
X                            be those specified by <file spec>.
X                            <file spec> should be a single
X                            filespec, or a comma separated list. 
X.EL
X.if system
X.I-1
X3 Error_bells
X.else system
X.send toc .ifnot global
X.hl 2 ^*Error Bells\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]errorbells         Determines whether or not a bell is
X                            sounded when certain errors occur.
X.EL
X.if system
X.I-1
X3 Expand_tabs
X.else system
X.send toc .ifnot global
X.hl 2 ^*Expand tabs\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]tabs               Determines whether or not tabs are
X                            expanded to the proper number of
X                            spaces as you type.  "notabs" will
X                            cause tabs to be expanded. 
X.EL
X.if system
X.I-1
X3 Line_report
X.else system
X.send toc .ifnot global
X.hl 2 ^*Line report\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set report=integer         Sets the number of lines at which VI
X                            will tell you what you did.  E.g. if
X                            you type, 2yy, then VI will quietly
X                            yank 2 lines.  If you type, 10yy,
X                            then VI will tell you "10 lines
X                            yanked", providing report is set to
X                            some number less than 10. The same
X                            thing occurs for deletion, and put
X                            operations. If more than 'report'
X                            lines are added/deleted, then VI
X                            tells you about it.  Report is set to
X                            5 by default. 
X.EL
X.if system
X.I-1
X3 No_write
X.else system
X.send toc .ifnot global
X.hl 2 ^*No write\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]write              Modifies the internal TPU flags for
X                            the current buffer that tell TPU
X                            whether or not to ignore
X                            modifications to a buffer.  This flag
X                            is examined during exit from VI to
X                            determine whether or not to prompt
X                            you to write out the buffer.  ":quit"
X                            will ignore modified buffers that
X                            have this flag set. 
X.EL
X.if system
X.I-1
X3 Paragraph_delimiters
X.else system
X.send toc .ifnot global
X.hl 2 ^*Paragraph delimiters\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set paragraphs=<pairs>     Sets pairs of characters that are
X                            assumed to occur at the beginning of
X                            the line following a ".".  It is
X                            usually the case that these pairs of
X                            characters are RUNOFF commands.  In
X                            VI under UNIX, these pairs are NROFF
X                            formatting commands.  A single
X                            character, as in .P, should be
X                            followed by a space in the string of
X                            pairs of characters.  If a paragraph
X                            movement (i.e. } or {) fails to
X                            locate any of the specified patterns,
X                            then the next blank line will be
X                            searched for. 
X.EL
X.if system
X.I-1
X3 Regular_expression_use
X.else system
X.send toc .ifnot global
X.hl 2 ^*Regular expression use\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]magic              Determines whether or not regular
X                            expressions are used in search
X                            strings.  By default, regular
X                            expressions are used. 
X.EL
X.if system
X.I-1
X3 Screen_length
X.else system
X.send toc .ifnot global
X.hl 2 ^*Screen length\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set window=lines           Sets the length of the screen in
X                            lines that is used by VI.  The UNIX
X                            version of VI chooses to use the
X                            bottom of the screen as the base of a
X                            small window.  The TPU version uses
X                            the top of the screen.  The maximum
X                            number of lines is terminal
X                            dependent, the minimum is 3. 
X.EL
X.if system
X.I-1
X3 Screen_width
X.else system
X.send toc .ifnot global
X.hl 2 ^*Screen width\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set width=cols             Sets the width of the current window
X                            to the specified value. The maximum
X                            setting is terminal dependent, while
X                            the minimum is left up to the user. 
X.EL
X.if system
X.I-1
X3 Scroll_amount
X.else system
X.send toc .ifnot global
X.hl 2 ^*Scroll amount\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set scroll=integer         Sets the default number of lines that
X                            the window scrolls when ^D or ^U is
X                            typed.  This number can also be set
X                            by preceeding ^D or ^U with a count. 
X.EL
X.if system
X.I-1
X3 Section_delimiters
X.else system
X.send toc .ifnot global
X.hl 2 ^*Section delimiters\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set sections=<pairs>       Sets pairs of characters that are
X                            assumed to occur at the beginning of
X                            the line following a ".".  It is
X                            usually the case that these pairs of
X                            characters are RUNOFF commands.  In
X                            VI under UNIX, these pairs are NROFF
X                            formatting commands.  A single
X                            character, as in .P, should be
X                            followed by a space in the string of
X                            pairs of characters.  There are some
X                            pairs of characters that are
X                            exceptions.  The pair of characters,
X                            +c, really means a single '{' at the
X                            beginning of the line.  The pair of
X                            characters, +f, really means the
X                            string, subroutine, or the string,
X                            function, anywhere in the line.  The
X                            pair of characters, +t, really means
X                            the string, procedure, at the
X                            beginning of the line.  If a section
X                            movement (i.e. ]] or [[) fails, then
X                            the next blank line will also be
X                            searched for. 
X.EL
X.if system
X.I-1
X3 Shift_width
X.else system
X.send toc .ifnot global
X.hl 2 ^*Shift width\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set shiftwidth=integer     Sets the number of columns that text
X                            is to be shifted by when the shift
X                            left or shift right commands are
X                            executed. .EL 
X.if system
X.I-1
X3 Show_settings
X.else system
X.send toc .ifnot global
X.hl 2 ^*Show settings\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set all                    Displays the current values of the
X                            options.
X.EL
X.if system
X.I-1
X3 Tab_stops
X.else system
X.send toc .ifnot global
X.hl 2 ^*Tab stops\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set tabstops=integer       Sets the number of columns on the
X                            screen that is used to represent a
X                            tabstop.  The default is eight. 
X.EL
X.if system
X.I-1
X3 Tag_Case
X.else system
X.send toc .ifnot global
X.hl 2 ^*Tag Case\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]tagcase            Determines whether or not the case of
X                            a tag is recognized when searching
X                            for it.  For case insensitive
X                            languages or facilities, set
X                            notagcase should be used, otherwise
X                            the default, tagcase, is sufficient. 
X.EL
X.if system
X.I-1
X3 Tags_files
X.else system
X.send toc .ifnot global
X.hl 2 ^*Tags files\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set tags=<file list>       Sets the list of files that are used
X                            to resolve tag references.  Each file
X                            name should be separated by a space. 
X.EL
X.if system
X.I-1
X3 Type_ahead
X.else system
X.send toc .ifnot global
X.hl 2 ^*Type ahead\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]update             Determines whether or not an explicit
X                            TPU UPDATE is done after each
X                            keystroke.  Normally, TPU will
X                            process typeahead by not updating the
X                            window until there is no typeahead.
X                            ":set update" will foil these
X                            attempts, and force an update to
X                            occur after each keystroke during
X                            command level processing. 
X.EL
X.if system
X.I-1
X3 Undo_and_maps
X.else system
X.send toc .ifnot global
X.hl 2 ^*Undo and maps\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]undomap            Controls whether or not an attempt
X                            is made to make it possible to undo
X                            all buffer operations that occur
X                            during the execution of a map or
X                            learned key sequence (see the :map
X                            and :learn commands). Normally, maps
X                            are undoable because a copy of the
X                            entire buffer is saved before a map
X                            is executed.  While editing large
X                            buffers, this makes it rather slow to
X                            use maps, so you can turn this
X                            feature off when it is deemed not
X                            necessary. 
X.EL
X.if system
X.I-1
X3 Wrap_on_search
X.else system
X.send toc .ifnot global
X.hl 2 ^*Wrap on search\*
X.send toc .endif global
X.endif system
X.s
X.LT
X:set [no]wrapscan           Determines whether or not search
X                            operations are continued at the
X                            end/beginning of a buffer by moving
X                            to the beginning/end, respecively.
X                            Normally, wrapscan is in effect. 
X.EL
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Additional key strokes\*
X.send toc .endif global
X.else system
X.I-1
X2 Additional_key_strokes
X.s
X.endif system
XThere are some additional key strokes available that pertain to using added
Xfeatures of this version of VI.  Below is an outline of the added key strokes.
X.ifnot system
X.send toc .ifnot global
X.hl 2 ^*Key pad keys used\*
X.send toc .endif global
X.else system
X.s
X.endif system
X.lm+5
X.LT
XKP0                         Temporarily creates a window that
X                            is the size of the entire
X                            screen, and maps the current
X                            buffer to that window.  Use KP1
X                            (Delete window) to remove this
X                            window, and uncover the windows
X                            that were occluded by the
X                            created window.  This command only
X                            works when there is more than one
X                            window on the screen.
X
XKP1                         Delete the current window from
X                            the screen and release its space
X                            to one of the surrounding
X                            windows. 
X
XKP2                         Split the current window into
X                            two windows divided by a status
X                            line place at the line that the
X                            cursor currently occupies. 
X
XKP3                         Move down the screen to the next
X                            window.
X
XKP4                         Shrink the size of the current
X                            window by one line, making the
X                            window above, or below larger.
X                            An attempt is made to shrink the
X                            window by pulling up the bottom
X                            line, if that fails, then an
X                            attempt is made to pull down the
X                            top line.  If that fails, then
X                            the window can not be shrunk. 
X
XKP5                         Enlarge the current window by
X                            one line.  The same algorithym
X                            as for shrink is used to
X                            determine how to alter the size
X                            of the window. 
X
XKP6                         Move up the screen to the next
X                            window.
X
XPF1                         When using VI on a VT100 series
X                            terminal, it is not possible to
X                            have TPU recognize the ESCAPE
X                            character, ASCII 27, it its
X                            primary processing loop.  When
X                            using a VT200 series terminal,
X                            this is circumvented by using
X                            F11 as if it were ESCAPE.  PF1
X                            provides this functionality for
X                            the VT100 series of terminals. 
X
XPF2                         PF2 envokes the help facilities
X                            available for VI.
X
X.EL
X.ifnot system
X.send toc .ifnot global
X.hl 2 ^*Keyboard keys used\*
X.send toc .endif global
X.else system
X.s
X.lm-5
XKEY BOARD KEYS USED
X.lm+5
X.endif system
X.s
X.LT
XCTRL-X                      The CTRL-X key is used to send a
X                            DCL command to the DCL subprocess
X                            that is bound to the DCL buffer.
X
XCTRL-R                      The CTRL-R key is used to remember
X                            a learn sequence any bind it to a
X                            key.  The :learn command initiates
X                            the learning process.
X.EL
X.lm-5
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Windows and buffers\*
X.send toc .endif global
X.else system
X.I-1
X2 Windows_and_buffers
X.s
X.endif system
XThe multiple window features of this implementation of VI make it possible to
Xview multiple portions of a single file, or different portions of different
Xfiles simultaneously.  It is also possible to yank/delete text from one
Xwindow/buffer and place it into another buffer.  To accomplish this, all
Xnamed buffers, and numbered, deletion buffers are globally available.  I.E.
Xthere are no buffers that are local to a buffer, with a single exception being
Xthe information pertaining to the undo operation.
X.s
XIf you type 'u' while in a buffer different from the one that you made
Xthe last change in, you will see the message
X.s
X.lm+5
XUndo not in this buffer.
X.s
X.lm-5
Xdisplayed at the bottom of the screen.
X.s
XFor more information on using multiple buffers and window, consult the
Xsection on additional key strokes.
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Display differences\*
X.send toc .endif global
X.else system
X.I-1
X2 Display_differences
X.s
X.endif system
XDue to certain characteristics of the TPU screen management facilities,
Xcertain activities on the display differ from those found in UNIX VI.  One
Xdifference is TPU's inability to display control characters in an expanded
Xformat, such as "^H" for a literal backspace character in the text.  While
Xcommands are being entered in EX mode, you will see that control characters
Xare displayed as "^?" where the "?" character is replaced by the appropriate
Xcharacter corresponding to the control character typed.  This type of
Xexpansion is possible here, but it is not possible to do it in the text
Xbuffers displayed on the screen. If a key typed does not correspond to a
Xprintable ASCII character, then a backward question mark will be displayed
Xwhen that key is typed. 
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Tag files\*
X.send toc .endif global
X.else system
X.I-1
X2 Tag_files
X.s
X.endif system
XA tags file is a file that contains one or more lines each of which contains
X3 columns of text.  Each column is separated by exactly one tab character.
XThe first column of text is the "tag" string.  The second column is the
Xfile with which that tag is associated, and the remainder of the line contains
Xan EX mode command that will perform an action associated with that tag.
XUsually, the action locates a specific line in the file that is associated
Xwith the tag.  VI will position the cursor at the bottom of the buffer prior
Xto execution the EX mode command.  Typically, a tags file is used to locate
Xthe definition of a languange procedure, or text formatter macro.
X.s
XA simple tags file can be constructed by using a program to analyze the text
Xof a file, and locate the lines that should be tagged.  In the UNIX operating
Xsystem, there is a program called CTAGS(1) that analyzes C language source
Xfiles, and creates a 'tags' file that allows access to the function
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Kept Editors\*
X.send toc .endif global
X.else system
X.I-1
X2 Kept_Editors
X.s
X.endif system
XVAX/VMS and TPU support the notion of a "Kept Editor".  A "Kept Editor" is
Xa subprocess that can be ATTACH'd to and from at will.  The
XVI$ROOT:[EXE]VI.COM command procedure takes care of all of the details of
Xcarrying out the operation of the "Kept Editor".  It knows how to locate,
Xand attach to an existing "Kept Editor", and how to automatically create
Xa new one if there is not one running.
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*Other TPU's\*
X.send toc .endif global
X.else system
X.I-1
X2 Other_Tpus
X.s
X.endif system
XIf you wish to use other TPU applications, besides VI, then there is a
Xprogram that can help in the negotiation of which CALL_USER routines and which
Xsection file to use.  VI$ROOT:[SRC]VI.MAR is the source to this program.  It
Xtranslates the logical names VISECINI and VI$CALLUSER instead of the normal
XTPUSECIN and TPUCALLUSER logical names.  VI$ROOT:[EXE]VI.CLD is a CLD file
Xthat you can use the "SET COMMAND" command on to make VI.EXE useable.  You
Xcan make VI.EXE by using the command "@MAKE EXE" from within the VI$ROOT:[SRC]
Xdirectory.  Then you will need to use the command
X.s
X.lm+5
X$ SET COMMAND VI$ROOT:[EXE]VI
X.lm-5
X.s
XIf you desire to use VI$ROOT:[EXE]VI.COM to run VI in a subprocess, then
Xyou should install VI.CLD into SYS$SHARE:DCLTABLES.EXE.  See the Command
XLanguage Definition manual for more information on doing this, if you
Xare no familiar with the procedure.  This is necessary because the command
Xtables are not propagated to a subprocess when it is created.
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*The DCL buffer\*
X.send toc .endif global
X.else system
X.I-1
X2 DCL_buffer
X.s
X.endif system
XThere is a special buffer that is always associated with a DCL subprocess.
XThe "DCL buffer" can be used as an alternate method of collecting DCL output
Vif the filter_region (!<movement><command>) and read_from_command (:r!<command
X>)
Xcapabilities do not fit your needs.  Any line in any buffer can be sent to
Xthe DCL subprocess by placing the cursor on that line, and typing a ^X
X(Control-X).
X.s
XWhen you type ^X, several actions can happen.  If you are not
Xalready in the DCL buffer, then the current window will be split, and the
Xtop window will be mapped to the DCL buffer, and you will be positioned there.
XIn either case, the command will be copied into the DCL buffer, and will also
Xbe sent to the DCL subprocess.  If the subprocess does not exist, then it
Xwill be created.  There are several ways that any one of these steps can
Xfail.  If they do, and appropriate diagnostic will be issued to allow you
Xto resolve the problem.
X.s
XThe setable option, senddcl, allows you to use the DCL buffer interactively,
Xsomewhat. When senddcl is in effect, you can place yourself in insert mode,
Xusing A, a, I, i, R, O, or o, and then type a DCL command. When you press enter
Xat the end of the line, that line is sent to the DCL subprocess as input.  The
Xoutput of the DCL command is placed into the DCL buffer as if you had typed it
Xin addition to the command line.  Thus, undo will allow you to remove both the
Xcommand line, and the output from the DCL buffer with a minimum of trouble. 
X.ifnot system
X.send toc .ifnot global
X.hl 1 ^*TPU bugs revealed\*
X.send toc .endif global
X.else system
X.I-1
X2 TPU_Bugs_Revealed
X.s
X.endif system
VThere are several problems with TPU that cause problems with this implementati
Xon
Xof VI.  Outlined below are some of the more major problems.  There are probably
Xsome that I have forgotten by now.
X.s
XEvery place that there is a TPU statement of the form:
X.s
X.lm+5
XEXECUTE (COMPILE ("vi$global_var := ...."));
X.lm-5
X.s
Xthere is a statement preceeding that line that initializes vi$global_var to
Xzero.  This is necessary to get around a bug in TPU that causes the storage
Xthat vi$global_var is associated with before the EXECUTE (COMPILE ()), to
Xnot be disassociated.  TPU would randomly scribble on string and buffer
Xdescriptors until it would stop with an "internal error, please SPR this",
Xmessage.
X.s
XAnother problems has to do with the KEY_NAME() values of keys.  It appears
Xthat GET_INFO (DEFINED_KEY...) does not return proper KEY_NAME() values
Xfor certain keys.  In particular, you will notice that maps to keys like
Xq, v, and others will be displayed with the key as a backward question
Xmark, instead of the proper letter, when you issue the :map command to
Xdisplay the current maps.  This is currently (apparently) unsurmountable.
XSome trickery (hacking I like to call it) could be done to coerce the
Xbogus key values into something reasonable, but I decided not to do that.
X.s
XStill another problem has to do with the fact that ASCII (CTRL_?_KEY) always
Xreturns ASCII(0) instead of ASCII(1) through ASCII(26) as would be convienent.
XI have written some code (hacks at best) to get around this problem by
Xnormalizing the values around the value of CTRL_A_KEY.  An expression of
Xthe form:
X.s
X.lm+5
Xkeyname-CTRL_A_KEY/(CTRL_B_KEY-CTRL_A_KEY)
X.lm-5
X.s
Xwill result in a value of 0 through 25 when keyname has a value in the
Xrange of CTRL_A_KEY to CTRL_Z_KEY.  This code is really bogus, but I
Xdid not see a more feasible way of doing this.  KEY_NAME() values should
Xreally comprise another TPU data type so that ASCII could distinguish
Xbetween those values and integer values.
X.s
XTPU's pattern matching code is mostly broken.  The regular expression compiler
Xin TPU generates TPU patterns that correspond to the RE's passed to it.  The
Xbiggest problem with the TPU pattern matching is that it does not know how to
Xback out of a match, and try an alternative.  If two adjacent pieces of an RE
Xhave a non-null intersection, then they can cause a pattern match failure
Xbecause the first pattern can consume a character that would match the
Xsecond pattern, but the SEARCH() routine will not backout of a match once
Xit has been made (even in the somewhat 'kludgy' incremental mode).
$ GoSub Convert_File
$ Exit
