Initialization
vi performs the following initialization steps:
If the
EXINITenvironment variable exists, execute the commands it contains. Separate multiple commands by a pipe symbol (|).If
EXINITdoesn’t exist, look for the file $HOME/.exrc. If it exists, read and execute it.If either
EXINITor $HOME/.exrc turns on theexrcoption, read and execute the file ./.exrc, if it exists.Execute search or goto commands given with
+/patternor+ncommand-line options (POSIX:-coption).
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.