vi performs the following initialization steps:
If the EXINIT
environment variable exists,
execute the commands it contains. Separate multiple commands by a pipe
symbol (|
).
If EXINIT
doesn’t exist, look for the file
$HOME/.exrc. If it exists, read and execute
it.
If either EXINIT
or
$HOME/.exrc turns on the exrc
option, read and execute the file ./.exrc, if it
exists.
Execute search or goto commands given with
+/
pattern
or
+
n
command-line options
(POSIX: -c
option).
The .exrc files are simple scripts of ex commands;
the commands in them don’t need a
leading colon. You can put comments in your scripts by starting a line
with a double quote ("
). This is recommended.
3.15.10.137