- 论坛徽章:
- 0
|
The man page for nvi.
The vi Tutorial
This document is a tutorial introduction to editing with vi.
The ex Reference Manual
The reference manual for ex. This manual is the original one for ex; it is a
bit out-of-date with respect to the facilities in nvi.
Also included are ASCII files that document some of the nvi internals, and provide
a list of features that should be implemented, and files that can be used as an
online tutorial to vi.
The actual online help built in to nvi is minimal, consisting of two commands,
:exusage and :viusage. These commands provide one-line summaries of each
ex and vi command. This is usually sufficient to remind you about how something
works, but not very good for learning about new or obscure features in nvi.
You can give a command as an argument to the :exusage and :viusage
commands, in which case nvi will display the help just for that command. nvi
prints one line explaining what the command does, and a one-line summary of
the command's usage.
9.4 Initialization
If the -s or "-" options have been specified, then nvi will bypass all initializations.
Otherwise, nvi performs the following steps:
1.
Read and execute the file /etc/vi.exrc. It must be owned either by root or
by you.
2.
Execute the value of the NEXINIT environment variable if it exists,
otherwise use EXINIT if it exists. Only one will be used, not both. Bypass
executing $HOME/.nexrc or $HOME/.exrc.
3.
If $HOME/.nexrc exists, read and execute it. Otherwise, if $HOME/.exrc
exists, read and execute it. Only one will be used.
4.
If the exrc option has been set, then look for and execute either ./.nexrc if
it exists, or ./.exrc. Only one will be used.
nvi will not execute any file that is writable by anyone other than the file's owner.
The nvi documentation suggests putting common initialization actions into your
.exrc file (i.e., options and commands for UNIX vi), and having your .nexrc file
execute :source .exrc before or after the nvi-specific initializations.
9.5 Multiwindow Editing
To create a new window in nvi, you use a capitalized version of one of the ex
editing commands: Edit, Fg, Next, Previous, Tag or Visual. (As usual, these
commands can be abbreviated.) If your cursor is in the top half of the screen, the
new window is created on the bottom half, and vice versa. You then switch to
another window with CTRL-W: |
|