Skip to Main Content
vi and Vim Editors Pocket Reference, 2nd Edition
book

vi and Vim Editors Pocket Reference, 2nd Edition

by Arnold Robbins
January 2011
Intermediate to advanced content levelIntermediate to advanced
94 pages
1h 52m
English
O'Reilly Media, Inc.
Content preview from vi and Vim Editors Pocket Reference, 2nd Edition

Initialization

vi performs the following initialization steps:

  1. If the EXINIT environment variable exists, execute the commands it contains. Separate multiple commands by a pipe symbol (|).

  2. If EXINIT doesn’t exist, look for the file $HOME/.exrc. If it exists, read and execute it.

  3. If either EXINIT or $HOME/.exrc turns on the exrc option, read and execute the file ./.exrc, if it exists.

  4. 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.

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.
Start your free trial

You might also like

Pro Vim

Pro Vim

Mark McDonnell
Learning the vi and Vim Editors, 7th Edition

Learning the vi and Vim Editors, 7th Edition

Arnold Robbins, Elbert Hannah, Linda Lamb

Publisher Resources

ISBN: 9781449303082Errata Page