*options.txt* For Vim version 5.0j. Last modification: 1997 Jun 01 VIM REFERENCE MANUAL by Bram Moolenaar Options *options* 1. Setting options |set_option| 2. Automatically setting options |auto_setting| 3. Saving settings |save_settings| 4. Options summary |option_summary| For an overview of options see help.txt |option_list|. Vim has a number of internal variables and switches which can be set to achieve special effects. These options come in three forms: toggle can only be on or off *toggle* number has a numeric value string has a string value ============================================================================== 1. Setting options *set_option* *:se* *:set* :se[t] Show all options that differ from their default value. :se[t] all Show all but terminal options. :se[t] termcap Show all terminal options. :se[t] {option}? Show value of {option}. :se[t] {option} Toggle option: set, switch it on. Number option: show value. String option: show value. :se[t] no{option} Toggle option: Reset, switch it off. :se[t] {option}! or :se[t] inv{option} Toggle option: Invert value. {not in Vi} :se[t] {option}& Reset option to its default value. {not in Vi} :se[t] all& Set all options, except terminal options, to their default value. {not in Vi} :se[t] {option}={value} or :se[t] {option}:{value} Set string or number option to {value}. For numeric options the value can be given in decimal, hex (preceded with 0x) or octal (preceded with '0') (hex and octal are only available for machines which have the strtol() function). The old value can be inserted by typing (or whatever the value of 'wildchar' is). See 4.4.2 |cmdline_completion|. See |option_backslash| for using backslashes in {value}. *:fix* *:fixdel* :fix[del] Set the value of 't_kD': 't_kb' is 't_kD' becomes CTRL-? CTRL-H not CTRL-? CTRL-? (CTRL-? is 0177 octal, 0x7f hex) {not in Vi} If your delete key terminal code is wrong, but the code for backspace is allright, you can put this in your .vimrc: :fixdel This works no matter what the actual code for backspace is. If the backspace key terminal code is wrong you can use this: :set t_kb=^V :fixdel Where "^V" is CTRL-V and "" is the backspace key. This will only work for terminals with the same code for the backspace key, you cannot use this in your .vimrc unless the code for backspace is the same on all your systems. If your key sends a strange key sequence (not CTRL-? or CTRL-H) you cannot use ":fixdel". Then use: :set t_kD=^V Where "^V" is CTRL-V and "" is the delete key. This will only work on systems with the same terminal codes for delete. Note about Linux: By default the backspace key produces CTRL-?, which is wrong. You can fix it by putting this line in your rc.local: echo "keycode 14 = BackSpace" | loadkeys The {option} arguments to ":set" may be repeated. For example: ":set ai nosi sw=3 ts=3". If you make an error in one of the arguments an error message will be given and the text up to the next space will be skipped. Thus following arguments will be processed. For {option} the form "t_xx" may be used to set a termcap option. This will override the value from the termcap. You can then use it in a mapping. If the "xx" part contains special characters, use the form: :set =^[Ot The listing from ":set" looks different from Vi. Long string options are put at the end of the list. The number of options is quite large. The output of "set all" probably does not fit on the screen, causing Vim to give the "--more--" message. See the 'more' option. *:set_env* *expand_env* Environment variables in most string options will be expanded. If the environment variable exists the '$' and the following environment variable name is replaced with its value. If it does not exist the '$' and the name are not modified. Any non-id character (not a letter, digit or '_') may follow the environment variable name. That character and what follows is appended to the value of the environment variable. Examples: :set term=$TERM.new :set path=/usr/$INCLUDE,$HOME/include,. Using "~" is like using "$HOME", but it is only recognized at the start of an option and after a space or comma. On Unix systems the form "${HOME}" can be used too. The name between {} can contain non-id characters then. Note that if you want to use this for the "gf" command, you need to add the '{' and '}' characters to 'isfname'. *$VIM* When "$VIM" is used, and VIM is not defined as an environment variable, Vim will try to use another way to get the value, in this order: 1. For MSDOS and Win32 the environment variable $HOME is used, when defined. 2. The path from 'helpfile' is used, unless it contains some environment variable too (chicken-egg problem). 3. For MSDOS and Win32 Vim tries to use the name of the executable. 4. For Unix the compile-time defined installation directory is used (see the output of ":version"). Note the maximum lenght of an expanded option is limited. How much depends on the system, mostly it is something like 256 or 1024 characters. *option_backslash* To include white space in a string option value it has to be preceded with a backslash. To include a backslash you have to use two. Effectively this means that the number of backslashes in an option value is halved (rounded down). A few examples: :set tags=tags\ /usr/tags results in "tags /usr/tags" :set tags=tags\\,file results in "tags\,file" :set tags=tags\\\ file results in "tags\ file" For MS-DOS and WIN32 backslashes in file names are mostly not removed. More precise: For options that expect a file name (those where environment variables are expanded) a backslash before a normal file name character is not removed. But a backslash before a special character (space, backslash, comma, etc.) is used like explained above. ============================================================================== 2. Automatically setting options *auto_setting* Besides changing options with the ":set" command, there are three alternatives to set options automatically for one or more files: 1. When starting Vim initializations are read from various places. See |initialization|. Most of them are performed for all editing sessions, and some of them depend on the directory where Vim is started. 2. If you start editing a new file, the automatic commands are executed. This can be used to set options for files matching a particular pattern and many other things. See |autocommand|. 3. If you start editing a new file, and the 'modeline' option is on, a number of lines at the beginning and end of the file are checked for modelines. This is explained here. *modeline* There are two forms of modelines. The first form: [text]{white}{vi:|vim:|ex:}[white]{options} [text] any text or empty {white} at least one white space ( or ) {vi:|vim:|ex:} the string "vi:", "vim:" or "ex:" [white] optional white space {options} a list of option settings, separated with white space or ':', where each part between ':' is the argument for a ":set" command Example: " vi:noai:sw=3 ts=6" The second form (this is compatible with some versions of Vi): [text]{white}{vi:|vim:|ex:}[white]set {options}:[text] [text] any text or empty {white} at least one white space ( or ) {vi:|vim:|ex:} the string "vi:", "vim:" or "ex:" [white] optional white space set the string "set " (note the space) {options} a list of options, separated with white space, which is the argument for a ":set" command : a colon [text] any text or empty Example: "/* vim: set ai tw=75: */" The white space before {vi:|vim:|ex:} is required. This minimizes the chance that a normal word like "lex:" is caught. There is one exception: "vi:" and "vim:" can also be at the start of the line (for compatibility with version 3.0). Using "ex:" at the start of the line will be ignored (this could be short for "example:"). The number of lines that are checked can be set with the 'modelines' option. If 'modeline' is off or 'modelines' is 0 no lines are checked. Note that for the first form all of the rest of the line is used, thus a line like: "/* vi:ts=4: */" will give an error message for the trailing "*/". This line is OK: "/* vi:set ts=4: */" If an error is detected the rest of the line is skipped. If you want to include a ':' in a set command precede it with a '\'. No other commands than "set" are supported, for security reasons (somebody might create a trojan horse text file with modelines). ============================================================================== 3. Saving settings *save_settings* *:mk* *:mkexrc* :mk[exrc] [file] Write current key mappings and changed options to [file] (default ".exrc" in the current directory), unless it already exists. {not in Vi} :mk[exrc]! [file] Always write current key mappings and changed options to [file] (default ".exrc" in the current directory). {not in Vi} *:mkv* *:mkvimrc* :mkv[imrc][!] [file] Like as :mkexrc, but default is ".vimrc" in the current directory. The ":version" command is also written to the file. {not in Vi} These commands will write ":map" and ":set" commands to a file, in such a way that when these commands are executed, the current key mappings and options will be set to the same values. The options 'columns', 'endofline', 'lines', 'modified', 'scroll', 'term' and 'ttyfast' are not included, because these are terminal or file dependent. Note that the options 'binary', 'textmode', 'paste' and 'readonly' are included, this might not always be what you want. A common method is to use a default ".vimrc" file, make some modifications with ":map" and ":set" commands and write the modified file. First read the default ".vimrc" in with a command like ":source ~piet/.vimrc.Cprogs", change the settings and then save them in the current directory with ":mkvimrc!". If you want to make this file your default .vimrc, move it to your home directory (on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use autocommands |autocommand| and/or modelines |modeline|. ============================================================================== 4. Options summary *option_summary* In the list below all the options are mentioned with their full name and most with an abbreviation between parens. Both forms may be used. In this document when an option that can be toggled is "set" that means that ":set option" is entered. When an option is "reset", ":set nooption" is used. For some options there are two default values: The "Vim default", which is used when 'compatible' is not set, and the "Vi default", which is used when 'compatible' is set. Most options are the same in all windows and buffers. There are a few that are specific to how the text is presented in a window. These can be set to a different value in each window. For example the 'list' option can be set in one window and reset in another for the same text, giving both types of view at the same time. There are a few options that are specific to a certain file. These can have a different value for each file or buffer. For example the 'textwidth' option can be 78 for a normal text file and 0 for a C program. global one option for all buffers and windows local to window each window has its own copy of this option local to buffer each buffer has its own copy of this option When creating a new window the option values from the currently active window are used as a default value for the window-specific options. For the buffer-specific options this depends on the 's' and 'S' flags in the 'cpoptions' option. If 's' in included (which is the default) the values for buffer options are copied from the currently active buffer when a buffer is first entered. If 'S' is present the options are copied each time the buffer is entered, this is almost like having global options. If 's' and 'S' are not present, the options are copied from the currently active buffer when the buffer is created. A jump table for the options with a short description can be found at |X_op|. *'aleph'* *'al'* 'aleph' 'al' number (default 128 for MS-DOS, 224 otherwise) global {not in Vi} {This option applies only if Vim was compiled with RIGHTLEFT defined} The ASCII code for the first letter of the Hebrew alphabet. The routine that maps the keyboard in Hebrew mode, both in Insert mode (when hkmap is set) and on the command line (when hitting CTRL-_) outputs the Hebrew characters in the range [aleph..aleph+26]. aleph=128 applies to PC code, and aleph=224 applies to ISO 8859-8. See |rightleft.txt|. *'altkeymap'* *'akm'* *'noalkeymap'* *'noakm'* 'altkeymap' 'akm' toggle (default off) global {not in Vi} {Only available if Vim was compiled with FKMAP defined} When on, the second language is Farsi. In editing mode CTRL-_ toggles the keyboard map between Farsi and English. When off, the keyboard map toggles between Hebrew and English. This is useful to start the vim in native mode i.e. English (left-to-right mode) and have default second language Farsi or Hebrew (right-to-left mode). See |farsi.txt|. *'autoindent'* *'ai'* *'noautoindent'* *'noai'* 'autoindent' 'ai' toggle (default off) local to buffer Copy indent from current line when starting a new line (typing in Insert mode or when using the "o" or "O" command). If you do not type anything on the new line except and then type or , the indent is deleted again. When autoindent is on, formatting (with the "gq" command or when you reach 'textwidth' in Insert mode) uses the indentation of the first line. When 'smartindent' or 'cindent' is on the indent is changed in specific cases. The 'autoindent' option is reset when the 'paste' option is set. {small difference from Vi: After the indent is deleted when typing or , the cursor position when moving up or down is after the deleted indent; Vi puts the cursor somewhere in the deleted indent}. *'autowrite'* *'aw'* *'noautowrite'* *'noaw'* 'autowrite' 'aw' toggle (default off) global Write the contents of the file, if it has been modified, on each :next, :rewind, :previous, :stop, :suspend, :tag, :!, :make, CTRL-] and CTRL-^ command; and when a CTRL-O, CTRL-I, ', or ` command takes one to another file. *'backspace'* *'bs'* 'backspace' 'bs' number (default 0) global {not in Vi} Influences the working of , , CTRL-W and CTRL-U in Insert mode. If set to 0 Vi compatible backspacing is used. When 1 allow backspacing over newlines. When larger than 1 allow backspacing over the start of insert. In the last case CTRL-W and CTRL-U stop once at the start of insert. See |:fixdel| if your or key does not do what you want. *'backup'* *'bk'* *'nobackup'* *'nobk'* 'backup' 'bk' toggle (default off) global {not in Vi} Make a backup before overwriting a file. Leave it around after the file has been successfully written. If you do not want to keep the backup file, but you do want a backup while the file is being written, reset this option and set the 'writebackup' option (this is the default). If you do not want a backup file at all reset both options (use this if your file system is almost full). See the |backup_table| for more explanations. *'backupdir'* *'bdir'* 'backupdir' 'bdir' string (default for Amiga: ".,t:", for MS-DOS and Win32: ".,c:/tmp,c:/temp" for Unix: ".,~/tmp,~/") global {not in Vi} 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. - Empty means that no backup file will be created ('patchmode' is impossible!). - A directory "." means to put the backup file in the same directory as the edited file. - A directory starting with "./" (or ".\" for MS-DOS et.al.) means to put the backup file relative to where the edited file is. The leading "." is replaced with the path name of the edited file. - Spaces after the comma are ignored, other spaces are considered part of the directory name. To have a space at the start of a directory name, precede it with a backslash. - To include a comma in a directory name precede it with a backslash. - A directory name may end in an '/'. - Environment variables are expanded |:set_env|. - Careful with '\' characters, type one before a space, type two to get one in the option (see |option_backslash|), for example: :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces - For backwards compatibility with Vim version 3.0 a '>' at the start of the option is removed. See also 'backup' and 'writebackup' options. *'backupext'* *'bex'* 'backupext' 'bex' string (default "~") global {not in Vi} String which is appended to a file name to make the name of the backup file. The default is quite unusual, because this avoids accidently overwriting existing files with a backup file. You might prefer using ".bak", but make sure that you don't have files with ".bak" that you want to keep. *'binary'* *'bin'* *'nobinary'* *'nobin'* 'binary' 'bin' toggle (default off) local to buffer {not in Vi} This option should be set before editing a binary file. You can also use the "-b" Vim argument. When this option is switched on a few options will be changed (also when it already was on): 'textwidth' will be set to 0 'wrapmargin' will be set to 0 'modeline' will be off 'textmode' will be off 'textauto' will be off 'expandtab' will be off NOTE: When you start editing a(nother) file while the 'bin' option is on, settings from the modelines or autocommands may change the settings again (e.g., 'textwidth'), causing trouble when editing. You might want to set 'bin' again when the file has been loaded. The previous values of these options are remembered and restored when 'bin' is switched fron on to off. Each buffer has its own set of saved option values, except for 'textauto', which is global. When writing a file the end-of-line for the last line is only written if there was one in the original file (normally Vim appends an end-of-line to the last line if there is none; this would make the file longer). See the 'endofline' option. *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'* 'bioskey' 'biosk' toggle (default on) global {not in Vi} {Only for MS-DOS} When on the bios is called to obtain a keyboard character. This works better to detect CTRL-C, but only works for the console. When using a terminal over a serial port reset this option. *'breakat'* *'brk'* 'breakat' 'brk' string (default " ^I!@*-+_;:,./?") global {not in Vi} This option lets you choose which characters might cause a line break if 'linebreak' is on. *'cindent'* *'cin'* *'nocindent'* *'nocin'* 'cindent' 'cin' toggle (default off) local to buffer {not in Vi} {Only present when compiled with CINDENT enabled, ":version" says "+cindent" instead of "-cindent"} Enables automatic C program indenting See 'cinkeys' to set the keys that trigger reindenting in insert mode and 'cinoptions' to set your preferred indent style. If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using this algorithm rather than calling an external program. See |C_indenting|. This option is switched off when 'paste' is set. When you don't like the way 'cindent' works, try the 'smartindent' option. 'cinkeys' 'cink' string (default "0{,0},:,0#,!^F,o,O,e") local to buffer {not in Vi} {Only present when compiled with CINDENT enabled} A list of keys that, when typed in insert mode, cause reindenting of the current line. Only happens if 'cindent' is on. See |C_indenting|. *'cinoptions'* *'cino'* 'cinoptions' 'cino' string (default "") local to buffer {not in Vi} {Only present when compiled with CINDENT enabled} The 'cinoptions' affect the way 'cindent' reindents lines in a C program. See |C_indenting|. *'cinwords'* *'cinw'* 'cinwords' 'cinw' string (default "if,else,while,do,for,switch") local to buffer {not in Vi} {Only present when compiled with CINDENT or SMARTINDENT enabled} These keywords start an extra indent in the next line when 'smartindent' or 'cindent' is set. For 'cindent' this is only done at an appropriate place (inside {}). *'cmdheight'* *'ch'* 'cmdheight' 'ch' number (default 1) global {not in Vi} Number of lines to use for the command line. If you are annoyed by "Hit return ..." caused by long messages, set this option to a larger value. *'columns'* *'co'* 'columns' 'co' number (default 80 or terminal width) global {not in Vi} Number of columns of the screen. Normally this is set by the terminal initialization and does not have to be set by hand. *'comments'* *'com'* 'comments' 'com' string (default "sr:/*,mb:*,el:*/,://,b:#,:%,:XCOMM,n:>,fb:-") local to buffer {not in Vi} A comma separated list of strings that can start a comment line. See |format_comments|. See |option_backslash| about using backslashes to insert a space. *'compatible'* *'cp'* *'nocompatible'* *'nocp'* 'compatible' 'cp' toggle (default on) global {not in Vi} This option has the function of making Vim either more Vi-compatible, or behave in a more useful way. This is a special kind of option, because when it's set or reset, other options are also changed as a side effect. By default this option is on and the Vi defaults are used for the options. This default was chosen for those people who want to use Vim just like Vi, and don't even (want to) know about the 'compatible' option. Switching this option off makes the Vim defaults be used for options that have a different Vi and Vim default value. See the options marked with a '+' below. Other options are not modified. At the moment this option is set, several other options will be set or reset to make Vim as Vi-compatible as possible. See the table below. This can be used if you want to revert to Vi compatible editing. See also 'cpoptions'. option + set value effect 'backspace' 0 normal backspace 'backup' off no backup file 'cindent' off no C code indentation 'cpoptions' + (all flags) Vi-compatible flags 'digraph' off no digraphs 'esckeys' + off no -keys in Insert mode 'expandtab' off tabs not expanded to spaces 'formatoptions' + "vt" Vi compatible formatting 'gdefault' off no default 'g' flag for ":s" 'history' + 0 no commandline history 'hlsearch' off no highlighting of search matches 'incsearch' off no incremental searching 'insertmode' off do not start in Insert mode 'iskeyword' + "@,48-57,_" keywords contain alphanumeric characters and '_' 'joinspaces' on insert 2 spaces after period 'modeline' + off no modelines 'more' + off no pauses in listings 'revins' off no reverse insert 'ruler' off no ruler 'scrolljump' 1 no jump scroll 'scrolloff' 0 no scroll offset 'shiftround' off indent not rounded to shiftwidth 'showcmd' + off command characters not shown 'showmode' + off current mode not shown 'smartcase' off no automatic ignore case switch 'smartindent' off no smart indentation 'smarttab' off no smart tab size 'softtabstop' 0 tabs are always 'tabstop' positions 'startofline' on goto startofline with some commands 'tagrelative' + off tag file names are not relative 'textauto' + off no automatic textmode detection 'textwidth' 0 no automatic line wrap 'tildeop' off tilde is not an operator 'ttimeout' off no terminal timeout 'whichwrap' + "" left-right movements don't wrap 'wildchar' + CTRL-E only when the current value is use CTRL-E for cmdline completion *'cpoptions'* *'cpo'* 'cpoptions' 'cpo' string (Vim default: "aABceFs", Vi default: all flags) global {not in Vi} A sequence of single character flags. When a character is present this indicates vi-compatible behaviour. This is used for things where not being vi-compatible is mostly or sometimes preferred. 'cpoptions' stands for 'compatibleoptions'. Commas can be added for readability. contains behaviour a When included, a ":read" command with a file name argument will set the alternate file name for the current window. A When included, a ":write" command with a file name argument will set the alternate file name for the current window. b "\|" in a ":map" command is recognized as the end of the map command. The '\' is included in the mapping, the text after the '|' is interpreted as the next command. Use a CTRL-V instead of a backslash to include the '|' in the mapping. Applies to all mapping, abbreviation, menu and autocmd commands. See also |map_bar|. B A backslash has no special meaning in mappings, abbreviations and the "to" part of the menu commands. Remove this flag to be able to use a backslash like a CTRL-V. This flag must be removed to be able to fully use the <> notation. For example, the command ":map X \" results in X being mapped to: 'B' included: "\^[" (^[ is a real ) 'B' excluded: "" (5 characters) ('<' excluded in both cases) < Disable the recognition of special key codes in <> form in mappings, abbreviations, and the "to" part of menu commands. For example, the command ":map X " results in X being mapped to: '<' included: "" (5 characters) '<' excluded: "^I" (^I is a real ) Also see the 'k' flag below. c Searching continues at the end of any match at the cursor position. When not present searching continues one character from the cursor position. With 'c' "abababababab" only gets three matches when repeating "/abab", without 'c' there are five matches. d Using "./" in the 'tags' option doesn't mean to use the tags file relative to the current file, but the tags file in the current directory. e When executing a register with ":@r", always add a to the last line, also when the register is not linewise. If this flag is not present, the register is not linewise and the last line does not end in a , then the last line is put on the command line and can be edited before hitting . f When included, a ":read" command with a file name argument will set the file name for the current buffer, if the current buffer doesn't have a file name yet. F When included, a ":write" command with a file name argument will set the file name for the current buffer, if the current buffer doesn't have a file name yet. k Disable the recognition of raw key codes in mappings, abbreviations, and the "to" part of menu commands. For example, if sends ^[OA (where ^[ is ), the command ":map X ^[OA" results in X being mapped to: 'k' included: "^[OA" (3 characters) 'k' excluded: "" (one key code) Also see the '<' flag above. l Backslash in a [] range in a search pattern is taken literally, only "\]" is special See |/[]| 'l' included: "/[ \t]" finds , '\' and 't' 'l' excluded: "/[ \t]" finds and m When included, a showmatch will always wait half a second. When not included, a showmatch will wait half a second or until a character is typed. |'showmatch'| o Line offset to search command is not remembered for next search. r Redo ("." command) uses "/" to repeat a search command, instead of the actually used search string. s Set buffer options when entering the buffer for the first time. This is like it is in Vim version 3.0. And it is the default. If not present the options are set when the buffer is created. S Set buffer options always when entering a buffer (except 'readonly' and 'textmode'). This is the (most) Vi compatible setting. The options are set to the values in the current buffer. When you change an option and go to another buffer, the value is copied. Effectively makes the buffer options global to all buffers. 's' 'S' copy buffer options no no when buffer created yes no when buffer first entered (default) X yes each time when buffer entered (vi comp.) t Search pattern for the tag command is remembered for "n" command. Otherwise Vim only puts the pattern in the history for search pattern, but doesn't change the last used search pattern. u Undo is Vi compatible. See |undo-two-ways|. w When using "cw" on a blank character, only change one character and not all blanks until the start of the next word. x on the command line executes the command line. The default in Vim is to abandon the command line, because normally aborts a command. |c_| $ When making a change to one line, don't redisplay the line, but put a '$' at the end of the changed text. The changed text will be overwritten when you type the new text. The line is redisplayed if you type any command that moves the cursor from the insertion point. ! When redoing a filter command, use the last used external command, whatever it was. Otherwise the last used -filter- command is used. % Vi-compatible matching is done for the "%" command. Parens inside single and double quotes are also counted, causing a string that contains a paren to disturb the matching. For example, in a line like "if (strcmp("foo(", s))" the first paren does not match the last one. When this flag is not included, parens inside single and double quotes are treated specially. When matching a paren outside of quotes, everything inside quotes is ignored. When matching a paren inside quotes, it will find the matching one (if there is one). This works very well for C programs. *'define'* *'def'* 'define' 'def' string (default "^#[ \t]*define") global {not in Vi} Pattern to be used to find a macro definition. It is a search pattern, just like for the "/" command. The default value is for C programs. This option is used for the commands like "[i" and "[d" |include_search|. The 'isident' option is used to recognize the identifier name after the match. See |option_backslash| about inserting backslashes to include a space or backslash. *'dictionary'* *'dict'* 'dictionary' 'dict' string (default "") global {not in Vi} List of file names, separated by commas, that are used to lookup words for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should contain a list of words, one word per line. To include a comma in a file name precede it with a backslash. Spaces after a comma are ignored, otherwise spaces are included in the file name. See |option_backslash| about using backslashes. Where to find a list of words? - On FreeBSD, there is the file "/usr/share/dict/words". - In the Simtel archive, look in the "msdos/linguist" directory. - In "miscfiles" of the GNU collection. *'digraph'* *'dg'* *'nodigraph'* *'nodg'* 'digraph' 'dg' toggle (default off) global {not in Vi} {Only applies when compiled with DIGRAPHS defined, check with ":version"} Enable the entering of digraphs in Insert mode with {char1} {char2}. See |digraphs|. *'directory'* *'dir'* 'directory' 'dir' string (default for Amiga: ".,t:", for MS-DOS and Win32: ".,c:\tmp,c:\temp" for Unix: ".,~/tmp,/tmp") global 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. - Empty means that no swap file will be used (recovery is impossible!). - A directory "." means to put the swap file in the same directory as the edited file. On Unix, a dot is prepended to the file name, so it doesn't show in a directory listing. - A directory starting with "./" (or ".\" for MS-DOS et.al.) means to put the swap file relative to where the edited file is. The leading "." is replaced with the path name of the edited file. - Spaces after the comma are ignored, other spaces are considered part of the directory name. To have a space at the start of a directory name, precede it with a backslash. - To include a comma in a directory name precede it with a backslash. - A directory name may end in an ':' or '/'. - Environment variables are expanded |:set_env|. - Careful with '\' characters, type one before a space, type two to get one in the option (see |option_backslash|), for example: :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces - For backwards compatibility with Vim version 3.0 a '>' at the start of the option is removed. Using "." first in the list is recommended. This means that editing the same file twice will result in a warning. Using "/tmp" on Unix is discouraged, when the system crashes you lose the swap file. That is why a "tmp" directory in your home directory is used first. {Vi: directory to put temp file in, defaults to "/tmp"} *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* 'edcompatible' 'ed' toggle (default off) global Makes the 'g' and 'c' flags of the ":substitute" command to be toggled each time the flag is given. See 11.3 |complex_change|. See also 'gdefault' option. *'endofline'* *'eol'* *'noendofline'* *'noeol'* 'endofline' 'eol' toggle (default on) local to buffer {not in Vi} When writing a file and this option is off and the 'binary' option is on, no end of line (newline) character will be written for the last line in the file. This option is automatically set when starting to edit a new file, unless the file does not have an end of line (newline) for the last line in the file, in which case it is reset. Normally you don't have to set or reset this option. When 'binary' is off the value is not used when writing the file. When 'binary' is on it is used to remember the presence of a newline for the last line in the file, so that when you write the file the situation from the original file can be kept. But you can change it when you want to. *'equalalways'* *'ea'* *'noequalalways'* *'noea'* 'equalalways' 'ea' toggle (default on) global {not in Vi} When on all the windows are automatically made the same size after splitting or closing a window. When off, splitting a window will reduce the size of the current window and leave the other windows the same. When closing a window the extra lines are given the the window above it. *'equalprg'* *'ep'* 'equalprg' 'ep' string (default "") global {not in Vi} External program to use for "=" command. When this option is empty the internal formatting functions are used ('lisp' or 'cindent'). Environment variables are expanded |:set_env|. See |option_backslash| about including spaces and backslashes. *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'* 'errorbells' 'eb' toggle (default off) global Ring the bell (beep or screen flash) for error messages. This only makes a difference for error messages, the bell will be used always for a lot of errors without a message (e.g., hitting in Normal mode). See 'visualbell' on how to make the bell behave like a beep, screen flash or do nothing. *'errorfile'* *'ef'* 'errorfile' 'ef' string (default "AztecC.Err" or "errors.vim") global {not in Vi} Name of the error file for the QuickFix mode (see 5.5 |:make_makeprg|). Environment variables are expanded |:set_env|. See |option_backslash| about including spaces and backslashes. *'errorformat'* *'efm'* 'errorformat' 'efm' string (default is very long) global {not in Vi} Scanf-like description of the format for the lines in the error file (see 5.5 |errorformat|). *'esckeys'* *'ek'* *'noesckeys'* *'noek'* 'esckeys' 'ek' toggle (Vim default: on, Vi default: off) global {not in Vi} Function keys that start with an are recognized in Insert mode. When this option is off, the cursor and function keys cannot be used in Insert mode if they start with an . The advantage of this is that the single is recognized immediately, instead of after one second. Instead of resetting this option, you might want to try changing the values for 'timeoutlen' and 'ttimeoutlen'. Note that when 'esckeys' is off, you can still map anything, but the cursor keys won't work by default. *'expandtab'* *'et'* *'noexpandtab'* *'noet'* 'expandtab' 'et' toggle (default off) local to buffer {not in Vi} In Insert mode: Use the appropriate number of spaces to insert a . Spaces are used in indents with the '>' and '<' commands and when 'autoindent' is on. To insert a real tab when 'expandtab' is on, use CTRL-V. See also |:retab| and |ins_expandtab|. *'exrc'* *'ex'* *'noexrc'* *'noex'* 'exrc' 'ex' toggle (default off) global {not in Vi} Enables the reading of .vimrc, .exrc and .gvimrc in the current directory. If you switch this option on you should also consider setting the 'secure' option (see 3.4 |initialization|). Using a local .exrc, .vimrc or .gvimrc is a potential security leak, use with care! also see |.vimrc| and |gui_init|. *'fkmap'* *'fk'* *'nofkmap'* *'nofk'* 'fkmap' 'fk' toggle (default off) global {not in Vi} {Only available if Vim was compiled with RIGHTLEFT defined} When on, the keyboard is mapped for the Farsi character set. Normally you would use CTRL-_ in insert mode to toggle this option. See |farsi.txt|. *'formatoptions'* *'fo'* 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt") local to buffer {not in Vi} This is a sequence of letters which describes how automatic formatting is to be done. See |fo_table|. When the 'paste' option is on, no formatting is done (like 'formatoptions' is empty). Commas can be inserted for readability. *'formatprg'* *'fp'* 'formatprg' 'fp' string (default "") global {not in Vi} The name of an external program that will be used to format the lines selected with the "gq" command. The program must take the input on stdin and produce the output on stdout. The Unix program "fmt" is such a program. If this option is an empty string, the internal format function will be used |C_indenting|. Environment variables are expanded |:set_env|. See |option_backslash| about including spaces and backslashes. *'gdefault'* *'gd'* *'nogdefault'* *'nogd'* 'gdefault' 'gd' toggle (default off) global {not in Vi} When on, the ":substitute" flag 'g' is default on. This means that all matches in a line are substituted instead of one. When a 'g' flag is given to a ":substitute" command, this will toggle the substitution of all or one match. See 11.3 |complex_change|. command 'gdefault' on 'gdefault' off :s/// subst. all subst. one :s///g subst. one subst. all :s///gg subst. all subst. one *'guicursor'* *'gcr'* 'guicursor' 'gcr' string (default "n-c-v:Cursor,i-ci:ver25-Cursor, r-cr:hor20-Cursor") global {not in Vi} {Only available when compiled with GUI enabled} This option tells Vim what the cursor should look like in different modes. The option is a comma separated list of parts. Each part consist of a mode-list and an argument-list: mode-list:argument-list,mode-list:argument-list,.. The mode-list is a dash separated list of these modes: n Normal mode v Visual mode i Insert mode r Replace mode c Command line Normal (append) mode ci Command line Insert mode cr Command line Replace mode The argument-list is a dash separated list of these arguments: hor{N} horizontal bar, {N} percent of the character height ver{N} vertical bar, {N} percent of the character width block block cursor, fills the whole character [only one of the above three should be present] blinkwait{N} blinkon{N} blinkoff{N} blink times for cursor: blinkwait is the delay before the cursor starts blinking, blinkon is the time that the cursor is shown and blinkoff is the time that the cursor is not shown. The times are in msec. When one of the numbers is zero, there is no blinking. The default is: "blinkwait700-blinkon400-blinkoff250". These numbers are used for a missing entry. This means that blinking is enabled by default. To switch blinking off you can use "blinkon0". The cursor only blinks when Vim is waiting for input, not while executing a command. {group-name} a highlight group name, that sets the color and font for the cursor Examples of parts: n-c-v:block-nCursor in Normal, Command-lne and Visual mode, use a block cursor with colors from the "nCursor" highlight group i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150 In Insert and Command-line Insert mode, use a 30% vertical bar cursor with colors from the "iCursor" highlight group. Blink a bit faster. Examples of cursor highlighting: :highlight Cursor gui=reverse guifg=NONE guibg=NONE :highlight Cursor gui=NONE guifg=bg guibg=fg *'guifont'* *'gfn'* 'guifont' 'gfn' string (default "") global {not in Vi} {Only available when compiled with GUI enabled} This is a list of fonts which should be tried when starting the GUI version of vim. The fonts are separated with commas. Spaces after a comma are ignored. To include a comma in a font name precede it with a backslash. Setting an option requires an extra backslash before a space and a backslash. See also |option_backslash|. For example: :set guifont=Screen15,\ 7x13,font\\,with\\,commas will make vim try to use the font "Screen15" first, and if it fails it will try to use "7x13" and then "font,with,commas" instead. If none of the fonts can be loaded, vim will try using other resource settings (for X, it will use the Vim.font resource), and finally it will try some builtin default which should always be there ("7x13" in the case of X). The font names given should be "normal" fonts. Vim will try to find the related bold and italic fonts. For the Win32 GUI - takes these options in the font name: hXX - height is XX (points) wXX - width is XX (points) b - bold i - italic u - underline s - strikeout Use a ':' to separate the options. - A '.' can be used in the place of a space, so you don't need to use backslashes to escape the spaces. - Example: ":set guifont=courier.new:h12:w5:b" *'guioptions'* *'go'* 'guioptions' 'go' string (default "agmr" (Unix) or "gmr") global {not in Vi} {Only available when compiled with GUI enabled} This option only has an effect in the GUI version of vim. It is a sequence of letters which describes what components and options of the GUI should be used. Valid letters are as follows: 'a' Autoselect: If present, then whenever VISUAL mode is started, or the Visual area extended, Vim tries to become the owner of the windowing system's global selection. This means that the Visually highlighted text is available for pasting into other applications as well as into Vim itself. When the Visual mode ends, possibly due to an operation on the text, or when an application wants to paste the selection, the highlighted text is automatically yanked into the <"*> selection register. Thus the selection is still available for pasting into other applications after the VISUAL mode has ended. If not present, then Vim won't become the owner of the windowing system's global selection unless explicitly told to by a yank or delete operation. 'f' Foreground: Don't use fork() to detatch the GUI from the shell where it was started. Use this for programs that wait for the editor to finish (e.g., an e-mail program). Altenatively you can use "gvim -f" or ":gui -f" to start the GUI in the foreground. |gui_fork| 'm' Menu bar is present when 'm' is included. 'g' Grey menu items: Make menu items that are not active grey. If 'g' is not included inactive menu items are not shown at all. 'r' Right-hand scrollbar is present when 'r' is included. 'l' Left-hand scrollbar is present when 'l' is included. 'b' Bottom (horizontal) scrollbar is present when 'b' is included. And yes, you may even have scrollbars on the left AND the right if you really want to :-). See |gui_scrollbars| for more information. *'guipty'* *'noguipty'* 'guipty' toggle (default on) global {not in Vi} {Only available when compiled with GUI enabled} Only in the GUI: If on, an attempt is made to open a pseudo-tty for I/O to/from shell commands. See |gui_pty|. *'helpfile'* *'hf'* 'helpfile' 'hf' string (default (Amiga) "vim:doc/help.txt" (MSDOS) "$VIM\doc\help.txt" (others) "$VIM/doc/help.txt") global {not in Vi} Name of the help file. All help files should be placed together in one directory. Environment variables are expanded |:set_env|. For example: "$VIM/doc/help.txt". If $VIM is not set, $HOME is also tried. Also see |$VIM|. |option_backslash| about including spaces and backslashes. *'helpheight'* *'hh'* 'helpheight' 'hh' number (default 20) global {not in Vi} Minimal initial height of the help window when it is opened with the ":help" command. The initial height of the help window is half of the current window, or (when the 'ea' option is on) the same as other windows. When the height is less than 'helpheight', the height is set to 'helpheight'. Set to zero to disable. *'hidden'* *'hid'* *'nohidden'* *'nohid'* 'hidden' 'hid' toggle (default off) global {not in Vi} When off the current buffer is unloaded when it is abandoned. When on the current buffer becomes hidden when starting to edit another buffer. If the current buffer is also displayed in another window it does not become hidden. The commands that move through the buffer list make the current buffer hidden although the 'hidden' option is off. See also |windows.txt|. *'highlight'* *'hl'* 'highlight' 'hl' string (default (split in pieces): "8:SpecialKey,@:WinEnd,d:Directory, e:ErrorMsg,l:Search,m:MoreMsg,M:ModeMsg, n:LineNr,r:Question,s:StatusLine,t:Title, v:Visual,w:WarningMsg") global {not in Vi} This option can be used to set highlighting mode for various occasions. It is a comma separated list of character pairs. The first character in a pair gives the occasion, the second the mode to use for that occasion. The occasions are: 8 Meta & special keys listed with ":map" @ '~' and '@' at the end of the window d directories in CTRL-D listing e error messages h (obsolete, ignored) l last search pattern highlighting (see 'hlsearch') m "--More--" message M Mode (e.g., "-- INSERT --") n line number for ":number" and ":#" commands r return to continue message and yes/no questions s status lines t Titles for output from ":set all", ":autocmd" etc. v Visual mode w warning messages The display modes are: r reverse (termcap entry "mr" and "me") i italic (termcap entry "ZH" and "ZR") b bold (termcap entry "md" and "me") s standout (termcap entry "so" and "se") u underline (termcap entry "us" and "ue") n no highlighting - no highlighting : use a highlight group The default is used for occasions that are not included. If you want to change what the display modes do, see |colors| for an example. When using the ':' display mode, this must be followed by the name of a highlight group. A highlight group can be used to define any type of highlighting, including using color. See |:highlight| on how to define one. The default uses a different group for each occasion. *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* 'hlsearch' 'hls' toggle (default off) global {not in Vi} When there is a previous search pattern, highlight all its matches. The type of highlighting used can be set with the 'l' occasion in the 'highlight' option. Note that only the matching text is highlighted, any offsets are not applied. When you switch this option on and off very often, it's a good idea to make a mapping for this. Example: :map :set hls! See also: 'incsearch'. *'history'* *'hi'* 'history' 'hi' number (Vim default: 20, Vi default: 0) global {not in Vi} A history of ":" commands, and a history of previous search patterns are remembered. This option decides how many entries may be stored in each of these histories (see |cmdline_editing|). *'hkmap'* *'hk'* *'nohkmap'* *'nohk'* 'hkmap' 'hk' toggle (default off) global {not in Vi} {Only available if Vim was compiled with RIGHTLEFT defined} When on, the keyboard is mapped for the Hebrew character set. Normally you would use CTRL-_ in insert mode to toggle this option. See |rightleft.txt|. *'icon'* *'noicon'* 'icon' toggle (default off, on when title can be restored) global {not in Vi} When on the icon of the window will be set to the name of the file currently being edited. Only the last part of the name is used. Overridden by the 'iconstring' option. Only works if the terminal supports setting window icons (currently only Unix xterm and iris-ansi). When Vim was compiled with HAVE_X11 defined, the original icon will be restored if possible |X11|. *'iconstring'* 'iconstring' string (default "") global {not in Vi} When this options is not empty, it will be used for the icon of the window. This happens regardless of the 'icon' option. Only works if the terminal supports setting window icons (currently only Unix xterm and iris-ansi). When Vim was compiled with HAVE_X11 defined, the original icon will be restored if possible |X11|. *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 'ignorecase' 'ic' toggle (default off) global Ignore case in search patterns. Also used when searching in the tags file. *'include'* *'inc'* 'include' 'inc' string (default "^#[ \t]*include") global {not in Vi} Pattern to be used to find an include command. It is a search pattern, just like for the "/" command (See 6.6, "Pattern searches" |search_pattern|). The default value is for C programs. This option is used for the commands "[i", "]I", "[d", etc.. The 'isfname' option is used to recognize the file name that comes after the matched pattern. See |option_backslash| about including spaces and backslashes. *'incsearch'* *'is'* *'noincsearch'* *'nois'* 'incsearch' 'is' toggle (default off) global {not in Vi} While typing a search pattern, show immediately where the so far typed pattern matches. The matched string is highlighted. If the pattern is invalid or not found, nothing is shown. The screen will be updated often, this is only useful on fast terminals. Note that the match will be shown, but the cursor is not actually positioned there. You still need to finish the search command with to move the cursor. See also: 'hlsearch'. *'infercase'* *'inf'* *'noinfercase'* *'noinf'* 'infercase' 'inf' toggle (default off) local to buffer {not in Vi} When doing keyword completion in insert mode |ins_completion|, and 'ignorecase' is also on, the case of the match is adjusted. If the typed text contains a lowercase letter where the match has an upper case letter, the completed part is made lower case. If the typed text has no lower case letters and the match has a lower case letter where the typed text has an upper case letter, and there is a letter before it, the completed part is made uppercase. *'insertmode'* *'im'* *'noinsertmode'* *'noim'* 'insertmode' 'im' toggle (default off) global {not in Vi} Start the edit of a file in Insert mode. Useful if you want to use Vim like a modeless editor (use the cursor keys to move around, use CTRL-O for other commands |i_CTRL-O|). *'isfname'* *'isf'* 'isfname' 'isf' string (default for MS-DOS, Win32 and OS/2: "@,48-57,/,.,-,_,+,,,$,:,\" for AMIGA: "@,48-57,/,.,-,_,+,,,$,:" otherwise: "@,48-57,/,.,-,_,+,,,$,:,~") global {not in Vi} The characters given by this option are included in file names and path names. Filenames are used for commands like "gf", "[i" and in the tags file. Besides the characters in this option characters that are defined by the C function isalpha() are also always included (this depends on the character set and "locale"). The format of this option is a list of parts, separated with commas. Each part can be a single character number or a range. A range is two character numbers with '-' in between. A character number can be a decimal number between 0 and 255 or the ASCII character itself (does not work for digits). Example: "_,-,128-140,#-43" (include '_' and '-' and the range 128 to 140 and '#' to 43) If a part starts with '^', the following character number or range will be excluded from the option. The option is interpreted from left to right. Put the excluded character after the range where it is included. To include '^' itself use it as the last character of the option or the end of a range. Example: "^a-z,#,^" (exclude 'a' to 'z', include '#' and '^') If the character is '@', all characters where isalpha() returns TRUE are included. Normally these are the characters a to z and A to Z, plus accented characters. To include '@' itself use "@-@". Examples: "@,^a-z" All alphabetic characters, excluding lower case letters. "a-z,A-Z,@-@" All letters plus the '@' character. A comma can be included by using it where a character number is expected. Example: "48-57,,,_" Digits, command and underscore. A comma can be excluded by prepending a '^'. Example: " -~,^,,9" All characters from space to '~', excluding comma, plus . See |option_backslash| about including spaces and backslashes. *'isident'* *'isi'* 'isident' 'isi' string (default for MS-DOS, Win32 and OS/2: "@,48-57,_,128-167,224-235" otherwise: "@,48-57,_,192-255") global {not in Vi} The characters given by this option are included in identifiers. Identifiers are used in recognizing environment variables and after a match of the 'define' option. See 'isfname' for a description of the format of this option. Careful: If you change this option, it might break expanding environment variables. E.g., when '/' is included and Vim tries to expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead. *'iskeyword'* *'isk'* 'iskeyword' 'isk' string (Vim default for MS-DOS and Win32: "@,48-57,_,128-167,224-235" otherwise: "@,48-57,_,192-255" Vi default: "@,48-57,_") local to buffer {not in Vi} Keywords are used in searching and recognizing with many commands: "w", "*", "[i", etc. See 'isfname' for a description of the format of this option. For C programs you could use "a-z,A-Z,48-57,_,.,-,>". For a help file it is set to all non-blank printable characters except '*', '"' and '|'. When the 'lisp' option is on the '-' character is always included. *'isprint'* *'isp'* 'isprint' 'isp' string (default for MS-DOS and Win32: "@,~-255" otherwise: "@,161-255") global {not in Vi} The characters given by this option are displayed directly on the screen. The characters from space (ascii 32) to '~' (ascii 126) are always displayed directly, even when they are not included in 'isprint' or excluded. See 'isfname' for a description of the format of this option. Non-printable characters are displayed with two characters: 0 - 31 "^@" - "^_" 32 - 126 always single characters 127 "^?" 128 - 159 "~@" - "~_" 160 - 254 "| " - "|~" 255 "~?" *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'* 'joinspaces' 'js' toggle (default on) global {not in Vi} Insert two spaces after a period with a join command. *'keywordprg'* *'kp'* 'keywordprg' 'kp' string (default "man") global {not in Vi} Program to use for the "K" command. Environment variables are expanded |:set_env|. When empty ":help" is used. See |option_backslash| about including spaces and backslashes. *'langmap'* *'lmap'* 'langmap' 'lmap' string (default "") global {not in Vi} {Only included when Vim was compiled with HAVE_LANGMAP defined (Check ":version" for "+langmap"). This option allows support for keyboards that have a mode for a special language. The idea is that when you are typing text in Insert mode your keyboard is switched in the special language mode, you get different key codes for the special characters. When in command mode the 'langmap' option takes care of translating these special characters to the original meaning of the key. This means you don't have to change the keyboard mode to be able to execute normal mode commands. Example (for greek): *greek* :set langmap=ÁA,ÂB,ØC,ÄD,ÅE,ÖF,ÃG,ÇH,ÉI,ÎJ,ÊK,ËL,ÌM,ÍN,ÏO,ÐP,QQ,ÑR,ÓS,ÔT,ÈU,ÙV,WW,×X,ÕY,ÆZ,áa,âb,øc,äd,åe,öf,ãg,çh,éi,îj,êk,ël,ìm,ín,ïo,ðp,qq,ñr,ós,ôt,èu,ùv,òw,÷x,õy,æz Example (exchanges meaning of z and y for commands): :set langmap=zy,yz,ZY,YZ The 'langmap' option is a list of parts, separated with commas. Each part can be in one of two forms: 1. A list of pairs. Each pair is a "from" character immediately followed by the "to" character. Examples: "aA", "aAbBcC". 2. A list of "from" characters, a semi-colon and a list of "to" characters. Example: "abc;ABC" Example: "aA,fgh;FGH,cCdDeE" Special characters need to be preceded with a backslash. These are ";", ',' and backslash itself. This will allow you to activate vim actions without having to switch back and forth between the languages. Your language characters will be understood as normal vim English characters (according to the langmap mappings) in the following cases: o Normal/Visual mode (commands, buffer/register names, user mappings) o Insert/Replace Mode: Register names after CTRL-R o Insert/Replace Mode: Mappings Characters entered in Command-line mode will NOT be affected by this option. Note that this option can be changed at any time allowing to switch between mappings for different languages/encodings. Use a mapping to avoid having to type it each time! *'laststatus'* *'ls'* 'laststatus' 'ls' number (default 1) global {not in Vi} The value of this option influences when the last window will have a status line: 0: never 1: only if there are at least two windows 2: always The screen looks nicer with a status line if you have several windows, but it takes another screen line. *'lazyredraw'* *'lz'* 'lazyredraw' 'lz' toggle (default off) global {not in Vi} When this option is set, the screen will not be redrawn while executing macros, registers and other commands that have not been typed. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 'linebreak' 'lbr' toggle (default off) local to window {not in Vi} If on Vim will wrap long lines at a character in 'breakat' rather than at the last character that fits on the screen. Unlike 'wrapmargin' and 'textwidth', this does not insert newline characters in the file, it only affects the way the file is displayed, not its contents. The value of 'showbreak' is used to put in front of wrapped lines. This option is not used when the 'wrap' option is off. Note that characters after a line break are mostly not displayed correctly. *'lines'* 'lines' number (default 24 or terminal height) global Number of lines in the display. Normally you don't need to set this. That is done automatically by the terminal initialization code. When you do set this, and Vim is unable to change the physical number of lines on the display, redisplaying may be wrong. *'lisp'* *'nolisp'* 'lisp' toggle (default off) local to buffer {Only included when compiled with LISPINDENT enabled, ":version" says "+lispindent" instead of "-lispindent"} Lisp mode: When a return is typed in insert mode set the indent for the next line to Lisp standards (well, sort of). Also happens with "cc" or "S". 'autoindent' must also be on for this to work. The '-' character is included in keyword characters. Redefines the "=" operator to use this same indentation algorithm rather than calling an external program if 'equalprg' is empty. This option is reset when 'paste' is set. {Vi: Does it a little bit differently} *'list'* *'nolist'* 'list' toggle (default off) local to window List mode: Show tabs as CTRL-I, show end of line with $. Useful to see the difference between tabs and spaces and for trailing blanks. Note that this will also affect formatting (set with 'textwidth' or 'wrapmargin'). *'magic'* *'nomagic'* 'magic' toggle (default on) global Changes the special characters that can be used in search patterns. See |search_pattern|. *'makeprg'* *'mp'* 'makeprg' 'mp' string (default "make") global {not in Vi} Program to use for the ":make" command. See |:make_makeprg|. This option may contain '%' and '#' characters, which are expanded like when used in a command line. Environment variables are expanded |:set_env|. See |option_backslash| about including spaces and backslashes. *'maxmapdepth'* *'mmd'* 'maxmapdepth' 'mmd' number (default 1000) global {not in Vi} Maximum number of times a mapping is done without resulting in a character to be used. This normally catches endless mappings, like ":map x y" with ":map y x". It still does not catch ":map g wg", because the 'w' is used before the next mapping is done. See also |key_mapping|. *'maxmem'* *'mm'* 'maxmem' 'mm' number (default 512) global {not in Vi} Maximum amount of memory (in Kbyte) to use for one buffer. When this limit is reached allocating extra memory for a buffer will cause other memory to be freed. See also 'maxmemtot'. *'maxmemtot'* *'mmt'* 'maxmemtot' 'mmt' number (default 2048, or half the amount of memory available) global {not in Vi} Maximum amount of memory (in Kbyte) to use for all buffers together. See also 'maxmem'. *'modeline'* *'ml'* *'nomodeline'* *'noml'* 'modeline' 'ml' toggle (Vim default: on, Vi default: off) local to buffer *'modelines'* *'mls'* 'modelines' 'mls' number (default 5) global {not in Vi} If 'modeline' is on 'modelines' gives the number of lines that is checked for set commands. If 'modeline' is off or 'modelines' is zero no lines are checked. See 19.1 |modeline|. 'modeline' is reset when 'compatible' is set. *'modified'* *'mod'* *'nomodified'* *'nomod'* 'modified' 'mod' toggle (default off) local to buffer {not in Vi} When on the buffer is considered to be modified. This option is set by every command that makes a change to the buffer. Only the undo command may reset it, when all changes have been undone. *'more'* *'nomore'* 'more' toggle (Vim default: on, Vi default: off) global {not in Vi} Listings pause when the whole screen is filled. Type: or for one more line. for the next page. 'd' for down half a page. 'q', or CTRL-C to stop the listing. ':' to stop the listing and enter a command line. Any other key causes the meaning of the keys to be displayed. When this option is off there are no pauses, the listing continues until finished. When 'compatible' is set this option is reset. Note: The key typed at the "more" prompt is directly obtained from the terminal, it is not mapped and typeahead is ignored. *'mouse'* 'mouse' string (default "", "a" for MS-DOS and Win32) global {not in Vi} Enable the use of the mouse. Only works for certain terminals (MS-DOS, Win32 and xterm). The mouse can be enabled for different modes: n Normal mode v Visual mode i Insert mode c Command-line mode h all previous modes when editing a help file a all previous modes r for "Hit return ..." question Normally you would enable the mouse in all four modes with: :set mouse=a Note: Normal copy/paste in an xterm can still be used by pressing the shift key when the mouse is being used by Vim. See |mouse_using|. *'mousetime'* *'mouset'* 'mousetime' 'mouset' number (default 500) global {not in Vi} Only for GUI, MS-DOS, Win32 and Unix with xterm. Defines the maximum time in msec between two mouse clicks for the second click to be recognized as a multi click. *'number'* *'nu'* *'nonumber'* *'nonu'* 'number' 'nu' toggle (default off) local to window Print the line number in front of each line. Tip: If you don't like wrapping lines to mix with the line numbers, set the 'showbreak' option to eight spaces: :set showbreak=\ \ \ \ \ \ \ \ *'paragraphs'* *'para'* 'paragraphs' 'para' string (default "IPLPPPQPP LIpplpipbp") global Specifies the nroff macros that separate paragraphs. These are pairs of two letters (see |object_motions|). *'paste'* *'nopaste'* 'paste' toggle (default off) global {not in Vi} Put Vim in Paste mode. This is useful if you want to cut or copy some text from one window and paste it in Vim. This will avoid unexpected effects. When the 'paste' option is switched on (also when it was already on): - mapping in Insert mode is disabled - abbreviations are disabled - 'textwidth' is set to 0 - 'autoindent' is reset - 'smartindent' is reset - 'cindent' is reset - 'lisp' is reset - 'revins' is reset - 'ruler' is reset - 'showmatch' is reset - 'formatoptions' is used like it is empty NOTE: When you start editing another file while the 'paste' option is on, settings from the modelines or autocommands may change the settings again, causing trouble when pasting text. You might want to set the 'paste' option again. When the 'paste' option is reset the mentioned options are restored to the value before the moment 'paste' was switched from off to on. Resetting 'paste' before ever setting it does not have any effect. If you use this often, you could map a function key to the command ":set invpaste^V^M". *'patchmode'* *'pm'* 'patchmode' 'pm' string (default "") global {not in Vi} When non-empty the oldest version of a file is kept. This can be used to keep the original version of a file if you are changing files in a source distribution. Only the first time that a file is edited a copy of the original file will be kept. The name of the copy is the name of the original file with the string in the 'patchmode' option appended. This option should start with a dot. Use a string like ".org". 'backupdir' must not be empty for this to work (Detail: The backup file is renamed to the patchmode file after the new file has been succesfully written, that's why it must be possible to write a backup file). If there was no file to be backed up, an empty file is created. *'path'* *'pa'* 'path' 'pa' string (default on Unix: ".,/usr/include,," on OS/2: ".,/emx/include,," other systems: ".,,") global {not in Vi} This is a list of directories which will be searched when using the gf, [f, ]f, ^Wf and other commands, provided that the file being searched for has a relative path (not starting with '/'). The directories in the 'path' option may be relative or absolute. - Use commas to separate directory names: :set path=.,/usr/local/include,/usr/include - Spaces can also be used to separate directory names (for backwards compatibility with version 3.0). To have a space in a directory name, precede it with an extra backslash: :set path=.,/dir/with\\ space - To include a comma in a directory name precede it with an extra backslash: :set path=.,/dir/with\\,comma - To search relative to the directory where the current file is use :set path=. - To search in the current directory use an empty string between two commas: :set path=,, - A directory name may end in a ':' or '/'. - Environment variables are expanded |:set_env|. - Use wildcards to specify directories more freely, e.g., :set path=/usr/include/* means all subdirectories below /usr/include (but not /usr/include itself). - Use '**' if you want the whole subtree to be searched: :set path=/home/user_x/src/** means search in the whole subtree under "/home/usr_x/src". (to avoid endless recursions, the depth is restricted to 100 levels) - Give wildcards and recursions in any order: :set path=/**/include/** specifies a path with at least one directory /include/ in it. - The set of allowed wildcards and the possible usage depend on the operating system, but /etc/*/etc and /etc/**/etc work on any system. |:_%<| - Careful with '\' characters, type two to get one in the option: :set path=.,c:\\include Or just use '/' instead: :set path=.,c:/include Don't forget "." or files won't even be found in the same directory as the file! The maximum lenght is limited. How much depends on the system, mostly it is something like 256 or 1024 characters. *'readonly'* *'ro'* *'noreadonly'* *'noro'* 'readonly' 'ro' toggle (default off) local to buffer {not in Vi} If on, writes fail unless you use a '!'. Protects you from accidentally overwriting a file. Default on when Vim is started in read-only mode ("vim -R") or when the executable is called "view". {not in Vi:} When using the ":view" command the 'readonly' option is set for the newly edited buffer. When using ":w!" the 'readonly' option is reset for the current buffer. *'remap'* *'noremap'* 'remap' toggle (default on) global Allows for mappings to work recursively. If you do not want this for a single entry, use the :noremap[!] command. *'report'* 'report' number (default 2) global Threshold for reporting number of lines changed. When the number of changed lines is more than 'report' a message will be given for most ":" commands. For the ":substitute" command the number of substitutions is used instead of the number of lines. *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* 'restorescreen' 'rs' toggle (default on) global {not in Vi} {Windows 95/NT version only} When set, the screen contents is restored when exiting Vim. This also happens when executing external commands. *'revins'* *'ri'* *'norevins'* *'nori'* 'revins' 'ri' toggle (default off) global {not in Vi} {only when compiled with RIGHTLEFT defined} Inserting characters in Insert mode will work backwards. See "typing backwards" |ins_reverse|. This option can be toggled with the CTRL-B command in Insert mode. This option is reset when 'compatible' or 'paste' is set. *'rightleft'* *'rl'* *'norightleft'* *'norl'* 'rightleft' 'rl' toggle (default off) local to window {not in Vi} {only when compiled with RIGHTLEFT defined} When on, display orientation becomes right-to-left, i.e., character that are stored in the file apear from the right to the left. Using this option, it is possible to edit files for languages that are written from the right to the left such as Hebrew and Arabic. This option is per window, so it is possible to edit mixed files simultaneously, or to view the same file in both ways (this is sometimes usefull when editing Hebrew TeX--XeT files). See |rightleft.txt|. *'ruler'* *'ru'* *'noruler'* *'noru'* 'ruler' 'ru' toggle (default off) global {not in Vi} Show the line and column number of the cursor position in the status line, separated by a comma. If there are characters in the line that take two positions on the screen, both the "real" column and the screen column are shown, separated with a dash. For an empty line "0-1" is shown. For an empty buffer the line number will also be zero: "0,0-1". This option is reset when the 'paste' option is set. If you don't want to see the ruler all the time but want to know where you are, use "g CTRL-G" |g_CTRL-G|. *'scroll'* *'scr'* 'scroll' 'scr' number (default 'lines' / 2) local to window Number of lines to scroll with CTRL-U and CTRL-D commands. Will be set to half the number of lines in the window when the window size changes. If you give a count to the CTRL-U or CTRL-D command it will be used as the new value for 'scroll'. Reset to 'lines' / 2 with ":set scroll=0". {difference from vi: 'scroll' gives the number of screen lines instead of file lines, makes a difference when lines wrap} *'scrolljump'* *'sj'* 'scrolljump' 'sj' number (default 1) global {not in Vi} Minimal number of lines to scroll when the cursor gets off the screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E, CTRL-D). Useful if your terminal scrolls very slowly. *'scrolloff'* *'so'* 'scrolloff' 'so' number (default 0) global {not in Vi} Minimal number of screen lines to keep above and below the cursor. This will make some context visible around where you are working. If you set it to a very large value (999) the cursor line will always be in the middle of the window (except at the start or end of the file or when long lines wrap). *'sections'* *'sect'* 'sections' 'sect' string (default "SHNHH HUnhsh") global Specifies the nroff macros that separate sections. These are pairs of two letters (See |object_motions|). *'secure'* *'nosecure'* 'secure' toggle (default off) global {not in Vi} When on, ":autocmd", shell and write commands are not allowed in ".vimrc" and ".exrc" in the current directory and map commands are displayed. Switch it off only if you know that you will not run into problems, or when the 'exrc' option is off. On Unix this option is only used if the ".vimrc" or ".exrc" is not owned by you. This can be dangerous if the systems allows users to do a "chown". You better set 'secure' at the end of your ~/.vimrc then. *'shell'* *'sh'* 'shell' 'sh' string (default $SHELL or "sh", MS-DOS and Win32: "command", OS/2: "cmd") global Name of the shell to use for ! and :! commands. When changing the value also check the 'shelltype', 'shellpipe' and 'shellredir' options. It is allowed to give an argument to the command, e.g. "csh -f". See |option_backslash| about including spaces and backslashes. Environment variables are expanded |:set_env|. *'shellcmdflag'* *'shcf'* 'shellcmdflag' 'shcf' string (default: "-c", MS-DOS and Win32, when 'shell' does not contain "sh" somewhere: "/c") global {not in Vi} Flag passed to the shell to execute "!" and ":!" commands; e.g., "bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like systems, the default is set according to the value of 'shell', to reduce the need to set this option by the user. It's not used for OS/2 (EMX figures this out itself). See |option_backslash| about including spaces and backslashes. See |win32_shell| for Win32. *'shellpipe'* *'sp'* 'shellpipe' 'sp' string (default ">", "| tee", "|& tee" or "2>&1| tee") global {not in Vi} String to be used to put the output of the ":make" command in the error file. See also |:make_makeprg|. See |option_backslash| about including spaces and backslashes. For the Amiga and MS-DOS the default is ">". The output is directly saved in a file and not echoed to the screen. For Unix the default it "| tee". The stdout of the compiler is saved in a file and echoed to the screen. If the 'shell' option is "csh" or "tcsh" after initializations, the default becomes "|& tee". If the 'shell' option is "sh", "ksh", "zsh" or "bash" the default becomes "2>&1| tee". This means that stderr is also included. The initialization of this option is done after reading the ".vimrc" and the other initializations, so that when the 'shell' option is set there, the 'shellpipe' option changes automatically, unless it was explicitly set before. When 'shellpipe' is set to an empty string, no redirection of the ":make" output will be done. This is useful if you use a 'makeprg' that writes to 'errorfile' by itself. If you want no piping, but do want to include the 'errorfile', set 'shellpipe' to a single space. Don't forget to precede the space with a backslash: ":set sp=\ ". In the future pipes may be used for filtering and this option will become obsolete (at least for Unix). *'shellquote'* *'shq'* 'shellquote' 'shq' string (default: ""; MS-DOS and Win32, when 'shell' contains "sh" somewhere: "\"") global {not in Vi} Quoting character(s) passed to the shell to execute "!" and ":!" commands. This is an empty string by default. Only known to be useful for third-party shells on MS-DOS-like systems, such as the MKS Korn Shell or bash, where it should be "\"". The default is adjusted according the value of 'shell', to reduce the need to set this option by the user. See |win32_shell| for Win32. *'shellredir'* *'srr'* 'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1") global {not in Vi} String to be used to put the output of a filter in a temporary file. See also |:!|. See |option_backslash| about including spaces and backslashes. The name of the temporary file can be represented by "%s" if necessary (the file name is appended automatically if no %s appears in the value of this option). The default is ">". For Unix, if the 'shell' option is "csh", "tcsh" or "zsh" during initializations, the default becomes ">&". If the 'shell' option is "sh", "ksh" or "bash" the default becomes ">%s 2>&1". This means that stderr is also included. The initialization of this option is done after reading the ".vimrc" and the other initializations, so that when the 'shell' option is set there, the 'shellredir' option changes automatically unless it was explicitly set before. In the future pipes may be used for filtering and this option will become obsolete (at least for Unix). *'shelltype'* *'st'* 'shelltype' 'st' number (default 0) global {not in Vi} On the Amiga this option influences the way how the commands work which use a shell. 0 and 1: always use the shell 2 and 3: use the shell only to filter lines 4 and 5: use shell only for ':sh' command When not using the shell, the command is executed directly. 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands 1 and 3: use "shell cmd" to start external commands *'shiftround'* *'sr'* *'noshiftround'* *'nosr'* 'shiftround' 'sr' toggle (default off) global {not in Vi} Round indent to multiple of 'shiftwidth'. Applies to > and < commands. CTRL-T and CTRL-D in Insert mode always round the indent to a multiple of 'shiftwidth' (this is vi compatible). *'shiftwidth'* *'sw'* 'shiftwidth' 'sw' number (default 8) local to buffer Number of spaces to use for each step of (auto)indent. *'shortmess'* *'shm'* 'shortmess' 'shm' string (default "") global {not in Vi} This option helps to avoid all the "Hit return" messages caused by file messages, for example with CTRL-G, and to avoid some other messages. It is a list of flags: flag meaning when present f use "(3 of 5)" instead of "(file 3 of 5)" i use "[noeol]" instead of "[Incomplete last line]" l use "999L, 888C" instead of "999 lines, 888 characters" m use "[+]" instead of "[Modified]" n use "[New]" instead of "[New File]" r use "[RO]" instead of "[readonly]" w use "[w]" instead of "written" for file write message. x use "[tx]" instead of "[textmode]" and "[notx]" instead of "[notextmode]" a all of the above abbreviations o overwrite message for writing a file with subsequent message for reading a file (useful for ":wn" or when 'autowrite' on) s don't give "search hit BOTTOM, continuing at TOP" or "search hit TOP, continuing at BOTTOM" messages t trunctate file message at the start if it is too long to fit on the command line, "<" will appear in the left most column. W don't give "written" or "[w]" when writing a file This gives you the opportunity to avoid that a change between buffers requires you to hit return, but still gives as useful a message as possible for the space available. To get the whole message that you would have got with 'shm' empty, use ":file!" Useful values: shm= No abbreviation of message. shm=a Abbreviation, but no loss of information. shm=at Abbreviation, and truncate message when necessary. *'shortname'* *'sn'* *'noshortname'* *'nosn'* 'shortname' 'sn' toggle (default off) local to buffer {not in Vi, not in MS-DOS versions} Filenames are assumed to be 8 characters plus one extension of 3 characters. Multiple dots in file names are not allowed. When this option is on, dots in file names are replaced with underscores when adding an extension (".~" or ".swp"). This option is not available for MS-DOS, because then it would always be on. This option is useful when editing files on an MS-DOS compatible filesystem, e.g., messydos or crossdos. *'showbreak'* *'sbr'* 'showbreak' 'sbr' string (default "") global {not in Vi} String to put at the start of lines that have been wrapped. Useful values are "> " or "+++ ". Only printable characters are allowed, excluding and comma (in a future version the comma might be used to separate the part that is shown at the end and at the start of a line). *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* 'showcmd' 'sc' toggle (Vim default: on, off for Unix, Vi default: off) global {not in Vi} Show (partial) command in status line. Set this option off if your terminal is slow. *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'* 'showmatch' 'sm' toggle (default off) global When a bracket is inserted, briefly jump to the matching one. The jump is only done if the match can be seen on the screen. A Beep is given if there is no match (no matter if the match can be seen or not). This option is reset when the 'paste' option is set. When the 'm' flag is not included in 'cpoptions', typing a character will immediately move the cursor back to where it belongs. *'showmode'* *'smd'* *'noshowmode'* *'nosmd'* 'showmode' 'smd' toggle (Vim default: on, Vi default: off) global If in Insert, Replace or Visual mode put a message on the last line. Use the 'M' flag in 'highlight' to set the type of highlighting for this message. *'sidescroll'* *'ss'* 'sidescroll' 'ss' number (default 0) global {not in Vi} The minimal number of columns to scroll horizontally. Used only when the 'wrap' option is off and the cursor is moved off of the screen. When it is zero the cursor will be put in the middle of the screen. When using a slow terminal set it to a large number or 0. When using a fast terminal use a small number or 1. Not used for "zh" and "zl" commands. *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'* 'smartcase' 'scs' toggle (default off) global {not in Vi} Override the 'ignorecase' option if the search pattern contains upper case characters. Only used when the search pattern is typed and 'ignorecase' option is on. Used for the commands "/", "?", "n", "N", ":g" and ":s". Not used for "*", "#", "gd", tag search, etc.. *'smartindent'* *'si'* *'nosmartindent'* *'nosi'* 'smartindent' 'si' toggle (default off) local to buffer {not in Vi} {Only included when compiled with SMARTINDENT defined, check with ":version"} Do smart autoindenting when starting a new line. Works best for C programs, but can also be used for other languages. 'cindent' does something like this, works better in most cases, but is more strict, see |C_indenting|. When 'cindent' is on setting 'si' has no effect. Normally 'autoindent' should also be on when using 'smartindent'. An indent is automatically inserted: - After a line ending in '{'. - After a line starting with a keyword from 'cinwords'. - Before a line starting with '}' (only with the "O" command). When typing '}' as the first character in a new line, that line is given the same indent as the matching '{'. When typing '#' as the first character in a new line, the indent for that line is removed, the '#' is put in the first column. The indent is restored for the next line. If you don't want this, use this mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. When using the ">>" command, lines starting with '#' are not shifted right. 'smartindent' is reset when the 'paste' option is set. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* 'smarttab' 'sta' toggle (default off) global {not in Vi} When on, a in front of a line inserts 'shiftwidth' positions, 'tabstop' in other places. When off a always inserts 'tabstop' positions, 'shiftwidth' is only used for ">>" and the like. See also |ins_expandtab|. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) local to buffer {not in Vi} Number of spaces that a counts for while performing editing operations, like inserting a or using . It "feels" like s are being inserted, while in fact a mix of spaces and s is used. This is useful to keep the 'ts' setting at its standard value of 8, while being able to edit like it is set to 'sts'. Commands like "x" still work on the actual characters. When 'sts' is zero, this feature is off. See also |ins_expandtab|. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* 'splitbelow' 'sb' toggle (default off) global {not in Vi} When on, spliting a window will put the new window below the current one. *'startofline'* *'sol'* *'nostartofline'* *'nosol'* 'startofline' 'sol' toggle (default on) global {not in Vi} When on the commands listed below move the cursor to the first blank of the line. When off the cursor is kept in the same column (if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", , and to the commands "d", "<<" and ">>" with a linewise operator and with "%" with a count. This option is set when the 'compatible' option is set. *'suffixes'* *'su'* 'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp") global {not in Vi} Files with these suffixes are ignored when multiple files match a wildcard. See |suffixes|. Commas can be used to separate the suffixes. Spaces after the comma are ignored. A dot is also seen as the start of a suffix. To include a dot or comma in a suffix, precede it with a backslash (see |option_backslash| about including spaces and backslashes). *'swapsync'* *'sws'* 'swapsync' 'sws' string (default "fsync") global {not in Vi} When this option is not empty a swap file is synced to disk after writing to it. This takes some time, especially on busy unix systems. When this option is empty parts of the swap file may be in memory and not written to disk. When the system crashes you may lose more work. On Unix the system does a sync now and then without Vim asking for it, so the disadvantage of setting this option off is small. On some systems the swap file will not be written at all. For a unix system setting it to "sync" will use the sync() call instead of the default fsync(), which may work better on some systems. *'tabstop'* *'ts'* 'tabstop' 'ts' number (default 8) local to buffer Number of spaces that a in the file counts for. (See also ":retab" command in 11.3 |:retab|). *'taglength'* *'tl'* 'taglength' 'tl' number (default 0) global If non-zero, tags are significant up to this number of characters. *'tagrelative'* *'tr'* *'notagrelative'* *'notr'* 'tagrelative' 'tr' toggle (Vim default: on, Vi default: off) global {not in Vi} If on and using a tag file in another directory, file names in that tag file are relative to the directory where the tag file is. When the 'compatible' option is set, this option is reset. *'tags'* *'tag'* 'tags' 'tag' string (default "./tags,tags", when compiled with Emacs tags enabled: "./tags,./TAGS,tags,TAGS") global Filenames for the tag command, separated by spaces or commas. To include a space or comma in a file name, precede it with a backslash (see |option_backslash| about including spaces and backslashes). When a file name starts with "./", the '.' is replaced with the path of the current file. But only when the 'd' flag is not included in 'cpoptions'. Environment variables are expanded |:set_env|. Also see |tags_option|. When Vim was compiled with EMACS_TAGS defined Emacs-style tag files are also supported. They are automatically recognized. The default value becomes "./tags,./TAGS,tags,TAGS". If ":version" shows "+emacs_tags" then the Emacs tags support is included. {Vi: default is "tags /usr/lib/tags"} *'term'* 'term' string (default is $TERM, if that fails: on Unix: "ansi" on Amiga: "amiga" on MS-DOS: "pcterm" on OS/2: "os2ansi" on Win 32: "win32") global Name of the terminal. Used for choosing the terminal control characters. Environment variables are expanded |:set_env|. For example: :set term=$TERM See |termcap|. *'terse'* *'noterse'* 'terse' toggle (default off) global {not in Vi} When set: Add 's' flag to 'shortmess' option (this makes the message for a search that hits the start or end of the file not being displayed). When reset: Remove 's' flag from 'shortmess' option. {Vi shortens a lot of messages} *'textauto'* *'ta'* *'notextauto'* *'nota'* 'textauto' 'ta' toggle (Vim default: on, Vi default: off) global {not in Vi} When starting to edit a file a check is done for the line separator. If all lines end in 'textmode' is set, otherwise 'textmode' is reset. When reading a file, the same is done, but this happens like 'textmode' has been set appropriately for that file only, the option is not changed. See |textmode_io|. *'textmode'* *'tx'* *'notextmode'* *'notx'* 'textmode' 'tx' toggle (MS-DOS, Win32 and OS/2: default on, others: default off) local to buffer {not in Vi} When off, separates lines. When on, separates lines and CTRL-Z at end of file is ignored. Only used when reading and writing files. Set automatically when starting to edit a file and 'textauto' is on. See |textmode_io|. *'textwidth'* *'tw'* 'textwidth' 'tw' number (default 0) local to buffer {not in Vi} Maximum width of text that is being inserted. A longer line will be broken after white space to get this width. A zero value disables this. 'textwidth' is set to 0 when the 'paste' option is set. When 'textwidth' is zero, 'wrapmargin' may be used. See also 'formatoptions' and |ins_textwidth|. *'tildeop'* *'top'* *'notildeop'* *'notop'* 'tildeop' 'top' toggle (default off) global {not in Vi} When on: The tilde command "~" behaves like an operator. *'timeout'* *'to'* *'notimeout'* *'noto'* 'timeout' 'to' toggle (default on) global *'ttimeout'* *'nottimeout'* 'ttimeout' toggle (default off) global {not in Vi} These two options together determine the behaviour when part of a mapped key sequence or keyboard code has been received: timeout ttimeout action off off no time out on on or off time out on :mappings and key codes off on time out on key codes If there is no time out, Vim will wait until either the complete mapping or key sequence has been received, or it is clear that there is no mapping or key sequence for the received characters. For example: if you have mapped "vl" and Vim has received 'v', the next character is needed to see if the 'v' is followed by an 'l'. With a time out Vim will wait for about 1 second for the next character to arrive. After that the already received characters are interpreted as single characters. The waiting time can be changed with the 'timeoutlen' option. On slow terminals or very busy systems time out may cause malfunctioning cursor keys. If both options are off, Vim waits forever after an entered if there are key codes that start with . You will have to type twice. If you do not have problems with key codes, but would like to have :mapped key sequences not time out in 1 second, set the ttimeout option and reset the timeout option. *'timeoutlen'* *'tm'* 'timeoutlen' 'tm' number (default 1000) global {not in all versions of Vi} *'ttimeoutlen'* *'ttm'* 'ttimeoutlen' 'ttm' number (default -1) global {not in Vi} The time in milliseconds that is waited for a key code or mapped key sequence to complete. Normally only 'timeoutlen' is used and 'ttimeoutlen' is -1. When a different timeout value for key codes is desired set 'ttimeoutlen' to a non-negative number. ttimeoutlen mapping delay key code delay < 0 'timeoutlen' 'timeoutlen' >= 0 'timeoutlen' 'ttimeoutlen' The timeout only happens when the 'timeout' and 'ttimeout' options tell so. A useful setting would be :set timeout timeoutlen=3000 ttimeoutlen=100 (time out on mapping after three seconds, time out on key codes after a tenth of a second). *'title'* *'notitle'* 'title' toggle (default off, on when title can be restored) global {not in Vi} When on the title of the window will be set to "VIM - filename", where filename is the name of the file currently being edited. Only works if the terminal supports setting window titles (currently Amiga console, Unix xterm and iris-ansi). Overridden by the 'titlestring' option. *X11* When Vim was compiled with HAVE_X11 defined, the original title will be restored if possible. The output of ":version" will include "+X11" when HAVE_X11 was defined, otherwise it will be "-X11". This also works for the icon name |'icon'|. If the title cannot be restored, it is set to "Thanks for flying Vim". You will have to restore the title outside of Vim then. When using an xterm from a remote machine you can use this command: rsh machine_name xterm -display $DISPLAY & then the WINDOWID environment variable should be inherited and the title of the window should change back to what it should be after exiting Vim (rather than using the "Thanks..." message). *'titlelen'* 'titlelen' number (default 85) global {not in Vi} Gives the percentage of 'columns' to use for the length of the window title. When the title is longer, only the end of the path name is shown. A '>' character is used to indicate this. Using a percentage makes this adapt to the width of the window. But it won't work perfectly, because the actual number of characters available also depends on the font used and other things in the title bar. When 'titlelen' is zero the full path is used. Otherwise, values from 1 to 30000 can be used. 'titlelen' is not used for the 'titlestring' option. *'titlestring'* 'titlestring' string (default "") global {not in Vi} When this options is not empty, it will be used for the title of the window. This happens regardless of the 'title' or 'titlelen' option. Only works if the terminal supports setting window titles (currently only Unix xterm and iris-ansi). When Vim was compiled with HAVE_X11 defined, the original title will be restored if possible |X11|. Example: let hostname = expand("`hostname`") auto BufEnter * let 'titlestring' = hostname . "/" . %:p *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* 'ttybuiltin' 'tbi' toggle (default on) global {not in Vi} When on, the builtin termcaps are searched before the external ones. When off the builtin termcaps are searched after the external ones. When this option is changed, you should set the 'term' option next for the change to take effect, for example: :set notbi term=$TERM See also |termcap|. *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* 'ttyfast' 'tf' toggle (default off, on when 'term' is xterm, hpterm, sun-cmd, scren, dtterm or iris-ansi) global {not in Vi} Indicates a fast terminal connection. More characters will be sent to the screen for redrawing, instead of using insert/delete line commands. Improves smoothness of redrawing when there are multiple windows and the terminal does not support a scrolling region. Also enables the extra writing of characters at the end of each screen line for lines that wrap. This helps when using copy/paste with the mouse in an xterm and other terminals. *'ttyscroll'* *'tsl'* 'ttyscroll' 'tsl' number (default 999) global Maximum number of lines to scroll the screen. If there are more lines to scroll the window is redrawn. For terminals where scrolling is very slow and redrawing is not slow this can be set to a small number, e.g., 3, to speed up displaying. *'ttytype'* *'tty'* 'ttytype' 'tty' string (default from $TERM) global Alias for 'term', see above. *'undolevels'* *'ul'* 'undolevels' 'ul' number (default 100, 1000 for Unix and OS/2) global {not in Vi} Maximum number of changes that can be undone. Set to 0 for Vi compatibility: one level of undo and "u" undoes itself. But you can also get Vi compatibility by including the 'u' flag in 'cpoptions', and still be able to use CTRL-R to repeat undo. Set to a negative number for no undo at all (saves memory). *'updatecount'* *'uc'* 'updatecount' 'uc' number (default: 200) global {not in Vi} After typing this many characters the swap file will be written to disk. When zero, no swap file will be created at all (see chapter on recovery |crash_recovery|). 'updatecount' is set to zero by starting Vim with the "-n" option, see |starting|. When editing in readonly mode this option will be initialized to 10000. Also see |'swapsync'|. *'updatetime'* *'ut'* 'updatetime' 'ut' number (default 4000) global {not in Vi} If this many milliseconds nothing is typed the swap file will be written to disk (see chapter on recovery |crash_recovery|). *'viminfo'* *'vi'* 'viminfo' 'vi' string (default "") global {not in Vi} {only included when Vim was compiled with VIMINFO defined. ":version" shows "+viminfo" if it was} When non-empty, the viminfo file is read upon startup and written when exiting Vim (see |viminfo_file|). The string should be a comma separated list of parameters, each consisting of a single character identifying the particular parameter, followed by a number or string which specifies the value of that parameter. If a particular character is left out, then the default value is used for that parameter. The following is a list of the identifying characters and the effect of their value. CHAR VALUE ' Maximum number of previously edited files for which the marks are remembered. This parameter must always be included when 'viminfo' is non-empty. f Whether file marks need to be stored. If zero, file marks ('0 to '9, 'A to 'Z) are not stored. When not present or when non-zero, they are all stored. '0 is used for the current cursor position (when exiting or when doing ":wviminfo"). r Removable media. The argument is a string (up to the next ','). This parameter can be given several times. Each specifies the start of a path for which no marks will be stored. This is to avoid removable media. For MS-DOS you could use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:". Case is ignored. Maximum length of each 'r' argument is 50 characters. " Maximum number of lines saved for each register. If zero then registers are not saved. When not included, all lines are saved. Dont forget to put a backslash before the ", otherwise it will be recognized as the start of a comment! : Maximum number of items in the command line history to be saved. When not included, the value of 'history' is used. / Maximum number of items in the search pattern history to be saved. If non-zero, then the previous search and substitute patterns are also saved. When not included, the value of 'history' is used. n Name of the viminfo file. The name must immediately follow the 'n'. Must be the last one! If the "-i" argument was given when starting Vim, that file name overrides the one given here with 'viminfo'. Environment variables are expanded when opening the file, not when setting the option. Example: :set viminfo='50,\"1000,:0,n~/vim/viminfo means that marks will be remembered for the last 50 files you edited, contents of registers (up to 1000 lines each) will be remembered, command line history will not be saved, and since '/' is not specified, the default will be used, that is, save all of the search history, and also the previous search and substitute patterns. And the name of the file to use is "~/vim/viminfo". *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* 'visualbell' 'vb' toggle (default off) global {not in Vi} Use visual bell instead of beeping. The terminal code to display the visual bell is given with 't_vb'. When no beep of flash is wanted, use ":set vb t_vb=". Does not work on the Amiga, you always get a screen flash. Also see 'errorbells'. *'warn'* *'nowarn'* 'warn' toggle (default on) global Give a warning message when a shell command is used while the buffer has been changed. *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'* 'weirdinvert' 'wiv' toggle (default off) global {not in Vi} This option has the same effect as the 't_xs' termcap option. It is provided for backwards compatibility with version 4.x. Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and vise versa. *'whichwrap'* *'ww'* 'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "") global {not in Vi} Allow specified keys that move the cursor left/right to wrap to the previous/next line when the cursor is on the first/last character in the line. Concatenate characters to allow this for these keys: char key mode b Normal and Visual s Normal and Visual h "h" Normal and Visual l "l" Normal and Visual < Normal and Visual > Normal and Visual [ Insert and Replace ] Insert and Replace For example: ":set ww=<,>,[,]" allows wrap only when cursor keys are used. When the movement keys are used in combination with a delete or change operator, the newline also counts for a character. This makes "3h" different from "3dh" when the cursor crosses the end of a line. This is also true for "x" and "X", because they do the same as "dl" and "dh". If you use this, you may also want to use the mapping ":map X" to make backspace delete the character in front of the cursor. When 'compatible' is set, 'whichwrap' is set to "". *'wildchar'* *'wc'* 'wildchar' 'wc' number (Vim default: , Vi default: CTRL-E) global {not in Vi} Character you have to type to start wildcard expansion in the command line. CTRL-E is used when the 'compatible' option is set. The character is not recognized when used inside a macro. Although 'wc' is a number option, you can set it to a special key: ":set wc=". *'winheight'* *'wh'* 'winheight' 'wh' number (default 0) global {not in Vi} Minimal number of lines for the current window. If the current window is smaller, its size is increased, at the cost of the height of other windows. Set it to 999 to make the current window always fill the screen. Set it to a small number for normal editing. The height is not adjusted after one of the commands to change the height of the current window. *'wrap'* *'nowrap'* 'wrap' toggle (default on) local to window {not in Vi} When on, lines longer than the width of the window will wrap and displaying continues on the next line. When off lines will not wrap and only part of long lines will be displayed. When the cursor is moved to a part that is not shown, the screen will scroll horizontally (also see 'sidescroll' option and |wrap_off|). If you want to break long lines, see 'textwidth'. *'wrapmargin'* *'wm'* 'wrapmargin' 'wm' number (default 0) local to buffer Number of characters from the right window border where wrapping starts. When typing text beyond this limit, a newline will be inserted and inserting continues on the next line. When 'textwidth' is non-zero, this option is not used. See also 'formatoptions' and |ins_textwidth|. {Vi: works differently and less useful} *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'* 'wrapscan' 'ws' toggle (default on) global Searches wrap around the end of the file. *'writeany'* *'wa'* *'nowriteany'* *'nowa'* 'writeany' 'wa' toggle (default off) global Allows writing to any file with no need for "!" override. *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'* 'writebackup' 'wb' toggle (default on, off when compiled with WRITEBACKUP not defined) global {not in Vi} Make a backup before overwriting a file. The backup is removed after the file was successfully written, unless the 'backup' option is also on. Reset this option if your file system is almost full. See |backup_table| for another explanation. *'writedelay'* *'wd'* 'writedelay' 'wd' number (default 0) global {not in Vi} The number of microseconds to wait for each character sent to the screen. When non-zero, characters are sent to the terminal one by one. For MS-DOS pcterm this does not work. For debugging purposes. vim:tw=78:ts=8:sw=8: