home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / vms-vi / 3 < prev    next >
Encoding:
Text File  |  1990-07-13  |  69.3 KB  |  2,094 lines

  1. Path: uunet!husc6!necntc!ncoast!allbery
  2. From: gregg@a.cs.okstate.edu@mandrill.CWRU.Edu (Gregg Wonderly)
  3. Newsgroups: comp.sources.misc
  4. Subject: VI in TPU part 3/13
  5. Message-ID: <4852@ncoast.UUCP>
  6. Date: 13 Oct 87 02:49:54 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Organization: Oklahoma State Univ., Stillwater
  9. Lines: 2081
  10. Approved: allbery@ncoast.UUCP
  11. X-Archive: comp.sources.misc/8710/vms-vi/3
  12.  
  13. $ show default
  14. $ if f$search("DOC.DIR;1") .eqs. "" then -
  15.      CREATE/LOG/DIRECTORY [.DOC]
  16. $ write sys$output "Creating [.DOC]VI.RNO"
  17. $ create [.DOC]VI.RNO
  18. $ DECK/DOLLARS="*$*$*EOD*$*$*"
  19. .ifnot system
  20. .! VI.RNO - Installation and help for VI emulation in TPU
  21. .! Written by Gregg Wonderly 22-JUL-1987
  22. .!
  23. .! RUNOFF operation instructions:
  24. .!
  25. .!     $ @VIDOC.COM
  26. .!
  27. .!   to create a document for printing.
  28. .!   
  29. .! We set the layout so that running page numbers are on the bottom
  30. .!
  31. .lo 1,2
  32. .st
  33. .!
  34. .! Initial right margin - sections should never set it higher than this.
  35. .! Set page size too.
  36. .ps 57,70 .rm 65
  37. .!
  38. .! Header level setup
  39. .sthl 6,0,0,8,9,1,1,9,2
  40. .dhl D,D,lu,d,ll,ll
  41. .!
  42. .!
  43. .flags bold
  44. .flags overstrike
  45. .!
  46. .c;                                             
  47. .sk 2
  48. .c;Guide for VI written in TPU
  49. .title Guide for VI written in TPU
  50. .sk 2
  51. .c;Gregg Wonderly
  52. .c;Mathematics Department
  53. .c;Oklahoma State University
  54. .sk 1
  55. .c;22-Jul-1987
  56. .else system
  57. .NO FLAGS ALL
  58. .P0
  59. .ap
  60. .NO NUMBER
  61. .NPA
  62. .LM1.RM70
  63. .I-1
  64. 1 VI
  65. .s
  66. VI is a text editor written in TPU, for more background information,
  67. see "HELP VI Introduction".
  68. .s
  69. .endif system
  70. .!
  71. .ifnot system
  72. .pg
  73. .hl 1 ^*Table of contents\*
  74. .req "vi.rnt"
  75. .pg
  76. .send toc .ifnot global
  77. .hl 1 ^*Purpose of this document\*
  78. .send toc .endif global
  79. This document provides an overview of this particular emulation
  80. of the VI editor.  It does not provide information on learning to
  81. use the VI editor.  It is assumed that the reader knows how to use VI to a
  82. reasonable extent, and/or has access to a VI manual or quick reference guide.
  83. .send toc .ifnot global
  84. .hl 1 ^*Introduction to VI\*
  85. .send toc .endif global
  86. .!
  87. .else system
  88. .!
  89. .i-1
  90. 2 Introduction
  91. .s
  92. .endif system
  93. .!
  94. VI is an editor which was originally written by Bill Joy at the University
  95. of Berkeley in California.  It was written to work on the UNIX (UNIX is a
  96. trademark of the American Telephone and Telegraph Corporation) operating
  97. system, and until now, has not been widely available on other operating
  98. systems.  VI is an excellent editor, but its full potential can not be realized
  99.  
  100. without a full understanding of the commands that are available.  Currently,
  101. this help file does not describe all of the keystrokes that are defined.
  102. You should consult one of the many VI quick reference guides for that
  103. information.  This version of VI should be close enough to the real version
  104. that the documentation of the additional features here, and a VI quick
  105. reference guide should suffice.
  106. .s
  107. VI is a mode oriented editor, and has two modes.  One mode allows text entry by
  108. simply typing (called text entry mode), and the other allows text manipulation
  109. by using the typing keys (called command mode).  This is a completely
  110. different approach to editing than used by most other text editors and word
  111. processors.  However, it provides some incredible possibilities for speed
  112. because one does not have to look to find function keys to perform certain
  113. editing tasks.  Also, many more commands can be placed within reach of your
  114. hands because all of the keys on the keyboard are available for use during
  115. command mode operations. 
  116. .s
  117. .!
  118. .if system
  119. .i-1
  120. 2 Author
  121. .s
  122. This emulation of VI was written by
  123. .s
  124. .lm+5
  125. Gregg Wonderly
  126. .br
  127. Mathematics Department
  128. .br
  129. Oklahoma State University
  130. .s
  131. Internet: gregg@nemo.math.okstate.edu
  132. .lm-5
  133. .s
  134. .endif system
  135. .!
  136. .ifnot system
  137. .send toc .ifnot global
  138. .hl 1 ^*Extensions to VI\*
  139. .send toc .endif global
  140. .else system
  141. .i-1
  142. 2 Extensions
  143. .s
  144. .endif system
  145. This emulation of VI contains some extensions that were made possible by
  146. the existance of supporting primitives in TPU.  A partial list of these
  147. extensions follows.
  148. .s
  149. .lm+5
  150. Select regions are available and can be used to perform many operations such
  151. as deleting, yanking, changing, shifting, changing/inverting case, compiling
  152. TPU procedures, filling regions of text to fit within a specified range of
  153. columns and writing portions of buffers to files/devices.
  154. .s
  155. Multiple buffers are available as well as multiple windows to display
  156. the buffers in.  This allows you to edit/view many files at once.
  157. .s
  158. You can force the editor to expand tabs as you type them, so that they are
  159. replaced by spaces in the text.
  160. .s
  161. You can control the use of TPU's typeahead recognition so that you see
  162. each screen update action while you type (with ":set [no]update").
  163. .s
  164. The EX mode commands, 'show buffers' and 'show files', display information abou
  165. t
  166. existing buffers, and the current list of files to edit, respectively.
  167. .s
  168. The EX mode command, sh, has an alias called 'dcl', which is a little more
  169. indicative of the action taken.
  170. .s
  171. The EX mode command, buffer, allows you to create a new buffer that may not
  172. have a file associated with it.  It also allows you to create a buffer by
  173. a specific name, and associate an arbitrary file with that buffer.
  174. .s
  175. The EX mode command, messages, allows you to map the TPU message buffer unto th
  176. e
  177. current window for viewing.
  178. .s
  179. The EX mode command, delbuf, allows you to delete a buffer according to its
  180. name.
  181. .s
  182. The EX mode command, prev, allows you to move back to the previously edited
  183. buffer that you used the 'next' command to leave.
  184. .s
  185. The EX mode command, tpu, allows you to execute arbitrary TPU statements from
  186. the editor.
  187. .lm-5
  188. .ifnot system
  189. .send toc .ifnot global
  190. .hl 1 ^*Using an initialization file\*
  191. .send toc .endif global
  192. .else system
  193. .I-1
  194. 2 Initialization
  195. .s
  196. .endif system
  197. VI allows you to use a file to initialize the options and settings that you wis
  198. h
  199. to use, automatically, each time the editor is envoked.  Note that when you use
  200. VI in a subprocess, the initialization is done only when the subprocess is firs
  201. t
  202. created, and not on any subsequent attach operations. The file SYS$LOGIN:VI.INI
  203. can contain EX mode commands, one per line, that will be executed after the
  204. file(s) selected are loaded into buffers.  Alternatively, the file may be
  205. located anywhere by defining the logical name, EXRC, to be the name of the file
  206. you wish to use for initialization (this name is the similar, minus a leading
  207. '.', to that used under UNIX).  Also, if you have only a single line of
  208. initialization, then the process logical, EXINIT (again a holdover from
  209. UNIX), can be defined to be the line
  210. of initialization, and it will be translated, and the resulting text executed. 
  211. This is generally faster than processing the EXRC file.
  212. .!
  213. .ifnot system
  214. .send toc .ifnot global
  215. .hl 1 ^*Supported EX mode commands\*
  216. .send toc .endif global
  217. .else system
  218. .I-1
  219. 2 Ex_mode
  220. .s
  221. .endif system
  222. .!
  223. EX mode is entered by typing a ":" (or the DO key).  From the ":" prompt, you
  224. can perform many different functions associated with changing the operation
  225. of the editor.  EX mode also allows you to perform operations such as global
  226. search and replace, block deletion of text, and many other operations that
  227. are not easily described with a single keystroke.  Below is a list of the
  228. commands that can be performed from EX mode.  The term, l_spec, is a
  229. specification for a line of the current file, and takes the form of either a
  230. search pattern, as in:
  231. .lm +5
  232. .s
  233. /foo/  or  ?foo?
  234. .s
  235. .lm -5
  236. an explict line number as in "5", or perhaps a relative line number as in
  237. ".+5" which means the current line, plus five lines.  There are two other
  238. special characters, like ".", they are "$" which means the last line of the
  239. file, and "%" which means every line in the file. If you specify a range of
  240. lines by separating two l_specs with a ",", the first specification must
  241. indicate a line that preceeds the second specification.  If not, the message,
  242. "Bad range of lines!" will be displayed, and the command will be aborted. 
  243. .if system
  244. .I-1
  245. 3 Abort_edit
  246. .else system
  247. .send toc .if global
  248. .hl 2 ^*Abort edit\*
  249. .send toc .endif global
  250. .endif system
  251. .s
  252. .LT
  253. :q[uit][!]                  This command quits the editor.  If
  254.                             "!" is not specified, and there are
  255.                             modified buffers, then you will be
  256.                             told so, and the command will be
  257.                             aborted.  You must then either retype
  258.                             the command with a "!" (if you really
  259.                             want to ignore the modified buffers,
  260.                             and loose those changes), or you must
  261.                             write out the modified buffers. 
  262. .EL
  263. .if system
  264. .I-1
  265. 3 Change_output_file
  266. .else system
  267. .send toc .ifnot global
  268. .hl 2 ^*Change output file\*
  269. .send toc .endif global
  270. .endif system
  271. .s
  272. .LT
  273. :file <file spec>           Changes the output file specification
  274.                             of the current buffer to the
  275.                             specified file. This will result in
  276.                             the buffer being written to the new
  277.                             file whenever a ":w", ":xit" or "ZZ"
  278.                             command is issued. 
  279. .EL
  280. .if system
  281. .I-1
  282. 3 Compile_TPU
  283. .else system
  284. .send toc .ifnot global
  285. .hl 2 ^*Compile TPU\*
  286. .send toc .endif global
  287. .endif system
  288. .s
  289. .LT
  290. :[l_spec][,l_spec]tpu       Compiles the indicated region,
  291.                             making the assumption, that the
  292.                             region contains TPU language code. 
  293. .EL
  294. .if system
  295. .I-1
  296. 3 Copy_lines
  297. .else system
  298. .send toc .ifnot global
  299. .hl 2 ^*Copy lines\*
  300. .send toc .endif global
  301. .endif system
  302. .s
  303. .LT
  304. :l_spec_1,l_spec_2 c[opy] l_spec_3
  305.                             The range of lines indicated by
  306.                             l_spec_1 and l_spec_2 are copied in
  307.                             their entirety, to the location after
  308.                             the line indicated by l_spec_3. 
  309. .EL
  310. .if system
  311. .I-1
  312. 3 Create_buffers
  313. .else system
  314. .send toc .ifnot global
  315. .hl 2 ^*Create buffers\*
  316. .send toc .endif global
  317. .endif system
  318. .s
  319. .LT
  320. :b[uffer] [<buffer name>] [<file spec>]
  321.                             This command maps the buffer named to
  322.                             the current window.  If there is no
  323.                             buffer by the name given, then a new
  324.                             buffer will be created.  If <file
  325.                             spec> is given, the named file will
  326.                             be read into any newly created
  327.                             buffer. 
  328. .EL
  329. .if system
  330. .I-1
  331. 3 Create_key_macro
  332. .else system
  333. .send toc .ifnot global
  334. .hl 2 ^*Create key macro\*
  335. .send toc .endif global
  336. .endif system
  337. .s
  338. .LT
  339. :map[!] <key> <key strokes> Allows you to establish a mapping
  340.                             or macro for a single keystroke.  If
  341.                             a "!" is specified then the
  342.                             mapping/macro is in effect during
  343.                             text entry mode, otherwise the
  344.                             mapping/macro is in effect during
  345.                             command mode. The next time that
  346.                             <key> is typed in the affected mode,
  347.                             the string of keystokes specified
  348.                             will be substituted for the single
  349.                             key typed.  ":map" with out any
  350.                             parameters displays the current
  351.                             mappings.
  352. .EL
  353. .if system
  354. .I-1
  355. 3 Delete_buffers
  356. .else system
  357. .send toc .ifnot global
  358. .hl 2 ^*Delete buffers\*
  359. .send toc .endif global
  360. .endif system
  361. .s
  362. .LT
  363. :de[lbuf][!] <buffer name>  This command allows you to delete a
  364.                             buffer by name so that it is no
  365.                             longer in existance.  This will
  366.                             destroy the contents of the buffer.
  367.                             If the buffer is modified you can
  368.                             specify the "!" to assure the the
  369.                             buffer is deleted. Otherwise when the
  370.                             buffer is modified you will be
  371.                             prompted to make sure that you wish
  372.                             to delete that buffer.  An unmodifed
  373.                             buffer will be deleted without any
  374.                             prompting, whether or not a "!" is
  375.                             specified. 
  376. .EL
  377. .if system
  378. .I-1
  379. 3 Delete_lines
  380. .else system
  381. .send toc .ifnot global
  382. .hl 2 ^*Delete lines\*
  383. .send toc .endif global
  384. .endif system
  385. .s
  386. .LT
  387. :l_spec[,l_spec]d           Delete the line(s) specified.
  388. .EL
  389. .if system
  390. .I-1
  391. 3 Edit_new_file
  392. .else system
  393. .send toc .ifnot global
  394. .hl 2 ^*Edit new file\*
  395. .send toc .endif global
  396. .endif system
  397. .s
  398. .LT
  399. :e[dit] <file spec>         This command allows you to switch to
  400.                             a different file that you want to
  401.                             edit.  File spec is first compared to
  402.                             the name of an existing buffer.  If
  403.                             there is a buffer by that name, then
  404.                             it is mapped to the current window.
  405.                             If not, then the indicated file will
  406.                             be read into a new buffer, which will
  407.                             be mapped to the current window. 
  408. .EL
  409. .if system
  410. .s
  411. .LT
  412. :vi <file spec>             This command is an alias for the
  413.                             e[dit] command.  For more information
  414.                             see the description of that command. 
  415. .EL
  416. .endif system
  417. .!
  418. .if system
  419. .I-1
  420. 3 Execute_command_file
  421. .else system
  422. .send toc .ifnot global
  423. .hl 2 ^*Execute command file\*
  424. .send toc .endif global
  425. .endif system
  426. .s
  427. .LT
  428. :so <file spec>             The specified file will be read,
  429.                             line by line, and each line will be
  430.                             interpreted as an EX mode command. 
  431. .EL
  432. .if system
  433. .I-1
  434. 3 Fill_text_region
  435. .else system
  436. .send toc .ifnot global
  437. .hl 2 ^*Fill text region\*
  438. .send toc .endif global
  439. .endif system
  440. .s
  441. .LT
  442. :l_spec[,l_spec]fill <left margin> <right margin>
  443.                             The indicated lines will be filled,
  444.                             wrapped, and joined so that they are
  445.                             as full as possible. the left and
  446.                             right margin values will determine
  447.                             how long the lines are, and where
  448.                             they start and begin. 
  449. .EL
  450. .if system
  451. .I-1
  452. 3 Goto_Line
  453. .else system
  454. .send toc .ifnot global
  455. .hl 2 ^*Goto Line\*
  456. .send toc .endif global
  457. .endif system
  458. .s
  459. .LT
  460. :l_spec[,l_spec]            Goto the beginning of the line(s)
  461.                             specified.
  462. .EL
  463. .if system
  464. .I-1
  465. 3 Goto_tag_in_file
  466. .else system
  467. .send toc .ifnot global
  468. .hl 2 ^*Goto tag in file\*
  469. .send toc .endif global
  470. .endif system
  471. .s
  472. .LT
  473. :ta [tag]                   The tag specified, or if none, then
  474.                             the tag following the cursor is
  475.                             located in one of the files specified
  476.                             by the "tags" value.  The associated
  477.                             file is loaded, or switched to, and
  478.                             the corresponding command executed.
  479.                             If the tag can not be located, then a
  480.                             diagnostic is issued. 
  481. .EL
  482. .if system
  483. .I-1
  484. 3 Help
  485. .else system
  486. .send toc .ifnot global
  487. .hl 2 ^*Help\*
  488. .send toc .endif global
  489. .endif system
  490. .s
  491. .LT
  492. :help <VI help topic>       Gives you access to this document as
  493.                             well as other VMS help topics from
  494.                             within VI. 
  495. .EL
  496. .if system
  497. .I-1
  498. 3 Invert_case
  499. .else system
  500. .send toc .ifnot global
  501. .hl 2 ^*Invert case\*
  502. .send toc .endif global
  503. .endif system
  504. .s
  505. .LT
  506. :l_spec[,l_spec]in[vert]    The case of all alphabetic
  507.                             characters in the indicated region
  508.                             will be inverted. 
  509. .EL
  510. .if system
  511. .I-1
  512. 3 Learn_Key_Strokes
  513. .else system
  514. .send toc .ifnot global
  515. .hl 2 ^*Learn Key Strokes\*
  516. .send toc .endif global
  517. .endif system
  518. .s
  519. .LT
  520. :learn                      Initiates a remember of keystrokes
  521.                             that allows a particular sequence of
  522.                             key strokes to be repeated at at a
  523.                             later time by typing a single key.
  524.                             This facility is similar to that
  525.                             provided by the :map command. The
  526.                             difference being that you must "know"
  527.                             the keys you want to type for the
  528.                             :map command.  A learn sequence is
  529.                             remember as you type the keys and the
  530.                             associated actions are carried out.
  531.                             When you are done typing a learn
  532.                             sequence, then you should use CTRL-R
  533.                             to bind that sequence to the desired
  534.                             key.  Note that :set undomap also
  535.                             pertains to how learned sequence
  536.                             behave when undo is performed.
  537. .EL
  538. .if system
  539. .I-1
  540. 3 Lower_case
  541. .else system
  542. .send toc .ifnot global
  543. .hl 2 ^*Lower case\*
  544. .send toc .endif global
  545. .endif system
  546. .s
  547. .LT
  548. :l_spec[,l_spec]lo[wer]     The case of all alphabetic
  549.                             characters in the indicated region
  550.                             will be changed to lower case. 
  551. .EL
  552. .if system
  553. .I-1
  554. 3 Message_buffer
  555. .else system
  556. .send toc .ifnot global
  557. .hl 2 ^*Message buffer\*
  558. .send toc .endif global
  559. .endif system
  560. .s
  561. .LT
  562. :me[ssages]                 This command simply maps the TPU
  563.                             messages buffer to the current window
  564.                             so that its contents can be viewed. 
  565. .EL
  566. .if system
  567. .I-1
  568. 3 Move_lines
  569. .else system
  570. .send toc .ifnot global
  571. .hl 2 ^*Move lines\*
  572. .send toc .endif global
  573. .endif system
  574. .s
  575. .LT
  576. :l_spec_1,l_spec_2 m[ove] l_spec_3
  577.                             The range of lines indicated by
  578.                             l_spec_1 and l_spec_2 are moved in
  579.                             their entirety, to the location after
  580.                             the line indicated by l_spec_3. 
  581. .EL
  582. .if system
  583. .I-1
  584. 3 Next_file
  585. .else system
  586. .send toc .ifnot global
  587. .hl 2 ^*Next file\*
  588. .send toc .endif global
  589. .endif system
  590. .s
  591. .LT
  592. :n[ext]                     Moves the pointer in the list of
  593.                             files currently being edited to the
  594.                             next file.  The buffer associated
  595.                             with that file will be mapped to the
  596.                             current window. 
  597. .EL
  598. .if system
  599. .I-1
  600. 3 Perform_Macros
  601. .else system
  602. .send toc .ifnot global
  603. .hl 2 ^*Perform Macros\*
  604. .send toc .endif global
  605. .endif system
  606. .s
  607. .LT
  608. :@<a-z>                     Executes the first line of the
  609.                             indicated named buffers as command
  610.                             mode commands. 
  611. .EL
  612. .if system
  613. .I-1
  614. 3 Previous_file
  615. .else system
  616. .send toc .ifnot global
  617. .hl 2 ^*Previous file\*
  618. .send toc .endif global
  619. .endif system
  620. .s
  621. .LT
  622. :p[rev]                     Moves the pointer in the list of
  623.                             files currently being edited to the
  624.                             previous file.  The buffer associated
  625.                             with that file will be mapped to the
  626.                             current window. 
  627. .EL
  628. .if system
  629. .I-1
  630. 3 Read_file_into_buffer
  631. .else system
  632. .send toc .ifnot global
  633. .hl 2 ^*Read file into buffer\*
  634. .send toc .endif global
  635. .endif system
  636. .s
  637. .LT
  638. :[l_spec]r[ead] <file spec> Reads the contents of the specified
  639.                             file, and inserts it into the current
  640.                             buffer after the indicated line.  If
  641.                             no line is specified, then the
  642.                             current line is used. 
  643. .EL
  644. .if system
  645. .I-1
  646. 3 Rewind_file_list
  647. .else system
  648. .send toc .ifnot global
  649. .hl 2 ^*Rewind file list\*
  650. .send toc .endif global
  651. .endif system
  652. .s
  653. .LT
  654. :rew                        Will reset the pointer in the list
  655.                             of files being edit to the first one.
  656.                             The buffer associated with that file
  657.                             will be mapped to the current window. 
  658. .EL
  659. .if system
  660. .I-1
  661. 3 Select_regions
  662. .else system
  663. .send toc .ifnot global
  664. .hl 2 ^*Select regions\*
  665. .send toc .endif global
  666. .endif system
  667. .s
  668. .LT
  669. :select                     Toggles the status of the select 
  670.                             region that can be used in place of a
  671.                             range specified in one of the EX mode
  672.                             commands, as well as any of the,
  673.                             buffer altering, command mode editing
  674.                             commands. 
  675. .EL
  676. .if system
  677. .I-1
  678. 3 Set_default_dir
  679. .else system
  680. .send toc .ifnot global
  681. .hl 2 ^*Set default dir\*
  682. .send toc .endif global
  683. .endif system
  684. .s
  685. .LT
  686. :cd <default spec>          Changes the default directory that
  687.                             that the editor process is running
  688.                             in.  The new default directory is
  689.                             shown in the message window. 
  690. .EL .S .LT
  691. :chdir                      Same as the cd command.
  692. .EL
  693. .if system
  694. .I-1
  695. 3 Set_options
  696. .else system
  697. .send toc .ifnot global
  698. .hl 2 ^*Set options\*
  699. .send toc .endif global
  700. .endif system
  701. .s
  702. .LT
  703. :set [no]option[=value] [...]
  704.                             Sets one or more options that dictate
  705.                             the behavior of the editor these
  706.                             options are described in full later.
  707.                             If the option is boolean in nature as
  708.                             is "wrapscan", then you must either
  709.                             specify "wrapscan" or "nowrapscan".
  710.                             If the option is variable in nature,
  711.                             as is "scroll", then you should
  712.                             specify "option=value" as in
  713.                             "scroll=21". 
  714. .EL
  715. .if system
  716. .I-1
  717. 3 Show_buffers
  718. .else system
  719. .send toc .ifnot global
  720. .hl 2 ^*Show buffers\*
  721. .send toc .endif global
  722. .endif system
  723. .s
  724. .LT
  725. :show buffers               Displays the list of currently active
  726.                             buffers that you have created for
  727.                             editing files. 
  728. .EL
  729. .if system
  730. .I-1
  731. 3 Show_file_list
  732. .else system
  733. .send toc .ifnot global
  734. .hl 2 ^*Show file list\*
  735. .send toc .endif global
  736. .endif system
  737. .s
  738. .LT
  739. :show files                 Displays the list of one or more
  740.                             files that matched the file spec that
  741.                             you last gave as the parameter to a
  742.                             "vi" or "edit" command.  This list of
  743.                             files is used by the ":next", ":prev"
  744.                             and ":rew" EX commands to allow you
  745.                             to cycle through a list of files in a
  746.                             logical sequence.  You can change the
  747.                             line that the cursor is on to change
  748.                             which file :next and :prev display by
  749.                             using, ^D ^U, h, j, k, and l key
  750.                             strokes. 
  751. .EL
  752. .if system
  753. .I-1
  754. 3 Show_tags
  755. .else system
  756. .send toc .ifnot global
  757. .hl 2 ^*Show Tags\*
  758. .send toc .endif global
  759. .endif system
  760. .s
  761. .LT
  762. :show tags                  Displays the contents of the buffer
  763.                             that is used to resolve "tag"
  764.                             references.  This can be used to make
  765.                             sure that you are specifying the
  766.                             proper tags. 
  767. .EL
  768. .if system
  769. .I-1
  770. 3 Spawn_command
  771. .else system
  772. .send toc .ifnot global
  773. .hl 2 ^*Spawn command\*
  774. .send toc .endif global
  775. .endif system
  776. .s
  777. .LT
  778. :!<DCL command>             Spawns a subprocess to run the given
  779.                             DCL command in.  Note that due to
  780.                             limitations of TPU, there is no
  781.                             prompt asking you to "[Hit ENTER to
  782.                             continue]" before the screen is
  783.                             redrawn when the command finishes.
  784.                             Therefore, you will have to use ^S/^Q
  785.                             or HOLD SCREEN to pause the display. 
  786. .EL
  787. .if system
  788. .I-1
  789. 3 Spawn_subprocess
  790. .else system
  791. .send toc .ifnot global
  792. .hl 2 ^*Spawn subprocess\*
  793. .send toc .endif global
  794. .endif system
  795. .s
  796. .LT
  797. :sh (:dcl)                  Spawns a DCL subprocess that you can
  798.                             use to perform some DCL related task
  799.                             with, and then LOGOUT of. 
  800. .EL
  801. .if system
  802. .I-1
  803. 3 Substitution
  804. .else system
  805. .send toc .ifnot global
  806. .hl 2 ^*Substitution\*
  807. .send toc .endif global
  808. .endif system
  809. .s
  810. .LT
  811. :l_spec[,l_spec]s/from_re/to_re/[g][q]
  812.                             Perform the indicated substitution on
  813.                             the indicated line(s) of text. Note
  814.                             that '&' is a single character alias
  815.                             for the last substitution made (not
  816.                             including line specs or options). The
  817.                             [g] option causes every occurence on
  818.                             a line to be replaced. By default,
  819.                             only the first is replaced.  The [q]
  820.                             option will cause the editor to pause
  821.                             and display the text matching the
  822.                             from_re, before each substition. You
  823.                             are given the opportunity to say
  824.                             whether or not the substitution is to
  825.                             be performed. 
  826. .EL
  827. .if system
  828. .I-1
  829. 3 Text_Abbreviations
  830. .else system
  831. .send toc .ifnot global
  832. .hl 2 ^*Text Abbreviations\*
  833. .send toc .endif global
  834. .endif system
  835. .s
  836. .LT
  837. :abbr <short> <long>        Creates an abbreviation for the text
  838.                             given by <long>.  <short> is a simple
  839.                             string of characters, e.g. ATT, and
  840.                             <long> is a more complicated string
  841.                             as in, American Telephone and Tele-
  842.                             graph.  ":abbr" by itself displays a
  843.                             list of the current abbreviations. 
  844.  
  845. :unabbr <short>             Removes a previously defined abbrev-
  846.                             iation that was defined with ":abbr".
  847. .EL
  848. .if system
  849. .I-1
  850. 3 Unmap_key_macros
  851. .else system
  852. .send toc .ifnot global
  853. .hl 2 ^*Unmap key macros\*
  854. .send toc .endif global
  855. .endif system
  856. .s
  857. .LT
  858. :unmap[!]                   Removes a previously established map.
  859.                             The "!" must be present if you wish
  860.                             to unmap a map that was made
  861.                             specifying the "!". 
  862. .EL
  863. .if system
  864. .I-1
  865. 3 Upper_case
  866. .else system
  867. .send toc .ifnot global
  868. .hl 2 ^*Upper case\*
  869. .send toc .endif global
  870. .endif system
  871. .s
  872. .LT
  873. :l_spec[,l_spec]upper       The case of all alphabetic characters
  874.                             in the indicated region will be
  875.                             changed to upper case. 
  876. .EL
  877. .!
  878. .if system
  879. .I-1
  880. 3 Write_buffer
  881. .else system
  882. .send toc .ifnot global
  883. .hl 2 ^*Write buffer\*
  884. .send toc .endif global
  885. .endif system
  886. .s
  887. .LT
  888. :[l_spec][,l_spec]w[rite][!] [<file spec>]
  889.                             The indicated line(s) will be written
  890.                             to a file.  The name of the file can
  891.                             either be specified, or will default
  892.                             to the current buffer.  There are
  893.                             certain operations that are not
  894.                             permitted unless the "!" is typed
  895.                             following "w[rite]".  If "!" is not
  896.                             present, you can NOT write all or
  897.                             portions of the buffer to a file that
  898.                             already exists, unless it is the file
  899.                             associated with the current buffer.
  900.                             Also, you can not write out a portion
  901.                             of the current buffer to it's
  902.                             associated file without specifying
  903.                             the "!". This protects you from
  904.                             unknowingly clobbering a file. 
  905.  
  906. :[l_spec][,l_spec]wq[!] [<file spec>]
  907.                             This command is identical to typing a
  908.                             ":w" command followed by typing a
  909.                             ":q" command.  See the descriptions
  910.                             of those commands for more details. 
  911. .EL
  912. .if system
  913. .I-1
  914. 3 Write_and_exit
  915. .else system
  916. .send toc .ifnot global
  917. .hl 2 ^*Write and exit\*
  918. .send toc .endif global
  919. .endif system
  920. .s
  921. .LT
  922. :x[it]                      Is synomous with typing "ZZ" while
  923.                             in command mode.  The contents of the
  924.                             current buffer will be written out if
  925.                             they are modified.  All other buffers
  926.                             will then be examined, and you will
  927.                             be asked whether or not you wish to
  928.                             write out any other modified buffer.
  929.                             The ":set nowrite" command will force
  930.                             a modifed buffer to be ignored during
  931.                             this search. 
  932. .EL
  933. .if system
  934. .I-1
  935. 2 Set_options
  936. .else system
  937. .send toc .ifnot global
  938. .hl 1 ^*Set options\*
  939. .send toc .endif global
  940. .endif system
  941. .s
  942. The ":set", EX, command allows you to change the behavior of VI under certain
  943. circumstances.  There are several characteristics that you may or may not
  944. wish to make use of.  Therefore, these can be altered by setting options.
  945. Below is a list of options that you can set using the ":set" command.
  946. Some of these options are either ON or OFF, and some have values.  The
  947. proper syntax for changing the option therefore varies, and is outlined
  948. with each option.
  949. .s
  950. .if system
  951. .I-1
  952. 3 Auto_Send_to_DCL
  953. .else system
  954. .send toc .ifnot global
  955. .hl 2 ^*Auto Send to DCL\*
  956. .send toc .endif global
  957. .endif system
  958. .s
  959. .LT
  960. :set [no]senddcl            Determines whether or not pressing
  961.                             <RETURN> while in the DCL buffer, and
  962.                             while in insert mode, causes the
  963.                             current line to be sent to the DCL
  964.                             subprocess.  If senddcl is in effect,
  965.                             then pressing return while you are in
  966.                             the DCL buffer will cause the current
  967.                             line to be sent to the DCL
  968.                             subprocess.  The line typed, as well
  969.                             as the output from the DCL command is
  970.                             part of the undo region that is
  971.                             deleted if you use undo after the DCL
  972.                             command output appears in the DCL
  973.                             buffer.  See the HELP section on the
  974.                             DCL process for more information.
  975. .EL
  976. .if system
  977. .I-1
  978. 3 Auto_line_wrap
  979. .else system
  980. .send toc .ifnot global
  981. .hl 2 ^*Auto line wrap\*
  982. .send toc .endif global
  983. .endif system
  984. .s
  985. .LT
  986. :set wrapmargin=integer     Sets the number of columns from the
  987.                             right margin at which VI will wrap
  988.                             text to the beginning of the next
  989.                             line.  Normally, no wrapping is done,
  990.                             i.e. wrapmargin=0 is in effect. 
  991. .EL
  992. .if system
  993. .I-1
  994. 3 Auto_write
  995. .else system
  996. .send toc .ifnot global
  997. .hl 2 ^*Auto write\*
  998. .send toc .endif global
  999. .endif system
  1000. .s
  1001. .LT
  1002. :set [no]autowrite          Determines whether or not modified
  1003.                             buffers are automatically written out
  1004.                             when you map a different buffer to
  1005.                             the window that a modified buffer is
  1006.                             mapped to. 
  1007. .EL
  1008. .if system
  1009. .I-1
  1010. 3 Case_insensitive_search
  1011. .else system
  1012. .send toc .ifnot global
  1013. .hl 2 ^*Case insensitive search\*
  1014. .send toc .endif global
  1015. .endif system
  1016. .s
  1017. .LT
  1018. :set [no]ignorecase         Determines whether or not case is
  1019.                             ignored during string search
  1020.                             operations.  Normally, case is
  1021.                             ignored. 
  1022. .EL
  1023. .if system
  1024. .I-1
  1025. 3 Change_file_list
  1026. .else system
  1027. .send toc .ifnot global
  1028. .hl 2 ^*Change file list\*
  1029. .send toc .endif global
  1030. .endif system
  1031. .s
  1032. .LT
  1033. :set file[s] <file spec>    Changes the list of files to edit to
  1034.                             be those specified by <file spec>.
  1035.                             <file spec> should be a single
  1036.                             filespec, or a comma separated list. 
  1037. .EL
  1038. .if system
  1039. .I-1
  1040. 3 Error_bells
  1041. .else system
  1042. .send toc .ifnot global
  1043. .hl 2 ^*Error Bells\*
  1044. .send toc .endif global
  1045. .endif system
  1046. .s
  1047. .LT
  1048. :set [no]errorbells         Determines whether or not a bell is
  1049.                             sounded when certain errors occur.
  1050. .EL
  1051. .if system
  1052. .I-1
  1053. 3 Expand_tabs
  1054. .else system
  1055. .send toc .ifnot global
  1056. .hl 2 ^*Expand tabs\*
  1057. .send toc .endif global
  1058. .endif system
  1059. .s
  1060. .LT
  1061. :set [no]tabs               Determines whether or not tabs are
  1062.                             expanded to the proper number of
  1063.                             spaces as you type.  "notabs" will
  1064.                             cause tabs to be expanded. 
  1065. .EL
  1066. .if system
  1067. .I-1
  1068. 3 Line_report
  1069. .else system
  1070. .send toc .ifnot global
  1071. .hl 2 ^*Line report\*
  1072. .send toc .endif global
  1073. .endif system
  1074. .s
  1075. .LT
  1076. :set report=integer         Sets the number of lines at which VI
  1077.                             will tell you what you did.  E.g. if
  1078.                             you type, 2yy, then VI will quietly
  1079.                             yank 2 lines.  If you type, 10yy,
  1080.                             then VI will tell you "10 lines
  1081.                             yanked", providing report is set to
  1082.                             some number less than 10. The same
  1083.                             thing occurs for deletion, and put
  1084.                             operations. If more than 'report'
  1085.                             lines are added/deleted, then VI
  1086.                             tells you about it.  Report is set to
  1087.                             5 by default. 
  1088. .EL
  1089. .if system
  1090. .I-1
  1091. 3 No_write
  1092. .else system
  1093. .send toc .ifnot global
  1094. .hl 2 ^*No write\*
  1095. .send toc .endif global
  1096. .endif system
  1097. .s
  1098. .LT
  1099. :set [no]write              Modifies the internal TPU flags for
  1100.                             the current buffer that tell TPU
  1101.                             whether or not to ignore
  1102.                             modifications to a buffer.  This flag
  1103.                             is examined during exit from VI to
  1104.                             determine whether or not to prompt
  1105.                             you to write out the buffer.  ":quit"
  1106.                             will ignore modified buffers that
  1107.                             have this flag set. 
  1108. .EL
  1109. .if system
  1110. .I-1
  1111. 3 Paragraph_delimiters
  1112. .else system
  1113. .send toc .ifnot global
  1114. .hl 2 ^*Paragraph delimiters\*
  1115. .send toc .endif global
  1116. .endif system
  1117. .s
  1118. .LT
  1119. :set paragraphs=<pairs>     Sets pairs of characters that are
  1120.                             assumed to occur at the beginning of
  1121.                             the line following a ".".  It is
  1122.                             usually the case that these pairs of
  1123.                             characters are RUNOFF commands.  In
  1124.                             VI under UNIX, these pairs are NROFF
  1125.                             formatting commands.  A single
  1126.                             character, as in .P, should be
  1127.                             followed by a space in the string of
  1128.                             pairs of characters.  If a paragraph
  1129.                             movement (i.e. } or {) fails to
  1130.                             locate any of the specified patterns,
  1131.                             then the next blank line will be
  1132.                             searched for. 
  1133. .EL
  1134. .if system
  1135. .I-1
  1136. 3 Regular_expression_use
  1137. .else system
  1138. .send toc .ifnot global
  1139. .hl 2 ^*Regular expression use\*
  1140. .send toc .endif global
  1141. .endif system
  1142. .s
  1143. .LT
  1144. :set [no]magic              Determines whether or not regular
  1145.                             expressions are used in search
  1146.                             strings.  By default, regular
  1147.                             expressions are used. 
  1148. .EL
  1149. .if system
  1150. .I-1
  1151. 3 Screen_length
  1152. .else system
  1153. .send toc .ifnot global
  1154. .hl 2 ^*Screen length\*
  1155. .send toc .endif global
  1156. .endif system
  1157. .s
  1158. .LT
  1159. :set window=lines           Sets the length of the screen in
  1160.                             lines that is used by VI.  The UNIX
  1161.                             version of VI chooses to use the
  1162.                             bottom of the screen as the base of a
  1163.                             small window.  The TPU version uses
  1164.                             the top of the screen.  The maximum
  1165.                             number of lines is terminal
  1166.                             dependent, the minimum is 3. 
  1167. .EL
  1168. .if system
  1169. .I-1
  1170. 3 Screen_width
  1171. .else system
  1172. .send toc .ifnot global
  1173. .hl 2 ^*Screen width\*
  1174. .send toc .endif global
  1175. .endif system
  1176. .s
  1177. .LT
  1178. :set width=cols             Sets the width of the current window
  1179.                             to the specified value. The maximum
  1180.                             setting is terminal dependent, while
  1181.                             the minimum is left up to the user. 
  1182. .EL
  1183. .if system
  1184. .I-1
  1185. 3 Scroll_amount
  1186. .else system
  1187. .send toc .ifnot global
  1188. .hl 2 ^*Scroll amount\*
  1189. .send toc .endif global
  1190. .endif system
  1191. .s
  1192. .LT
  1193. :set scroll=integer         Sets the default number of lines that
  1194.                             the window scrolls when ^D or ^U is
  1195.                             typed.  This number can also be set
  1196.                             by preceeding ^D or ^U with a count. 
  1197. .EL
  1198. .if system
  1199. .I-1
  1200. 3 Section_delimiters
  1201. .else system
  1202. .send toc .ifnot global
  1203. .hl 2 ^*Section delimiters\*
  1204. .send toc .endif global
  1205. .endif system
  1206. .s
  1207. .LT
  1208. :set sections=<pairs>       Sets pairs of characters that are
  1209.                             assumed to occur at the beginning of
  1210.                             the line following a ".".  It is
  1211.                             usually the case that these pairs of
  1212.                             characters are RUNOFF commands.  In
  1213.                             VI under UNIX, these pairs are NROFF
  1214.                             formatting commands.  A single
  1215.                             character, as in .P, should be
  1216.                             followed by a space in the string of
  1217.                             pairs of characters.  There are some
  1218.                             pairs of characters that are
  1219.                             exceptions.  The pair of characters,
  1220.                             +c, really means a single '{' at the
  1221.                             beginning of the line.  The pair of
  1222.                             characters, +f, really means the
  1223.                             string, subroutine, or the string,
  1224.                             function, anywhere in the line.  The
  1225.                             pair of characters, +t, really means
  1226.                             the string, procedure, at the
  1227.                             beginning of the line.  If a section
  1228.                             movement (i.e. ]] or [[) fails, then
  1229.                             the next blank line will also be
  1230.                             searched for. 
  1231. .EL
  1232. .if system
  1233. .I-1
  1234. 3 Shift_width
  1235. .else system
  1236. .send toc .ifnot global
  1237. .hl 2 ^*Shift width\*
  1238. .send toc .endif global
  1239. .endif system
  1240. .s
  1241. .LT
  1242. :set shiftwidth=integer     Sets the number of columns that text
  1243.                             is to be shifted by when the shift
  1244.                             left or shift right commands are
  1245.                             executed. .EL 
  1246. .if system
  1247. .I-1
  1248. 3 Show_settings
  1249. .else system
  1250. .send toc .ifnot global
  1251. .hl 2 ^*Show settings\*
  1252. .send toc .endif global
  1253. .endif system
  1254. .s
  1255. .LT
  1256. :set all                    Displays the current values of the
  1257.                             options.
  1258. .EL
  1259. .if system
  1260. .I-1
  1261. 3 Tab_stops
  1262. .else system
  1263. .send toc .ifnot global
  1264. .hl 2 ^*Tab stops\*
  1265. .send toc .endif global
  1266. .endif system
  1267. .s
  1268. .LT
  1269. :set tabstops=integer       Sets the number of columns on the
  1270.                             screen that is used to represent a
  1271.                             tabstop.  The default is eight. 
  1272. .EL
  1273. .if system
  1274. .I-1
  1275. 3 Tag_Case
  1276. .else system
  1277. .send toc .ifnot global
  1278. .hl 2 ^*Tag Case\*
  1279. .send toc .endif global
  1280. .endif system
  1281. .s
  1282. .LT
  1283. :set [no]tagcase            Determines whether or not the case of
  1284.                             a tag is recognized when searching
  1285.                             for it.  For case insensitive
  1286.                             languages or facilities, set
  1287.                             notagcase should be used, otherwise
  1288.                             the default, tagcase, is sufficient. 
  1289. .EL
  1290. .if system
  1291. .I-1
  1292. 3 Tags_files
  1293. .else system
  1294. .send toc .ifnot global
  1295. .hl 2 ^*Tags files\*
  1296. .send toc .endif global
  1297. .endif system
  1298. .s
  1299. .LT
  1300. :set tags=<file list>       Sets the list of files that are used
  1301.                             to resolve tag references.  Each file
  1302.                             name should be separated by a space. 
  1303. .EL
  1304. .if system
  1305. .I-1
  1306. 3 Type_ahead
  1307. .else system
  1308. .send toc .ifnot global
  1309. .hl 2 ^*Type ahead\*
  1310. .send toc .endif global
  1311. .endif system
  1312. .s
  1313. .LT
  1314. :set [no]update             Determines whether or not an explicit
  1315.                             TPU UPDATE is done after each
  1316.                             keystroke.  Normally, TPU will
  1317.                             process typeahead by not updating the
  1318.                             window until there is no typeahead.
  1319.                             ":set update" will foil these
  1320.                             attempts, and force an update to
  1321.                             occur after each keystroke during
  1322.                             command level processing. 
  1323. .EL
  1324. .if system
  1325. .I-1
  1326. 3 Undo_and_maps
  1327. .else system
  1328. .send toc .ifnot global
  1329. .hl 2 ^*Undo and maps\*
  1330. .send toc .endif global
  1331. .endif system
  1332. .s
  1333. .LT
  1334. :set [no]undomap            Controls whether or not an attempt
  1335.                             is made to make it possible to undo
  1336.                             all buffer operations that occur
  1337.                             during the execution of a map or
  1338.                             learned key sequence (see the :map
  1339.                             and :learn commands). Normally, maps
  1340.                             are undoable because a copy of the
  1341.                             entire buffer is saved before a map
  1342.                             is executed.  While editing large
  1343.                             buffers, this makes it rather slow to
  1344.                             use maps, so you can turn this
  1345.                             feature off when it is deemed not
  1346.                             necessary. 
  1347. .EL
  1348. .if system
  1349. .I-1
  1350. 3 Wrap_on_search
  1351. .else system
  1352. .send toc .ifnot global
  1353. .hl 2 ^*Wrap on search\*
  1354. .send toc .endif global
  1355. .endif system
  1356. .s
  1357. .LT
  1358. :set [no]wrapscan           Determines whether or not search
  1359.                             operations are continued at the
  1360.                             end/beginning of a buffer by moving
  1361.                             to the beginning/end, respecively.
  1362.                             Normally, wrapscan is in effect. 
  1363. .EL
  1364. .ifnot system
  1365. .send toc .ifnot global
  1366. .hl 1 ^*Additional key strokes\*
  1367. .send toc .endif global
  1368. .else system
  1369. .I-1
  1370. 2 Additional_key_strokes
  1371. .s
  1372. .endif system
  1373. There are some additional key strokes available that pertain to using added
  1374. features of this version of VI.  Below is an outline of the added key strokes.
  1375. .ifnot system
  1376. .send toc .ifnot global
  1377. .hl 2 ^*Key pad keys used\*
  1378. .send toc .endif global
  1379. .else system
  1380. .s
  1381. .endif system
  1382. .lm+5
  1383. .LT
  1384. KP0                         Temporarily creates a window that
  1385.                             is the size of the entire
  1386.                             screen, and maps the current
  1387.                             buffer to that window.  Use KP1
  1388.                             (Delete window) to remove this
  1389.                             window, and uncover the windows
  1390.                             that were occluded by the
  1391.                             created window.  This command only
  1392.                             works when there is more than one
  1393.                             window on the screen.
  1394.  
  1395. KP1                         Delete the current window from
  1396.                             the screen and release its space
  1397.                             to one of the surrounding
  1398.                             windows. 
  1399.  
  1400. KP2                         Split the current window into
  1401.                             two windows divided by a status
  1402.                             line place at the line that the
  1403.                             cursor currently occupies. 
  1404.  
  1405. KP3                         Move down the screen to the next
  1406.                             window.
  1407.  
  1408. KP4                         Shrink the size of the current
  1409.                             window by one line, making the
  1410.                             window above, or below larger.
  1411.                             An attempt is made to shrink the
  1412.                             window by pulling up the bottom
  1413.                             line, if that fails, then an
  1414.                             attempt is made to pull down the
  1415.                             top line.  If that fails, then
  1416.                             the window can not be shrunk. 
  1417.  
  1418. KP5                         Enlarge the current window by
  1419.                             one line.  The same algorithym
  1420.                             as for shrink is used to
  1421.                             determine how to alter the size
  1422.                             of the window. 
  1423.  
  1424. KP6                         Move up the screen to the next
  1425.                             window.
  1426.  
  1427. PF1                         When using VI on a VT100 series
  1428.                             terminal, it is not possible to
  1429.                             have TPU recognize the ESCAPE
  1430.                             character, ASCII 27, it its
  1431.                             primary processing loop.  When
  1432.                             using a VT200 series terminal,
  1433.                             this is circumvented by using
  1434.                             F11 as if it were ESCAPE.  PF1
  1435.                             provides this functionality for
  1436.                             the VT100 series of terminals. 
  1437.  
  1438. PF2                         PF2 envokes the help facilities
  1439.                             available for VI.
  1440.  
  1441. .EL
  1442. .ifnot system
  1443. .send toc .ifnot global
  1444. .hl 2 ^*Keyboard keys used\*
  1445. .send toc .endif global
  1446. .else system
  1447. .s
  1448. .lm-5
  1449. KEY BOARD KEYS USED
  1450. .lm+5
  1451. .endif system
  1452. .s
  1453. .LT
  1454. CTRL-X                      The CTRL-X key is used to send a
  1455.                             DCL command to the DCL subprocess
  1456.                             that is bound to the DCL buffer.
  1457.  
  1458. CTRL-R                      The CTRL-R key is used to remember
  1459.                             a learn sequence any bind it to a
  1460.                             key.  The :learn command initiates
  1461.                             the learning process.
  1462. .EL
  1463. .lm-5
  1464. .ifnot system
  1465. .send toc .ifnot global
  1466. .hl 1 ^*Windows and buffers\*
  1467. .send toc .endif global
  1468. .else system
  1469. .I-1
  1470. 2 Windows_and_buffers
  1471. .s
  1472. .endif system
  1473. The multiple window features of this implementation of VI make it possible to
  1474. view multiple portions of a single file, or different portions of different
  1475. files simultaneously.  It is also possible to yank/delete text from one
  1476. window/buffer and place it into another buffer.  To accomplish this, all
  1477. named buffers, and numbered, deletion buffers are globally available.  I.E.
  1478. there are no buffers that are local to a buffer, with a single exception being
  1479. the information pertaining to the undo operation.
  1480. .s
  1481. If you type 'u' while in a buffer different from the one that you made
  1482. the last change in, you will see the message
  1483. .s
  1484. .lm+5
  1485. Undo not in this buffer.
  1486. .s
  1487. .lm-5
  1488. displayed at the bottom of the screen.
  1489. .s
  1490. For more information on using multiple buffers and window, consult the
  1491. section on additional key strokes.
  1492. .ifnot system
  1493. .send toc .ifnot global
  1494. .hl 1 ^*Display differences\*
  1495. .send toc .endif global
  1496. .else system
  1497. .I-1
  1498. 2 Display_differences
  1499. .s
  1500. .endif system
  1501. Due to certain characteristics of the TPU screen management facilities,
  1502. certain activities on the display differ from those found in UNIX VI.  One
  1503. difference is TPU's inability to display control characters in an expanded
  1504. format, such as "^H" for a literal backspace character in the text.  While
  1505. commands are being entered in EX mode, you will see that control characters
  1506. are displayed as "^?" where the "?" character is replaced by the appropriate
  1507. character corresponding to the control character typed.  This type of
  1508. expansion is possible here, but it is not possible to do it in the text
  1509. buffers displayed on the screen. If a key typed does not correspond to a
  1510. printable ASCII character, then a backward question mark will be displayed
  1511. when that key is typed. 
  1512. .ifnot system
  1513. .send toc .ifnot global
  1514. .hl 1 ^*Tag files\*
  1515. .send toc .endif global
  1516. .else system
  1517. .I-1
  1518. 2 Tag_files
  1519. .s
  1520. .endif system
  1521. A tags file is a file that contains one or more lines each of which contains
  1522. 3 columns of text.  Each column is separated by exactly one tab character.
  1523. The first column of text is the "tag" string.  The second column is the
  1524. file with which that tag is associated, and the remainder of the line contains
  1525. an EX mode command that will perform an action associated with that tag.
  1526. Usually, the action locates a specific line in the file that is associated
  1527. with the tag.  VI will position the cursor at the bottom of the buffer prior
  1528. to execution the EX mode command.  Typically, a tags file is used to locate
  1529. the definition of a languange procedure, or text formatter macro.
  1530. .s
  1531. A simple tags file can be constructed by using a program to analyze the text
  1532. of a file, and locate the lines that should be tagged.  In the UNIX operating
  1533. system, there is a program called CTAGS(1) that analyzes C language source
  1534. files, and creates a 'tags' file that allows access to the function
  1535. .ifnot system
  1536. .send toc .ifnot global
  1537. .hl 1 ^*Kept Editors\*
  1538. .send toc .endif global
  1539. .else system
  1540. .I-1
  1541. 2 Kept_Editors
  1542. .s
  1543. .endif system
  1544. VAX/VMS and TPU support the notion of a "Kept Editor".  A "Kept Editor" is
  1545. a subprocess that can be ATTACH'd to and from at will.  The
  1546. VI$ROOT:[EXE]VI.COM command procedure takes care of all of the details of
  1547. carrying out the operation of the "Kept Editor".  It knows how to locate,
  1548. and attach to an existing "Kept Editor", and how to automatically create
  1549. a new one if there is not one running.
  1550. .ifnot system
  1551. .send toc .ifnot global
  1552. .hl 1 ^*Other TPU's\*
  1553. .send toc .endif global
  1554. .else system
  1555. .I-1
  1556. 2 Other_Tpus
  1557. .s
  1558. .endif system
  1559. If you wish to use other TPU applications, besides VI, then there is a
  1560. program that can help in the negotiation of which CALL_USER routines and which
  1561. section file to use.  VI$ROOT:[SRC]VI.MAR is the source to this program.  It
  1562. translates the logical names VISECINI and VI$CALLUSER instead of the normal
  1563. TPUSECIN and TPUCALLUSER logical names.  VI$ROOT:[EXE]VI.CLD is a CLD file
  1564. that you can use the "SET COMMAND" command on to make VI.EXE useable.  You
  1565. can make VI.EXE by using the command "@MAKE EXE" from within the VI$ROOT:[SRC]
  1566. directory.  Then you will need to use the command
  1567. .s
  1568. .lm+5
  1569. $ SET COMMAND VI$ROOT:[EXE]VI
  1570. .lm-5
  1571. .s
  1572. If you desire to use VI$ROOT:[EXE]VI.COM to run VI in a subprocess, then
  1573. you should install VI.CLD into SYS$SHARE:DCLTABLES.EXE.  See the Command
  1574. Language Definition manual for more information on doing this, if you
  1575. are no familiar with the procedure.  This is necessary because the command
  1576. tables are not propagated to a subprocess when it is created.
  1577. .ifnot system
  1578. .send toc .ifnot global
  1579. .hl 1 ^*The DCL buffer\*
  1580. .send toc .endif global
  1581. .else system
  1582. .I-1
  1583. 2 DCL_buffer
  1584. .s
  1585. .endif system
  1586. There is a special buffer that is always associated with a DCL subprocess.
  1587. The "DCL buffer" can be used as an alternate method of collecting DCL output
  1588. if the filter_region (!<movement><command>) and read_from_command (:r!<command>
  1589. )
  1590. capabilities do not fit your needs.  Any line in any buffer can be sent to
  1591. the DCL subprocess by placing the cursor on that line, and typing a ^X
  1592. (Control-X).
  1593. .s
  1594. When you type ^X, several actions can happen.  If you are not
  1595. already in the DCL buffer, then the current window will be split, and the
  1596. top window will be mapped to the DCL buffer, and you will be positioned there.
  1597. In either case, the command will be copied into the DCL buffer, and will also
  1598. be sent to the DCL subprocess.  If the subprocess does not exist, then it
  1599. will be created.  There are several ways that any one of these steps can
  1600. fail.  If they do, and appropriate diagnostic will be issued to allow you
  1601. to resolve the problem.
  1602. .s
  1603. The setable option, senddcl, allows you to use the DCL buffer interactively,
  1604. somewhat. When senddcl is in effect, you can place yourself in insert mode,
  1605. using A, a, I, i, R, O, or o, and then type a DCL command. When you press enter
  1606. at the end of the line, that line is sent to the DCL subprocess as input.  The
  1607. output of the DCL command is placed into the DCL buffer as if you had typed it
  1608. in addition to the command line.  Thus, undo will allow you to remove both the
  1609. command line, and the output from the DCL buffer with a minimum of trouble. 
  1610. .ifnot system
  1611. .send toc .ifnot global
  1612. .hl 1 ^*TPU bugs revealed\*
  1613. .send toc .endif global
  1614. .else system
  1615. .I-1
  1616. 2 TPU_Bugs_Revealed
  1617. .s
  1618. .endif system
  1619. There are several problems with TPU that cause problems with this implementatio
  1620. n
  1621. of VI.  Outlined below are some of the more major problems.  There are probably
  1622. some that I have forgotten by now.
  1623. .s
  1624. Every place that there is a TPU statement of the form:
  1625. .s
  1626. .lm+5
  1627. EXECUTE (COMPILE ("vi$global_var := ...."));
  1628. .lm-5
  1629. .s
  1630. there is a statement preceeding that line that initializes vi$global_var to
  1631. zero.  This is necessary to get around a bug in TPU that causes the storage
  1632. that vi$global_var is associated with before the EXECUTE (COMPILE ()), to
  1633. not be disassociated.  TPU would randomly scribble on string and buffer
  1634. descriptors until it would stop with an "internal error, please SPR this",
  1635. message.
  1636. .s
  1637. Another problems has to do with the KEY_NAME() values of keys.  It appears
  1638. that GET_INFO (DEFINED_KEY...) does not return proper KEY_NAME() values
  1639. for certain keys.  In particular, you will notice that maps to keys like
  1640. q, v, and others will be displayed with the key as a backward question
  1641. mark, instead of the proper letter, when you issue the :map command to
  1642. display the current maps.  This is currently (apparently) unsurmountable.
  1643. Some trickery (hacking I like to call it) could be done to coerce the
  1644. bogus key values into something reasonable, but I decided not to do that.
  1645. .s
  1646. Still another problem has to do with the fact that ASCII (CTRL_?_KEY) always
  1647. returns ASCII(0) instead of ASCII(1) through ASCII(26) as would be convienent.
  1648. I have written some code (hacks at best) to get around this problem by
  1649. normalizing the values around the value of CTRL_A_KEY.  An expression of
  1650. the form:
  1651. .s
  1652. .lm+5
  1653. keyname-CTRL_A_KEY/(CTRL_B_KEY-CTRL_A_KEY)
  1654. .lm-5
  1655. .s
  1656. will result in a value of 0 through 25 when keyname has a value in the
  1657. range of CTRL_A_KEY to CTRL_Z_KEY.  This code is really bogus, but I
  1658. did not see a more feasible way of doing this.  KEY_NAME() values should
  1659. really comprise another TPU data type so that ASCII could distinguish
  1660. between those values and integer values.
  1661. .s
  1662. TPU's pattern matching code is mostly broken.  The regular expression compiler
  1663. in TPU generates TPU patterns that correspond to the RE's passed to it.  The
  1664. biggest problem with the TPU pattern matching is that it does not know how to
  1665. back out of a match, and try an alternative.  If two adjacent pieces of an RE
  1666. have a non-null intersection, then they can cause a pattern match failure
  1667. because the first pattern can consume a character that would match the
  1668. second pattern, but the SEARCH() routine will not backout of a match once
  1669. it has been made (even in the somewhat 'kludgy' incremental mode).
  1670. *$*$*EOD*$*$*
  1671. $ if f$search("DOC.DIR;1") .eqs. "" then -
  1672.      CREATE/LOG/DIRECTORY [.DOC]
  1673. $ write sys$output "Creating [.DOC]VI.RNT"
  1674. $ create [.DOC]VI.RNT
  1675. $ DECK/DOLLARS="*$*$*EOD*$*$*"
  1676. .! DSRTOC version V2.1-09
  1677. .! RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN
  1678. .SAVE
  1679. .NO FLAGS ALL
  1680. .NO FLAGS BREAK        .NO FLAGS CAPITALIZE    .NO FLAGS ENDFOOTNOTE
  1681. .NO FLAGS HYPHENATE    .NO FLAGS INDEX        .NO FLAGS PERIOD
  1682. .NO FLAGS SPACE        .NO FLAGS SUBSTITUTE
  1683. .FLAGS ACCEPT _        .FLAGS BOLD *        .FLAGS COMMENT !
  1684. .FLAGS LOWERCASE \    .FLAGS OVERSTRIKE %    .FLAGS UNDERLINE &
  1685. .FLAGS UPPERCASE ^
  1686. .FLAGS ALL
  1687. .NO FILL        .NO JUSTIFY
  1688. .LEFT MARGIN 8        .RIGHT MARGIN 70    .PAGE SIZE , 70
  1689. .CENTER;CONTENTS
  1690. .BLANK
  1691. .TEST PAGE 2
  1692.  
  1693. 1       Table of contents  . . . . . . . . . . . . . . . . . 2
  1694. .ifnot global
  1695. 2       Purpose of this document . . . . . . . . . . . . . . 4
  1696. .endif global
  1697. .ifnot global
  1698. 3       Introduction to VI . . . . . . . . . . . . . . . . . 4
  1699. .endif global
  1700. .ifnot global
  1701. 4       Extensions to VI . . . . . . . . . . . . . . . . . . 4
  1702. .endif global
  1703. .ifnot global
  1704. 5       Using an initialization file . . . . . . . . . . . . 5
  1705. .endif global
  1706. .ifnot global
  1707. 6       Supported EX mode commands . . . . . . . . . . . . . 5
  1708. .endif global
  1709. .if global
  1710. 6_.1       Abort edit . . . . . . . . . . . . . . . . . . . . 6
  1711. .endif global
  1712. .ifnot global
  1713. 6_.2       Change output file . . . . . . . . . . . . . . . . 6
  1714. .endif global
  1715. .ifnot global
  1716. 6_.3       Compile TPU  . . . . . . . . . . . . . . . . . . . 6
  1717. .endif global
  1718. .ifnot global
  1719. 6_.4       Copy lines . . . . . . . . . . . . . . . . . . . . 7
  1720. .endif global
  1721. .ifnot global
  1722. 6_.5       Create buffers . . . . . . . . . . . . . . . . . . 7
  1723. .endif global
  1724. .ifnot global
  1725. 6_.6       Create key macro . . . . . . . . . . . . . . . . . 7
  1726. .endif global
  1727. .ifnot global
  1728. 6_.7       Delete buffers . . . . . . . . . . . . . . . . . . 7
  1729. .endif global
  1730. .ifnot global
  1731. 6_.8       Delete lines . . . . . . . . . . . . . . . . . . . 8
  1732. .endif global
  1733. .ifnot global
  1734. 6_.9       Edit new file  . . . . . . . . . . . . . . . . . . 8
  1735. .endif global
  1736. .ifnot global
  1737. 6_.10      Execute command file . . . . . . . . . . . . . . . 8
  1738. .endif global
  1739. .ifnot global
  1740. 6_.11      Fill text region . . . . . . . . . . . . . . . . . 8
  1741. .endif global
  1742. .ifnot global
  1743. 6_.12      Goto Line  . . . . . . . . . . . . . . . . . . . . 8
  1744. .endif global
  1745. .ifnot global
  1746. 6_.13      Goto tag in file . . . . . . . . . . . . . . . . . 9
  1747. .endif global
  1748. .ifnot global
  1749. 6_.14      Help . . . . . . . . . . . . . . . . . . . . . . . 9
  1750. .endif global
  1751. .ifnot global
  1752. 6_.15      Invert case  . . . . . . . . . . . . . . . . . . . 9
  1753. .endif global
  1754. .ifnot global
  1755. 6_.16      Learn Key Strokes  . . . . . . . . . . . . . . . . 9
  1756. .endif global
  1757. .ifnot global
  1758. 6_.17      Lower case . . . . . . . . . . . . . . . . . . .  10
  1759. .endif global
  1760. .ifnot global
  1761. 6_.18      Message buffer . . . . . . . . . . . . . . . . .  10
  1762. .endif global
  1763. .ifnot global
  1764. 6_.19      Move lines . . . . . . . . . . . . . . . . . . .  10
  1765. .endif global
  1766. .ifnot global
  1767. 6_.20      Next file  . . . . . . . . . . . . . . . . . . .  10
  1768. .endif global
  1769. .ifnot global
  1770. 6_.21      Perform Macros . . . . . . . . . . . . . . . . .  10
  1771. .endif global
  1772. .ifnot global
  1773. 6_.22      Previous file  . . . . . . . . . . . . . . . . .  10
  1774. .endif global
  1775. .ifnot global
  1776. 6_.23      Read file into buffer  . . . . . . . . . . . . .  11
  1777. .endif global
  1778. .ifnot global
  1779. 6_.24      Rewind file list . . . . . . . . . . . . . . . .  11
  1780. .endif global
  1781. .ifnot global
  1782. 6_.25      Select regions . . . . . . . . . . . . . . . . .  11
  1783. .endif global
  1784. .ifnot global
  1785. 6_.26      Set default dir  . . . . . . . . . . . . . . . .  11
  1786. .endif global
  1787. .ifnot global
  1788. 6_.27      Set options  . . . . . . . . . . . . . . . . . .  11
  1789. .endif global
  1790. .ifnot global
  1791. 6_.28      Show buffers . . . . . . . . . . . . . . . . . .  12
  1792. .endif global
  1793. .ifnot global
  1794. 6_.29      Show file list . . . . . . . . . . . . . . . . .  12
  1795. .endif global
  1796. .ifnot global
  1797. 6_.30      Show Tags  . . . . . . . . . . . . . . . . . . .  12
  1798. .endif global
  1799. .ifnot global
  1800. 6_.31      Spawn command  . . . . . . . . . . . . . . . . .  12
  1801. .endif global
  1802. .ifnot global
  1803. 6_.32      Spawn subprocess . . . . . . . . . . . . . . . .  13
  1804. .endif global
  1805. .ifnot global
  1806. 6_.33      Substitution . . . . . . . . . . . . . . . . . .  13
  1807. .endif global
  1808. .ifnot global
  1809. 6_.34      Text Abbreviations . . . . . . . . . . . . . . .  13
  1810. .endif global
  1811. .ifnot global
  1812. 6_.35      Unmap key macros . . . . . . . . . . . . . . . .  13
  1813. .endif global
  1814. .ifnot global
  1815. 6_.36      Upper case . . . . . . . . . . . . . . . . . . .  14
  1816. .endif global
  1817. .ifnot global
  1818. 6_.37      Write buffer . . . . . . . . . . . . . . . . . .  14
  1819. .endif global
  1820. .ifnot global
  1821. 6_.38      Write and exit . . . . . . . . . . . . . . . . .  14
  1822. .endif global
  1823. .ifnot global
  1824. 7       Set options  . . . . . . . . . . . . . . . . . . .  15
  1825. .endif global
  1826. .ifnot global
  1827. 7_.1       Auto Send to DCL . . . . . . . . . . . . . . . .  15
  1828. .endif global
  1829. .ifnot global
  1830. 7_.2       Auto line wrap . . . . . . . . . . . . . . . . .  15
  1831. .endif global
  1832. .ifnot global
  1833. 7_.3       Auto write . . . . . . . . . . . . . . . . . . .  15
  1834. .endif global
  1835. .ifnot global
  1836. 7_.4       Case insensitive search  . . . . . . . . . . . .  16
  1837. .endif global
  1838. .ifnot global
  1839. 7_.5       Change file list . . . . . . . . . . . . . . . .  16
  1840. .endif global
  1841. .ifnot global
  1842. 7_.6       Error Bells  . . . . . . . . . . . . . . . . . .  16
  1843. .endif global
  1844. .ifnot global
  1845. 7_.7       Expand tabs  . . . . . . . . . . . . . . . . . .  16
  1846. .endif global
  1847. .ifnot global
  1848. 7_.8       Line report  . . . . . . . . . . . . . . . . . .  16
  1849. .endif global
  1850. .ifnot global
  1851. 7_.9       No write . . . . . . . . . . . . . . . . . . . .  17
  1852. .endif global
  1853. .ifnot global
  1854. 7_.10      Paragraph delimiters . . . . . . . . . . . . . .  17
  1855. .endif global
  1856. .ifnot global
  1857. 7_.11      Regular expression use . . . . . . . . . . . . .  17
  1858. .endif global
  1859. .ifnot global
  1860. 7_.12      Screen length  . . . . . . . . . . . . . . . . .  17
  1861. .endif global
  1862. .ifnot global
  1863. 7_.13      Screen width . . . . . . . . . . . . . . . . . .  18
  1864. .endif global
  1865. .ifnot global
  1866. 7_.14      Scroll amount  . . . . . . . . . . . . . . . . .  18
  1867. .endif global
  1868. .ifnot global
  1869. 7_.15      Section delimiters . . . . . . . . . . . . . . .  18
  1870. .endif global
  1871. .ifnot global
  1872. 7_.16      Shift width  . . . . . . . . . . . . . . . . . .  18
  1873. .endif global
  1874. .ifnot global
  1875. 7_.17      Tab stops  . . . . . . . . . . . . . . . . . . .  19
  1876. .endif global
  1877. .ifnot global
  1878. 7_.18      Tag Case . . . . . . . . . . . . . . . . . . . .  19
  1879. .endif global
  1880. .ifnot global
  1881. 7_.19      Tags files . . . . . . . . . . . . . . . . . . .  19
  1882. .endif global
  1883. .ifnot global
  1884. 7_.20      Type ahead . . . . . . . . . . . . . . . . . . .  19
  1885. .endif global
  1886. .ifnot global
  1887. 7_.21      Undo and maps  . . . . . . . . . . . . . . . . .  20
  1888. .endif global
  1889. .ifnot global
  1890. 7_.22      Wrap on search . . . . . . . . . . . . . . . . .  20
  1891. .endif global
  1892. .ifnot global
  1893. 8       Additional key strokes . . . . . . . . . . . . . .  20
  1894. .endif global
  1895. .ifnot global
  1896. 8_.1       Key pad keys used  . . . . . . . . . . . . . . .  20
  1897. .endif global
  1898. .ifnot global
  1899. 8_.2       Keyboard keys used . . . . . . . . . . . . . . .  21
  1900. .endif global
  1901. .ifnot global
  1902. 9       Windows and buffers  . . . . . . . . . . . . . . .  22
  1903. .endif global
  1904. .ifnot global
  1905. 10      Display differences  . . . . . . . . . . . . . . .  22
  1906. .endif global
  1907. .ifnot global
  1908. 11      Tag files  . . . . . . . . . . . . . . . . . . . .  22
  1909. .endif global
  1910. .ifnot global
  1911. 12      Kept Editors . . . . . . . . . . . . . . . . . . .  23
  1912. .endif global
  1913. .ifnot global
  1914. 13      Other TPU's  . . . . . . . . . . . . . . . . . . .  23
  1915. .endif global
  1916. .ifnot global
  1917. 14      The DCL buffer . . . . . . . . . . . . . . . . . .  23
  1918. .endif global
  1919. .RESTORE
  1920. *$*$*EOD*$*$*
  1921. $ if f$search("DOC.DIR;1") .eqs. "" then -
  1922.      CREATE/LOG/DIRECTORY [.DOC]
  1923. $ write sys$output "Creating [.DOC]VIDOC.COM"
  1924. $ create [.DOC]VIDOC.COM
  1925. $ DECK/DOLLARS="*$*$*EOD*$*$*"
  1926. $ ! This command procedure builds copies of the various
  1927. $ ! VI documentation files
  1928. $ !
  1929. $ DO="@[-.EXE]DO"
  1930. $ IF F$LOGICAL ("VI$ROOT") .NES. "" THEN DO="@[EXE]DO"
  1931. $ !
  1932. $ RM=""
  1933. $ IF P2 .NES. "" THEN RM=P2
  1934. $ IF P1 .NES. "" THEN GOTO 'P1'
  1935. $ !
  1936. $ ! Build the printable manual by default
  1937. $ !
  1938. $ MANUAL:
  1939. $    VARS="MANUAL" ! Actually there is no such variant, but something is nee
  1940. ded
  1941. $    EXT="MEM"
  1942. $    IF RM .EQS. "" THEN RM=8
  1943. $    GOTO PROCESS
  1944. $ !
  1945. $ ! Build the on-line help manual
  1946. $ !
  1947. $ HELP:
  1948. $    VARS="SYSTEM"
  1949. $    EXT="HLP"
  1950. $    IF RM .EQS. "" THEN RM=0
  1951. $    GOTO FINAL
  1952. $ !
  1953. $ PROCESS:
  1954. $ !
  1955. $    DO RUNOFF/LOG/OUT=NLA0:/RIGHT='RM'/INTERMEDIATE/MESS=USER/VAR='VARS' -
  1956.            VI.RNO
  1957. $ !
  1958. $ ! Do the table of contents
  1959. $ !
  1960. $    DO RUNOFF/CONTENTS/OUT=VI.RNT VI.BRN
  1961. $ !
  1962. $ FINAL:
  1963. $    DO RUNOFF/LOG/OUT=VI.'EXT'/RIGHT='RM'/MESS=USER/VAR='VARS' VI.RNO
  1964. $    DO PURGE VI.'EXT',VI.RNT
  1965. $ !
  1966. $    DO DELETE VI.BRN;*
  1967. $ !
  1968. $    IF P1 .NES. "HELP" THEN EXIT
  1969. $ !
  1970. $ INSTALL_HELP:
  1971. $ !
  1972. $ ! Reinstall help file
  1973. $ !
  1974. $    WRITE SYS$OUTPUT " "
  1975. $   IF F$SEARCH("VI.HLB") .EQS. "" THEN DO LIB/LOG/CREATE/HELP VI
  1976. $    INQUIRE/NOPUNCT HELPLIB "Name of library to install HELP files in? "
  1977. $    DO LIB/REPLACE/HELP 'HELPLIB' VI.'EXT'
  1978. $    EXIT
  1979. $ !
  1980. $ ! Just install the HELP file
  1981. $ !
  1982. $ HELPINST:
  1983. $    EXT="HLP"
  1984. $    VARS="HELP"
  1985. $    GOTO INSTALL_HELP
  1986. *$*$*EOD*$*$*
  1987. $ if f$search("DOC.DIR;1") .eqs. "" then -
  1988.      CREATE/LOG/DIRECTORY [.DOC]
  1989. $ write sys$output "Creating [.DOC]README."
  1990. $ create [.DOC]README.
  1991. $ DECK/DOLLARS="*$*$*EOD*$*$*"
  1992. There are 13 parts to the distribution of VI written in TPU.  The first,
  1993. this file, is a plain text file.  The remainder, are DCL command files.
  1994. Files 2-13 should each be executed as DCL procedures in sequence.  Below
  1995. is a sequence of steps that should allow you to get VI up and running.
  1996.  
  1997.     1)  You should pick a directory to place VI under, and place all 13 files
  1998.         in that directory.  Then, you can begin extracting.  Three directories
  1999.         will be created, [.SRC], [.EXE], and [.DOC].  The directory names
  2000.         should reveal the purposes of these directories. 
  2001.  
  2002.     2)  Place all 13 of the VI parts into the directory chosen in step 1.
  2003.         For each part, 2 through 13, execute the file as a command procedure
  2004.         using the command "@<filename>", where <filename> is the name of
  2005.         the file to execute (e.g. @VI_2.COM, followed by @VI_3.COM, etc).
  2006.  
  2007.     3)  After executing the 13th command file, you should set default to the
  2008.         [.SRC] directory, and use the commands "$ @make exe", and "$ @make
  2009.         tpusubs" to create the VI.EXE executable, and the CALL_USER routines
  2010.         for VI to use. 
  2011.  
  2012.     4)  Next, set default to [-.DOC] (from the SRC directory), and execute
  2013.         the command "$ VIDOC", and "$ @VIDOC HELP" to create a printable
  2014.         version of the current documentation, as well as a HELP file
  2015.         that VI can use.  When asked the question:
  2016.  
  2017.             Name of library to install HELP files in?
  2018.  
  2019.         you should probably answer with the full path to the current
  2020.         directory.  VI.TPU contains the path VI$ROOT:[DOC]VI.HLB as the place
  2021.         where it will work from, so if you do not place the help file in this
  2022.         library (It will automatically be created for you), then you must
  2023.         edit VI.TPU to contain the proper path.
  2024.  
  2025.     5)  Here you have a decision to make.  I have written a interface to
  2026.         callable TPU, [-.SRC]VI.MAR.  If you wish to use this interface,
  2027.         then there must be a CLD definition for it installed in DCLTABLES.
  2028.         This is really only necessary for using VI as a SUB-process, but
  2029.         I find it conveinent to install the CLD so that I do not have
  2030.         to wait for SET COMMAND to complete when I log in.  If do not
  2031.         wish to use the callable TPU interface then go to the next step NOW,
  2032.         otherwise hang tight.
  2033.  
  2034.         The CLD definition that needs to be installed is in [-.EXE]VI.CLD.  If
  2035.         you do not have sufficient privileges to install a new DCLTABLES you
  2036.         should get prepared to do so, or find someone that will do it for you
  2037.         (now is not entirely necessary, as you can skip to step 6, and do this
  2038.         later). 
  2039.  
  2040.         a)  Take the time to examine the CLD, and make sure it is ok for
  2041.             your installation.  If you are on a cluster, then there is
  2042.             some extra work that I won't describe here since I have never
  2043.             done it.  Basically you need to do the following set of commands.
  2044.             (the dollar signs are provide by DCL in case it wasn't obvious).
  2045.  
  2046.             $ SET COMMAND [-.EXE]VI.CLD/TABLE=SYS$SHARE:DCLTABLES.EXE/OUT=-
  2047.             _$ SYS$SHARE:DCLTABLES.EXE
  2048.             $ MCR INSTALL
  2049.             INSTALL>SYS$SHARE:DCLTABLES/REPLACE
  2050.             INSTALL>EXIT
  2051.  
  2052.         b)  This should be all that single CPU sites need to do.  If you
  2053.             have a different arrangement at your sight that requires
  2054.             something different, then you would know that better than I.
  2055.             Remeber that you MUST logout and log back in to have the updated
  2056.             DCLTABLES available to your process.  Step 8, below, can not be
  2057.             done unless you either 1) do not do (c) below, or 2) you logout and
  2058.             log back in after reinstalling DCLTABLES.
  2059.  
  2060.         c)  [-.EXE]VI.COM, and [-.EXE]VISETUP.COM contain uses of the symbol,
  2061.             "VI".  This symbol is normally equated to "EDIT/TPU".  Once you
  2062.             have made the changes necessary to update DCLTABLES, then these
  2063.             references should be changed.  In [-.EXE]VI.COM, change VI to
  2064.             be "VI", instead of "EDIT/TPU".  In [-.EXE]VISETUP.COM, delete
  2065.             the assignment to the variable VI, as the comment there says
  2066.             to.
  2067.  
  2068.     6)  Next, set default to [-.EXE] (from [.DOC]), and edit the file
  2069.         VISETUP.COM.  This file must be executed by each user wishing to
  2070.         use VI before they can use it.  You should change the definition of
  2071.         VI$ROOT to be the parent directory of the directory you are in NOW.
  2072.         E.g. if you are in the directory DUA0:[PUBLIC.VI.DOC], then VI$ROOT
  2073.         should be defined to be DUA0:[PUBLIC.VI.].  Note that this file
  2074.         potentially defines 3 symbols.  VI allows normal use of VI, VIS
  2075.         allows use of the VI.COM procedure to run VI in a subprocess, and
  2076.         VIEW allows READONLY editing of a file (as in UNIX).
  2077.  
  2078.     7)  The command file VI.COM is used to envoke VI in a sub-process
  2079.         so that a minimal amount of overhead for image activation will
  2080.         be incurred by the system.  In the VI.COM that you have, there
  2081.         are invocations of a SUSPEND, and a RESUME command.  I use these
  2082.         commands to suspend kept editors while they are not it use so that
  2083.         they will be swapped out or trimmed by the SWAPPER in a more timely
  2084.         manner.  This will allow their memory to be put to use by other
  2085.         processes whenever possible.  If you do not wish to do this and/or
  2086.         do not have these facilities available to you, then you should comment
  2087.         out these command lines.
  2088.  
  2089.     8)  Next, you should be ready to give VI a trial run.  Execute the
  2090.         VISETUP.COM procedure in [.EXE].  Then type VI, and hit return.
  2091.         You should be off and running.
  2092. *$*$*EOD*$*$*
  2093. $ exit
  2094.