In addition to reading
file in your home directory (
many versions of
will read a file
in the current directory. This allows
you to set options that are appropriate
to a particular project.
For example, you might want to have one set of options in a
directory mainly used for programming:
set number lisp autoindent sw=4 terse
and another set of options in a directory used for text editing:
set wrapmargin=15 ignorecase
Note that you can set certain options in the
file in your home directory and unset them (for example,
set wrapmargin=0 noignorecase
in a local directory.
In System V, Release 3.2 and later,
files in the current directory unless you first
option in your
This mechanism makes it harder for other people to place, in your
working directory, an
file whose commands might jeopardize the security of your system.
You can also define alternate
environments by saving option
settings in a file other than
and reading in that file
command. For example:
files are also useful for defining
key mappings (
When we write a book or manual, we save all
abbreviations to be used in that book in an
in the directory in which the book is being created.
You can also store settings and startup commands for
environment variable (
If there is a conflict between settings in
settings take precedence.
from O'Reilly & Associates'
Learning the vi Editor
, Chapter 7