7

I'm trying to find complete documentation for the possible contents of .vimrc.

Here's what I've tried:

  • Google search. Plenty of examples, no docs.
  • Official docs
  • man vim
  • :help vimrc
  • Searching this beta SE
  • Searching Stackoverflow

For example, this site lists the "top 50 vim configuration options" and mentions at the end that there are 330 more but doesn't say where.

Short of grepping through the source code, is there any comprehensive documentation for what the contents of a vimrc can be/do?

7

The hosting site vimdoc.sourceforge.net is not an official documentation and not up-to-date.

Prefer vimhelp.appspot.com if you want to share doc pages.

This help is available locally if you have Vim installed, and is one of the more comprehensive despite its density.

From :h vimrc

A file that contains initialization commands is called a "vimrc" file. Each line in a vimrc file is executed as an Ex command line. It is sometimes also referred to as "exrc" file. They are the same type of file, but "exrc" is what Vi always used, "vimrc" is a Vim specific name. Also see vimrc-intro.

:h vimrc-intro

The vimrc file can contain all the commands that you type after a colon. The most simple ones are for setting options.

See this page for more information on how to write a Vim script.

You should always look up what an option does before adding it to your configuration, take a look at the Vim Tip Learn to use help and :h help for details on how to navigate and search the docs.

  • option-list was it exactly. – Jared Smith Aug 28 '17 at 14:37
7

The contents of the vimrc file are written in the Vim scripting language, so the file could contain anything expressible in that language. It's not limited to just option settings.

The vimrc and its contents are explained in the Vim User Manual starting at :help vimrc-intro.

If you want to see a list of just option settings, execute

:options
  • That was more or less what I was looking for thank you. LEI beat you to the punch – Jared Smith Aug 28 '17 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.