vim 5.1 has a total of 170 options that affect its behavior. Table C.4 summarizes the most important ones. Most options described in Table C.1 are not repeated here.
The summaries in the table here are of necessity very brief. Much more information about each option may be found in the vim online help.
Option | Default | Description |
---|---|---|
|
| vim tries to use background and foreground colors that are appropriate to the particular terminal. |
|
| Controls whether you can backspace over a newline and/or over the start of insert. Values are: 0 for vi compatibility, 1 to backspace over newlines, and 2 to backspace over the start of insert. Using a value of 3 allows both. |
|
| Make a backup before overwriting a file,
then leave it around after the
file has been successfully written.
To have a backup file just while the file is being written, use
the |
|
| A list of directories for the backup file, separated with commas.
The backup file will be created in the first directory in the list
where this is possible. If empty, you cannot create a backup file.
The name |
|
| The string which is appended to a file name to make the name of the backup file. |
|
| Changes a number of other options to make it
easier to edit binary files.
The previous values of these options are remembered and restored when
|
|
| Enables automatic smart C program indenting. |
|
| A list of keys that, when typed in insert mode, cause
reindenting of the current line. Only happens if
|
| Affects
the way | |
|
| These keywords start an extra indent in the next line when
|
| A comma-separated list of strings that can start a comment line. See the online help for details. | |
|
| Makes vim behave more like vi in too many ways to describe here. It is on by default, to avoid surprises. Having a .vimrc turns off the vi compatibility; usually this is a desirable side effect. |
|
| A sequence of single character flags, each one indicating a different way in which vim will or will not exactly mimic vi. When empty, the vim defaults are used. See the on-line help for details. |
|
| A search pattern that describes macro definitions.
The default value is for C programs. For C++, use
|
|
| A list
of directory names for the swap file, separated with commas.
The swap file will be created in the first directory where this is
possible.
If empty, no swap file will be used and recovery is
impossible!
The name |
| External program to use for | |
|
| Name of the errorfile for the quickfix mode.
When the -q command line argument is used,
|
| (too long to print) | Scanf-like description of the format for the lines in the error file. |
|
| When inserting a tab, expand it to the appropriate number of spaces. |
|
| Describes the convention to terminate lines when
reading/writing the current buffer.
Possible values are |
|
| Lists the line-terminating conventions that vim will try to apply to a file when reading. Multiple names enable automatic end-of-line detection when reading a file. |
| vim default: | A sequence of letters which describes how automatic formatting is to be done. See the online help for details. |
|
| Causes the substitute command to change all instances. |
| A comma-separated list of fonts to try when starting the GUI version of vim. | |
|
| Hides the current buffer when it is unloaded from a window, instead of abandoning it. |
|
| Highlight all matches of the most recent search pattern. |
| vim default: 20, vi default: 0 | Controls how many ex commands, search strings and expressions are remembered in the command history. |
|
| vim attempts
to change the name of the icon associated with the window
where it is running.
Overridden by the |
| String value used for the icon name of the window. | |
|
| Defines a search pattern for finding include commands. The default value is for C programs. |
|
| Enables incremental searching. |
|
| A list of characters that can be included in file
and path names. Non-UNIX systems have different default values.
The @ character stands for any alphabetic character.
It is also used in the other |
|
| A list of characters that can be included in identifiers. Non-UNIX systems may have different default values. |
|
| A list of characters that can be included in keywords.
Non-UNIX systems may have different default values.
Keywords are used in searching and recognizing with many commands,
such as |
|
| A list of characters that can be displayed directly to the screen. Non-UNIX systems may have different default values. |
| /tmp/vim##.err | The errorfile name for the
|
|
| The program to use for the |
| Enable the mouse in non-GUI versions of vim. This works for MS-DOS, Win32, and xterm. See the online help for details. | |
|
| Hides the mouse pointer during typing. Restores the pointer when the mouse is moved. |
|
| Changes a large number of options so that pasting into a vim window with a mouse does not mangle the pasted text. Turning it off restores those options to their previous values. See the online help for details. |
|
| Shows the line and column number of the cursor position. |
|
| Disables certain kinds of commands in the startup file. Automatically enabled if you don't own the .vimrc and .exrc files. |
| The shell string to use for capturing the output from
| |
| The shell string for capturing the output of a filter into a temporary file. The default value depends upon the shell. | |
| vim default: | Put a message in the status line for insert, replace, and visual modes. |
|
| How many columns to scroll horizontally. The value zero puts the cursor in the middle of the screen. |
|
| Overrides the |
|
| When multiple files match a pattern during filename completion, the value of this variable sets a priority among them, in order to pick the one vim will actually use. |
|
| Defines number of characters that are significant for tags. Default (zero) means that all characters are significant. |
| vim default: | Filenames in a tags file from another directory are taken to be relative to the directory where the tags file is. |
| ./tags,tags | Filenames for the |
|
| Makes the |
|
| The
maximum number of changes that can be undone. A value of 0
means vi compatibility: one level of undo
and |
| Reads the viminfo file upon startup and writes it upon exiting. The value is complex; it controls the different kinds of information that vim will store in the file. See the online help for details. | |
|
| Make a backup before overwriting a file.
The backup is removed after the file was successfully written,
unless the |