GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing vimhelp.org (truncated) — Vim: options.txt options.txt For Vim version 9.2. Last change: 2026 Nov 24 VIM REFERENCE MANUAL by Bram Moolenaar Options options 1. Setting options set-option 2. Automatically setting options auto-setting 3. Options summary option-summary For an overview of options see quickref.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: boolean can only be on or off boolean toggle number has a numeric value string has a string value ============================================================================== 1. Setting options set-option E764 :se :set :se[t][!] Show all options that differ from their default value. When [!] is present every option is on a separate line. :se[t][!] all Show all but terminal options. When [!] is present every option is on a separate line. :se[t] termcap Show all terminal options. Note that in the GUI the key codes are not shown, because they are generated internally and can't be changed. Changing the terminal codes in the GUI is not useful either... The options have the form t_AB, see terminal-options. :se[t]! termcap Idem, but don't use multiple columns. E518 E519 :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. :set-! :set-inv :se[t] {option}! or :se[t] inv{option} Toggle option: Invert value. :set-default :set-& :set-&vi :set-&vim :se[t] {option}& Reset option to its default value. May depend on the current value of 'compatible'. :se[t] {option}&vi Reset option to its Vi default value. :se[t] {option}&vim Reset option to its Vim default value. :se[t] all& Set all options to their default value. The values of these options are not changed: all terminal options, starting with t_ 'columns' 'cryptmethod' 'encoding' 'key' 'lines' 'term' 'ttymouse' 'ttytype' Warning: This may have a lot of side effects. :set-args :set= E487 E521 :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' or '0o'). The old value can be inserted by typing 'wildchar' (by default this is a <Tab> or CTRL-E if 'compatible' is set). Many string options with fixed syntax and names also support completing known values. See cmdline-completion and complete-set-option. White space between {option} and '=' is allowed and will be ignored. White space between '=' and {value} is not allowed. See option-backslash for using white space and backslashes in {value}. :se[t] {option}+={value} :set+= Add the {value} to a number option, or append the {value} to a string option. When the option is a comma-separated list, a comma is added, unless the value was empty. If the option is a list of flags, superfluous flags are removed. When adding a flag that was already present the option value doesn't change. When the option supports "key:value" items and {value} contains a "key:value" item or multiple comma-separated items, each item is processed individually: - A "key:value" item where the key already exists with a different value: the old item is removed and the new item is appended to the end. - A "key:value" item that is an exact duplicate is left unchanged. - Other items that already exist are left unchanged. - New items are appended to the end. Also see :set-args above. :se[t] {option}^={value} :set^= Multiply the {value} to a number option, or prepend the {value} to a string option. When the option is a comma-separated list, a comma is added, unless the value was empty. When the option supports "key:value" items and {value} contains a "key:value" item or multiple comma-separated items, each item is processed individually. Works like :set+= but new items are prepended to the beginning instead of appended. Also see :set-args above. :se[t] {option}-={value} :set-= Subtract the {value} from a number option, or remove the {value} from a string option, if it is there. If the {value} is not found in a string option, there is no error or warning. When the option is a comma separated list, a comma is deleted, unless the option becomes empty. When the option is a list of flags, {value} must be exactly as they appear in the option. Remove flags one by one to avoid problems. When the option supports "key:value" items and {value} contains a "key:value" item or multiple comma-separated items, each item is processed individually. A "key:value" item removes the existing item with that key regardless of its value. A "key:" item also removes by key match. The individual values from a comma separated list or list of flags can be inserted by typing 'wildchar'. See complete-set-option. Also see :set-args above. 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 following arguments will be ignored. :set-verbose When 'verbose' is non-zero, displaying an option value will also tell where it was last set. Example: :verbose set shiftwidth cindent? shiftwidth=4 Last set from modeline line 1 cindent Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 This is only done when specific option values are requested, not for ":verbose set all" or ":verbose set" without an argument. When the option was set by hand there is no "Last set" message. When the option was set while executing a function, user command or autocommand, the script in which it was defined is reported. Note that an option may also have been set as a side effect of setting 'compatible'. A few special texts: Last set from modeline line 1 Option was set in a modeline. Last set from --cmd argument Option was set with command line argument --cmd or +. Last set from -c argument Option was set with command line argument -c, +, -S or -q. Last set from environment variable Option was set from an environment variable, $VIMINIT, $GVIMINIT or $EXINIT. Last set from error handler Option was cleared when evaluating it resulted in an error. {not available when compiled without the |+eval| feature} :set-termcap E522 For {option} the form "t_xx" may be used to set a terminal 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 <t_xx> form: :set <t_#4>=^[Ot This can also be used to translate a special code for a normal key. For example, if Alt-b produces <Esc>b, use this: :set <M-b>=^[b (the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it) The advantage over a mapping is that it works in all situations. You can define any key codes, e.g.: :set t_xy=^[foo; There is no warning for using a name that isn't recognized. You can map these codes as you like: :map <t_xy> something E846 When a key code is not set, it's like it does not exist. Trying to get its value will result in an error: :set t_kb= :set t_kb E846: Key code not set: t_kb The t_xx options cannot be set from a modeline or in the sandbox, for security reasons. 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-prompt. 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). In options 'path', 'cdpath', and 'tags', spaces have to be preceded with three backslashes instead for compatibility with version 3.0 where the options can be separated by either commas or spaces. Comma-separated options like 'backupdir' and 'tags' will also require commas to be escaped with two backslashes, whereas this is not needed for non-comma-separated ones like 'makeprg'. When setting options using :let and literal-string, you need to use one fewer layer of backslash. A few examples: :set makeprg=make\ file results in "make file" :let &makeprg='make file' (same as above) :set makeprg=make\\\ file results in "make\ file" :set tags=tags\ /usr/tags results in "tags" and "/usr/tags" :set tags=tags\\\ file results in "tags file" :let &tags='tags\ file' (same as above) :set makeprg=make,file results in "make,file" :set makeprg=make\\,file results in "make\,file" :set tags=tags,file results in "tags" and "file" :set tags=tags\\,file results in "tags\,file" :let &tags='tags\,file' (same as above) The "|" character separates a ":set" command from a following command. To include the "|" in the option value, use "\|" instead. This example sets the 'titlestring' option to "hi|there": :set titlestring=hi\|there This sets the 'titlestring' option to "hi" and 'iconstring' to "there": :set titlestring=hi|set iconstring=there Similarly, in legacy script the double quote character starts a comment. To include the '"' in the option value, use '\"' instead. This example sets the 'titlestring' option to 'hi "there"': :set titlestring=hi\ \"there\" In Vim9 script it's simpler, comments start with a '#' character, and only when preceded by white space. A backslash is needed less often: vim9script set titlestring=hi\ "there" set titlestring=hi#there# set titlestring=hi\ \#there# For 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. There is one special situation, when the value starts with "\\": :set dir=\\machine\path results in "\\machine\path" :set dir=\\\\machine\\path results in "\\machine\path" :set dir=\\path\\file results in "\\path\file" (wrong!) For the first one the start is kept, but for the second one the backslashes are halved. This makes sure it works both when you expect backslashes to be halved and when you expect the backslashes to be kept. The third gives a result which is probably not what you want. Avoid it. add-option-flags remove-option-flags E539 E550 E551 E552 Some options are a list of flags. When you want to add a flag to such an option, without changing the existing ones, you can do it like this: :set guioptions+=a Remove a flag from an option like this: :set guioptions-=a This removes the 'a' flag from 'guioptions'. Note that you should add or remove one flag at a time. If 'guioptions' has the value "ab", using "set guioptions-=ba" won't work, because the string "ba" doesn't appear. :set_env expand-env expand-environment-var Environment variables in specific 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,. When adding or removing a string from an option with ":set opt-=val" or ":set opt+=val" the expansion is done before the adding or removing. Handling of local options local-options Note: The following also applies to global-local options. Some of the options only apply to a window or buffer. Each window or buffer has its own copy of this option, thus each can have its own value. This allows you to set 'list' in one window but not in another. And set 'shiftwidth' to 3 in one buffer and 4 in another. The following explains what happens to these local options in specific situations. You don't really need to know all of this, since Vim mostly uses the option values you would expect. Unfortunately, doing what the user expects is a bit complicated... When splitting a window, the local options are copied to the new window. Thus right after the split the contents of the two windows look the same. When editing a new buffer, its local option values must be initialized. Since the local options of the current buffer might be specifically for that buffer, these are not used. Instead, for each buffer-local option there also is a global value, which is used for new buffers. With ":set" both the local and global value is changed. With "setlocal" only the local value is changed, thus this value is not used when editing a new buffer. When editing a buffer that has been edited before, the options from the window that was last closed are used again. If this buffer has been edited in this window, the values from back then are used. Otherwise the values from the last closed window where the buffer was edited last are used. ":setlocal" can be used to set a local window option specifically for a type of buffer. When you edit another buffer in the same window, you don't want to keep using these local window options. Meanwhile ":set" also sets a global value of a local window option, which is used when editing another buffer. Each window has its own copy of these global values, making them local to the window, but global to all buffers in the window. With this you can do: :e one :set list :e two Now the 'list' option will also be set in "two", since with the ":set list" command you have also set the global value. :set nolist :e one :setlocal list :e two Now the 'list' option is not set, because ":set nolist" resets the global value, ":setlocal list" only changes the local value and ":e two" gets the global value. Note that if you do this next: :e one You will get back the 'list' value as it was the last time you edited "one". The options local to a window are remembered for each buffer. This also happens when the buffer is not loaded, but they are lost when the buffer is wiped out :bwipe. Special local window options local-noglobal The following local window options won't be copied over when new windows are created, thus they behave slightly differently: Option Reason 'previewwindow' there can only be a single one 'scroll' specific to existing window 'winfixbuf' specific to existing window 'winfixheight' specific to existing window 'winfixwidth' specific to existing window Special local buffer options The following local buffer options won't be copied over when new buffers are created, thus they behave slightly differently: Option Reason 'filetype' explicitly set by autocommands 'syntax' explicitly set by autocommands 'bufhidden' denote special-buffers 'buftype' denote special-buffers 'readonly' will be detected automatically 'modified' will be detected automatically :setl :setlocal :setl[ocal][!] ... Like ":set" but set only the value local to the current buffer or window. Not all options have a local value. If the option does not have a local value the global value is set. With the "all" argument: display local values for all local options. Without argument: Display local values for all local options which are different from the default. When displaying a specific local option, show the local value. For a global/local boolean option, when the global value is being used, "--" is displayed before the option name. For a global option the global value is shown (but that might change in the future). :se[t] {option}< Set the effective value of {option} to its global value. For string global-local options, the local value is removed, so that the global value will be used. For all other options, the global value is copied to the local value. :setl[ocal] {option}< Set the effective value of {option} to its global value. For number and boolean global-local options, the local value is removed, so that the global value will be used. For all other options, including string global-local options, the global value is copied to the local value. Note that the behaviour for global-local options is slightly different between string and number-based options. :setg :setglobal :setg[lobal][!] ... Like ":set" but set only the global value for a local option without changing the local value. When displaying an option, the global value is shown. With the "all" argument: display global values for all local options. Without argument: display global values for all local options which are different from the default. For buffer-local and window-local options: Command global value local value condition :set option=value set set :setlocal option=value - set :setglobal option=value set - :set option? - display local value is set :set option? display - local value is not set :setlocal option? - display :setglobal option? display - Global options with a local value global-local Options are global when you mostly use one value for all buffers and windows. For some global options it's useful to sometimes have a different local value. You can set the local value with ":setlocal". That buffer or window will then use the local value, while other buffers and windows continue using the global value. For example, you have two windows, both on C source code. They use the global 'makeprg' option. If you do this in one of the two windows: :set makeprg=gmake then the other window will switch to the same value. There is no need to set the 'makeprg' option in the other C source window too. However, if you start editing a Perl file in a new window, you want to use another 'makeprg' for it, without changing the value used for the C source files. You use this command: :setlocal makeprg=perlmake You can switch back to using the global value by making the local value empty: :setlocal makeprg= This only works for a string option. For a number or boolean option you need to use the "<" flag, like this: :setlocal autoread< Note that for non-boolean and non-number options using "<" copies the global value to the local value, it doesn't switch back to using the global value (that matters when the global value changes later). You can also use: :set path< This will make the local value of 'path' empty, so that the global value is used. Thus it does the same as: :setlocal path= Note: In the future more global options can be made global-local. Using ":setlocal" on a global option might work differently then. option-value-function Some options ('completefunc', 'findfunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc', 'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to a function name or a function reference or a lambda function. When using a lambda it will be converted to the name, e.g. "<lambda>123". Examples: set opfunc=MyOpFunc set opfunc=function('MyOpFunc') set opfunc=funcref('MyOpFunc') set opfunc={a\ ->\ MyOpFunc(a)} Set to a script-local function: set opfunc=s:MyLocalFunc set opfunc=<SID>MyLocalFunc In Vim9 script the "s:" and "<SID>" can be omitted if the function exists in the script: set opfunc=MyLocalFunc Set using a funcref variable: let Fn = function('MyTagFunc') let &tagfunc = Fn Set using a lambda expression: let &tagfunc = {t -> MyTagFunc(t)} Set using a variable with lambda expression: let L = {a, b, c -> MyTagFunc(a, b , c)} let &tagfunc = L In Vim9 script, in a compiled function, you can use a lambda, but a closure does not work, because the function will be called without the context of where it was defined. Setting the filetype :setf[iletype] [FALLBACK] {filetype} :setf :setfiletype Set the 'filetype' option to {filetype}, but only if not done yet in a sequence of (nested) autocommands. This is short for: :if !did_filetype() : setlocal filetype={filetype} :endif This command is used in a filetype.vim file to avoid setting the 'filetype' option twice, causing different settings and syntax files to be loaded. When the optional FALLBACK argument is present, a later :setfiletype command will override the 'filetype'. This is to be used for filetype detections that are just a guess. did_filetype() will return false after this command. option-window optwin :bro[wse] se[t] :set-browse :browse-set :opt :options :opt[ions] Open a window for viewing and setting all options. Options are grouped by function. Offers short help for each option. Hit <CR> on the short help to open a help window with more help for the option. Modify the value of the option and hit <CR> on the "set" line to set the new value. For window and buffer specific options, the last accessed window is used to set the option value in, unless this is a help window, in which case the window below help window is used (skipping the option-window). {not available when compiled without the +eval feature} $HOME 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 "~user" can be used too. It is replaced by the home directory of user "user". Example: :set path=~mool/include,/usr/include,. 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'. NOTE: expanding environment variables and "~/" is only done with the ":set" command, not when assigning a value to an option with ":let". $HOME-windows On MS-Windows, if $HOME is not defined as an environment variable, then at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. If $HOMEDRIVE is not set then $USERPROFILE is used. This expanded value is not exported to the environment, this matters when running an external command: :echo system('set | findstr ^HOME=') and :echo luaeval('os.getenv("HOME")') should echo nothing (an empty string) despite exists('$HOME') being true. When setting $HOME to a non-empty string it will be exported to the subprocesses. Note the maximum length of an expanded option is limited. How much depends on the system, mostly it is something like 256 or 1024 characters. :fix :fixdel :fix[del] Set the value of 't_kD': 't_kb' is 't_kD' becomes CTRL-? CTRL-H not CTRL-? CTRL-? (CTRL-? is 0o177 octal, 0x7f hex) If your delete key terminal code is wrong, but the code for backspace is alright, 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: :if &term == "termname" : set t_kb=^V<BS> : fixdel :endif Where "^V" is CTRL-V and "<BS>" is the backspace key (don't type four characters!). Replace "termname" with your terminal name. If your <Delete> key sends a strange key sequence (not CTRL-? or CTRL-H) you cannot use ":fixdel". Then use: :if &term == "termname" : set t_kD=^V<Delete> :endif Where "^V" is CTRL-V and "<Delete>" is the delete key (don't type eight characters!). Replace "termname" with your terminal name. Linux-backspace 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 NetBSD-backspace Note about NetBSD: If your backspace doesn't produce the right code, try this: xmodmap -e "keycode 22 = BackSpace" If this works, add this in your .Xmodmap file: keysym 22 = BackSpace You need to restart for this to take effect. ============================================================================== 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. You can create an initialization file with :mkvimrc, :mkview and :mksession. 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 vim: vi: ex: E520 There are two forms of modelines. The first form: [text{white}]{vi:vim:ex:}[white]{options} [text{white}] empty or any text followed by at least one blank character (<Space> or <Tab>); "ex:" always requires at least one blank character {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 (can be empty) Examples: vi:noai:sw=3 ts=6 vim: tw=77 The second form (this is compatible with some versions of Vi): [text{white}]{vi:vim:Vim:|ex:}[white]se[t] {options}:[text] [text{white}] empty or any text followed by at least one blank character (<Space> or <Tab>); "ex:" always requires at least one blank character {vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:" [white] optional white space se[t] the string "set " or "se " (note the space); When "Vim" is used it must be "set". {options} a list of options, separated with white space, which is the argument for a ":set" command : a colon [text] any text or empty Examples: /* vim: set ai tw=75: */ /* Vim: set ai tw=75: */ The white space before {vi:|vim:|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:"). If the modeline is disabled within a modeline, subsequent modelines will be ignored. This is to allow turning off modeline on a per-file basis, which is useful when a line looks like a modeline but isn't. For example, it would be good to start a YAML file containing strings like "vim:" with # vim: nomodeline so as to avoid modeline misdetection. Following options on the same line after modeline deactivation, if any, are still evaluated (but you would normally not have any). modeline-strict The 'modelinestrict' option restricts which options can be set via a modeline to a fixed whitelist. This is enabled by default, for security reasons: it avoids unexpected or harmful side effects when opening files from unknown or untrustworthy locations. When 'verbose' is non-zero a message is given for each option that is ignored. modeline-local The options are set like with ":setlocal": The new value only applies to the buffer and window that contain the file. Although it's possible to set global options from a modeline, this is unusual. If you have two windows open and the files in it set the same global option to a different value, the result depends on which one was opened last. When editing a file that was already loaded, only the window-local options from the modeline are used. Thus if you manually changed a buffer-local option after opening the file, it won't be changed if you edit the same buffer in another window. But window-local options will be set. modeline-version If the modeline is only to be used for some versions of Vim, the version number can be specified where "vim:" or "Vim:" is used: vim{vers}: version {vers} or later vim<{vers}: version before {vers} vim={vers}: version {vers} vim>{vers}: version after {vers} {vers} is 700 for Vim 7.0 (hundred times the major version plus minor). For example, to use a modeline only for Vim 7.0: /* vim700: set foldmethod=marker */ To use a modeline for Vim after version 7.2: /* vim>702: set cole=2: */ There can be no blanks between "vim" and the ":". 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 '\'. The backslash in front of the ':' will be removed. Example: /* vi:set fillchars=stl\:^,vert\:\|: */ This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash before the ':' is removed. Thus to include "\:" you have to specify "\\:". E992 No other commands than "set" are supported, for security reasons (somebody might create a Trojan horse text file with modelines). And not all options can be set. For some options a flag is set, so that when the value is used the sandbox is effective. Some options can only be set from the modeline when 'modelineexpr' is set (the default is off). Still, there is always a small risk that a modeline causes trouble. E.g., when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly. So disable modelines before editing untrusted text. The mail ftplugin does this, for example. Hint: If you would like to do something else than setting an option, you could define an autocommand that checks the file for a specific string. For example: au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif And define a function SetVar() that does something with the line containing "VAR". ============================================================================== 3. Options summary option-summary In the list below all the options are mentioned with their full name and with an abbreviation if there is one. Both forms may be used. In this document when a boolean option 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' is 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. Hidden options hidden-options Not all options are supported in all versions. This depends on the supported features and sometimes on the system. A remark about this is in curly braces below. When an option is not supported it may still be set without getting an error, this is called a hidden option. You can't get the value of a hidden option though, it is not stored. To test if option "foo" can be used with ":set" use something like this: if exists('&foo') This also returns true for a hidden option. To test if option "foo" is really supported use something like this: if exists('+foo') E355 A jump table for the options with a short description can be found at Q_op. 'aleph' 'al' aleph Aleph 'aleph' 'al' number (default 128 for MS-Windows, 224 otherwise) global {only available when compiled with the +rightleft feature} 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 rileft.txt. 'allowrevins' 'ari' 'noallowrevins' 'noari' 'allowrevins' 'ari' boolean (default off) global {only available when compiled with the +rightleft feature} Allow CTRL-_ in Insert and Command-line mode. This is default off, to avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get into reverse Insert mode, and don't know how to get out. See 'revins'. NOTE: This option is reset when 'compatible' is set. 'altkeymap' 'akm' 'noaltkeymap' 'noakm' 'altkeymap' 'akm' boolean (default off) global {only available when compiled with the +farsi feature} This option was for using Farsi, which has been removed. See farsi.txt. 'ambiwidth' 'ambw' 'ambiwidth' 'ambw' string (default: "single") global Only effective when 'encoding' is "utf-8" or another Unicode encoding. Tells Vim what to do with characters with East Asian Width Class Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek letters, Cyrillic letters). There are currently two possible values: "single": Use the same width as characters in US-ASCII. This is expected by most users. "double": Use twice the width of ASCII characters. E834 E835 The value "double" cannot be used if 'listchars' or 'fillchars' contains a character that would be double width. These errors may also be given when calling setcellwidths(). The values are overruled for characters specified with setcellwidths(). There are a number of CJK fonts for which the width of glyphs for those characters are solely based on how many octets they take in legacy/traditional CJK encodings. In those encodings, Euro, Registered sign, Greek/Cyrillic letters are represented by two octets, therefore those fonts have "wide" glyphs for them. This is also true of some line drawing characters used to make tables in text file. Therefore, when a CJK font is used for GUI Vim or Vim is running inside a terminal (emulators) that uses a CJK font (or Vim is run inside an xterm invoked with "-cjkwidth" option.), this option should be set to "double" to match the width perceived by Vim with the width of glyphs in the font. Perhaps it also has to be set to "double" under CJK MS-Windows when the system locale is set to one of CJK locales. See Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11). Vim may set this option automatically at startup time when Vim is compiled with the +termresponse feature and if t_u7 is set to the escape sequence to request cursor position report. The response can be found in v:termu7resp. 'antialias' 'anti' 'noantialias' 'noanti' 'antialias' 'anti' boolean (default: off) global {only available when compiled with GUI enabled on macOS} This option only has an effect in the GUI version of Vim on macOS v10.2 or later. When on, Vim will use smooth ("antialiased") fonts, which can be easier to read at certain sizes on certain displays. Setting this option can sometimes cause problems if 'guifont' is set to its default (empty string). NOTE: This option is reset when 'compatible' is set. 'arabic' 'arab' 'noarabic' 'noarab' 'arabic' 'arab' boolean (default off) local to window {only available when compiled with the +arabic feature} This option can be set to start editing Arabic text. Setting this option will: - Set the 'rightleft' option, unless 'termbidi' is set. - Set the 'arabicshape' option, unless 'termbidi' is set. - Set the 'keymap' option to "arabic"; in Insert mode CTRL-^ toggles between typing English and Arabic key mapping. - Set the 'delcombine' option Note that 'encoding' must be "utf-8" for working with Arabic text. Resetting this option will: - Reset the 'rightleft' option. - Disable the use of 'keymap' (without changing its value). Note that 'arabicshape' and 'delcombine' are not reset (it is a global option). NOTE: This option is reset when 'compatible' is set. Also see arabic.txt. 'arabicshape' 'arshape' 'noarabicshape' 'noarshape' 'arabicshape' 'arshape' boolean (default on) global {only available when compiled with the +arabic feature} When on and 'termbidi' is off, the required visual character corrections that need to take place for displaying the Arabic language take effect. Shaping, in essence, gets enabled; the term is a broad one which encompasses: a) the changing/morphing of characters based on their location within a word (initial, medial, final and stand-alone). b) the enabling of the ability to compose characters c) the enabling of the required combining of some characters When disabled the display shows each character's true stand-alone form. Arabic is a complex language which requires other settings, for further details see arabic.txt. NOTE: This option is set when 'compatible' is set. 'autochdir' 'acd' 'noautochdir' 'noacd' 'autochdir' 'acd' boolean (default off) global {only available when compiled with it, use exists("+autochdir") to check} When on, Vim will change the current working directory whenever you open a file, switch buffers, delete a buffer or open/close a window. It will change to the directory containing the file which was opened or selected. When a buffer has no name it also has no directory, thus the current directory won't change when navigating to it. Note: When this option is on some plugins may not work. 'autocomplete' 'ac' 'noautocomplete' 'noac' 'autocomplete' 'ac' boolean (default off) global or local to buffer global-local {only available on platforms with timing support} When on, Vim shows a completion menu as you type, similar to using i_CTRL-N, but triggered automatically. See ins-autocompletion. 'autocompletedelay' 'acl' 'autocompletedelay' 'acl' number (default 0) global Delay in milliseconds before the autocomplete menu appears after typing. If you prefer it not to open too quickly, set this value slightly above your typing speed. See ins-autocompletion. 'autocompletetimeout' 'act' 'autocompletetimeout' 'act' number (default 80) global Initial timeout (in milliseconds) for the decaying time-sliced completion algorithm. Starts at this value, halves for each slower source until a minimum is reached. All sources run, but slower ones are quickly de-prioritized. The default is tuned so the popup menu opens within ~200ms even with multiple slow sources on a slow system. Changing this value is rarely needed. Only 80 or higher is valid. Special case: when 'complete' contains "F" or "o" (function sources), a longer timeout is used, allowing up to ~1s for sources such as LSP servers that may sometimes take longer (e.g., while loading modules). See ins-autocompletion. 'autoindent' 'ai' 'noautoindent' 'noai' 'autoindent' 'ai' boolean (default off) local to buffer Copy indent from current line when starting a new line (typing <CR> in Insert mode or when using the "o" or "O" command). If you do not type anything on the new line except <BS> or CTRL-D and then type <Esc>, CTRL-O or <CR>, the indent is deleted again. Moving the cursor to another line has the same effect, unless the 'I' flag is included in 'cpoptions'. 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 a different way. The 'autoindent' option is reset when the 'paste' option is set and restored when 'paste' is reset. 'autoread' 'ar' 'noautoread' 'noar' 'autoread' 'ar' boolean (default off) global or local to buffer global-local When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again. When the file has been deleted this is not done, so you have the text from before it was deleted. When it appears again then it is read. timestamp If this option has a local value, use this command to switch back to using the global value: :set autoread< 'autoshelldir' 'asd' 'noautoshelldir' 'noasd' 'autoshelldir' 'asd' boolean (default off) global When on, Vim will change the current working directory whenever you change the directory of the shell running in a terminal window. You need proper setting-up, so whenever the shell's pwd changes an OSC 7 escape sequence will be emitted. For example, on Linux, you can source /etc/profile.d/vte.sh in your shell profile if you use bash or zsh. For bash this should work (put it in a bash init file): if [[ -n "$VIM_TERMINAL" ]]; then PROMPT_COMMAND='_vim_sync_PWD' function _vim_sync_PWD() { printf '\033]7;file://%s\033\\' "$PWD" } fi Or, in a zsh init file: if [[ -n "$VIM_TERMINAL" ]]; then autoload -Uz add-zsh-hook add-zsh-hook -Uz chpwd _vim_sync_PWD function _vim_sync_PWD() { printf '\033]7;file://%s\033\\' "$PWD" } fi In a fish init file: if test -n "$VIM_TERMINAL" function _vim_sync_PWD --on-variable=PWD printf '\033]7;file://%s\033\\' "$PWD" end end You can find an alternative method at terminal-autoshelldir. When the parsing of the OSC sequence fails you get E1179 . 'autowrite' 'aw' 'noautowrite' 'noaw' 'autowrite' 'aw' boolean (default off) global Write the contents of the file, if it has been modified, on each :next, :rewind, :last, :first, :previous, :tag, :stop, :suspend, :!, :make, :terminal, CTRL-] or CTRL-^ command; and when a :buffer, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command switches to another file. A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is set to "hide" and :next is used. Note that for some commands the 'autowrite' option is not used, see 'autowriteall' for that. Some buffers will not be written, specifically when 'buftype' is "nowrite", "nofile", "terminal" or "prompt". USE WITH CARE: If you make temporary changes to a buffer that you don't want to be saved this option may cause it to be saved anyway. Renaming the buffer with ":file {name}" may help avoid this. 'autowriteall' 'awa' 'noautowriteall' 'noawa' 'autowriteall' 'awa' boolean (default off) global Like 'autowrite', but also used for commands :edit, :enew, :quit, :qall, :exit, :xit, :recover and closing the Vim window. Setting this option also implies that Vim behaves like 'autowrite' has been set. 'background' 'bg' 'background' 'bg' string (default "dark" or "light", see below) global When set to "dark", Vim will try to use colors that look good on a dark background. When set to "light", Vim will try to use colors that look good on a light background. Any other value is illegal. Vim tries to set the default value according to the terminal used. This will not always be correct. Setting this option does not change the background color, it tells Vim what the background color looks like. For changing the background color, see :hi-normal. When 'background' is changed Vim will adjust the default color groups for the new value. But the colors used for syntax highlighting will not change. g:colors_name When a color scheme is loaded (the "g:colors_name" variable is set) changing 'background' will cause the color scheme to be reloaded. If the color scheme adjusts to the value of 'background' this will work. However, if the color scheme sets 'background' itself the effect may be undone. First delete the "g:colors_name" variable when needed. When setting 'background' to the default value with: :set background& Vim will guess the value. In the GUI this should work correctly, in other cases Vim might not be able to guess the right value. If the GUI supports a dark theme, you can use the "d" flag in 'guioptions', see 'go-d'. When the t_RB option is set, Vim will use it to request the background color from the terminal. If the returned RGB value is dark/light and 'background' is not dark/light, 'background' will be set and the screen is redrawn. This may have side effects, make t_RB empty in your .vimrc if you suspect this problem. The response to t_RB can be found in v:termrbgresp. background-flash By default Vim does not wait for this response during startup. If you see a light-background flash in a dark terminal, set 'termbackgroundwait' in your vimrc to wait briefly before the first screen clear. For example: set termbackgroundwait=100 This may delay startup by up to 100 ms. If the response arrives later, the colors are adjusted then, so a flash may still occur. When starting the GUI, the default value for 'background' will be "light". When the value is not set in the .gvimrc, and Vim detects that the background is actually quite dark, 'background' is set to "dark". But this happens only AFTER the .gvimrc file has been read (because the window needs to be opened to find the actual background color). To get around this, force the GUI window to be opened by putting a ":gui" command in the .gvimrc file, before where the value of 'background' is used (e.g., before ":syntax on"). For MS-Windows the default is "dark". For other systems "dark" is used when 'term' is "linux", "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark background. Otherwise the default is "light". The :terminal command and the term_start() function use the 'background' value to decide whether the terminal window will start with a white or black background. Normally this option would be set in the .vimrc file. Possibly depending on the terminal name. Example: :if &term == "pcterm" : set background=dark :endif When this option is set, the default settings for the highlight groups will change. To use other settings, place ":highlight" commands AFTER the setting of the 'background' option. This option is also used in the "$VIMRUNTIME/syntax/syntax.vim" file to select the colors for syntax highlighting. After changing this option, you must load syntax.vim again to see the result. This can be done with ":syntax on". 'backspace' 'bs' 'backspace' 'bs' string (Vim default: "indent,eol,start", Vi default: "") global Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert mode. This is a list of items, separated by commas. Each item allows a way to backspace over something: value effect indent allow backspacing over autoindent eol allow backspacing over line breaks (join lines) start allow backspacing over the start of insert; CTRL-W and CTRL-U stop once at the start of insert. nostop like start, except CTRL-W and CTRL-U do not stop at the start of insert. When the value is empty, Vi compatible backspacing is used, none of the ways mentioned for the items above are possible. For backwards compatibility with version 5.4 and earlier: value effect 0 same as ":set backspace=" (Vi compatible) 1 same as ":set backspace=indent,eol" 2 same as ":set backspace=indent,eol,start" 3 same as ":set backspace=indent,eol,nostop" See :fixdel if your <BS> or <Del> key does not do what you want. NOTE: This option is set to "" when 'compatible' is set. 'backup' 'bk' 'nobackup' 'nobk' 'backup' 'bk' boolean (default off) global 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. When the 'backupskip' pattern matches, a backup is not made anyway. When 'patchmode' is set, the backup may be renamed to become the oldest version of a file. NOTE: This option is reset when 'compatible' is set. 'backupcopy' 'bkc' 'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto") global or local to buffer global-local When writing a file and a backup is made, this option tells how it's done. This is a comma-separated list of words. The main values are: "yes" make a copy of the file and overwrite the original one "no" rename the file and write a new one "auto" one of the previous, what works best Extra values that can be combined with the ones above are: "breaksymlink" always break symlinks when writing "breakhardlink" always break hardlinks when writing Making a copy and overwriting the original file: - Takes extra time to copy the file. + When the file has special attributes, is a (hard/symbolic) link or has a resource fork, all this is preserved. - When the file is a link the backup will have the name of the link, not of the real file. Renaming the file and writing a new one: + It's fast. - Sometimes not all attributes of the file can be copied to the new file. - When the file is a link the new file will not be a link. The "auto" value is the middle way: When Vim sees that renaming the file is possible without side effects (the attributes can be passed on and the file is not a link) that is used. When problems are expected, a copy will be made. The "breaksymlink" and "breakhardlink" values can be used in combination with any of "yes", "no" and "auto". When included, they force Vim to always break either symbolic or hard links by doing exactly what the "no" option does, renaming the original file to become the backup and writing a new file in its place. This can be useful for example in source trees where all the files are symbolic or hard links and any changes should stay in the local source tree, not be propagated back to the original source. crontab One situation where "no" and "auto" will cause problems: A program that opens a file, invokes Vim to edit that file, and then tests if the open file was changed (through the file descriptor) will check the backup file instead of the newly created file. "crontab -e" is an example, as are several file-watcher daemons like inotify. In that case you probably want to switch this option. When a copy is made, the original file is truncated and then filled with the new text. This means that protection bits, owner and symbolic links of the original file are unmodified. The backup file, however, is a new file, owned by the user who edited the file. The group of the backup is set to the group of the original file. If this fails, the protection bits for the group are made the same as for others. When the file is renamed, this is the other way around: The backup has the same attributes of the original file, and the newly written file is owned by the current user. When the file was a (hard/symbolic) link, the new file will not! That's why the "auto" value doesn't rename when the file is a link. The owner and group of the newly written file will be set to the same ones as the original file, but the system may refuse to do this. In that case the "auto" value will again not rename the file. NOTE: This option is set to the Vi default value when 'compatible' is set and to the Vim default value when 'compatible' is reset. 'backupdir' 'bdir' 'backupdir' 'bdir' string (default for Amiga: ".,t:", for Win32: ".,$TEMP,c:/tmp,c:/temp" for Unix: ".,~/tmp,~/") global 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. The directory must exist, Vim will not create it for you. - Empty means that no backup file will be created ('patchmode' is impossible!). Writing may fail because of this. - A directory "." means to put the backup file in the same directory as the edited file. - A directory starting with "./" (or ".\" for MS-Windows) 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. ("." inside a directory name has no special meaning). - 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 '/'. - For Unix and Win32, if a directory ends in two path separators "//", the backup file name will be built from the complete path to the file with all path separators changed to percent '%' signs. This will ensure file name uniqueness in the backup directory. On Win32, it is also possible to end with "\\". However, When a separating comma is following, you must use "//", since "\\" will include the comma in the file name. Therefore it is recommended to use '//', instead of '\\'. - 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. If you want to hide your backup files on Unix, consider this value: :set backupdir=./.backup,~/.backup,.,/tmp You must create a ".backup" directory in each directory and in your home directory for this to work properly. The use of :set+= and :set-= is preferred when adding or removing directories from the list. This avoids problems when a future version uses another default. This option cannot be set from a modeline or in the sandbox, for security reasons. 'backupext' 'bex' E589 'backupext' 'bex' string (default "~", for VMS: "_") global String which is appended to a file name to make the name of the backup file. The default is quite unusual, because this avoids accidentally 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. Only normal file name characters can be used; "/\*?[|<>" are illegal. If you like to keep a lot of backups, you could use a BufWritePre autocommand to change 'backupext' just before writing the file to include a timestamp. :au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~' Use 'backupdir' to put the backup in a different directory. 'backupskip' 'bsk' 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global A list of file patterns. When one of the patterns matches with the name of the file which is written, no backup file is created. Both the specified file name and the full path name of the file are used. The pattern is used like with :autocmd, see autocmd-patterns. Watch out for special characters, see option-backslash. When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the default value. "/tmp/*" is only used for Unix. WARNING: Not having a backup file means that when Vim fails to write your buffer correctly and then, for whatever reason, Vim exits, you lose both the original file and what you were writing. Only disable backups if you don't care about losing the file. Note that environment variables are not expanded. If you want to use $HOME you must expand it explicitly, e.g.: :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' Note that the default also makes sure that "crontab -e" works (when a backup would be made by renaming the original file crontab won't see the newly created file). Also see 'backupcopy' and crontab. 'balloondelay' 'bdlay' 'balloondelay' 'bdlay' number (default: 600) global {only available when compiled with the +balloon_eval feature} Delay in milliseconds before a balloon may pop up. See balloon-eval. 'ballooneval' 'beval' 'noballooneval' 'nobeval' 'ballooneval' 'beval' boolean (default off) global {only available when compiled with the +balloon_eval feature} Switch on the balloon-eval functionality for the GUI. 'balloonevalterm' 'bevalterm' 'noballoonevalterm' 'nobevalterm' 'balloonevalterm' 'bevalterm' boolean (default off) global {only available when compiled with the +balloon_eval_term feature} Switch on the balloon-eval functionality for the terminal. 'balloonexpr' 'bexpr' 'balloonexpr' 'bexpr' string (default "") global or local to buffer global-local {only available when compiled with the +balloon_eval feature} Expression for text to show in evaluation balloon. It is only used when 'ballooneval' or 'balloonevalterm' is on. These variables can be used: v:beval_bufnr number of the buffer in which balloon is going to show v:beval_winnr number of the window v:beval_winid ID of the window v:beval_lnum line number v:beval_col column number (byte index) v:beval_text word under or after the mouse pointer Instead of showing a balloon, which is limited to plain text, consider using a popup window, see popup_beval_example. A popup window can use highlighting and show a border. The evaluation of the expression must not have side effects! Example: function MyBalloonExpr() return 'Cursor is at line ' .. v:beval_lnum .. \ ', column ' .. v:beval_col .. \ ' of file ' .. bufname(v:beval_bufnr) .. \ ' on word "' .. v:beval_text .. '"' endfunction set bexpr=MyBalloonExpr() set ballooneval balloonevalterm Also see balloon_show(), it can be used if the content of the balloon is to be fetched asynchronously. In that case evaluating 'balloonexpr' should result in an empty string. If you get a balloon with only "0" you probably didn't return anything from your function. NOTE: The balloon is displayed only if the cursor is on a text character. If the result of evaluating 'balloonexpr' is not empty, Vim does not try to send a message to an external debugger (Netbeans or Sun Workshop). If the expression starts with s: or <SID>, then it is replaced with the script ID (local-function). Example: set bexpr=s:MyBalloonExpr() set bexpr=<SID>SomeBalloonExpr() Otherwise, the expression is evaluated in the context of the script where the option was set, thus script-local items are available. The expression will be evaluated in the sandbox when set from a modeline, see sandbox-option. This option cannot be set in a modeline when 'modelineexpr' is off. It is not allowed to change text or jump to another window while evaluating 'balloonexpr', see textlock. To check whether line breaks in the balloon text work use this check: if has("balloon_multiline") When they are supported "\n" characters will start a new line. If the expression evaluates to a List this is equal to using each List item as a string and putting "\n" in between them. NOTE: This option is set to "" when 'compatible' is set. 'belloff' 'bo' 'belloff' 'bo' string (default "") global Specifies for which events the bell will not be rung. It is a comma separated list of items. For each item that is present, the bell will be silenced. This is most useful to specify specific events in insert mode to be silenced. You can also make it flash by using 'visualbell'. item meaning when present all All events. backspace When hitting <BS> or <Del> and deleting results in an error. cursor Fail to move around using the cursor keys or <PageUp>/<PageDown> in Insert-mode. complete Error occurred when using i_CTRL-X_CTRL-K or i_CTRL-X_CTRL-T. copy Cannot copy char from insert mode using i_CTRL-Y or i_CTRL-E. ctrlg Unknown Char after <C-G> in Insert mode. error Other Error occurred (e.g. try to join last line) (mostly used in Normal-mode or Cmdline-mode). esc hitting <Esc> in Normal-mode. ex In Visual-mode, hitting Q results in an error. hangul Ignored. insertmode Pressing <Esc> in 'insertmode'. lang Calling the beep module for Lua/Mzscheme/TCL. mess No output available for g<. showmatch Error occurred for 'showmatch' function. operator Empty region error cpo-E. register Unknown register after <C-R> in Insert-mode. shell Bell from shell output :!. spell Error happened on spell suggest. term Bell from :terminal output. wildmode More matches in cmdline-completion available (depends on the 'wildmode' setting). This is most useful to fine tune when in Insert mode the bell should be rung. For Normal mode and Ex commands, the bell is often rung to indicate that an error occurred. It can be silenced by adding the "error" keyword. 'binary' 'bin' 'nobinary' 'nobin' 'binary' 'bin' boolean (default off) local to buffer 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 'expandtab' will be off Also, 'fileformat' and 'fileformats' options will not be used, the file is read and written like 'fileformat' was "unix" (a single <NL> separates lines). The 'fileencoding' and 'fileencodings' options will not be used, the file is read without conversion. NOTE: When you start editing a(nother) file while the 'bin' option is on, settings from 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 from on to off. Each buffer has its own set of saved option values. To edit a file with 'binary' set you can use the ++bin argument. This avoids you have to do ":set bin", which would have effect for all files you edit. When writing a file the <EOL> for the last line is only written if there was one in the original file (normally Vim appends an <EOL> to the last line if there is none; this would make the file longer). See the 'endofline' option. 'bioskey' 'biosk' 'nobioskey' 'nobiosk' 'bioskey' 'biosk' boolean (default on) global {only for MS-DOS} This was for MS-DOS and is no longer supported. 'bomb' 'nobomb' 'bomb' boolean (default off) local to buffer When writing a file and the following conditions are met, a BOM (Byte Order Mark) is prepended to the file: - this option is on - the 'binary' option is off - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big endian variants. Some applications use the BOM to recognize the encoding of the file. Often used for UCS-2 files on MS-Windows. For other applications it causes trouble, for example: "cat file1 file2" makes the BOM of file2 appear halfway through the resulting file. Gcc doesn't accept a BOM. When Vim reads a file and 'fileencodings' starts with "ucs-bom", a check for the presence of the BOM is done and 'bomb' set accordingly. Unless 'binary' is set, it is removed from the first line, so that you don't see it when editing. When you don't change the options, the BOM will be restored when writing the file. 'breakat' 'brk' 'breakat' 'brk' string (default " ^I!@*-+;:,./?") global {not available when compiled without the +linebreak feature} This option lets you choose which characters might cause a line break if 'linebreak' is on. Only works for ASCII and also for 8-bit characters when 'encoding' is an 8-bit encoding. 'breakindent' 'bri' 'nobreakindent' 'nobri' 'breakindent' 'bri' boolean (default off) local to window {not available when compiled without the +linebreak feature} Every wrapped line will continue visually indented (same amount of space as the beginning of that line), thus preserving horizontal blocks of text. NOTE: This option is reset when 'compatible' is set. 'breakindentopt' 'briopt' 'breakindentopt' 'briopt' string (default empty) local to window {not available when compiled without the +linebreak feature} Settings for 'breakindent'. It can consist of the following optional items and must be separated by a comma: min:{n} Minimum text width that will be kept after applying 'breakindent', even if the resulting text should normally be narrower. This prevents text indented almost to the right window border occupying lots of vertical space when broken. (default: 20) shift:{n} After applying 'breakindent', the wrapped line's beginning will be shifted by the given number of characters. It permits dynamic French paragraph indentation (negative) or emphasizing the line continuation (positive). (default: 0) sbr Display the 'showbreak' value before applying the additional indent. (default: off) list:{n} Adds an additional indent for lines that match a numbered or bulleted list (using the 'formatlistpat' setting). (default: 0) list:-1 Uses the width of a match with 'formatlistpat' for indentation. column:{n} Indent at column {n}. Will overrule the other sub-options. Note: an additional indent may be added for the 'showbreak' setting. (default: off) 'browsedir' 'bsdir' 'browsedir' 'bsdir' string (default: "last") global {only for Motif, GTK, Mac and Win32 GUI} Which directory to use for the file browser: last Use same directory as with last file browser, where a file was opened or saved. buffer Use the directory of the related buffer. current Use the current directory. {path} Use the specified directory 'bufhidden' 'bh' 'bufhidden' 'bh' string (default: "") local to buffer local-noglobal This option specifies what happens when a buffer is no longer displayed in a window: <empty> follow the global 'hidden' option hide hide the buffer (don't unload it), even if 'hidden' is not set unload unload the buffer, even if 'hidden' is set; the :hide command will also unload the buffer delete delete the buffer from the buffer list, even if 'hidden' is set; the :hide command will also delete the buffer, making it behave like :bdelete wipe wipe the buffer from the buffer list, even if 'hidden' is set; the :hide command will also wipe out the buffer, making it behave like :bwipeout CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer are lost without a warning. Also, these values may break autocommands that switch between buffers temporarily. This option is used together with 'buftype' and 'swapfile' to specify special kinds of buffers. See special-buffers. 'buflisted' 'bl' 'nobuflisted' 'nobl' E85 'buflisted' 'bl' boolean (default: on) local to buffer When this option is set, the buffer shows up in the buffer list. If it is reset it is not used for ":bnext", "ls", the Buffers menu, etc. This option is reset by Vim for buffers that are only used to remember a file name or marks. Vim sets it when starting to edit a buffer. But not when moving to a buffer with ":buffer". 'buftype' 'bt' E382 'buftype' 'bt' string (default: "") local to buffer local-noglobal The value of this option specifies the type of a buffer: <empty> normal buffer nofile buffer which is not related to a file and will not be written nowrite buffer which will not be written acwrite buffer which will always be written with BufWriteCmd autocommands. quickfix quickfix buffer, contains list of errors :cwindow or list of locations :lwindow help help buffer (you are not supposed to set this manually) terminal buffer for a terminal (you are not supposed to set this manually) prompt buffer where only the last line can be edited, meant to be used by a plugin, see prompt-buffer {only when compiled with the |+channel| feature} popup buffer used in a popup window, see popup. {only when compiled with the |+textprop| feature} This option is used together with 'bufhidden' and 'swapfile' to specify special kinds of buffers. See special-buffers. Also see win_gettype(), which returns the type of the window. Be careful with changing this option, it can have many side effects! One such effect is that Vim will not check the timestamp of the file, if the file is changed by another program this will not be noticed. A "quickfix" buffer is only used for the error list and the location list. This value is set by the :cwindow and :lwindow commands and you are not supposed to change it. "nofile" and "nowrite" buffers are similar: both: The buffer is not to be written to disk, ":w" doesn't work (":w filename" does work though). both: The buffer is never considered to be 'modified'. There is no warning when the changes will be lost, for example when you quit Vim. both: A swap file is only created when using too much memory (when 'swapfile' has been reset there is never a swap file). nofile only: The buffer name is fixed, it is not handled like a file name. It is not modified in response to a :cd command. both: When using ":e bufname" and already editing "bufname" the buffer is made empty and autocommands are triggered as usual for :edit. E676 "acwrite" implies that the buffer name is not related to a file, like "nofile", but it will be written. Thus, in contrast to "nofile" and "nowrite", ":w" does work and a modified buffer can't be abandoned without saving. For writing there must be matching BufWriteCmd, FileWriteCmd or FileAppendCmd autocommands. 'casemap' 'cmp' 'casemap' 'cmp' string (default: "internal,keepascii") global Specifies details about changing the case of letters. It may contain these words, separated by a comma: internal Use internal case mapping functions, the current locale does not change the case mapping. This only matters when 'encoding' is a Unicode encoding, "latin1" or "iso-8859-15". When "internal" is omitted, the towupper() and towlower() system library functions are used when available. keepascii For the ASCII characters (0x00 to 0x7f) use the US case mapping, the current locale is not effective. This probably only matters for Turkish. 'cdhome' 'cdh' 'nocdhome' 'nocdh' 'cdhome' 'cdh' boolean (default: off) global When on, :cd, :tcd and :lcd without an argument changes the current working directory to the $HOME directory like in Unix. When off, those commands just print the current directory name. On Unix this option has no effect. This option cannot be set from a modeline or in the sandbox, for security reasons. NOTE: This option is reset when 'compatible' is set. 'cdpath' 'cd' E344 E346 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") global This is a list of directories which will be searched when using the :cd, :tcd and :lcd commands, provided that the directory being searched for has a relative path, not an absolute part starting with "/", "./" or "../", the 'cdpath' option is not used then. The 'cdpath' option's value has the same form and semantics as 'path'. Also see file-searching. The default value is taken from $CDPATH, with a "," prepended to look in the current directory first. If the default value taken from $CDPATH is not what you want, include a modified version of the following command in your vimrc file to override it: :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') Environment variables are expanded :set_env. This option cannot be set from a modeline or in the sandbox, for security reasons. (parts of 'cdpath' can be passed to the shell to expand file names). 'cedit' 'cedit' string (Vi default: "", Vim default: CTRL-F) global The key used in Command-line Mode to open the command-line window. The default is CTRL-F when 'compatible' is off. Only non-printable keys are allowed. The key can be specified as a single character, but it is difficult to type. The preferred way is to use key-notation (e.g. <Up>, <C-F>) or a letter preceded with a caret (e.g. ^F is CTRL-F). Examples: :set cedit=^Y :set cedit=<Esc> Nvi also has this option, but it only uses the first character. See cmdwin. NOTE: This option is set to the Vim default value when 'compatible' is reset. 'charconvert' 'ccv' E202 E214 E513 'charconvert' 'ccv' string (default "") global {only available when compiled with the |+eval| feature} An expression that is used for character encoding conversion. It is evaluated when a file that is to be read or has been written has a different encoding from what is desired. 'charconvert' is not used when the internal iconv() function is supported and is able to do the conversion. Using iconv() is preferred, because it is much faster. 'charconvert' is not used when reading stdin --, because there is no file to convert from. You will have to save the text in a file first. The expression must return zero, false or an empty string for success, non-zero or true for failure. The possible encoding names encountered are in 'encoding'. Additionally, names given in 'fileencodings' and 'fileencoding' are used. Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8" is done internally by Vim, 'charconvert' is not used for this. 'charconvert' is also used to convert the viminfo file, if the 'c' flag is present in 'viminfo'. Also used for Unicode conversion. Example: set charconvert=CharConvert() fun CharConvert() system("recode " \ .. v:charconvert_from .. ".." .. v:charconvert_to \ .. " <" .. v:fname_in .. " >" .. v:fname_out) return v:shell_error endfun The related Vim variables are: v:charconvert_from name of the current encoding v:charconvert_to name of the desired encoding v:fname_in name of the input file v:fname_out name of the output file Note that v:fname_in and v:fname_out will never be the same. Note that v:charconvert_from and v:charconvert_to may be different from 'encoding'. Vim internally uses UTF-8 instead of UCS-2 or UCS-4. The advantage of using a function call without arguments is that it is faster, see expr-option-function. Encryption is not done by Vim when using 'charconvert'. If you want to encrypt the file after conversion, 'charconvert' should take care of this. If the 'charconvert' expression starts with s: or <SID>, then it is replaced with the script ID (local-function). Example: set charconvert=s:MyConvert() set charconvert=<SID>SomeConvert() Otherwise the expression is evaluated in the context of the script where the option was set, thus script-local items are available. This option cannot be set from a modeline or in the sandbox, for security reasons. 'chistory' 'chi' E1542 E1543 E1544 'chistory' 'chi' number (default: 10) global {only available when compiled with the +quickfix feature} Number of quickfix lists that should be remembered for the quickfix stack. Must be between 1 and 100. If the option is set to a value that is lower than the amount of entries in the quickfix list stack, entries will be removed starting from the oldest one. If the current quickfix list was removed, then the quickfix list at top of the stack (the most recently created) will be used in its place. For additional info, see quickfix-stack. 'cindent' 'cin' 'nocindent' 'nocin' 'cindent' 'cin' boolean (default off) local to buffer 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 'indentexpr' is not empty, it overrules 'cindent'. If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty, the "=" operator indents using this algorithm rather than calling an external program. See C-indenting. When you don't like the way 'cindent' works, try the 'smartindent' option or 'indentexpr'. This option is not used when 'paste' is set. NOTE: This option is reset when 'compatible' is set. 'cinkeys' 'cink' 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e") local to buffer A list of keys that, when typed in Insert mode, cause reindenting of the current line. Only used if 'cindent' is on and 'indentexpr' is empty. For the format of this option see cinkeys-format. See C-indenting. 'cinoptions' 'cino' 'cinoptions' 'cino' string (default "") local to buffer The 'cinoptions' affect the way 'cindent' reindents lines in a C program. See cinoptions-values for the values of this option, and C-indenting for info on C indenting in general. 'cinscopedecls' 'cinsd' 'cinscopedecls' 'cinsd' string (default "public,protected,private") local to buffer Keywords that are interpreted as a C++ scope declaration by cino-g. Useful e.g. for working with the Qt framework that defines additional scope declarations "signals", "public slots" and "private slots": set cinscopedecls+=signals,public\ slots,private\ slots 'cinwords' 'cinw' 'cinwords' 'cinw' string (default "if,else,while,do,for,switch") local to buffer 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 {}). Note that 'ignorecase' isn't used for 'cinwords'. If case doesn't matter, include the keyword both the uppercase and lowercase: "if,If,IF". 'clipboard' 'cb' 'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux" for X-windows, "" otherwise) global {only in GUI versions or when the +xterm_clipboard or +wayland_clipboard features or +clipboard_provider features are included} This option is a list of comma-separated names. Note: if one of the items is "exclude:", then you can't add an item after that. Therefore do not append an item with += but use ^= to prepend, e.g.: set clipboard^=unnamed When using the GUI see 'go-A'. When using the clipboard-providers feature, only the "unnamed" and "unnamedplus" features will be recognized If compiled without the +clipboard feature but compiled with the +clipboard_provider feature, then they will be the only values allowed and the other values will be invalid. These names are recognized: clipboard-unnamed unnamed When included, Vim will use the clipboard register '*' for all yank, delete, change and put operations which would normally go to the unnamed register. When a register is explicitly specified, it will always be used regardless of whether "unnamed" is in 'clipboard' or not. The clipboard register can always be explicitly accessed using the "* notation. Also see gui-clipboard. clipboard-unnamedplus unnamedplus A variant of the "unnamed" flag which uses the clipboard register '+' (quoteplus) instead of register '*' for all yank, delete, change and put operations which would normally go to the unnamed register. When "unnamed" is also included to the option, yank operations (but not delete, change or put) will additionally copy the text into register '*'. If Wayland is being used and the compositor does not support the primary selection then the regular selection is used in its place. Only available with the +X11 or +wayland_clipboard feature. Availability can be checked with: if has('unnamedplus') clipboard-autoselect autoselect Works like the 'a' flag in 'guioptions': 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 or put the selected text on the clipboard used by the selection register "*. See 'go-a' and quotestar for details. When the GUI is active, the 'a' flag in 'guioptions' is used, when the GUI is not active, this "autoselect" flag is used. Also applies to the modeless selection. clipboard-autoselectplus autoselectplus Like "autoselect" but using the + register instead of the * register. Compare to the 'P' flag in 'guioptions'. clipboard-autoselectml autoselectml Like "autoselect", but for the modeless selection only. Compare to the 'A' flag in 'guioptions'. clipboard-html html When the clipboard contains HTML, use this when pasting. When putting text on the clipboard, mark it as HTML. This works to copy rendered HTML from Firefox, paste it as raw HTML in Vim, select the HTML in Vim and paste it in a rich edit box in Firefox. You probably want to add this only temporarily, possibly use BufEnter autocommands. Only supported for GTK version 2 and later. clipboard-exclude exclude:{pattern} Defines a pattern that is matched against the name of the terminal 'term'. If there is a match, no connection will be made to the X server or Wayland compositor. This is useful in this situation: - Running Vim in a console. - $DISPLAY/$WAYLAND_DISPLAY is set to start applications on another display. - You do not want to connect to the X server/Wayland compositor in the console, but do want this in a terminal emulator. To never connect to the X server/Wayland compositor use: exclude:.* This has the same effect as using the -X or -Y argument. Note that when there is no connection to the X server the window title won't be restored and the clipboard cannot be accessed. This is the same for Wayland, except there is no title restoring. The value of 'magic' is ignored, {pattern} is interpreted as if 'magic' was on. The rest of the option value will be used for {pattern}, this must be the last entry. 'clipmethod' 'cpm' 'clipmethod' 'cpm' string (default for Unix: "wayland,x11", for VMS: "x11", otherwise: "") global {only when the +xterm_clipboard, +wayland_clipboard, or +eval features are included} Specifies which method of accessing the system clipboard (or clipboard provider) is used. Methods are tried in the order given; the first working method is used. Supported methods are: wayland Wayland selections x11 X11 selections <name> Use a clipboard provider with the given name Note: This option is ignored when either the GUI is running or if Vim is run on a system without Wayland or X11 support, such as Windows or macOS. The GUI or system way of accessing the clipboard is used instead, meaning v:clipmethod will be set to "none". The exception to this is the clipboard-providers feature, in which if a clipboard provider is being used, then it will override the existing clipboard functionality. The option value is a list of comma separated items. The list is parsed left to right in order, and the first method that Vim determines is available or is working is used as the actual method for accessing the clipboard. The current method that is being used can be found in the v:clipmethod variable. 'cmdheight' 'ch' 'cmdheight' 'ch' number (default 1) global or local to tab page Number of screen lines to use for the command-line. A larger value helps avoiding hit-enter prompts. The value of this option is stored with the tab page, so that each tab page can have a different value. 'cmdwinheight' 'cwh' 'cmdwinheight' 'cwh' number (default 7) global Number of screen lines to use for the command-line window. cmdwin 'colorcolumn' 'cc' 'colorcolumn' 'cc' string (default "") local to window {not available when compiled without the +syntax feature} 'colorcolumn' is a comma-separated list of screen columns that are highlighted with ColorColumn hl-ColorColumn. Useful to align text. Will make screen redrawing slower. The screen column can be an absolute number, or a number preceded with '+' or '-', which is added to or subtracted from 'textwidth'. :set cc=+1 " highlight column after 'textwidth' :set cc=+1,+2,+3 " highlight three columns after 'textwidth' :hi ColorColumn ctermbg=lightgrey guibg=lightgrey When 'textwidth' is zero then the items with '-' and '+' are not used. A maximum of 256 columns are highlighted. 'columns' 'co' E594 'columns' 'co' number (default 80 or terminal width) global Number of columns of the screen. Normally this is set by the terminal initialization and does not have to be set by hand. Also see posix-screen-size. When Vim is running in the GUI or in a resizable window, setting this option will cause the window size to be changed. When you only want to use the size for the GUI, put the command in your gvimrc file. When you set this option and Vim is unable to change the physical number of columns of the display, the display may be messed up. For the GUI it is always possible and Vim limits the number of columns to what fits on the screen. You can use this command to get the widest window possible: :set columns=9999 Minimum value is 12, maximum value is 10000. 'comments' 'com' E524 E525 'comments' 'com' string (default "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-") local to buffer 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. 'commentstring' 'cms' E537 'commentstring' 'cms' string (default "/* %s */") local to buffer A template for a comment. The "%s" in the value is replaced with the comment text, and should be padded with a space when possible. Currently used to add markers for folding, see fold-marker. Also commonly used by commenting plugins (e.g. comment-install). 'compatible' 'cp' 'nocompatible' 'nocp' 'compatible' 'cp' boolean (default on, off when a vimrc or gvimrc file is found, reset in defaults.vim) global This option has the effect of making Vim either more Vi-compatible, or make Vim 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. NOTE: Setting or resetting this option can have a lot of unexpected effects: Mappings are interpreted in another way, undo behaves differently, etc. If you set this option in your vimrc file, you should probably put it at the very start. 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. When a vimrc or gvimrc file is found while Vim is starting up, this option is switched off, and all options that have not been modified will be set to the Vim defaults. Effectively, this means that when a vimrc or gvimrc file exists, Vim will use the Vim defaults, otherwise it will use the Vi defaults. (Note: This doesn't happen for the system-wide vimrc or gvimrc file, nor for a file given with the -u argument). Also see compatible-default and posix-compliance. You can also set this option with the "-C" argument, and reset it with "-N". See -C and -N. See 'cpoptions' for more fine tuning of Vi compatibility. When this option is set, numerous other options are set to make Vim as Vi-compatible as possible. When this option is unset, various options are set to make Vim more useful. The table below lists all the options affected. The {?} column indicates when the options are affected: + Means that the option is set to the value given in {set value} when 'compatible' is set. & Means that the option is set to the value given in {set value} when 'compatible' is set AND is set to its Vim default value when 'compatible' is unset. - Means the option is NOT changed when setting 'compatible' but IS set to its Vim default when 'compatible' is unset. The {effect} column summarises the change when 'compatible' is set. option ? set value effect 'allowrevins' + off no CTRL-_ command 'antialias' + off don't use antialiased fonts 'arabic' + off reset arabic-related options 'arabicshape' + on correct character shapes 'backspace' + "" normal backspace 'backup' + off no backup file 'backupcopy' & Unix: "yes" backup file is a copy else: "auto" copy or rename backup file 'balloonexpr' + "" text to show in evaluation balloon 'breakindent' + off don't indent when wrapping lines 'cedit' - {unchanged} {set vim default only on resetting 'cp'} 'cdhome' + off ":cd" don't chdir to home on non-Unix 'cindent' + off no C code indentation 'compatible' - {unchanged} {set vim default only on resetting 'cp'} 'copyindent' + off don't copy indent structure 'cpoptions' & (all flags) Vi-compatible flags 'cscopepathcomp'+ 0 don't show directories in tags list 'cscoperelative'+ off don't use basename of path as prefix 'cscopetag' + off don't use cscope for ":tag" 'cscopetagorder'+ 0 see cscopetagorder 'cscopeverbose' + off see cscopeverbose 'delcombine' + off unicode: delete whole char combination 'digraph' + off no digraphs 'esckeys' & off no <Esc>-keys in Insert mode this also disables modifyOtherKeys and xterm-bracketed-paste 'expandtab' + off tabs not expanded to spaces 'fileformats' & "" no automatic file format detection, "dos,unix" except for MS-Windows 'formatexpr' + "" use 'formatprg' for auto-formatting 'formatoptions' & "vt" Vi compatible formatting 'gdefault' + off no default 'g' flag for ":s" 'history' & 0 no commandline history 'hkmap' + off no Hebrew keyboard mapping 'hkmapp' + off no phonetic Hebrew keyboard mapping 'hlsearch' + off no highlighting of search matches 'incsearch' + off no incremental searching 'indentexpr' + "" no indenting by expression '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 'mzquantum' - {unchanged} {set vim default only on resetting 'cp'} 'numberwidth' & 8 min number of columns for line number 'preserveindent'+ off don't preserve current indent structure when changing it 'revins' + off no reverse insert 'ruler' & off no ruler 'scrolljump' + 1 no jump scroll 'scrolloff' + 0 no scroll offset 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} 'shiftround' + off indent not rounded to shiftwidth 'shortmess' & "S" no shortening of messages 'showcmd' & off command characters not shown 'showmode' & off current mode not shown 'sidescrolloff' + 0 cursor moves to edge of screen in scroll 'smartcase' + off no automatic ignore case switch 'smartindent' + off no smart indentation 'smarttab' + off no smart tab size 'softtabstop' + 0 no soft tab stops 'startofline' + on goto startofline with some commands 'tagcase' & "followic" 'ignorecase' when searching tags file 'tagrelative' & off tag file names are not relative 'termguicolors' + off don't use highlight-(guifg|guibg) 'textauto' & off no automatic textmode detection 'textwidth' + 0 no automatic line wrap 'tildeop' + off tilde is not an operator 'ttimeout' + off no terminal timeout 'undofile' + off don't use an undo file 'viminfo' - {unchanged} {set Vim default only on resetting 'cp'} 'virtualedit' + "" cursor can only be placed on characters 'whichwrap' & "" left-right movements don't wrap 'wildchar' & CTRL-E only when the current value is <Tab> use CTRL-E for cmdline completion 'writebackup' + on or off depends on the +writebackup feature 'complete' 'cpt' E535 'complete' 'cpt' string (default: ".,w,b,u,t,i") local to buffer This option controls how completion ins-completion behaves when using CTRL-P, CTRL-N, or ins-autocompletion. It is also used for whole-line completion i_CTRL-X_CTRL-L. It indicates the type of completion and the places to scan. It is a comma-separated list of flags: . scan the current buffer ('wrapscan' is ignored) w scan buffers from other windows b scan other loaded buffers that are in the buffer list u scan the unloaded buffers that are in the buffer list U scan the buffers that are not in the buffer list k scan the files given with the 'dictionary' option kspell use the currently active spell checking spell k{dict} scan the file {dict}. Several "k" flags can be given, patterns are valid too. For example: :set cpt=k/usr/dict/*,k~/spanish s scan the files given with the 'thesaurus' option s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns are valid too. i scan current and included files d scan current and included files for defined name or macro i_CTRL-X_CTRL-D ] tag completion t same as "]" F{func} call the function {func}. Multiple "F" flags may be specified. Refer to complete-functions for details on how the function is invoked and what it should return. The value can be the name of a function or a Funcref. For Funcref values, spaces must be escaped with a backslash ('\'), and commas with double backslashes ('\\') (see option-backslash). Unlike other sources, functions can provide completions starting from a non-keyword character before the cursor, and their start position for replacing text may differ from other sources. If the Dict returned by the {func} includes {"refresh": "always"}, the function will be invoked again whenever the leading text changes. If generating matches is potentially slow, call complete_check() periodically to keep Vim responsive. This is especially important for ins-autocompletion. F equivalent to using "F{func}", where the function is taken from the 'completefunc' option. o equivalent to "F{func}", where {func} is taken from the 'omnifunc' option. If a plugin (such as an LSP client) defines 'omnifunc', it can be used through this flag. Unloaded buffers are not loaded, thus their autocmds :autocmd are not executed, this may lead to unexpected completions from some files (gzipped files for example). Unloaded buffers are not scanned for whole-line completion. The default is ".,w,b,u,t,i", which means to scan: 1. the current buffer 2. buffers in other windows 3. other loaded buffers 4. unloaded buffers 5. tags 6. included files CTRL-N, CTRL-P, and ins-autocompletion can be used for any 'iskeyword'-based completion (dictionary i_CTRL-X_CTRL-K, included patterns i_CTRL-X_CTRL-I, tags i_CTRL-X_CTRL-], and normal expansions). With the "F" and "o" flags in 'complete', non-keywords can also be completed. An optional match limit can be specified for a completion source by appending a caret ("^") followed by a {count} to the source flag. For example: ".^9,w,u,t^5" limits matches from the current buffer to 9 and from tags to 5. Other sources remain unlimited. Note: The match limit takes effect only during forward completion (CTRL-N) and is ignored during backward completion (CTRL-P). This option cannot be set in a modeline when 'modelineexpr' is off. 'completefunc' 'cfu' 'completefunc' 'cfu' string (default: empty) local to buffer {not available when compiled without the +eval feature} This option specifies a function to be used for Insert mode completion with CTRL-X CTRL-U. i_CTRL-X_CTRL-U See complete-functions for an explanation of how the function is invoked and what it should return. The value can be the name of a function, a lambda or a Funcref. See option-value-function for more information. This option cannot be set from a modeline or in the sandbox, for security reasons. 'completefuzzycollect' 'cfc' 'completefuzzycollect' 'cfc' string (default: empty) global DEPRECATED: This option is no longer used; changing it has no effect. When 'completeopt' contains "fuzzy", Vim will internally use the equivalent of: "keyword,files,whole_line" The values below are kept for compatibility and for scripts that may read this option: keyword keywords in the current file i_CTRL-X_CTRL-N keywords with flags ".", "w", i_CTRL-N i_CTRL-P "b", "u", "U" and "k{dict}" in 'complete' keywords in 'dictionary' i_CTRL-X_CTRL-K files file names i_CTRL-X_CTRL-F whole_line whole lines i_CTRL-X_CTRL-L 'completeitemalign' 'cia' 'completeitemalign' 'cia' string (default: "abbr,kind,menu") global A comma-separated list of strings that controls the alignment and display order of items in the popup menu during Insert mode completion. The supported values are "abbr", "kind", and "menu". These values allow customizing how complete-items are shown in the popup menu. Note: must always contain those three values in any order. 'completeopt' 'cot' 'completeopt' 'cot' string (default: "menu,preview") global or local to buffer global-local A comma-separated list of options for Insert mode completion ins-completion. The supported values are: fuzzy Enable fuzzy-matching for completion candidates. This allows for more flexible and intuitive matching, where characters can be skipped and matches can be found even if the exact sequence is not typed (disabled for thesaurus completion compl-thesaurus). longest When 'autocomplete' is not active, only the longest common prefix of the matches is inserted (disabled for thesaurus completion compl-thesaurus). If the popup menu is displayed, you can use CTRL-L to add more characters. Whether case is ignored depends on the type of completion. For buffer text the 'ignorecase' option applies. When 'autocomplete' is active and no completion item is selected, the longest common prefix of the matches is inserted after the cursor. The prefix is taken either from all displayed items or only from items in the current buffer. The inserted text is highlighted with hl-PreInsert, and the cursor position does not change (similar to "preinsert"). Press CTRL-Y to accept. See also preinserted(). menu Use a popup menu to show the possible completions. The menu is only shown when there is more than one match. ins-completion-menu menuone Use the popup menu also when there is only one match. Useful when there is additional information about the match, e.g., what file it comes from. nearest Matches are listed based on their proximity to the cursor position, unlike the default behavior, which only considers proximity for matches appearing below the cursor. This applies only to matches from the current buffer. No effect if "fuzzy" is present. noinsert Do not insert any text for a match until the user selects a match from the menu. Only works in combination with "menu" or "menuone". No effect if "longest" is present. noselect Same as "noinsert", except that no menu item is pre-selected. If both "noinsert" and "noselect" are present, "noselect" takes precedence. This is enabled automatically when 'autocomplete' is on, unless "preinsert" is also enabled. nosort Disable sorting of completion candidates based on fuzzy scores when "fuzzy" is enabled. Candidates will appear in their original order. pathopt Additionally consult the 'path' option during filename completion. Depending on the patterns in 'path', setting this option may result in performance degradation due to path expansions i_CTRL-X_CTRL-F popup Show extra information about the currently selected completion in a popup window. Only works in combination with "menu" or "menuone". Overrides "preview". See 'completepopup' for specifying properties. {only works when compiled with the |+textprop| feature} popuphidden Just like "popup" but initially hide the popup. Use a CompleteChanged autocommand to fetch the info and call popup_show() once the popup has been filled. See the example at complete-popuphidden. {only works when compiled with the |+textprop| feature} preinsert Inserts the text of the first completion candidate beyond the current leader, highlighted with hl-PreInsert. The cursor does not move. Requires "fuzzy" to be unset, and either "menuone" in 'completeopt' or 'autocomplete' enabled. When 'autocomplete' is enabled, this does not work if 'ignorecase' is set without 'infercase'. See also preinserted(). preview Show extra information about the currently selected completion in the preview window. Only works in combination with "menu" or "menuone". Only "fuzzy", "longest", "popup", "popuphidden", "preinsert" and "preview" have an effect when 'autocomplete' is enabled. This option does not apply to cmdline-completion. See 'wildoptions' for that. 'completepopup' 'cpp' 'completepopup' 'cpp' string (default empty) global {not available when compiled without the +textprop or +quickfix feature} When 'completeopt' contains "popup", this option specifies the properties of the info popup when it is created. If an info popup window already exists it is closed, so that the option value is applied when it is created again. The option is a comma-separated list of values: align "item" (default) or "menu" border border style: "single" thin box-drawing characters "double" double-line "round" rounded corners "ascii" ASCII characters (-, |, +) "custom:X;X;X;X;X;X;X;X" eight characters separated by semicolons, in the order: top, right, bottom, left, topleft, topright, botright, botleft "on" same as "double" when 'encoding' is "utf-8" and 'ambiwidth' is "single", else "ascii" (default) "off" no border borderhighlight highlight group for the popup border characters close show close button: "on" (default) or "off" height maximum height of the popup highlight popup highlight group (default: PmenuSel) opacity opacity percentage 0-100 (default 100, fully opaque). When less than 100, content beneath the popup shows through. resize show resize handle: "on" (default) or "off" shadow "off" (default) or "on" using hl-PmenuShadow width maximum width of the popup Example: :set completepopup=height:10,border:single,highlight:InfoPopup :set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└ :set completepopup=border:round,opacity:80 When "align" is set to "item", the popup is positioned near the selected item and moves as the selection changes. When set to "menu", the popup aligns with the top of the menu (if the menu appears below the text) or with the bottom (if it appears above). The close button and resize handle are shown on the popup border only when 'mouse' is enabled. After creation, the info popup can be located with popup_findinfo() and modified using popup_setoptions(). See also: complete-popup. 'completeslash' 'csl' 'completeslash' 'csl' string (default: "") local to buffer {only for MS-Windows} When this option is set it overrules 'shellslash' for completion: - When this option is set to "slash", a forward slash is used for path completion in insert mode. This is useful when editing HTML tag, or Makefile with 'noshellslash' on MS-Windows. - When this option is set to "backslash", backslash is used. This is useful when editing a batch file with 'shellslash' set on MS-Windows. - When this option is empty, same character is used as for 'shellslash'. For Insert mode completion the buffer-local value is used. For command line completion the global value is used. 'completetimeout' 'cto' 'completetimeout' 'cto' number (default 0) global Like 'autocompletetimeout', but applies to i_CTRL-N and i_CTRL-P completion. Value of 0 disables the timeout; positive values allowed. 'concealcursor' 'cocu' 'concealcursor' 'cocu' string (default: "") local to window {not available when compiled without the +conceal feature} Sets the modes in which text in the cursor line can also be concealed. When the current mode is listed then concealing happens just like in other lines. n Normal mode v Visual mode i Insert mode c Command line editing, for 'incsearch' 'v' applies to all lines in the Visual area, not only the cursor. A useful value is "nc". This is used in help files. So long as you are moving around text is concealed, but when starting to insert text or selecting a Visual area the concealed text is displayed, so that you can see what you are doing. Keep in mind that the cursor position is not always where it's displayed. E.g., when moving vertically it may change column. 'conceallevel' 'cole' 'conceallevel' 'cole' number (default 0) local to window {not available when compiled without the +conceal feature} Determine how text with the "conceal" syntax attribute :syn-conceal is shown: Value Effect 0 Text is shown normally 1 Each block of concealed text is replaced with one character. If the syntax item does not have a custom replacement character defined (see :syn-cchar) the character defined in 'listchars' is used (default is a space). It is highlighted with the "Conceal" highlight group. 2 Concealed text is completely hidden unless it has a custom replacement character defined (see :syn-cchar). 3 Concealed text is completely hidden. Note: in the cursor line concealed text is not hidden, so that you can edit and copy the text. This can be changed with the 'concealcursor' option. 'confirm' 'cf' 'noconfirm' 'nocf' 'confirm' 'cf' boolean (default off) global When 'confirm' is on, certain operations that would normally fail because of unsaved changes to a buffer, e.g. ":q" and ":e", instead raise a dialog asking if you wish to save the current file(s). You can still use a ! to unconditionally abandon a buffer. If 'confirm' is off you can still activate confirmation for one command only (this is most useful in mappings) with the :confirm command. Also see the confirm() function and the 'v' flag in 'guioptions'. 'conskey' 'consk' 'noconskey' 'noconsk' 'conskey' 'consk' boolean (default off) global This was for MS-DOS and is no longer supported. 'copyindent' 'ci' 'nocopyindent' 'noci' 'copyindent' 'ci' boolean (default off) local to buffer Copy the structure of the existing lines indent when autoindenting a new line. Normally the new indent is reconstructed by a series of tabs followed by spaces as required (unless 'expandtab' is enabled, in which case only spaces are used). Enabling this option makes the new line copy whatever characters were used for indenting on the existing line. 'expandtab' has no effect on these characters, a Tab remains a Tab. If the new indent is greater than on the existing line, the remaining space is filled in the normal manner. NOTE: This option is reset when 'compatible' is set. Also see 'preserveindent'. 'cpoptions' 'cpo' cpo 'cpoptions' 'cpo' string (Vim default: "aABceFsz", Vi default: all flags, except "#{|&/\.~" $VIM_POSIX: all flags) global A sequence of single character flags. When a character is present this indicates Vi-compatible behavior. This is used for things where not being Vi-compatible is mostly or sometimes preferred. 'cpoptions' stands for "compatible-options". Commas can be added for readability. To avoid problems with flags that are added in the future, use the "+=" and "-=" feature of ":set" add-option-flags. NOTE: This option is set to the Vi default value when 'compatible' is set and to the Vim default value when 'compatible' is reset. NOTE: In a Vim9 script, when vim9script is encountered, the value is saved, 'cpoptions' is set to the Vim default, and the saved value is restored at the end of the script. Changes to the value of 'cpoptions' will be applied to the saved value, but keep in mind that removing a flag that is not present when 'cpoptions' is changed has no effect. In the .vimrc file the value is not restored, thus using vim9script in the .vimrc file results in using the Vim default. NOTE: This option is set to the POSIX default value at startup when the Vi default value would be used and the $VIM_POSIX environment variable exists posix. This means Vim tries to behave like the POSIX specification. contains behavior cpo-a a When included, a ":read" command with a file name argument will set the alternate file name for the current window. cpo-A A When included, a ":write" command with a file name argument will set the alternate file name for the current window. cpo-b 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. cpo-B B A backslash has no special meaning in mappings, abbreviations, user commands and the "to" part of the menu commands. Remove this flag to be able to use a backslash like a CTRL-V. For example, the command ":map X \<Esc>" results in X being mapped to: 'B' included: "\^[" (^[ is a real <Esc>) 'B' excluded: "<Esc>" (5 characters) ('<' excluded in both cases) cpo-c c Searching continues at the end of any match at the cursor position, but not further than the start of the next line. 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. cpo-C C Do not concatenate sourced lines that start with a backslash. See line-continuation. cpo-d 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. cpo-D D Can't use CTRL-K to enter a digraph after Normal mode commands with a character argument, like r, f and t. cpo-e e When executing a register with ":@r", always add a <CR> 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 <CR>, then the last line is put on the command-line and can be edited before hitting <CR>. cpo-E E It is an error when using "y", "d", "c", "g~", "gu" or "gU" on an Empty region. The operators only work when at least one character is to be operated on. Example: This makes "y0" fail in the first column. cpo-f 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. cpo-F 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. Also see cpo-P. cpo-g g Goto line 1 when using ":edit" without argument. cpo-H H When using "I" on a line with only blanks, insert before the last blank. Without this flag insert after the last blank. cpo-i i When included, interrupting the reading of a file will leave it modified. cpo-I I When moving the cursor up or down just after inserting indent for 'autoindent', do not delete the indent. cpo-j j When joining lines, only add two spaces after a '.', not after '!' or '?'. Also see 'joinspaces'. cpo-J J A sentence has to be followed by two spaces after the '.', '!' or '?'. A <Tab> is not recognized as white space. cpo-k k Disable the recognition of raw key codes in mappings, abbreviations, and the "to" part of menu commands. For example, if <Key> sends ^[OA (where ^[ is <Esc>), the command ":map X ^[OA" results in X being mapped to: 'k' included: "^[OA" (3 characters) 'k' excluded: "<Key>" (one key code) Also see the '<' flag below. cpo-K K Don't wait for a key code to complete when it is halfway a mapping. This breaks mapping <F1><F1> when only part of the second <F1> has been read. It enables cancelling the mapping by typing <F1><Esc>. cpo-l l Backslash in a [] range in a search pattern is taken literally, only "\]", "\^", "\-" and "\\" are special. See /[] 'l' included: "/[ \t]" finds <Space>, '\' and 't' 'l' excluded: "/[ \t]" finds <Space> and <Tab> Also see cpo-\. cpo-L L When the 'list' option is set, 'wrapmargin', 'textwidth', 'softtabstop' and Virtual Replace mode (see gR) count a <Tab> as two characters, instead of the normal behavior of a <Tab>. cpo-m 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' cpo-M M When excluded, "%" matching will take backslashes into account. Thus in "( \( )" and "\( ( \)" the outer parenthesis match. When included "%" ignores backslashes, which is Vi compatible. cpo-n n When included, the column used for 'number' and 'relativenumber' will also be used for text of wrapped lines. cpo-o o Line offset to search command is not remembered for next search. cpo-O O Don't complain if a file is being overwritten, even when it didn't exist when editing it. This is a protection against a file unexpectedly created by someone else. Vi didn't complain about this. cpo-p p Vi compatible Lisp indenting. When not present, a slightly better algorithm is used. cpo-P P When included, a ":write" command that appends to a file will set the file name for the current buffer, if the current buffer doesn't have a file name yet and the 'F' flag is also included cpo-F. cpo-q q When joining multiple lines leave the cursor at the position where it would be when joining two lines. cpo-r r Redo ("." command) uses "/" to repeat a search command, instead of the actually used search string. cpo-R R Remove marks from filtered lines. Without this flag marks are kept like :keepmarks was used. cpo-s 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. cpo-S S Set buffer options always when entering a buffer (except 'readonly', 'fileformat', 'filetype' and 'syntax'). 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.) cpo-t 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. cpo-u u Undo is Vi compatible. See undo-two-ways. cpo-v v Backspaced characters remain visible on the screen in Insert mode. Without this flag the characters are erased from the screen right away. With this flag the screen newly typed text overwrites backspaced characters. cpo-w w When using "cw" on a blank character, only change one character and not all blanks until the start of the next word. cpo-W W Don't overwrite a readonly file. When omitted, ":w!" overwrites a readonly file, if possible. cpo-x x <Esc> on the command-line executes the command-line. The default in Vim is to abandon the command-line, because <Esc> normally aborts a command. c_<Esc> cpo-X X When using a count with "R" the replaced text is deleted only once. Also when repeating "R" with "." and a count. cpo-y y A yank command can be redone with ".". Think twice if you really want to use this, it may break some plugins, since most people expect "." to only repeat a change. cpo-Z Z When using "w!" while the 'readonly' option is set, don't reset 'readonly'. cpo-z z Special casing the "cw" and "d" command (see cw and d-special). cpo-! ! When redoing a filter command, use the last used external command, whatever it was. Otherwise the last used -filter- command is used. cpo-$ $ 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. cpo-% % Vi-compatible matching is done for the "%" command. Does not recognize "#if", "#endif", etc. Does not recognize "/*" and "*/". 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. This flag is also used for other features, such as C-indenting. cpo-- - When included, a vertical movement command fails when it would go above the first line or below the last line. Without it the cursor moves to the first or last line, unless it already was in that line. Applies to the commands "-", "k", CTRL-P, "+", "j", CTRL-N, CTRL-J and ":1234". cpo-+ + When included, a ":write file" command will reset the 'modified' flag of the buffer, even though the buffer itself may still be different from its file. cpo-star * Use ":*" in the same way as ":@". When not included, ":*" is an alias for ":'<,'>", select the Visual area. cpo-< < 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 <Tab>" results in X being mapped to: '<' included: "<Tab>" (5 characters) '<' excluded: "^I" (^I is a real <Tab>) Also see the 'k' flag above. cpo-> > When appending to a register, put a line break before the appended text. cpo-; ; When using , or ; to repeat the last t search and the cursor is right in front of the searched character, the cursor won't move. When not included, the cursor would skip over it and jump to the following occurrence. cpo-~ ~ When included, don't resolve symbolic links when changing directory with :cd, :lcd, or :tcd. This preserves the symbolic link path in buffer names and when displaying the current directory. When excluded (default), symbolic links are resolved to their target paths. POSIX flags. These are not included in the Vi default value, except when $VIM_POSIX was set on startup. posix contains behavior cpo-# # A count before "D", "o" and "O" has no effect. cpo-& & When ":preserve" was used keep the swap file when exiting normally while this buffer is still loaded. This flag is tested when exiting. cpo-\ \ Backslash in a [] range in a search pattern is taken literally, only "\]" is special See /[] '\' included: "/[ \-]" finds <Space>, '\' and '-' '\' excluded: "/[ \-]" finds <Space> and '-' Also see cpo-l. cpo-/ / When "%" is used as the replacement string in a :s command, use the previous replacement string. :s% cpo-{ { The |{| and |}| commands also stop at a "{" character at the start of a line. cpo-. . The ":chdir" and ":cd" commands fail if the current buffer is modified, unless ! is used. Vim doesn't need this, since it remembers the full path of an opened file. cpo-bar | The value of the $LINES and $COLUMNS environment variables overrule the terminal size values obtained with system specific functions. 'cryptmethod' 'cm' 'cryptmethod' 'cm' string (default "blowfish2") global or local to buffer global-local Method used for encryption when the buffer is written to a file: pkzip zip PkZip compatible method. A weak kind of encryption. Backwards compatible with Vim 7.2 and older. Only use if you need to be backwards compatible. blowfish blowfish Blowfish method. Medium strong encryption but it has an implementation flaw. Requires Vim 7.3 or later, files can NOT be read by Vim 7.2 and older. This adds a "seed" to the file, every time you write the file the encrypted bytes will be different. Obsolete, please do no longer use. blowfish2 blowfish2 Blowfish method. Medium strong encryption. Requires Vim 7.4.401 or later, files can NOT be read by Vim 7.3 and older. This adds a "seed" to the file, every time you write the file the encrypted bytes will be different. The whole undo file is encrypted, not just the pieces of text. E1193 E1194 E1195 E1196 E1230 E1197 E1198 E1199 E1200 E1201 xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication Code. Medium strong to strong encryption. Encryption is provided by the libsodium library, it requires Vim to be built with +sodium. It adds a seed and a message authentication code (MAC) to the file. This needs at least a Vim 8.2.3022 to read the encrypted file. Encryption of swap files is not supported, therefore no swap file will be used when xchacha20 encryption is enabled. Encryption of undo files is not yet supported, therefore no undo file will currently be written. CAREFUL: Files written with this method might have to be read back with the same version of Vim if the binary format changes later. Obsolete, please do no longer use. xchacha20v2 Same algorithm as with "xchacha20" that correctly stores the key derivation parameters together with the encrypted file. Should work better in case the parameters in the libsodium library ever change. STILL EXPERIMENTAL: Files written with this method might have to be read back with the same version of Vim if the binary format changes later. You should use "blowfish2", also to re-encrypt older files. The "xchacha20" method provides better encryption, but it does not work with all versions of Vim. When reading an encrypted file 'cryptmethod' will be set automatically to the detected method of the file being read. Thus if you write it without changing 'cryptmethod' the same method will be used. Changing 'cryptmethod' does not mark the file as modified, you have to explicitly write it, you don't get a warning unless there are other modifications. Also see :X. When setting the global value to an empty string, it will end up with the value "blowfish2". When setting the local value to an empty string the buffer will use the global value. When a new encryption method is added in a later version of Vim, and the current version does not recognize it, you will get E821 . You need to edit this file with the later version of Vim. 'cscopepathcomp' 'cspc' 'cscopepathcomp' 'cspc' number (default 0) global {not available when compiled without the +cscope feature} Determines how many components of the path to show in a list of tags. See cscopepathcomp. NOTE: This option is set to 0 when 'compatible' is set. 'cscopeprg' 'csprg' 'cscopeprg' 'csprg' string (default "cscope") global {not available when compiled without the +cscope feature} Specifies the command to execute cscope. See cscopeprg. This option cannot be set from a modeline or in the sandbox, for security reasons. 'cscopequickfix' 'csqf' 'cscopequickfix' 'csqf' string (default "") global {not available when compiled without the +cscope or +quickfix features} Specifies whether to use quickfix window to show cscope results. See cscopequickfix. 'cscoperelative' 'csre' 'nocscoperelative' 'nocsre' 'cscoperelative' 'csre' boolean (default off) global {not available when compiled without the +cscope feature} In the absence of a prefix (-P) for cscope, setting this option enables to use the basename of cscope.out path as the prefix. See cscoperelative. NOTE: This option is reset when 'compatible' is set. 'cscopetag' 'cst' 'nocscopetag' 'nocst' 'cscopetag' 'cst' boolean (default off) global {not available when compiled without the +cscope feature} Use cscope for tag commands. See cscope-options. NOTE: This option is reset when 'compatible' is set. 'cscopetagorder' 'csto' 'cscopetagorder' 'csto' number (default 0) global {not available when compiled without the +cscope feature} Determines the order in which ":cstag" performs a search. See cscopetagorder. NOTE: This option is set to 0 when 'compatible' is set. 'cscopeverbose' 'csverb' 'nocscopeverbose' 'nocsverb' 'cscopeverbose' 'csverb' boolean (default off) global {not available when compiled without the +cscope feature} Give messages when adding a cscope database. See cscopeverbose. NOTE: This option is reset when 'compatible' is set. 'cursorbind' 'crb' 'nocursorbind' 'nocrb' 'cursorbind' 'crb' boolean (default off) local to window When this option is set, as the cursor in the current window moves other cursorbound windows (windows that also have this option set) move their cursors to the corresponding line and column. This option is useful for viewing the differences between two versions of a file (see 'diff'); in diff mode, inserted and deleted lines (though not characters within a line) are taken into account. 'cursorcolumn' 'cuc' 'nocursorcolumn' 'nocuc' 'cursorcolumn' 'cuc' boolean (default off) local to window {not available when compiled without the +syntax feature} Highlight the screen column of the cursor with CursorColumn hl-CursorColumn. Useful to align text. Will make screen redrawing slower. If you only want the highlighting in the current window you can use these autocommands: au WinLeave * set nocursorline nocursorcolumn au WinEnter * set cursorline cursorcolumn 'cursorline' 'cul' 'nocursorline' 'nocul' 'cursorline' 'cul' boolean (default off) local to window {not available when compiled without the +syntax feature} Highlighting used for the line the cursor is on: CursorLine the text line hl-CursorLine CursorLineFold the fold column hl-CursorLineFold CursorLineSign the sign column hl-CursorLineSign CursorLineNr the line number, when 'cursorlineopt' contains "number" hl-CursorLineNr Useful to easily spot the cursor. Will make screen redrawing slower. When Visual mode is active the highlighting isn't used to make it easier to see the selected text. 'cursorlineopt' 'culopt' 'cursorlineopt' 'culopt' string (default: "number,line") local to window {not available when compiled without the +syntax feature} Comma-separated list of settings for how 'cursorline' is displayed. Valid values: "line" Highlight the text line of the cursor with CursorLine hl-CursorLine. "screenline" Highlight only the screen line of the cursor with CursorLine hl-CursorLine. "number" Highlight the line number of the cursor with CursorLineNr hl-CursorLineNr. Special value: "both" Alias for the values "line,number". "line" and "screenline" cannot be used together. 'debug' 'debug' string (default "") global These values can be used: msg Error messages that would otherwise be omitted will be given anyway. throw Error messages that would otherwise be omitted will be given anyway and also throw an exception and set v:errmsg. beep A message will be given when otherwise only a beep would be produced. The values can be combined, separated by a comma. "msg" and "throw" are useful for debugging 'foldexpr', 'formatexpr' or 'indentexpr'. 'define' 'def' 'define' 'def' string (default "^\s*#\s*define") global or local to buffer global-local Pattern to be used to find a macro definition. It is a search pattern, just like for the "/" command. This option is used for the commands like "[i" and "[d" include-search. The 'isident' option is used to recognize the defined name after the match: {match with 'define'}{non-ID chars}{defined name}{non-ID char} See option-backslash about inserting backslashes to include a space or backslash. The default value is for C programs. For C++ this value would be useful, to include const type declarations: ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\) You can also use "\ze" just before the name and continue the pattern to check what is following. E.g. for Javascript, if a function is defined with "func_name = function(args)": ^\s*\ze\i\+\s*=\s*function( If the function is defined with "func_name : function() {...": ^\s*\ze\i\+\s*[:]\s*(*function\s*( When using the ":set" command, you need to double the backslashes! To avoid that use :let with a single quote string: let &l:define = '^\s*\ze\k\+\s*=\s*function(' 'delcombine' 'deco' 'nodelcombine' 'nodeco' 'delcombine' 'deco' boolean (default off) global If editing Unicode and this option is set, backspace and Normal mode "x" delete each combining character on its own. When it is off (the default) the character along with its combining characters are deleted. Note: When 'delcombine' is set "xx" may work differently from "2x"! This is useful for Arabic, Hebrew and many other languages where one may have combining characters overtop of base characters, and want to remove only the combining ones. NOTE: This option is reset when 'compatible' is set. 'dictionary' 'dict' 'dictionary' 'dict' string (default "") global or local to buffer global-local 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. This can be one word per line, or several words per line, separated by non-keyword characters (white space is preferred). Maximum line length is 510 bytes. When this option is empty or an entry "spell" is present, and spell checking is enabled, words in the word lists for the currently active 'spelllang' are used. See spell. 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. Environment variables are expanded :set_env. This has nothing to do with the Dictionary variable type. 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. The use of :set+= and :set-= is preferred when adding or removing directories from the list. This avoids problems when a future version uses another default. Backticks cannot be used in this option for security reasons. 'diff' 'nodiff' 'diff' boolean (default off) local to window {not available when compiled without the +diff feature} Join the current window in the group of windows that shows differences between files. See vimdiff. 'dia' 'diffanchors' E1549 'diffanchors' 'dia' string (default "") global or local to buffer global-local List of {address} in each buffer, separated by commas, that are considered anchors when used for diffing. It's valid to specify "$+1" for 1 past the last line. "%" cannot be used for this option. There can be at most 20 anchors set for each buffer. Each anchor line splits the buffer (the split happens above the anchor), with each part being diff'ed separately before the final result is joined. When more than one {address} are provided, the anchors will be sorted internally by line number. If using buffer local options, each buffer should have the same number of anchors (extra anchors will be ignored). This option is only used when 'diffopt' has "anchor" set. See diff-anchors for more details and examples. E1550 If some of the {address} do not resolve to a line in each buffer (e.g. a pattern search that does not match anything), none of the anchors will be used. E1562 Diff anchors can only be used when there are no hidden diff buffers. 'dex' 'diffexpr' 'diffexpr' 'dex' string (default "") global {not available when compiled without the +diff feature} Expression which is evaluated to obtain a diff file (either ed-style or unified-style) from two versions of a file. See diff-diffexpr. This option cannot be set from a modeline or in the sandbox, for security reasons. 'dip' 'diffopt' 'diffopt' 'dip' string (default "internal,filler,closeoff, indent-heuristic,inline:char") global {not available when compiled without the +diff feature} Option settings for diff mode. It can consist of the following items. All are optional. Items must be separated by a comma. algorithm:{text} Use the specified diff algorithm with the internal diff engine. Currently supported algorithms are: myers the default algorithm minimal spend extra time to generate the smallest possible diff patience patience diff algorithm histogram histogram diff algorithm anchor Anchor specific lines in each buffer to be aligned with each other if 'diffanchors' is set. See diff-anchors. closeoff When a window is closed where 'diff' is set and there is only one window remaining in the same tab page with 'diff' set, execute :diffoff in that window. This undoes a :diffsplit command. context:{n} Use a context of {n} lines between a change and a fold that contains unchanged lines. When omitted a context of six lines is used. When using zero the context is actually one, since folds require a line in between, also for a deleted line. Set it to a very large value (999999) to disable folding completely. See fold-diff. filler Show filler lines, to keep the text synchronized with a window that has inserted lines at the same position. Mostly useful when windows are side-by-side and 'scrollbind' is set. foldcolumn:{n} Set the 'foldcolumn' option to {n} when starting diff mode. Without this 2 is used. followwrap Follow the 'wrap' option and leave as it is. horizontal Start diff mode with horizontal splits (unless explicitly specified otherwise). hiddenoff Do not use diff mode for a buffer when it becomes hidden. iblank Ignore changes where lines are all blank. Adds the "-B" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. NOTE: the diff windows will get out of sync, because no differences between blank lines are taken into account. icase Ignore changes in case of text. "a" and "A" are considered the same. Adds the "-i" flag to the "diff" command if 'diffexpr' is empty. indent-heuristic Use the indent heuristic for the internal diff library. inline:{text} Highlight inline differences within a change. See view-diffs. Supported values are: none Do not perform inline highlighting. simple Highlight from first different character to the last one in each line. This is the default if no inline: value is set. char Use internal diff to perform a character-wise diff and highlight the difference. word Use internal diff to perform a word-wise diff and highlight the difference. Non-alphanumeric multi-byte characters such as emoji and CJK characters are considered individual words. Small gaps of non-word characters (5 bytes or less) between changes are merged into a single highlight block. internal Use the internal diff library. This is ignored when 'diffexpr' is set. E960 When running out of memory when writing a buffer or the diff is larger than 1 GB this item will be ignored for diffs involving that buffer. Set the 'verbose' option to see when this happens. iwhite Ignore changes in amount of white space. Adds the "-b" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. It should ignore adding trailing white space, but not leading white space. iwhiteall Ignore all white space changes. Adds the "-w" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. iwhiteeol Ignore white space changes at end of line. Adds the "-Z" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. linematch:{n} Align and mark changes between the most similar lines between the buffers. When the total number of lines in the diff hunk exceeds {n}, the lines will not be aligned because for very large diff hunks there will be a noticeable lag. A reasonable setting is "linematch:60", as this will enable alignment for a 2 buffer diff hunk of 30 lines each, or a 3 buffer diff hunk of 20 lines each. Implicitly sets "filler" when this is set. vertical Start diff mode with vertical splits (unless explicitly specified otherwise). Examples: :set diffopt=internal,filler,context:4 :set diffopt= :set diffopt=internal,filler,foldcolumn:3 :set diffopt-=internal " do NOT use the internal diff parser 'digraph' 'dg' 'nodigraph' 'nodg' 'digraph' 'dg' boolean (default off) global {not available when compiled without the +digraphs feature} Enable the entering of digraphs in Insert mode with {char1} <BS> {char2}. See digraphs. NOTE: This option is reset when 'compatible' is set. 'directory' 'dir' 'directory' 'dir' string (default for Amiga: ".,t:", for Win32: ".,$TEMP,c:\tmp,c:\temp" for Unix: ".,~/tmp,/var/tmp,/tmp") global List of directory names for the swap file, separated with commas. Recommended value: ".,~/vimswap//" - this will put the swap file next to the edited file if possible, and in your personal swap directory otherwise. Make sure "~/vimswap//" is only readable for you. Possible items: - 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!) and no E303 error will be given. - 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. On MS-Windows the "hidden" attribute is set and a dot prepended if possible. - A directory starting with "./" (or ".\" for MS-Windows) 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. - For Unix and Win32, if a directory ends in two path separators "//", the swap file name will be built from the complete path to the file with all path separators replaced by percent '%' signs (including the colon following the drive letter on Win32). This will ensure file name uniqueness in the preserve directory. On Win32, it is also possible to end with "\\". However, When a separating comma is following, you must use "//", since "\\" will include the comma in the file name. Therefore it is recommended to use '//', instead of '\\'. - 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. "/var/tmp" is often not cleared when rebooting, thus is a better choice than "/tmp". But others on the computer may be able to see the files, and it can contain a lot of files, your swap files get lost in the crowd. That is why a "tmp" directory in your home directory is tried first. The use of :set+= and :set-= is preferred when adding or removing directories from the list. This avoids problems when a future version uses another default. This option cannot be set from a modeline or in the sandbox, for security reasons. 'display' 'dy' 'display' 'dy' string (default "", set to "truncate" in defaults.vim) global Change the way text is displayed. This is a comma-separated list of flags: lastline When included, as much as possible of the last line in a window will be displayed. "@@@" is put in the last columns of the last screen line to indicate the rest of the line is not displayed. truncate Like "lastline", but "@@@" is displayed in the first column of the last screen line. Overrules "lastline". uhex Show unprintable characters hexadecimal as <xx> instead of using ^C and ~C. When neither "lastline" nor "truncate" is included, a last line that doesn't fit is replaced with "@" lines. The "@" character can be changed by setting the "lastline" item in 'fillchars'. The character is highlighted with hl-NonText. 'eadirection' 'ead' 'eadirection' 'ead' string (default "both") global Tells when the 'equalalways' option applies: ver vertically, width of windows is not affected hor horizontally, height of windows is not affected both width and height of windows is affected 'ed' 'edcompatible' 'noed' 'noedcompatible' 'edcompatible' 'ed' boolean (default off) global Makes the 'g' and 'c' flags of the ":substitute" command to be toggled each time the flag is given. See complex-change. See also 'gdefault' option. Switching this option on may break plugins! This option is not used in Vim9 script. 'emoji' 'emo' 'noemoji' 'noemo' 'emoji' 'emo' boolean (default: on) global When on all Unicode emoji characters are considered to be full width. This excludes "text emoji" characters, which are normally displayed as single width. Unfortunately there is no good specification for this and it has been determined on trial-and-error basis. Use the setcellwidths() function to change the behavior. 'encoding' 'enc' E543 'encoding' 'enc' string (default for MS-Windows: "utf-8", otherwise: value from $LANG or "latin1") global Sets the character encoding used inside Vim. It applies to text in the buffers, registers, Strings in expressions, text stored in the viminfo file, etc. It sets the kind of characters which Vim can work with. See encoding-names for the possible values. NOTE: Changing this option will not change the encoding of the existing text in Vim. It may cause non-ASCII text to become invalid. It should normally be kept at its default value, or set when Vim starts up. See multibyte. To reload the menus see :menutrans. This option cannot be set from a modeline. It would most likely corrupt the text. NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding' to "utf-8". Although care has been taken to allow different values of 'encoding', "utf-8" is the natural choice for the environment and avoids unnecessary conversion overhead. "utf-8" has not been made the default to prevent different behavior of the GUI and terminal versions, and to avoid changing the encoding of newly created files without your knowledge (in case 'fileencodings' is empty). The character encoding of files can be different from 'encoding'. This is specified with 'fileencoding'. The conversion is done with iconv() or as specified with 'charconvert'. If you need to know whether 'encoding' is a multibyte encoding, you can use: if has("multi_byte_encoding") Normally 'encoding' will be equal to your current locale. This will be the default if Vim recognizes your environment settings. If 'encoding' is not set to the current locale, 'termencoding' must be set to convert typed and displayed text. See encoding-table. When you set this option, it fires the EncodingChanged autocommand event so that you can set up fonts if necessary. When the option is set, the value is converted to lowercase. Thus you can set it with uppercase values too. Underscores are translated to '-' signs. When the encoding is recognized, it is changed to the standard name. For example "Latin-1" becomes "latin1", "ISO_88592" becomes "iso-8859-2" and "utf8" becomes "utf-8". Note: "latin1" is also used when the encoding could not be detected. This only works when editing files in the same encoding! When the actual character set is not latin1, make sure 'fileencoding' and 'fileencodings' are empty. When conversion is needed, switch to using utf-8. When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8. You don't notice this while editing, but it does matter for the viminfo-file. And Vim expects the terminal to use utf-8 too. Thus setting 'encoding' to one of these values instead of utf-8 only has effect for encoding used for files when 'fileencoding' is empty. When 'encoding' is set to a Unicode encoding, and 'fileencodings' was not set yet, the default for 'fileencodings' is changed. 'endoffile' 'eof' 'noendoffile' 'noeof' 'endoffile' 'eof' boolean (default off) local to buffer Indicates that a CTRL-Z character was found at the end of the file when reading it. Normally only happens when 'fileformat' is "dos". When writing a file and this option is off and the 'binary' option is on, or 'fixeol' option is off, no CTRL-Z will be written at the end of the file. See eol-and-eof for example settings. 'endofline' 'eol' 'noendofline' 'noeol' 'endofline' 'eol' boolean (default on) local to buffer When writing a file and this option is off and the 'binary' option is on, or 'fixeol' option is off, no <EOL> will be written for the last line in the file. This option is automatically set or reset when starting to edit a new file, depending on whether file has an <EOL> for the last line in the file. Normally you don't have to set or reset this option. When 'binary' is off and 'fixeol' is on the value is not used when writing the file. When 'binary' is on or 'fixeol' is off it is used to remember the presence of a <EOL> 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 if you want to. See eol-and-eof for example settings. 'equalalways' 'ea' 'noequalalways' 'noea' 'equalalways' 'ea' boolean (default on) global When on, all the windows are automatically made the same size after splitting or closing a window. This also happens the moment the option is switched on. 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 to the window next to it (depending on 'splitbelow' and 'splitright'). When mixing vertically and horizontally split windows, a minimal size is computed and some windows may be larger if there is room. The 'eadirection' option tells in which direction the size is affected. Changing the height and width of a window can be avoided by setting 'winfixheight' and 'winfixwidth', respectively. If a window size is specified when creating a new window sizes are currently not equalized (it's complicated, but may be implemented in the future). 'equalprg' 'ep' 'equalprg' 'ep' string (default "") global or local to buffer global-local External program to use for "=" command. When this option is empty the internal You are visitor 01402775 — GeezerVison does not store the pages you look up. |