gregg@a.cs.okstate.edu@mandrill.CWRU.Edu (Gregg Wonderly) (10/13/87)
$ show default $ if f$search("DOC.DIR;1") .eqs. "" then - CREATE/LOG/DIRECTORY [.DOC] $ write sys$output "Creating [.DOC]VI.RNO" $ create [.DOC]VI.RNO $ DECK/DOLLARS="*$*$*EOD*$*$*" .ifnot system .! VI.RNO - Installation and help for VI emulation in TPU .! Written by Gregg Wonderly 22-JUL-1987 .! .! RUNOFF operation instructions: .! .! $ @VIDOC.COM .! .! to create a document for printing. .! .! We set the layout so that running page numbers are on the bottom .! .lo 1,2 .st .! .! Initial right margin - sections should never set it higher than this. .! Set page size too. .ps 57,70 .rm 65 .! .! Header level setup .sthl 6,0,0,8,9,1,1,9,2 .dhl D,D,lu,d,ll,ll .! .! .flags bold .flags overstrike .! .c; .sk 2 .c;Guide for VI written in TPU .title Guide for VI written in TPU .sk 2 .c;Gregg Wonderly .c;Mathematics Department .c;Oklahoma State University .sk 1 .c;22-Jul-1987 .else system .NO FLAGS ALL .P0 .ap .NO NUMBER .NPA .LM1.RM70 .I-1 1 VI .s VI is a text editor written in TPU, for more background information, see "HELP VI Introduction". .s .endif system .! .ifnot system .pg .hl 1 ^*Table of contents\* .req "vi.rnt" .pg .send toc .ifnot global .hl 1 ^*Purpose of this document\* .send toc .endif global This document provides an overview of this particular emulation of the VI editor. It does not provide information on learning to use the VI editor. It is assumed that the reader knows how to use VI to a reasonable extent, and/or has access to a VI manual or quick reference guide. .send toc .ifnot global .hl 1 ^*Introduction to VI\* .send toc .endif global .! .else system .! .i-1 2 Introduction .s .endif system .! VI is an editor which was originally written by Bill Joy at the University of Berkeley in California. It was written to work on the UNIX (UNIX is a trademark of the American Telephone and Telegraph Corporation) operating system, and until now, has not been widely available on other operating systems. VI is an excellent editor, but its full potential can not be realized without a full understanding of the commands that are available. Currently, this help file does not describe all of the keystrokes that are defined. You should consult one of the many VI quick reference guides for that information. This version of VI should be close enough to the real version that the documentation of the additional features here, and a VI quick reference guide should suffice. .s VI is a mode oriented editor, and has two modes. One mode allows text entry by simply typing (called text entry mode), and the other allows text manipulation by using the typing keys (called command mode). This is a completely different approach to editing than used by most other text editors and word processors. However, it provides some incredible possibilities for speed because one does not have to look to find function keys to perform certain editing tasks. Also, many more commands can be placed within reach of your hands because all of the keys on the keyboard are available for use during command mode operations. .s .! .if system .i-1 2 Author .s This emulation of VI was written by .s .lm+5 Gregg Wonderly .br Mathematics Department .br Oklahoma State University .s Internet: gregg@nemo.math.okstate.edu .lm-5 .s .endif system .! .ifnot system .send toc .ifnot global .hl 1 ^*Extensions to VI\* .send toc .endif global .else system .i-1 2 Extensions .s .endif system This emulation of VI contains some extensions that were made possible by the existance of supporting primitives in TPU. A partial list of these extensions follows. .s .lm+5 Select regions are available and can be used to perform many operations such as deleting, yanking, changing, shifting, changing/inverting case, compiling TPU procedures, filling regions of text to fit within a specified range of columns and writing portions of buffers to files/devices. .s Multiple buffers are available as well as multiple windows to display the buffers in. This allows you to edit/view many files at once. .s You can force the editor to expand tabs as you type them, so that they are replaced by spaces in the text. .s You can control the use of TPU's typeahead recognition so that you see each screen update action while you type (with ":set [no]update"). .s The EX mode commands, 'show buffers' and 'show files', display information abou t existing buffers, and the current list of files to edit, respectively. .s The EX mode command, sh, has an alias called 'dcl', which is a little more indicative of the action taken. .s The EX mode command, buffer, allows you to create a new buffer that may not have a file associated with it. It also allows you to create a buffer by a specific name, and associate an arbitrary file with that buffer. .s The EX mode command, messages, allows you to map the TPU message buffer unto th e current window for viewing. .s The EX mode command, delbuf, allows you to delete a buffer according to its name. .s The EX mode command, prev, allows you to move back to the previously edited buffer that you used the 'next' command to leave. .s The EX mode command, tpu, allows you to execute arbitrary TPU statements from the editor. .lm-5 .ifnot system .send toc .ifnot global .hl 1 ^*Using an initialization file\* .send toc .endif global .else system .I-1 2 Initialization .s .endif system VI allows you to use a file to initialize the options and settings that you wis h to use, automatically, each time the editor is envoked. Note that when you use VI in a subprocess, the initialization is done only when the subprocess is firs t created, and not on any subsequent attach operations. The file SYS$LOGIN:VI.INI can contain EX mode commands, one per line, that will be executed after the file(s) selected are loaded into buffers. Alternatively, the file may be located anywhere by defining the logical name, EXRC, to be the name of the file you wish to use for initialization (this name is the similar, minus a leading '.', to that used under UNIX). Also, if you have only a single line of initialization, then the process logical, EXINIT (again a holdover from UNIX), can be defined to be the line of initialization, and it will be translated, and the resulting text executed. This is generally faster than processing the EXRC file. .! .ifnot system .send toc .ifnot global .hl 1 ^*Supported EX mode commands\* .send toc .endif global .else system .I-1 2 Ex_mode .s .endif system .! EX mode is entered by typing a ":" (or the DO key). From the ":" prompt, you can perform many different functions associated with changing the operation of the editor. EX mode also allows you to perform operations such as global search and replace, block deletion of text, and many other operations that are not easily described with a single keystroke. Below is a list of the commands that can be performed from EX mode. The term, l_spec, is a specification for a line of the current file, and takes the form of either a search pattern, as in: .lm +5 .s /foo/ or ?foo? .s .lm -5 an explict line number as in "5", or perhaps a relative line number as in ".+5" which means the current line, plus five lines. There are two other special characters, like ".", they are "$" which means the last line of the file, and "%" which means every line in the file. If you specify a range of lines by separating two l_specs with a ",", the first specification must indicate a line that preceeds the second specification. If not, the message, "Bad range of lines!" will be displayed, and the command will be aborted. .if system .I-1 3 Abort_edit .else system .send toc .if global .hl 2 ^*Abort edit\* .send toc .endif global .endif system .s .LT :q[uit][!] This command quits the editor. If "!" is not specified, and there are modified buffers, then you will be told so, and the command will be aborted. You must then either retype the command with a "!" (if you really want to ignore the modified buffers, and loose those changes), or you must write out the modified buffers. .EL .if system .I-1 3 Change_output_file .else system .send toc .ifnot global .hl 2 ^*Change output file\* .send toc .endif global .endif system .s .LT :file <file spec> Changes the output file specification of the current buffer to the specified file. This will result in the buffer being written to the new file whenever a ":w", ":xit" or "ZZ" command is issued. .EL .if system .I-1 3 Compile_TPU .else system .send toc .ifnot global .hl 2 ^*Compile TPU\* .send toc .endif global .endif system .s .LT :[l_spec][,l_spec]tpu Compiles the indicated region, making the assumption, that the region contains TPU language code. .EL .if system .I-1 3 Copy_lines .else system .send toc .ifnot global .hl 2 ^*Copy lines\* .send toc .endif global .endif system .s .LT :l_spec_1,l_spec_2 c[opy] l_spec_3 The range of lines indicated by l_spec_1 and l_spec_2 are copied in their entirety, to the location after the line indicated by l_spec_3. .EL .if system .I-1 3 Create_buffers .else system .send toc .ifnot global .hl 2 ^*Create buffers\* .send toc .endif global .endif system .s .LT :b[uffer] [<buffer name>] [<file spec>] This command maps the buffer named to the current window. If there is no buffer by the name given, then a new buffer will be created. If <file spec> is given, the named file will be read into any newly created buffer. .EL .if system .I-1 3 Create_key_macro .else system .send toc .ifnot global .hl 2 ^*Create key macro\* .send toc .endif global .endif system .s .LT :map[!] <key> <key strokes> Allows you to establish a mapping or macro for a single keystroke. If a "!" is specified then the mapping/macro is in effect during text entry mode, otherwise the mapping/macro is in effect during command mode. The next time that <key> is typed in the affected mode, the string of keystokes specified will be substituted for the single key typed. ":map" with out any parameters displays the current mappings. .EL .if system .I-1 3 Delete_buffers .else system .send toc .ifnot global .hl 2 ^*Delete buffers\* .send toc .endif global .endif system .s .LT :de[lbuf][!] <buffer name> This command allows you to delete a buffer by name so that it is no longer in existance. This will destroy the contents of the buffer. If the buffer is modified you can specify the "!" to assure the the buffer is deleted. Otherwise when the buffer is modified you will be prompted to make sure that you wish to delete that buffer. An unmodifed buffer will be deleted without any prompting, whether or not a "!" is specified. .EL .if system .I-1 3 Delete_lines .else system .send toc .ifnot global .hl 2 ^*Delete lines\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]d Delete the line(s) specified. .EL .if system .I-1 3 Edit_new_file .else system .send toc .ifnot global .hl 2 ^*Edit new file\* .send toc .endif global .endif system .s .LT :e[dit] <file spec> This command allows you to switch to a different file that you want to edit. File spec is first compared to the name of an existing buffer. If there is a buffer by that name, then it is mapped to the current window. If not, then the indicated file will be read into a new buffer, which will be mapped to the current window. .EL .if system .s .LT :vi <file spec> This command is an alias for the e[dit] command. For more information see the description of that command. .EL .endif system .! .if system .I-1 3 Execute_command_file .else system .send toc .ifnot global .hl 2 ^*Execute command file\* .send toc .endif global .endif system .s .LT :so <file spec> The specified file will be read, line by line, and each line will be interpreted as an EX mode command. .EL .if system .I-1 3 Fill_text_region .else system .send toc .ifnot global .hl 2 ^*Fill text region\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]fill <left margin> <right margin> The indicated lines will be filled, wrapped, and joined so that they are as full as possible. the left and right margin values will determine how long the lines are, and where they start and begin. .EL .if system .I-1 3 Goto_Line .else system .send toc .ifnot global .hl 2 ^*Goto Line\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec] Goto the beginning of the line(s) specified. .EL .if system .I-1 3 Goto_tag_in_file .else system .send toc .ifnot global .hl 2 ^*Goto tag in file\* .send toc .endif global .endif system .s .LT :ta [tag] The tag specified, or if none, then the tag following the cursor is located in one of the files specified by the "tags" value. The associated file is loaded, or switched to, and the corresponding command executed. If the tag can not be located, then a diagnostic is issued. .EL .if system .I-1 3 Help .else system .send toc .ifnot global .hl 2 ^*Help\* .send toc .endif global .endif system .s .LT :help <VI help topic> Gives you access to this document as well as other VMS help topics from within VI. .EL .if system .I-1 3 Invert_case .else system .send toc .ifnot global .hl 2 ^*Invert case\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]in[vert] The case of all alphabetic characters in the indicated region will be inverted. .EL .if system .I-1 3 Learn_Key_Strokes .else system .send toc .ifnot global .hl 2 ^*Learn Key Strokes\* .send toc .endif global .endif system .s .LT :learn Initiates a remember of keystrokes that allows a particular sequence of key strokes to be repeated at at a later time by typing a single key. This facility is similar to that provided by the :map command. The difference being that you must "know" the keys you want to type for the :map command. A learn sequence is remember as you type the keys and the associated actions are carried out. When you are done typing a learn sequence, then you should use CTRL-R to bind that sequence to the desired key. Note that :set undomap also pertains to how learned sequence behave when undo is performed. .EL .if system .I-1 3 Lower_case .else system .send toc .ifnot global .hl 2 ^*Lower case\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]lo[wer] The case of all alphabetic characters in the indicated region will be changed to lower case. .EL .if system .I-1 3 Message_buffer .else system .send toc .ifnot global .hl 2 ^*Message buffer\* .send toc .endif global .endif system .s .LT :me[ssages] This command simply maps the TPU messages buffer to the current window so that its contents can be viewed. .EL .if system .I-1 3 Move_lines .else system .send toc .ifnot global .hl 2 ^*Move lines\* .send toc .endif global .endif system .s .LT :l_spec_1,l_spec_2 m[ove] l_spec_3 The range of lines indicated by l_spec_1 and l_spec_2 are moved in their entirety, to the location after the line indicated by l_spec_3. .EL .if system .I-1 3 Next_file .else system .send toc .ifnot global .hl 2 ^*Next file\* .send toc .endif global .endif system .s .LT :n[ext] Moves the pointer in the list of files currently being edited to the next file. The buffer associated with that file will be mapped to the current window. .EL .if system .I-1 3 Perform_Macros .else system .send toc .ifnot global .hl 2 ^*Perform Macros\* .send toc .endif global .endif system .s .LT :@<a-z> Executes the first line of the indicated named buffers as command mode commands. .EL .if system .I-1 3 Previous_file .else system .send toc .ifnot global .hl 2 ^*Previous file\* .send toc .endif global .endif system .s .LT :p[rev] Moves the pointer in the list of files currently being edited to the previous file. The buffer associated with that file will be mapped to the current window. .EL .if system .I-1 3 Read_file_into_buffer .else system .send toc .ifnot global .hl 2 ^*Read file into buffer\* .send toc .endif global .endif system .s .LT :[l_spec]r[ead] <file spec> Reads the contents of the specified file, and inserts it into the current buffer after the indicated line. If no line is specified, then the current line is used. .EL .if system .I-1 3 Rewind_file_list .else system .send toc .ifnot global .hl 2 ^*Rewind file list\* .send toc .endif global .endif system .s .LT :rew Will reset the pointer in the list of files being edit to the first one. The buffer associated with that file will be mapped to the current window. .EL .if system .I-1 3 Select_regions .else system .send toc .ifnot global .hl 2 ^*Select regions\* .send toc .endif global .endif system .s .LT :select Toggles the status of the select region that can be used in place of a range specified in one of the EX mode commands, as well as any of the, buffer altering, command mode editing commands. .EL .if system .I-1 3 Set_default_dir .else system .send toc .ifnot global .hl 2 ^*Set default dir\* .send toc .endif global .endif system .s .LT :cd <default spec> Changes the default directory that that the editor process is running in. The new default directory is shown in the message window. .EL .S .LT :chdir Same as the cd command. .EL .if system .I-1 3 Set_options .else system .send toc .ifnot global .hl 2 ^*Set options\* .send toc .endif global .endif system .s .LT :set [no]option[=value] [...] Sets one or more options that dictate the behavior of the editor these options are described in full later. If the option is boolean in nature as is "wrapscan", then you must either specify "wrapscan" or "nowrapscan". If the option is variable in nature, as is "scroll", then you should specify "option=value" as in "scroll=21". .EL .if system .I-1 3 Show_buffers .else system .send toc .ifnot global .hl 2 ^*Show buffers\* .send toc .endif global .endif system .s .LT :show buffers Displays the list of currently active buffers that you have created for editing files. .EL .if system .I-1 3 Show_file_list .else system .send toc .ifnot global .hl 2 ^*Show file list\* .send toc .endif global .endif system .s .LT :show files Displays the list of one or more files that matched the file spec that you last gave as the parameter to a "vi" or "edit" command. This list of files is used by the ":next", ":prev" and ":rew" EX commands to allow you to cycle through a list of files in a logical sequence. You can change the line that the cursor is on to change which file :next and :prev display by using, ^D ^U, h, j, k, and l key strokes. .EL .if system .I-1 3 Show_tags .else system .send toc .ifnot global .hl 2 ^*Show Tags\* .send toc .endif global .endif system .s .LT :show tags Displays the contents of the buffer that is used to resolve "tag" references. This can be used to make sure that you are specifying the proper tags. .EL .if system .I-1 3 Spawn_command .else system .send toc .ifnot global .hl 2 ^*Spawn command\* .send toc .endif global .endif system .s .LT :!<DCL command> Spawns a subprocess to run the given DCL command in. Note that due to limitations of TPU, there is no prompt asking you to "[Hit ENTER to continue]" before the screen is redrawn when the command finishes. Therefore, you will have to use ^S/^Q or HOLD SCREEN to pause the display. .EL .if system .I-1 3 Spawn_subprocess .else system .send toc .ifnot global .hl 2 ^*Spawn subprocess\* .send toc .endif global .endif system .s .LT :sh (:dcl) Spawns a DCL subprocess that you can use to perform some DCL related task with, and then LOGOUT of. .EL .if system .I-1 3 Substitution .else system .send toc .ifnot global .hl 2 ^*Substitution\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]s/from_re/to_re/[g][q] Perform the indicated substitution on the indicated line(s) of text. Note that '&' is a single character alias for the last substitution made (not including line specs or options). The [g] option causes every occurence on a line to be replaced. By default, only the first is replaced. The [q] option will cause the editor to pause and display the text matching the from_re, before each substition. You are given the opportunity to say whether or not the substitution is to be performed. .EL .if system .I-1 3 Text_Abbreviations .else system .send toc .ifnot global .hl 2 ^*Text Abbreviations\* .send toc .endif global .endif system .s .LT :abbr <short> <long> Creates an abbreviation for the text given by <long>. <short> is a simple string of characters, e.g. ATT, and <long> is a more complicated string as in, American Telephone and Tele- graph. ":abbr" by itself displays a list of the current abbreviations. :unabbr <short> Removes a previously defined abbrev- iation that was defined with ":abbr". .EL .if system .I-1 3 Unmap_key_macros .else system .send toc .ifnot global .hl 2 ^*Unmap key macros\* .send toc .endif global .endif system .s .LT :unmap[!] Removes a previously established map. The "!" must be present if you wish to unmap a map that was made specifying the "!". .EL .if system .I-1 3 Upper_case .else system .send toc .ifnot global .hl 2 ^*Upper case\* .send toc .endif global .endif system .s .LT :l_spec[,l_spec]upper The case of all alphabetic characters in the indicated region will be changed to upper case. .EL .! .if system .I-1 3 Write_buffer .else system .send toc .ifnot global .hl 2 ^*Write buffer\* .send toc .endif global .endif system .s .LT :[l_spec][,l_spec]w[rite][!] [<file spec>] The indicated line(s) will be written to a file. The name of the file can either be specified, or will default to the current buffer. There are certain operations that are not permitted unless the "!" is typed following "w[rite]". If "!" is not present, you can NOT write all or portions of the buffer to a file that already exists, unless it is the file associated with the current buffer. Also, you can not write out a portion of the current buffer to it's associated file without specifying the "!". This protects you from unknowingly clobbering a file. :[l_spec][,l_spec]wq[!] [<file spec>] This command is identical to typing a ":w" command followed by typing a ":q" command. See the descriptions of those commands for more details. .EL .if system .I-1 3 Write_and_exit .else system .send toc .ifnot global .hl 2 ^*Write and exit\* .send toc .endif global .endif system .s .LT :x[it] Is synomous with typing "ZZ" while in command mode. The contents of the current buffer will be written out if they are modified. All other buffers will then be examined, and you will be asked whether or not you wish to write out any other modified buffer. The ":set nowrite" command will force a modifed buffer to be ignored during this search. .EL .if system .I-1 2 Set_options .else system .send toc .ifnot global .hl 1 ^*Set options\* .send toc .endif global .endif system .s The ":set", EX, command allows you to change the behavior of VI under certain circumstances. There are several characteristics that you may or may not wish to make use of. Therefore, these can be altered by setting options. Below is a list of options that you can set using the ":set" command. Some of these options are either ON or OFF, and some have values. The proper syntax for changing the option therefore varies, and is outlined with each option. .s .if system .I-1 3 Auto_Send_to_DCL .else system .send toc .ifnot global .hl 2 ^*Auto Send to DCL\* .send toc .endif global .endif system .s .LT :set [no]senddcl Determines whether or not pressing <RETURN> while in the DCL buffer, and while in insert mode, causes the current line to be sent to the DCL subprocess. If senddcl is in effect, then pressing return while you are in the DCL buffer will cause the current line to be sent to the DCL subprocess. The line typed, as well as the output from the DCL command is part of the undo region that is deleted if you use undo after the DCL command output appears in the DCL buffer. See the HELP section on the DCL process for more information. .EL .if system .I-1 3 Auto_line_wrap .else system .send toc .ifnot global .hl 2 ^*Auto line wrap\* .send toc .endif global .endif system .s .LT :set wrapmargin=integer Sets the number of columns from the right margin at which VI will wrap text to the beginning of the next line. Normally, no wrapping is done, i.e. wrapmargin=0 is in effect. .EL .if system .I-1 3 Auto_write .else system .send toc .ifnot global .hl 2 ^*Auto write\* .send toc .endif global .endif system .s .LT :set [no]autowrite Determines whether or not modified buffers are automatically written out when you map a different buffer to the window that a modified buffer is mapped to. .EL .if system .I-1 3 Case_insensitive_search .else system .send toc .ifnot global .hl 2 ^*Case insensitive search\* .send toc .endif global .endif system .s .LT :set [no]ignorecase Determines whether or not case is ignored during string search operations. Normally, case is ignored. .EL .if system .I-1 3 Change_file_list .else system .send toc .ifnot global .hl 2 ^*Change file list\* .send toc .endif global .endif system .s .LT :set file[s] <file spec> Changes the list of files to edit to be those specified by <file spec>. <file spec> should be a single filespec, or a comma separated list. .EL .if system .I-1 3 Error_bells .else system .send toc .ifnot global .hl 2 ^*Error Bells\* .send toc .endif global .endif system .s .LT :set [no]errorbells Determines whether or not a bell is sounded when certain errors occur. .EL .if system .I-1 3 Expand_tabs .else system .send toc .ifnot global .hl 2 ^*Expand tabs\* .send toc .endif global .endif system .s .LT :set [no]tabs Determines whether or not tabs are expanded to the proper number of spaces as you type. "notabs" will cause tabs to be expanded. .EL .if system .I-1 3 Line_report .else system .send toc .ifnot global .hl 2 ^*Line report\* .send toc .endif global .endif system .s .LT :set report=integer Sets the number of lines at which VI will tell you what you did. E.g. if you type, 2yy, then VI will quietly yank 2 lines. If you type, 10yy, then VI will tell you "10 lines yanked", providing report is set to some number less than 10. The same thing occurs for deletion, and put operations. If more than 'report' lines are added/deleted, then VI tells you about it. Report is set to 5 by default. .EL .if system .I-1 3 No_write .else system .send toc .ifnot global .hl 2 ^*No write\* .send toc .endif global .endif system .s .LT :set [no]write Modifies the internal TPU flags for the current buffer that tell TPU whether or not to ignore modifications to a buffer. This flag is examined during exit from VI to determine whether or not to prompt you to write out the buffer. ":quit" will ignore modified buffers that have this flag set. .EL .if system .I-1 3 Paragraph_delimiters .else system .send toc .ifnot global .hl 2 ^*Paragraph delimiters\* .send toc .endif global .endif system .s .LT :set paragraphs=<pairs> Sets pairs of characters that are assumed to occur at the beginning of the line following a ".". It is usually the case that these pairs of characters are RUNOFF commands. In VI under UNIX, these pairs are NROFF formatting commands. A single character, as in .P, should be followed by a space in the string of pairs of characters. If a paragraph movement (i.e. } or {) fails to locate any of the specified patterns, then the next blank line will be searched for. .EL .if system .I-1 3 Regular_expression_use .else system .send toc .ifnot global .hl 2 ^*Regular expression use\* .send toc .endif global .endif system .s .LT :set [no]magic Determines whether or not regular expressions are used in search strings. By default, regular expressions are used. .EL .if system .I-1 3 Screen_length .else system .send toc .ifnot global .hl 2 ^*Screen length\* .send toc .endif global .endif system .s .LT :set window=lines Sets the length of the screen in lines that is used by VI. The UNIX version of VI chooses to use the bottom of the screen as the base of a small window. The TPU version uses the top of the screen. The maximum number of lines is terminal dependent, the minimum is 3. .EL .if system .I-1 3 Screen_width .else system .send toc .ifnot global .hl 2 ^*Screen width\* .send toc .endif global .endif system .s .LT :set width=cols Sets the width of the current window to the specified value. The maximum setting is terminal dependent, while the minimum is left up to the user. .EL .if system .I-1 3 Scroll_amount .else system .send toc .ifnot global .hl 2 ^*Scroll amount\* .send toc .endif global .endif system .s .LT :set scroll=integer Sets the default number of lines that the window scrolls when ^D or ^U is typed. This number can also be set by preceeding ^D or ^U with a count. .EL .if system .I-1 3 Section_delimiters .else system .send toc .ifnot global .hl 2 ^*Section delimiters\* .send toc .endif global .endif system .s .LT :set sections=<pairs> Sets pairs of characters that are assumed to occur at the beginning of the line following a ".". It is usually the case that these pairs of characters are RUNOFF commands. In VI under UNIX, these pairs are NROFF formatting commands. A single character, as in .P, should be followed by a space in the string of pairs of characters. There are some pairs of characters that are exceptions. The pair of characters, +c, really means a single '{' at the beginning of the line. The pair of characters, +f, really means the string, subroutine, or the string, function, anywhere in the line. The pair of characters, +t, really means the string, procedure, at the beginning of the line. If a section movement (i.e. ]] or [[) fails, then the next blank line will also be searched for. .EL .if system .I-1 3 Shift_width .else system .send toc .ifnot global .hl 2 ^*Shift width\* .send toc .endif global .endif system .s .LT :set shiftwidth=integer Sets the number of columns that text is to be shifted by when the shift left or shift right commands are executed. .EL .if system .I-1 3 Show_settings .else system .send toc .ifnot global .hl 2 ^*Show settings\* .send toc .endif global .endif system .s .LT :set all Displays the current values of the options. .EL .if system .I-1 3 Tab_stops .else system .send toc .ifnot global .hl 2 ^*Tab stops\* .send toc .endif global .endif system .s .LT :set tabstops=integer Sets the number of columns on the screen that is used to represent a tabstop. The default is eight. .EL .if system .I-1 3 Tag_Case .else system .send toc .ifnot global .hl 2 ^*Tag Case\* .send toc .endif global .endif system .s .LT :set [no]tagcase Determines whether or not the case of a tag is recognized when searching for it. For case insensitive languages or facilities, set notagcase should be used, otherwise the default, tagcase, is sufficient. .EL .if system .I-1 3 Tags_files .else system .send toc .ifnot global .hl 2 ^*Tags files\* .send toc .endif global .endif system .s .LT :set tags=<file list> Sets the list of files that are used to resolve tag references. Each file name should be separated by a space. .EL .if system .I-1 3 Type_ahead .else system .send toc .ifnot global .hl 2 ^*Type ahead\* .send toc .endif global .endif system .s .LT :set [no]update Determines whether or not an explicit TPU UPDATE is done after each keystroke. Normally, TPU will process typeahead by not updating the window until there is no typeahead. ":set update" will foil these attempts, and force an update to occur after each keystroke during command level processing. .EL .if system .I-1 3 Undo_and_maps .else system .send toc .ifnot global .hl 2 ^*Undo and maps\* .send toc .endif global .endif system .s .LT :set [no]undomap Controls whether or not an attempt is made to make it possible to undo all buffer operations that occur during the execution of a map or learned key sequence (see the :map and :learn commands). Normally, maps are undoable because a copy of the entire buffer is saved before a map is executed. While editing large buffers, this makes it rather slow to use maps, so you can turn this feature off when it is deemed not necessary. .EL .if system .I-1 3 Wrap_on_search .else system .send toc .ifnot global .hl 2 ^*Wrap on search\* .send toc .endif global .endif system .s .LT :set [no]wrapscan Determines whether or not search operations are continued at the end/beginning of a buffer by moving to the beginning/end, respecively. Normally, wrapscan is in effect. .EL .ifnot system .send toc .ifnot global .hl 1 ^*Additional key strokes\* .send toc .endif global .else system .I-1 2 Additional_key_strokes .s .endif system There are some additional key strokes available that pertain to using added features of this version of VI. Below is an outline of the added key strokes. .ifnot system .send toc .ifnot global .hl 2 ^*Key pad keys used\* .send toc .endif global .else system .s .endif system .lm+5 .LT KP0 Temporarily creates a window that is the size of the entire screen, and maps the current buffer to that window. Use KP1 (Delete window) to remove this window, and uncover the windows that were occluded by the created window. This command only works when there is more than one window on the screen. KP1 Delete the current window from the screen and release its space to one of the surrounding windows. KP2 Split the current window into two windows divided by a status line place at the line that the cursor currently occupies. KP3 Move down the screen to the next window. KP4 Shrink the size of the current window by one line, making the window above, or below larger. An attempt is made to shrink the window by pulling up the bottom line, if that fails, then an attempt is made to pull down the top line. If that fails, then the window can not be shrunk. KP5 Enlarge the current window by one line. The same algorithym as for shrink is used to determine how to alter the size of the window. KP6 Move up the screen to the next window. PF1 When using VI on a VT100 series terminal, it is not possible to have TPU recognize the ESCAPE character, ASCII 27, it its primary processing loop. When using a VT200 series terminal, this is circumvented by using F11 as if it were ESCAPE. PF1 provides this functionality for the VT100 series of terminals. PF2 PF2 envokes the help facilities available for VI. .EL .ifnot system .send toc .ifnot global .hl 2 ^*Keyboard keys used\* .send toc .endif global .else system .s .lm-5 KEY BOARD KEYS USED .lm+5 .endif system .s .LT CTRL-X The CTRL-X key is used to send a DCL command to the DCL subprocess that is bound to the DCL buffer. CTRL-R The CTRL-R key is used to remember a learn sequence any bind it to a key. The :learn command initiates the learning process. .EL .lm-5 .ifnot system .send toc .ifnot global .hl 1 ^*Windows and buffers\* .send toc .endif global .else system .I-1 2 Windows_and_buffers .s .endif system The multiple window features of this implementation of VI make it possible to view multiple portions of a single file, or different portions of different files simultaneously. It is also possible to yank/delete text from one window/buffer and place it into another buffer. To accomplish this, all named buffers, and numbered, deletion buffers are globally available. I.E. there are no buffers that are local to a buffer, with a single exception being the information pertaining to the undo operation. .s If you type 'u' while in a buffer different from the one that you made the last change in, you will see the message .s .lm+5 Undo not in this buffer. .s .lm-5 displayed at the bottom of the screen. .s For more information on using multiple buffers and window, consult the section on additional key strokes. .ifnot system .send toc .ifnot global .hl 1 ^*Display differences\* .send toc .endif global .else system .I-1 2 Display_differences .s .endif system Due to certain characteristics of the TPU screen management facilities, certain activities on the display differ from those found in UNIX VI. One difference is TPU's inability to display control characters in an expanded format, such as "^H" for a literal backspace character in the text. While commands are being entered in EX mode, you will see that control characters are displayed as "^?" where the "?" character is replaced by the appropriate character corresponding to the control character typed. This type of expansion is possible here, but it is not possible to do it in the text buffers displayed on the screen. If a key typed does not correspond to a printable ASCII character, then a backward question mark will be displayed when that key is typed. .ifnot system .send toc .ifnot global .hl 1 ^*Tag files\* .send toc .endif global .else system .I-1 2 Tag_files .s .endif system A tags file is a file that contains one or more lines each of which contains 3 columns of text. Each column is separated by exactly one tab character. The first column of text is the "tag" string. The second column is the file with which that tag is associated, and the remainder of the line contains an EX mode command that will perform an action associated with that tag. Usually, the action locates a specific line in the file that is associated with the tag. VI will position the cursor at the bottom of the buffer prior to execution the EX mode command. Typically, a tags file is used to locate the definition of a languange procedure, or text formatter macro. .s A simple tags file can be constructed by using a program to analyze the text of a file, and locate the lines that should be tagged. In the UNIX operating system, there is a program called CTAGS(1) that analyzes C language source files, and creates a 'tags' file that allows access to the function .ifnot system .send toc .ifnot global .hl 1 ^*Kept Editors\* .send toc .endif global .else system .I-1 2 Kept_Editors .s .endif system VAX/VMS and TPU support the notion of a "Kept Editor". A "Kept Editor" is a subprocess that can be ATTACH'd to and from at will. The VI$ROOT:[EXE]VI.COM command procedure takes care of all of the details of carrying out the operation of the "Kept Editor". It knows how to locate, and attach to an existing "Kept Editor", and how to automatically create a new one if there is not one running. .ifnot system .send toc .ifnot global .hl 1 ^*Other TPU's\* .send toc .endif global .else system .I-1 2 Other_Tpus .s .endif system If you wish to use other TPU applications, besides VI, then there is a program that can help in the negotiation of which CALL_USER routines and which section file to use. VI$ROOT:[SRC]VI.MAR is the source to this program. It translates the logical names VISECINI and VI$CALLUSER instead of the normal TPUSECIN and TPUCALLUSER logical names. VI$ROOT:[EXE]VI.CLD is a CLD file that you can use the "SET COMMAND" command on to make VI.EXE useable. You can make VI.EXE by using the command "@MAKE EXE" from within the VI$ROOT:[SRC] directory. Then you will need to use the command .s .lm+5 $ SET COMMAND VI$ROOT:[EXE]VI .lm-5 .s If you desire to use VI$ROOT:[EXE]VI.COM to run VI in a subprocess, then you should install VI.CLD into SYS$SHARE:DCLTABLES.EXE. See the Command Language Definition manual for more information on doing this, if you are no familiar with the procedure. This is necessary because the command tables are not propagated to a subprocess when it is created. .ifnot system .send toc .ifnot global .hl 1 ^*The DCL buffer\* .send toc .endif global .else system .I-1 2 DCL_buffer .s .endif system There is a special buffer that is always associated with a DCL subprocess. The "DCL buffer" can be used as an alternate method of collecting DCL output if the filter_region (!<movement><command>) and read_from_command (:r!<command> ) capabilities do not fit your needs. Any line in any buffer can be sent to the DCL subprocess by placing the cursor on that line, and typing a ^X (Control-X). .s When you type ^X, several actions can happen. If you are not already in the DCL buffer, then the current window will be split, and the top window will be mapped to the DCL buffer, and you will be positioned there. In either case, the command will be copied into the DCL buffer, and will also be sent to the DCL subprocess. If the subprocess does not exist, then it will be created. There are several ways that any one of these steps can fail. If they do, and appropriate diagnostic will be issued to allow you to resolve the problem. .s The setable option, senddcl, allows you to use the DCL buffer interactively, somewhat. When senddcl is in effect, you can place yourself in insert mode, using A, a, I, i, R, O, or o, and then type a DCL command. When you press enter at the end of the line, that line is sent to the DCL subprocess as input. The output of the DCL command is placed into the DCL buffer as if you had typed it in addition to the command line. Thus, undo will allow you to remove both the command line, and the output from the DCL buffer with a minimum of trouble. .ifnot system .send toc .ifnot global .hl 1 ^*TPU bugs revealed\* .send toc .endif global .else system .I-1 2 TPU_Bugs_Revealed .s .endif system There are several problems with TPU that cause problems with this implementatio n of VI. Outlined below are some of the more major problems. There are probably some that I have forgotten by now. .s Every place that there is a TPU statement of the form: .s .lm+5 EXECUTE (COMPILE ("vi$global_var := ....")); .lm-5 .s there is a statement preceeding that line that initializes vi$global_var to zero. This is necessary to get around a bug in TPU that causes the storage that vi$global_var is associated with before the EXECUTE (COMPILE ()), to not be disassociated. TPU would randomly scribble on string and buffer descriptors until it would stop with an "internal error, please SPR this", message. .s Another problems has to do with the KEY_NAME() values of keys. It appears that GET_INFO (DEFINED_KEY...) does not return proper KEY_NAME() values for certain keys. In particular, you will notice that maps to keys like q, v, and others will be displayed with the key as a backward question mark, instead of the proper letter, when you issue the :map command to display the current maps. This is currently (apparently) unsurmountable. Some trickery (hacking I like to call it) could be done to coerce the bogus key values into something reasonable, but I decided not to do that. .s Still another problem has to do with the fact that ASCII (CTRL_?_KEY) always returns ASCII(0) instead of ASCII(1) through ASCII(26) as would be convienent. I have written some code (hacks at best) to get around this problem by normalizing the values around the value of CTRL_A_KEY. An expression of the form: .s .lm+5 keyname-CTRL_A_KEY/(CTRL_B_KEY-CTRL_A_KEY) .lm-5 .s will result in a value of 0 through 25 when keyname has a value in the range of CTRL_A_KEY to CTRL_Z_KEY. This code is really bogus, but I did not see a more feasible way of doing this. KEY_NAME() values should really comprise another TPU data type so that ASCII could distinguish between those values and integer values. .s TPU's pattern matching code is mostly broken. The regular expression compiler in TPU generates TPU patterns that correspond to the RE's passed to it. The biggest problem with the TPU pattern matching is that it does not know how to back out of a match, and try an alternative. If two adjacent pieces of an RE have a non-null intersection, then they can cause a pattern match failure because the first pattern can consume a character that would match the second pattern, but the SEARCH() routine will not backout of a match once it has been made (even in the somewhat 'kludgy' incremental mode). *$*$*EOD*$*$* $ if f$search("DOC.DIR;1") .eqs. "" then - CREATE/LOG/DIRECTORY [.DOC] $ write sys$output "Creating [.DOC]VI.RNT" $ create [.DOC]VI.RNT $ DECK/DOLLARS="*$*$*EOD*$*$*" .! DSRTOC version V2.1-09 .! RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN .SAVE .NO FLAGS ALL .NO FLAGS BREAK .NO FLAGS CAPITALIZE .NO FLAGS ENDFOOTNOTE .NO FLAGS HYPHENATE .NO FLAGS INDEX .NO FLAGS PERIOD .NO FLAGS SPACE .NO FLAGS SUBSTITUTE .FLAGS ACCEPT _ .FLAGS BOLD * .FLAGS COMMENT ! .FLAGS LOWERCASE \ .FLAGS OVERSTRIKE % .FLAGS UNDERLINE & .FLAGS UPPERCASE ^ .FLAGS ALL .NO FILL .NO JUSTIFY .LEFT MARGIN 8 .RIGHT MARGIN 70 .PAGE SIZE , 70 .CENTER;CONTENTS .BLANK .TEST PAGE 2 1 Table of contents . . . . . . . . . . . . . . . . . 2 .ifnot global 2 Purpose of this document . . . . . . . . . . . . . . 4 .endif global .ifnot global 3 Introduction to VI . . . . . . . . . . . . . . . . . 4 .endif global .ifnot global 4 Extensions to VI . . . . . . . . . . . . . . . . . . 4 .endif global .ifnot global 5 Using an initialization file . . . . . . . . . . . . 5 .endif global .ifnot global 6 Supported EX mode commands . . . . . . . . . . . . . 5 .endif global .if global 6_.1 Abort edit . . . . . . . . . . . . . . . . . . . . 6 .endif global .ifnot global 6_.2 Change output file . . . . . . . . . . . . . . . . 6 .endif global .ifnot global 6_.3 Compile TPU . . . . . . . . . . . . . . . . . . . 6 .endif global .ifnot global 6_.4 Copy lines . . . . . . . . . . . . . . . . . . . . 7 .endif global .ifnot global 6_.5 Create buffers . . . . . . . . . . . . . . . . . . 7 .endif global .ifnot global 6_.6 Create key macro . . . . . . . . . . . . . . . . . 7 .endif global .ifnot global 6_.7 Delete buffers . . . . . . . . . . . . . . . . . . 7 .endif global .ifnot global 6_.8 Delete lines . . . . . . . . . . . . . . . . . . . 8 .endif global .ifnot global 6_.9 Edit new file . . . . . . . . . . . . . . . . . . 8 .endif global .ifnot global 6_.10 Execute command file . . . . . . . . . . . . . . . 8 .endif global .ifnot global 6_.11 Fill text region . . . . . . . . . . . . . . . . . 8 .endif global .ifnot global 6_.12 Goto Line . . . . . . . . . . . . . . . . . . . . 8 .endif global .ifnot global 6_.13 Goto tag in file . . . . . . . . . . . . . . . . . 9 .endif global .ifnot global 6_.14 Help . . . . . . . . . . . . . . . . . . . . . . . 9 .endif global .ifnot global 6_.15 Invert case . . . . . . . . . . . . . . . . . . . 9 .endif global .ifnot global 6_.16 Learn Key Strokes . . . . . . . . . . . . . . . . 9 .endif global .ifnot global 6_.17 Lower case . . . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.18 Message buffer . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.19 Move lines . . . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.20 Next file . . . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.21 Perform Macros . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.22 Previous file . . . . . . . . . . . . . . . . . 10 .endif global .ifnot global 6_.23 Read file into buffer . . . . . . . . . . . . . 11 .endif global .ifnot global 6_.24 Rewind file list . . . . . . . . . . . . . . . . 11 .endif global .ifnot global 6_.25 Select regions . . . . . . . . . . . . . . . . . 11 .endif global .ifnot global 6_.26 Set default dir . . . . . . . . . . . . . . . . 11 .endif global .ifnot global 6_.27 Set options . . . . . . . . . . . . . . . . . . 11 .endif global .ifnot global 6_.28 Show buffers . . . . . . . . . . . . . . . . . . 12 .endif global .ifnot global 6_.29 Show file list . . . . . . . . . . . . . . . . . 12 .endif global .ifnot global 6_.30 Show Tags . . . . . . . . . . . . . . . . . . . 12 .endif global .ifnot global 6_.31 Spawn command . . . . . . . . . . . . . . . . . 12 .endif global .ifnot global 6_.32 Spawn subprocess . . . . . . . . . . . . . . . . 13 .endif global .ifnot global 6_.33 Substitution . . . . . . . . . . . . . . . . . . 13 .endif global .ifnot global 6_.34 Text Abbreviations . . . . . . . . . . . . . . . 13 .endif global .ifnot global 6_.35 Unmap key macros . . . . . . . . . . . . . . . . 13 .endif global .ifnot global 6_.36 Upper case . . . . . . . . . . . . . . . . . . . 14 .endif global .ifnot global 6_.37 Write buffer . . . . . . . . . . . . . . . . . . 14 .endif global .ifnot global 6_.38 Write and exit . . . . . . . . . . . . . . . . . 14 .endif global .ifnot global 7 Set options . . . . . . . . . . . . . . . . . . . 15 .endif global .ifnot global 7_.1 Auto Send to DCL . . . . . . . . . . . . . . . . 15 .endif global .ifnot global 7_.2 Auto line wrap . . . . . . . . . . . . . . . . . 15 .endif global .ifnot global 7_.3 Auto write . . . . . . . . . . . . . . . . . . . 15 .endif global .ifnot global 7_.4 Case insensitive search . . . . . . . . . . . . 16 .endif global .ifnot global 7_.5 Change file list . . . . . . . . . . . . . . . . 16 .endif global .ifnot global 7_.6 Error Bells . . . . . . . . . . . . . . . . . . 16 .endif global .ifnot global 7_.7 Expand tabs . . . . . . . . . . . . . . . . . . 16 .endif global .ifnot global 7_.8 Line report . . . . . . . . . . . . . . . . . . 16 .endif global .ifnot global 7_.9 No write . . . . . . . . . . . . . . . . . . . . 17 .endif global .ifnot global 7_.10 Paragraph delimiters . . . . . . . . . . . . . . 17 .endif global .ifnot global 7_.11 Regular expression use . . . . . . . . . . . . . 17 .endif global .ifnot global 7_.12 Screen length . . . . . . . . . . . . . . . . . 17 .endif global .ifnot global 7_.13 Screen width . . . . . . . . . . . . . . . . . . 18 .endif global .ifnot global 7_.14 Scroll amount . . . . . . . . . . . . . . . . . 18 .endif global .ifnot global 7_.15 Section delimiters . . . . . . . . . . . . . . . 18 .endif global .ifnot global 7_.16 Shift width . . . . . . . . . . . . . . . . . . 18 .endif global .ifnot global 7_.17 Tab stops . . . . . . . . . . . . . . . . . . . 19 .endif global .ifnot global 7_.18 Tag Case . . . . . . . . . . . . . . . . . . . . 19 .endif global .ifnot global 7_.19 Tags files . . . . . . . . . . . . . . . . . . . 19 .endif global .ifnot global 7_.20 Type ahead . . . . . . . . . . . . . . . . . . . 19 .endif global .ifnot global 7_.21 Undo and maps . . . . . . . . . . . . . . . . . 20 .endif global .ifnot global 7_.22 Wrap on search . . . . . . . . . . . . . . . . . 20 .endif global .ifnot global 8 Additional key strokes . . . . . . . . . . . . . . 20 .endif global .ifnot global 8_.1 Key pad keys used . . . . . . . . . . . . . . . 20 .endif global .ifnot global 8_.2 Keyboard keys used . . . . . . . . . . . . . . . 21 .endif global .ifnot global 9 Windows and buffers . . . . . . . . . . . . . . . 22 .endif global .ifnot global 10 Display differences . . . . . . . . . . . . . . . 22 .endif global .ifnot global 11 Tag files . . . . . . . . . . . . . . . . . . . . 22 .endif global .ifnot global 12 Kept Editors . . . . . . . . . . . . . . . . . . . 23 .endif global .ifnot global 13 Other TPU's . . . . . . . . . . . . . . . . . . . 23 .endif global .ifnot global 14 The DCL buffer . . . . . . . . . . . . . . . . . . 23 .endif global .RESTORE *$*$*EOD*$*$* $ if f$search("DOC.DIR;1") .eqs. "" then - CREATE/LOG/DIRECTORY [.DOC] $ write sys$output "Creating [.DOC]VIDOC.COM" $ create [.DOC]VIDOC.COM $ DECK/DOLLARS="*$*$*EOD*$*$*" $ ! This command procedure builds copies of the various $ ! VI documentation files $ ! $ DO="@[-.EXE]DO" $ IF F$LOGICAL ("VI$ROOT") .NES. "" THEN DO="@[EXE]DO" $ ! $ RM="" $ IF P2 .NES. "" THEN RM=P2 $ IF P1 .NES. "" THEN GOTO 'P1' $ ! $ ! Build the printable manual by default $ ! $ MANUAL: $ VARS="MANUAL" ! Actually there is no such variant, but something is nee ded $ EXT="MEM" $ IF RM .EQS. "" THEN RM=8 $ GOTO PROCESS $ ! $ ! Build the on-line help manual $ ! $ HELP: $ VARS="SYSTEM" $ EXT="HLP" $ IF RM .EQS. "" THEN RM=0 $ GOTO FINAL $ ! $ PROCESS: $ ! $ DO RUNOFF/LOG/OUT=NLA0:/RIGHT='RM'/INTERMEDIATE/MESS=USER/VAR='VARS' - VI.RNO $ ! $ ! Do the table of contents $ ! $ DO RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN $ ! $ FINAL: $ DO RUNOFF/LOG/OUT=VI.'EXT'/RIGHT='RM'/MESS=USER/VAR='VARS' VI.RNO $ DO PURGE VI.'EXT',VI.RNT $ ! $ DO DELETE VI.BRN;* $ ! $ IF P1 .NES. "HELP" THEN EXIT $ ! $ INSTALL_HELP: $ ! $ ! Reinstall help file $ ! $ WRITE SYS$OUTPUT " " $ IF F$SEARCH("VI.HLB") .EQS. "" THEN DO LIB/LOG/CREATE/HELP VI $ INQUIRE/NOPUNCT HELPLIB "Name of library to install HELP files in? " $ DO LIB/REPLACE/HELP 'HELPLIB' VI.'EXT' $ EXIT $ ! $ ! Just install the HELP file $ ! $ HELPINST: $ EXT="HLP" $ VARS="HELP" $ GOTO INSTALL_HELP *$*$*EOD*$*$* $ if f$search("DOC.DIR;1") .eqs. "" then - CREATE/LOG/DIRECTORY [.DOC] $ write sys$output "Creating [.DOC]README." $ create [.DOC]README. $ DECK/DOLLARS="*$*$*EOD*$*$*" There are 13 parts to the distribution of VI written in TPU. The first, this file, is a plain text file. The remainder, are DCL command files. Files 2-13 should each be executed as DCL procedures in sequence. Below is a sequence of steps that should allow you to get VI up and running. 1) You should pick a directory to place VI under, and place all 13 files in that directory. Then, you can begin extracting. Three directories will be created, [.SRC], [.EXE], and [.DOC]. The directory names should reveal the purposes of these directories. 2) Place all 13 of the VI parts into the directory chosen in step 1. For each part, 2 through 13, execute the file as a command procedure using the command "@<filename>", where <filename> is the name of the file to execute (e.g. @VI_2.COM, followed by @VI_3.COM, etc). 3) After executing the 13th command file, you should set default to the [.SRC] directory, and use the commands "$ @make exe", and "$ @make tpusubs" to create the VI.EXE executable, and the CALL_USER routines for VI to use. 4) Next, set default to [-.DOC] (from the SRC directory), and execute the command "$ VIDOC", and "$ @VIDOC HELP" to create a printable version of the current documentation, as well as a HELP file that VI can use. When asked the question: Name of library to install HELP files in? you should probably answer with the full path to the current directory. VI.TPU contains the path VI$ROOT:[DOC]VI.HLB as the place where it will work from, so if you do not place the help file in this library (It will automatically be created for you), then you must edit VI.TPU to contain the proper path. 5) Here you have a decision to make. I have written a interface to callable TPU, [-.SRC]VI.MAR. If you wish to use this interface, then there must be a CLD definition for it installed in DCLTABLES. This is really only necessary for using VI as a SUB-process, but I find it conveinent to install the CLD so that I do not have to wait for SET COMMAND to complete when I log in. If do not wish to use the callable TPU interface then go to the next step NOW, otherwise hang tight. The CLD definition that needs to be installed is in [-.EXE]VI.CLD. If you do not have sufficient privileges to install a new DCLTABLES you should get prepared to do so, or find someone that will do it for you (now is not entirely necessary, as you can skip to step 6, and do this later). a) Take the time to examine the CLD, and make sure it is ok for your installation. If you are on a cluster, then there is some extra work that I won't describe here since I have never done it. Basically you need to do the following set of commands. (the dollar signs are provide by DCL in case it wasn't obvious). $ SET COMMAND [-.EXE]VI.CLD/TABLE=SYS$SHARE:DCLTABLES.EXE/OUT=- _$ SYS$SHARE:DCLTABLES.EXE $ MCR INSTALL INSTALL>SYS$SHARE:DCLTABLES/REPLACE INSTALL>EXIT b) This should be all that single CPU sites need to do. If you have a different arrangement at your sight that requires something different, then you would know that better than I. Remeber that you MUST logout and log back in to have the updated DCLTABLES available to your process. Step 8, below, can not be done unless you either 1) do not do (c) below, or 2) you logout and log back in after reinstalling DCLTABLES. c) [-.EXE]VI.COM, and [-.EXE]VISETUP.COM contain uses of the symbol, "VI". This symbol is normally equated to "EDIT/TPU". Once you have made the changes necessary to update DCLTABLES, then these references should be changed. In [-.EXE]VI.COM, change VI to be "VI", instead of "EDIT/TPU". In [-.EXE]VISETUP.COM, delete the assignment to the variable VI, as the comment there says to. 6) Next, set default to [-.EXE] (from [.DOC]), and edit the file VISETUP.COM. This file must be executed by each user wishing to use VI before they can use it. You should change the definition of VI$ROOT to be the parent directory of the directory you are in NOW. E.g. if you are in the directory DUA0:[PUBLIC.VI.DOC], then VI$ROOT should be defined to be DUA0:[PUBLIC.VI.]. Note that this file potentially defines 3 symbols. VI allows normal use of VI, VIS allows use of the VI.COM procedure to run VI in a subprocess, and VIEW allows READONLY editing of a file (as in UNIX). 7) The command file VI.COM is used to envoke VI in a sub-process so that a minimal amount of overhead for image activation will be incurred by the system. In the VI.COM that you have, there are invocations of a SUSPEND, and a RESUME command. I use these commands to suspend kept editors while they are not it use so that they will be swapped out or trimmed by the SWAPPER in a more timely manner. This will allow their memory to be put to use by other processes whenever possible. If you do not wish to do this and/or do not have these facilities available to you, then you should comment out these command lines. 8) Next, you should be ready to give VI a trial run. Execute the VISETUP.COM procedure in [.EXE]. Then type VI, and hit return. You should be off and running. *$*$*EOD*$*$* $ exit