In many cases, screen update may differ somewhat in MAINVI, especially in ex mode (the mode entered by the Q command) and shell escape commands.
MAINVI examines the UNIX EXINIT shell variable only on UNIX.
On all operating systems, it
attempts to read the file .exrc in the
It then attempts to read the file .mainvirc on the home directory;
this is where initialization commands that are incompatible with
real vi should be put.
If an eparms file is present,
MAINVI also remembers in it the last file edited
and all abbreviations and macros from MAINVI sessions
(the DONOTUPDATEEPARMS parameter may be used to suppress this
2.2. Status Line
MAINVI uses one line of each window for a status line,
which includes the line number (preceded by L#),
page number (preceded by P.), and page-relative
line number (preceded by L.) of the line
at the top of the window,
a letter representing the current mode (C for command, I for
input), and the name of the buffer.
This line is required to separate the current window from other windows
that may also be on the screen (a feature vi does not provide).
Prompts appear on the top line of the screen instead of the bottom.
Tabs are treated very differently in MAINVI and vi.
MAINEDIT “expands” tabs to tabified blanks, as described in
Section 1.11 of the MAINEDIT User's Guide.
It is possible to position the cursor at each position within
a tab in a MAINVI buffer, as if the tab were completely expanded
to blanks; i.e., the cursor-left and cursor-right
commands do not jump to the last position of the tab as in
The editor does, however, remember which blanks originated as
blank characters and which as tabs, so that when a file is written
out, undisturbed tabs are written as tabs.
2.4. Lines Too Long to Fit on the Screen
Lines too long to fit on the screen are wrapped onto subsequent lines
MAINVI displays a tilde in the last column of the overly long
line and does not display the characters extending beyond the edge
of the screen, so that there is always exactly one line on the screen
for each line in the buffer.
It is possible to scroll the screen left or right to see these
invisible characters by issuing the :leftcolumn command.
2.5. Display of Control Characters
The ^X notation is
not used; an asterisk is displayed on most
terminals for a non-printing character.
The actual contents of a range of lines may be displayed with
the :list command.
In a non-ASCII character set,
:list writes all characters not in the MAINSAIL character set
as \nnn, where nnn are octal digits.
MAINVI's :print differs from :list in that it does no
special processing of control characters.
2.6. Page Marks (CTRL-L in a File)
The page mark character
(CTRL-L on ASCII systems)
is always preceded by an end-of-line,
and is always displayed on the screen
so that it takes up a full line.
The preceding end-of-line is actually present in
the file when it is written;
the apparent end-of-line after the page mark line is not present.
This is a property of the editor back end required by MAINEDIT, but a
nuisance in MAINVI.
The g command may be used to move to the beginning of a page.
On many terminals, you cannot insert a page mark by typing CTRL-L
The easiest way to insert a page mark on such terminals
in MAINVI is to issue the
command :swm p.
The :swm command allows MAINED-specific commands
to be issued (in this case the P command to insert a page mark).
2.7. Deletions during Input Mode
vi does not immediately erase characters from the screen
deleted by the backspace key in input mode, although these characters
are erased when input mode is exited.
MAINVI erases them each time the backspace key is pressed, so that
the screen always reflects the buffer contents.
The c command does not put a dollar sign at the end of text to be deleted, but goes ahead and deletes it before insertion starts.
The characters used for deletions during insert mode are hardwired
as CTRL-U (for line deletions), CTRL-W (for word deletions),
and backspace or delete (for character deletions).
They are not read from the current UNIX terminal mode information.
2.8. CTRL-L Command
CTRL-L is a screen refresh command in vi (a near synonym is
On most terminals, CTRL-L is the MAINEDIT
<abort> command, so CTRL-R
should be used instead.
Use CTRL-R also when you change
the size of a terminal emulator window
in which MAINVI is running;
MAINVI checks the size of the screen each
time this command is issued, and adjusts the size of its display
The <abort> key
is used in some situations where CTRL-C (or the UNIX interrupt
character) would be used in vi.
The regular interrupt character should be used to abort a shell
command invoked from MAINVI.
2.9. Shell Commands
Commands that invoke the shell or another process work only on
systems that have MAINSAIL STREAMS installed.
Consult the MAINSAIL STREAMS User's Guide for details.
2.10. Delete Buffers and Text Recovery
Deletions always go into the numbered buffer ring (buffers are
numbered from 1 to 9); if a lettered buffer is specified,
the deletion also goes into it.
All deletions are saved except those made in input mode.
The default buffer from which text is recovered is 1.
Text is recovered in the order deleted, without extra line
breaks inserted between character-oriented deletions.
Command mode macro left-hand sides
are limited to a single keystroke (most keys
that send escape sequences are considered a single keystroke).
Input mode macros (those defined by :map!)
are usually limited to keys that generate a
single character code.
2.12. Ignored Modes and Variables
The following :set variables are ignored:
directory hardtabs lisp list open
optimize redraw slowopen taglength
term terse w300 w1200 w9600 writeany