Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VI(1)  —  UNIX Programmer’s Manual

NAME

vi, view − screen oriented (visual) display editor based on ex

SYNOPSIS

vi [ −t tag ] [ −r ] [ −l ] [ -wn ] [ −x ] [ −R ] [ +command ] name ... 

DESCRIPTION

Vi (visual) is a display oriented text editor based on ex(1). Ex and vi run the same code; it is possible to get to the command mode of ex from within vi by entering Q, and it is possible to get to the visual mode of vi from within ex by entering vi at the : prompt. 

The Vi Quick Reference card and the Introduction to Display Editing with Vi provide full details on using vi. 

This version of vi supports multiple instances of a tag in a tags file.  Multiple tags cause vi to enter a special mode and present a list of tags.  The user can then scan through the list and select the desired tag using the following commands:

j move down in the list

k move up in the list

CR accept the displayed tag

n check next tag file

ESC
abort the tags command

Other keystrokes will give an error indication. 

The −t option is equivalent to an initial tag command, editing the file containing the tag and positioning the editor at its definition.  The −r option is used in recovering after an editor or system crash, retrieving the last saved version of the named file or, if no file is specified, typing a list of saved files.  The −l option sets up for editing LISP, setting the showmatch and lisp options.  The −w option sets the default window size to n, and is useful on dialups to start in small windows.  The −x option causes vi to prompt for a key that is used to encrypt and decrypt the contents of the file, which should already be encrypted using the same key (see crypt (1)).  The −R option is equivalent to using view rather than vi and sets the readonly option at the start.  The name ...  arguments indicate files to be edited.  An argument of the form +command indicates that the editor should begin by executing the specified command.  If command is omitted, then it defaults to “$”, positioning the editor at the last line of the first file initially.  Other useful commands here are scanning patterns of the form “/pat” or line numbers, e.g. “+100” starting at line 100. 

FILES

See ex(1).

SEE ALSO

ex (1), edit (1), “Vi Quick Reference” card, “An Introduction to Display Editing with Vi”. 

AUTHOR

William Joy
Mark Horton added macros to visual mode and is maintaining version 3

BUGS

The x command and −x command line option are available only when the DYNIX Cryptographic Software option has been installed. 

Software tabs using ^T work only immediately after the autoindent. 

Left and right shifts on intelligent terminals don’t make use of insert and delete character operations in the terminal. 

The wrapmargin option can be fooled since it looks at output columns when blanks are typed.  If a long word passes through the margin and onto the next line without a break, then the line won’t be broken. 

Insert/delete within a line can be slow if tabs are present on intelligent terminals, since the terminals need help in doing this correctly. 

Saving text on deletes in the named buffers is somewhat inefficient. 

The source command does not work when executed as :source; there is no way to use the :append, :change, and :insert commands, since it is not possible to give more than one line of input to a : escape.  To use these on a :global you must Q to ex command mode, execute them, and then reenter the screen editor with vi or open. 

If you invoke vi and the system crashes, you may or may not be able to recover your file.  If your file is still in memory (the file is less than 64-Kbytes long and has fewer than 12 changes) the recover program will fail to work properly. 

3BSD

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026