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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access