VI(1) — USER COMMANDS
NAME
vi − screen oriented (visual) display editor based on ex
SYNOPSIS
vi [ −R ] [ −r ] [ −t tag ] [ +command ] [ −x ] [ −wnnn ] [ −l ] file...
DESCRIPTION
Vi (visual) is a display oriented text editor based on ex. ex and vi are in fact the same text editor; it is possible to get to the command mode of ex from within vi and vice-versa.
OPTIONS
−R edit the file in read-only state. You can achieve the same effect with the view command.
−r recover the indicated files after a crash.
−t tag
edit the file containing the tag tag. A tags database must have been built previously using the ctags(1) command.
+command
start the editing session by executing command.
−wnnn
set the default window (number of lines on your terminal) to nnn— this is useful if you are dialling into the system over a slow ’phone line.
−x prompt for a key to be used in encrypting the file being edited.
−l set up for editing LISP programs.
FILES
See ex(1).
SEE ALSO
Editing Text Files on the Sun
ex(1)
BUGS
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.
Repeating a change which wraps over the margin when wrapmargin is in effect doesn’t generally work well: sometimes it just makes a mess of the change, and sometimes even leaves you in insert mode. A way to work around the problem is to replicate the changes using yank and put.
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.
When using the −r option to recover a file, you must write the recovered text before quitting or you will lose it. Vi does not prevent you from exiting without writing unless you make changes.
RESTRICTIONS
The encryption facilities of vi are not available on software shipped outside the U.S.
Sun Release 3.0β — Last change: 1 February 1985