diff options
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r-- | runtime/doc/options.txt | 1603 |
1 files changed, 612 insertions, 991 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e00f27f9f0..bcefa1f56b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2016 Apr 12 +*options.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar @@ -6,11 +6,7 @@ Options *options* -1. Setting options |set-option| -2. Automatically setting options |auto-setting| -3. Options summary |option-summary| - -For an overview of options see help.txt |option-list|. +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: @@ -18,18 +14,15 @@ achieve special effects. These options come in three forms: number has a numeric value string has a string value + Type |gO| to see the table of contents. + ============================================================================== 1. Setting options *set-option* *E764* *:se* *:set* :se[t] Show all options that differ from their default value. -:se[t] all Show all but terminal options. - -:se[t] termcap Show all terminal options. 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... +:se[t] all Show all options. *E518* *E519* :se[t] {option}? Show value of {option}. @@ -52,7 +45,6 @@ achieve special effects. These options come in three forms: :se[t] all& Set all options to their default value. The values of these options are not changed: 'columns' - 'encoding' 'lines' Warning: This may have a lot of side effects. @@ -108,17 +100,17 @@ and the following arguments will be ignored. 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 ~ - cindent ~ - Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~ +< 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. A few special texts: - Last set from modeline ~ + 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 +. @@ -131,39 +123,6 @@ A few special texts: 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 @@ -228,7 +187,7 @@ opt+=val" the expansion is done before the adding or removing. Handling of local options *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 can each have their own value. This +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. @@ -247,10 +206,10 @@ 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 last used window -options are used again. If this buffer has been edited in this window, the -values from back then are used. Otherwise the values from the window where -the buffer was edited last are used. +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. It's possible 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 @@ -352,7 +311,7 @@ Note: In the future more global options can be made global-local. Using Setting the filetype -:setf[iletype] {filetype} *:setf* *:setfiletype* +: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: > @@ -363,6 +322,12 @@ Setting the filetype 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 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. @@ -389,30 +354,27 @@ 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. -NOTE: expanding environment variables and "~/" is only done with the ":set" -command, not when assigning a value to an option with ":let". +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. - *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* @@ -497,6 +459,7 @@ For example, to use a modeline only for Vim 7.0: 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 modeline is ignored if {vers} does not fit in an integer. The number of lines that are checked can be set with the 'modelines' option. @@ -612,9 +575,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'ambiwidth'* *'ambw'* 'ambiwidth' 'ambw' string (default: "single") global - {only available when compiled with the |+multi_byte| - feature} - 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). @@ -643,14 +603,12 @@ A jump table for the options with a short description can be found at |Q_op|. 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 + compiled with the |+termresponse| feature and if t_u7 is set to the escape sequence to request cursor position report. *'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 @@ -667,7 +625,6 @@ A jump table for the options with a short description can be found at |Q_op|. - 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. @@ -718,7 +675,9 @@ A jump table for the options with a short description can be found at |Q_op|. 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. |timestamp| + 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< @@ -732,6 +691,8 @@ A jump table for the options with a short description can be found at |Q_op|. '{A-Z0-9}, or `{A-Z0-9} command takes one to another file. 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". *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* 'autowriteall' 'awa' boolean (default off) @@ -742,47 +703,24 @@ A jump table for the options with a short description can be found at |Q_op|. 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 set Vim will adjust the default color groups for - the new value. But the colors used for syntax highlighting will not - change. *g:colors_name* +'background' 'bg' string (default "dark") + global + When set to "dark" or "light", Nvim will adjust the default color + groups for a dark or light background, respectively. + + This option does NOT change the background color, it tells Nvim what + the "inherited" (terminal/GUI) background looks like. + See |:hi-normal| if you want to set the background color explicitly. + *g:colors_name* When a color scheme is loaded (the "g:colors_name" variable is set) setting '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. - - 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 Windows the default is "dark". "dark" should be used if $COLORFGBG - suggests a dark background (not yet implemented). Otherwise the default - is "light". - Normally this option would be set in the vimrc file. Possibly depending on the terminal name. Example: > - :if $TERM == "xterm" + :if $TERM ==# "xterm" : set background=dark :endif < When this option is set, the default settings for the highlight groups @@ -899,7 +837,7 @@ A jump table for the options with a short description can be found at |Q_op|. - 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 + - 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. @@ -948,8 +886,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'backupskip'* *'bsk'* 'backupskip' 'bsk' string (default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global - {not available when compiled without the |+wildignore| - feature} 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. @@ -972,16 +908,16 @@ A jump table for the options with a short description can be found at |Q_op|. the newly created file). Also see 'backupcopy' and |crontab|. *'balloondelay'* *'bdlay'* -'balloondelay' 'bdlay' Removed. {Nvim} +'balloondelay' 'bdlay' Removed. *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'* -'ballooneval' 'beval' Removed. {Nvim} +'ballooneval' 'beval' Removed. *'balloonexpr'* *'bexpr'* -'balloonexpr' 'bexpr' Removed. {Nvim} +'balloonexpr' 'bexpr' Removed. *'belloff'* *'bo'* -'belloff' 'bo' string (default "") +'belloff' 'bo' string (default "all") 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 @@ -1015,8 +951,8 @@ A jump table for the options with a short description can be found at |Q_op|. 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 + 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. @@ -1053,8 +989,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'bomb'* *'nobomb'* 'bomb' boolean (default off) local to buffer - {only available when compiled with the |+multi_byte| - feature} When writing a file and the following conditions are met, a BOM (Byte Order Mark) is prepended to the file: - this option is on @@ -1074,17 +1008,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'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. + break if 'linebreak' is on. Only works for ASCII characters. *'breakindent'* *'bri'* '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. @@ -1092,8 +1021,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'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 @@ -1106,14 +1033,13 @@ A jump table for the options with a short description can be found at |Q_op|. characters. It permits dynamic French paragraph indentation (negative) or emphasizing the line continuation (positive). - sbr Display the 'showbreak' value before applying the + sbr Display the 'showbreak' value before applying the additional indent. The default value for min is 20 and shift is 0. *'browsedir'* *'bsdir'* 'browsedir' 'bsdir' string (default: "last") global - {only for 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. @@ -1124,8 +1050,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'bufhidden'* *'bh'* 'bufhidden' 'bh' string (default: "") local to buffer - {not available when compiled without the |+quickfix| - feature} This option specifies what happens when a buffer is no longer displayed in a window: <empty> follow the global 'hidden' option @@ -1158,21 +1082,14 @@ A jump table for the options with a short description can be found at |Q_op|. *'buftype'* *'bt'* *E382* 'buftype' 'bt' string (default: "") local to buffer - {not available when compiled without the |+quickfix| - feature} 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 terminal buffer, this is set automatically when a - terminal is created. |terminal-emulator| + acwrite buffer will always be written with |BufWriteCmd|s + help help buffer (do not set this manually) + nofile buffer is not related to a file, will not be written + nowrite buffer will not be written + quickfix list of errors |:cwindow| or locations |:lwindow| + terminal |terminal-emulator| buffer This option is used together with 'bufhidden' and 'swapfile' to specify special kinds of buffers. See |special-buffers|. @@ -1208,16 +1125,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'casemap'* *'cmp'* 'casemap' 'cmp' string (default: "internal,keepascii") global - {only available when compiled with the |+multi_byte| - feature} 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. + locale does not change the case mapping. 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. @@ -1225,8 +1138,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'cdpath'* *'cd'* *E344* *E346* 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") global - {not available when compiled without the - |+file_in_path| feature} This is a list of directories which will be searched when using the |:cd| and |:lcd| commands, provided that the directory being searched for has a relative path, not an absolute part starting with "/", "./" @@ -1250,16 +1161,21 @@ A jump table for the options with a short description can be found at |Q_op|. 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 the <> notation. Examples: > - :set cedit=<C-Y> - :set cedit=<Esc> + :exe "set cedit=\<C-Y>" + :exe "set cedit=\<Esc>" < |Nvi| also has this option, but it only uses the first character. See |cmdwin|. + *'channel'* +'channel' number (default: 0) + local to buffer + |channel| connected to the buffer, or 0 if no channel is connected. + In a |:terminal| buffer this is the terminal channel. + Read-only. + *'charconvert'* *'ccv'* *E202* *E214* *E513* 'charconvert' 'ccv' string (default "") global - {only available when compiled with the |+multi_byte| - and |+eval| features} 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. @@ -1270,13 +1186,12 @@ A jump table for the options with a short description can be found at |Q_op|. file to convert from. You will have to save the text in a file first. The expression must return zero or an empty string for success, non-zero for failure. - The possible encoding names encountered are in 'encoding'. + See |encoding-names| for possible encoding names. 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 shada file, if 'encoding' is - not "utf-8". Also used for Unicode conversion. + Also used for Unicode conversion. Example: > set charconvert=CharConvert() fun CharConvert() @@ -1291,8 +1206,6 @@ A jump table for the options with a short description can be found at |Q_op|. 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. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -1364,27 +1277,6 @@ A jump table for the options with a short description can be found at |Q_op|. will additionally copy the text into register '*'. See |clipboard|. - *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 |guioptions_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'. - *'cmdheight'* *'ch'* 'cmdheight' 'ch' number (default 1) global @@ -1401,8 +1293,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'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. @@ -1443,15 +1333,10 @@ A jump table for the options with a short description can be found at |Q_op|. *'commentstring'* *'cms'* *E537* 'commentstring' 'cms' string (default "/*%s*/") local to buffer - {not available when compiled without the |+folding| - feature} A template for a comment. The "%s" in the value is replaced with the comment text. Currently only used to add markers for folding, see |fold-marker|. - *'compatible'* *'cp'* *'nocompatible'* *'nocp'* -'compatible' 'cp' Removed. |vim-differences| {Nvim} - *'complete'* *'cpt'* *E535* 'complete' 'cpt' string (default: ".,w,b,u,t") local to buffer @@ -1459,7 +1344,7 @@ A jump table for the options with a short description can be found at |Q_op|. when CTRL-P or CTRL-N are used. 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) + . 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 @@ -1490,8 +1375,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'completefunc'* *'cfu'* 'completefunc' 'cfu' string (default: empty) local to buffer - {not available when compiled without the |+eval| - or |+insert_expand| features} 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 @@ -1502,8 +1385,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'completeopt'* *'cot'* 'completeopt' 'cot' string (default: "menu,preview") global - {not available when compiled without the - |+insert_expand| feature} A comma separated list of options for Insert mode completion |ins-completion|. The supported values are: @@ -1554,8 +1435,8 @@ A jump table for the options with a short description can be found at |Q_op|. displayed. E.g., when moving vertically it may change column. -'conceallevel' 'cole' *'conceallevel'* *'cole'* - number (default 0) + *'conceallevel'* *'cole'* +'conceallevel' 'cole' number (default 0) local to window Determine how text with the "conceal" syntax attribute |:syn-conceal| is shown: @@ -1581,7 +1462,7 @@ A jump table for the options with a short description can be found at |Q_op|. 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 + 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| @@ -1632,13 +1513,12 @@ A jump table for the options with a short description can be found at |Q_op|. See also |map_bar|. *cpo-B* B A backslash has no special meaning in mappings, - abbreviations and the "to" part of the menu commands. - Remove this flag to be able to use a backslash like a - CTRL-V. For example, the command ":map X \<Esc>" - results in X being mapped to: + 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 @@ -1667,7 +1547,7 @@ A jump table for the options with a short description can be found at |Q_op|. *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 operate on. Example: + 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 @@ -1688,15 +1568,6 @@ A jump table for the options with a short description can be found at |Q_op|. 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 through a mapping. This breaks mapping @@ -1830,14 +1701,6 @@ A jump table for the options with a short description can be found at |Q_op|. + 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-<* - < 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. @@ -1847,9 +1710,9 @@ A jump table for the options with a short description can be found at |Q_op|. character, the cursor won't move. When not included, the cursor would skip over it and jump to the following occurrence. - - *'cryptmethod'* *'cm'* -'cryptmethod' Removed. |vim-differences| {Nvim} + *cpo-_* + _ When using |cw| on a word, do not include the + whitespace following the word in the motion. *'cscopepathcomp'* *'cspc'* 'cscopepathcomp' 'cspc' number (default 0) @@ -1888,12 +1751,6 @@ A jump table for the options with a short description can be found at |Q_op|. Determines the order in which ":cstag" performs a search. See |cscopetagorder|. - *'cscopeverbose'* *'csverb'* - *'nocscopeverbose'* *'nocsverb'* -'cscopeverbose' 'csverb' boolean (default off) - global - Give messages when adding a cscope database. See |cscopeverbose|. - *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'* 'cursorbind' 'crb' boolean (default off) local to window @@ -1909,8 +1766,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'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. @@ -1923,8 +1778,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'cursorline'* *'cul'* *'nocursorline'* *'nocul'* 'cursorline' 'cul' boolean (default off) local to window - {not available when compiled without the |+syntax| - feature} Highlight the screen line of the cursor with CursorLine |hl-CursorLine|. Useful to easily spot the cursor. Will make screen redrawing slower. @@ -1964,8 +1817,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'* 'delcombine' 'deco' boolean (default off) global - {only available when compiled with the |+multi_byte| - feature} 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 @@ -2008,13 +1859,13 @@ A jump table for the options with a short description can be found at |Q_op|. *'dex'* *'diffexpr'* 'diffexpr' 'dex' string (default "") global - Expression which is evaluated to obtain an ed-style diff file from two - versions of a file. See |diff-diffexpr|. + 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 "filler") +'diffopt' 'dip' string (default "internal,filler") global Option settings for diff mode. It can consist of the following items. All are optional. Items must be separated by a comma. @@ -2030,6 +1881,15 @@ A jump table for the options with a short description can be found at |Q_op|. When omitted a context of six lines is used. See |fold-diff|. + 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. @@ -2041,26 +1901,59 @@ A jump table for the options with a short description can be found at |Q_op|. 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. + horizontal Start diff mode with horizontal splits (unless explicitly specified otherwise). vertical Start diff mode with vertical splits (unless explicitly specified otherwise). + hiddenoff Do not use diff mode for a buffer when it + becomes hidden. + foldcolumn:{n} Set the 'foldcolumn' option to {n} when starting diff mode. Without this 2 is used. - Examples: > + internal Use the internal diff library. This is + ignored when 'diffexpr' is set. *E960* + When running out of memory when writing a + buffer this item will be ignored for diffs + involving that buffer. Set the 'verbose' + option to see when this happens. + + indent-heuristic + Use the indent heuristic for the internal + diff library. + + 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 - :set diffopt=filler,context:4 + Examples: > + :set diffopt=internal,filler,context:4 :set diffopt= - :set diffopt=filler,foldcolumn:3 + :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|. @@ -2111,15 +2004,25 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. *'display'* *'dy'* -'display' 'dy' string (default "lastline", Vi default: "") +'display' 'dy' string (default "lastline,msgsep", Vi default: "") global Change the way text is displayed. This is comma separated list of flags: lastline When included, as much as possible of the last line - in a window will be displayed. When not included, a - last line that doesn't fit is replaced with "@" lines. + 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. + msgsep When showing messages longer than 'cmdheight', only + scroll the message lines, not the entire screen. The + separator line is decorated by |hl-MsgSeparator| and + the "msgsep" flag of 'fillchars'. + + When neither "lastline" nor "truncate" is included, a last line that + doesn't fit is replaced with "@" lines. *'eadirection'* *'ead'* 'eadirection' 'ead' string (default "both") @@ -2129,47 +2032,18 @@ A jump table for the options with a short description can be found at |Q_op|. hor horizontally, height of windows is not affected both width and height of windows is affected - *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* -'edcompatible' 'ed' Removed. |vim-differences| {Nvim} + *'emoji'* *'emo'* +'emoji' 'emo' boolean (default: on) + global + When on all Unicode emoji characters are considered to be full width. - *'encoding'* *'enc'* *E543* -'encoding' 'enc' string (default: "utf-8") - global - {only available when compiled with the |+multi_byte| - feature} - Sets the character encoding used inside Vim. It applies to text in - the buffers, registers, Strings in expressions, text stored in the - shada file, etc. It sets the kind of characters which Vim can work - with. See |encoding-names| for the possible values. - - 'encoding' cannot be changed after startup, because (1) it causes - non-ASCII text inside Vim to become invalid, and (2) it complicates - runtime logic. The recommended 'encoding' is "utf-8". Remote plugins - and GUIs only support utf-8. See |multibyte|. - - 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 multi-byte encoding, you - can use: > - if has("multi_byte_encoding") -< - When you set this option, it fires the |EncodingChanged| autocommand - event so that you can set up fonts if necessary. + *'encoding'* *'enc'* *E543* +'encoding' 'enc' + String-encoding used internally and for |RPC| communication. + Always UTF-8. - 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". - - 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 - |shada-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. + See 'fileencoding' to control file-content encoding. *'endofline'* *'eol'* *'noendofline'* *'noeol'* 'endofline' 'eol' boolean (default on) @@ -2222,15 +2096,12 @@ A jump table for the options with a short description can be found at |Q_op|. Ring the bell (beep or screen flash) for error messages. This only makes a difference for error messages, the bell will be used always for a lot of errors without a message (e.g., hitting <Esc> in Normal - mode). See 'visualbell' on how to make the bell behave like a beep, - screen flash or do nothing. See 'belloff' to finetune when to ring the - bell. + mode). See 'visualbell' to make the bell behave like a screen flash + or do nothing. See 'belloff' to finetune when to ring the bell. *'errorfile'* *'ef'* 'errorfile' 'ef' string (default: "errors.err") global - {not available when compiled without the |+quickfix| - feature} Name of the errorfile for the QuickFix mode (see |:cf|). When the "-q" command-line argument is used, 'errorfile' is set to the following argument. See |-q|. @@ -2243,23 +2114,9 @@ A jump table for the options with a short description can be found at |Q_op|. *'errorformat'* *'efm'* 'errorformat' 'efm' string (default is very long) global or local to buffer |global-local| - {not available when compiled without the |+quickfix| - feature} Scanf-like description of the format for the lines in the error file (see |errorformat|). - *'esckeys'* *'ek'* *'noesckeys'* *'noek'* -'esckeys' 'ek' boolean (Vim default: on, Vi default: off) - global - Function keys that start with an <Esc> are recognized in Insert - mode. When this option is off, the cursor and function keys cannot be - used in Insert mode if they start with an <Esc>. The advantage of - this is that the single <Esc> is recognized immediately, instead of - after one second. Instead of resetting this option, you might want to - try changing the values for 'timeoutlen' and 'ttimeoutlen'. Note that - when 'esckeys' is off, you can still map anything, but the cursor keys - won't work by default. - *'eventignore'* *'ei'* 'eventignore' 'ei' string (default "") global @@ -2282,10 +2139,15 @@ A jump table for the options with a short description can be found at |Q_op|. *'exrc'* *'ex'* *'noexrc'* *'noex'* 'exrc' 'ex' boolean (default off) global - Enables the reading of .nvimrc and .exrc in the current directory. - If you switch this option on you should also consider setting the - 'secure' option (see |initialization|). Using this option comes - with a potential security risk, use with care! + Enables the reading of .vimrc and .exrc in the current directory. + Setting this option is a potential security leak. E.g., consider + unpacking a package or fetching files from github, a .vimrc in there + might be a trojan horse. BETTER NOT SET THIS OPTION! + Instead, define an autocommand in your .vimrc to set options for a + matching directory. + + If you do switch this option on you should also consider setting the + 'secure' option (see |initialization|). This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. Also see |init.vim| and |gui-init|. @@ -2293,24 +2155,18 @@ A jump table for the options with a short description can be found at |Q_op|. *'fileencoding'* *'fenc'* *E213* 'fileencoding' 'fenc' string (default: "") local to buffer - {only available when compiled with the |+multi_byte| - feature} - Sets the character encoding for the file of this buffer. - - When 'fileencoding' is different from 'encoding', conversion will be - done when writing the file. For reading see below. - When 'fileencoding' is empty, the same value as 'encoding' will be - used (no conversion when reading or writing a file). - Conversion will also be done when 'encoding' and 'fileencoding' are - both a Unicode encoding and 'fileencoding' is not utf-8. That's - because internally Unicode is always stored as utf-8. - WARNING: Conversion can cause loss of information! When - 'encoding' is "utf-8" or another Unicode encoding, conversion - is most likely done in a way that the reverse conversion - results in the same text. When 'encoding' is not "utf-8" some - characters may be lost! - - See 'encoding' for the possible values. Additionally, values may be + File-content encoding for the current buffer. Conversion is done with + iconv() or as specified with 'charconvert'. + + When 'fileencoding' is not UTF-8, conversion will be done when + writing the file. For reading see below. + When 'fileencoding' is empty, the file will be saved with UTF-8 + encoding (no conversion when reading or writing a file). + + WARNING: Conversion to a non-Unicode encoding can cause loss of + information! + + See |encoding-names| for the possible values. Additionally, values may be specified that can be handled by the converter, see |mbyte-conversion|. @@ -2323,8 +2179,8 @@ A jump table for the options with a short description can be found at |Q_op|. Prepending "8bit-" and "2byte-" has no meaning here, they are ignored. When the option is set, the value is converted to lowercase. Thus you can set it with uppercase values too. '_' characters are - replaced with '-'. If a name is recognized from the list for - 'encoding', it is replaced by the standard name. For example + replaced with '-'. If a name is recognized from the list at + |encoding-names|, it is replaced by the standard name. For example "ISO8859-2" becomes "iso-8859-2". When this option is set, after starting to edit a file, the 'modified' @@ -2335,29 +2191,18 @@ A jump table for the options with a short description can be found at |Q_op|. written. If you do set 'fenc' in a modeline, you might want to set 'nomodified' to avoid not being able to ":q". - This option can not be changed when 'modifiable' is off. - - *'fe'* - NOTE: Before version 6.0 this option specified the encoding for the - whole of Vim, this was a mistake. Now use 'encoding' instead. The - old short name was 'fe', which is no longer used. + This option cannot be changed when 'modifiable' is off. *'fileencodings'* *'fencs'* 'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1") global - {only available when compiled with the |+multi_byte| - feature} This is a list of character encodings considered when starting to edit an existing file. When a file is read, Vim tries to use the first mentioned character encoding. If an error is detected, the next one in the list is tried. When an encoding is found that works, 'fileencoding' is set to it. If all fail, 'fileencoding' is set to - an empty string, which means the value of 'encoding' is used. - WARNING: Conversion can cause loss of information! When - 'encoding' is "utf-8" (or one of the other Unicode variants) - conversion is most likely done in a way that the reverse - conversion results in the same text. When 'encoding' is not - "utf-8" some non-ASCII characters may be lost! You can use + an empty string, which means that UTF-8 is used. + WARNING: Conversion can cause loss of information! You can use the |++bad| argument to specify what is done with characters that can't be converted. For an empty file or a file with only ASCII characters most encodings @@ -2383,11 +2228,11 @@ A jump table for the options with a short description can be found at |Q_op|. because Vim cannot detect an error, thus the encoding is always accepted. The special value "default" can be used for the encoding from the - environment. It is useful when 'encoding' is set to "utf-8" and - your environment uses a non-latin1 encoding, such as Russian. - When 'encoding' is "utf-8" and a file contains an illegal byte - sequence it won't be recognized as UTF-8. You can use the |8g8| - command to find the illegal byte sequence. + environment. It is useful when your environment uses a non-latin1 + encoding, such as Russian. + When a file contains an illegal UTF-8 byte sequence it won't be + recognized as "utf-8". You can use the |8g8| command to find the + illegal byte sequence. WRONG VALUES: WHAT'S WRONG: latin1,utf-8 "latin1" will always be used utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8 @@ -2417,7 +2262,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'fileformats' is not empty and 'binary' is off. When this option is set, after starting to edit a file, the 'modified' option is set, because the file would be different when written. - This option can not be changed when 'modifiable' is off. + This option cannot be changed when 'modifiable' is off. *'fileformats'* *'ffs'* 'fileformats' 'ffs' string (default: @@ -2505,26 +2350,29 @@ A jump table for the options with a short description can be found at |Q_op|. Only normal file name characters can be used, "/\*?[|<>" are illegal. *'fillchars'* *'fcs'* -'fillchars' 'fcs' string (default "vert:|,fold:-") +'fillchars' 'fcs' string (default "") global - {not available when compiled without the |+windows| - and |+folding| features} Characters to fill the statuslines and vertical separators. It is a comma separated list of items: item default Used for ~ stl:c ' ' or '^' statusline of the current window stlnc:c ' ' or '=' statusline of the non-current windows - vert:c '|' vertical separators |:vsplit| - fold:c '-' filling 'foldtext' + vert:c '│' or '|' vertical separators |:vsplit| + fold:c '·' or '-' filling 'foldtext' diff:c '-' deleted lines of the 'diff' option + msgsep:c ' ' message separator 'display' + eob:c '~' empty lines at the end of a buffer Any one that is omitted will fall back to the default. For "stl" and "stlnc" the space will be used when there is highlighting, '^' or '=' otherwise. + If 'ambiwidth' is "double" then "vert" and "fold" default to + single-byte alternatives. + Example: > - :set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:- + :set fillchars=stl:^,stlnc:=,vert:│,fold:·,diff:- < This is similar to the default, except that these characters will also be used when there is highlighting. @@ -2537,11 +2385,11 @@ A jump table for the options with a short description can be found at |Q_op|. vert:c VertSplit |hl-VertSplit| fold:c Folded |hl-Folded| diff:c DiffDelete |hl-DiffDelete| + eob:c EndOfBuffer |hl-EndOfBuffer| *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* 'fixendofline' 'fixeol' boolean (default on) local to buffer - {not in Vi} When writing a file and this option is on, <EOL> at the end of file will be restored if missing. Turn this option off if you want to preserve the situation from the original file. @@ -2559,8 +2407,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldclose'* *'fcl'* 'foldclose' 'fcl' string (default "") global - {not available when compiled without the |+folding| - feature} When set to "all", a fold is closed when the cursor isn't in it and its level is higher than 'foldlevel'. Useful if you want folds to automatically close when moving out of them. @@ -2568,8 +2414,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldcolumn'* *'fdc'* 'foldcolumn' 'fdc' number (default 0) local to window - {not available when compiled without the |+folding| - feature} When non-zero, a column with the specified width is shown at the side of the window which indicates open and closed folds. The maximum value is 12. @@ -2578,8 +2422,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'* 'foldenable' 'fen' boolean (default on) local to window - {not available when compiled without the |+folding| - feature} When off, all folds are open. This option can be used to quickly switch between showing all text unfolded and viewing the text with folds (including manually opened or closed folds). It can be toggled @@ -2591,8 +2433,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldexpr'* *'fde'* 'foldexpr' 'fde' string (default: "0") local to window - {not available when compiled without the |+folding| - or |+eval| features} The expression used for when 'foldmethod' is "expr". It is evaluated for each line to obtain its fold level. See |fold-expr|. @@ -2607,8 +2447,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldignore'* *'fdi'* 'foldignore' 'fdi' string (default: "#") local to window - {not available when compiled without the |+folding| - feature} Used only when 'foldmethod' is "indent". Lines starting with characters in 'foldignore' will get their fold level from surrounding lines. White space is skipped before checking for this character. @@ -2617,8 +2455,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldlevel'* *'fdl'* 'foldlevel' 'fdl' number (default: 0) local to window - {not available when compiled without the |+folding| - feature} Sets the fold level: Folds with a higher level will be closed. Setting this option to zero will close all folds. Higher numbers will close fewer folds. @@ -2628,8 +2464,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldlevelstart'* *'fdls'* 'foldlevelstart' 'fdls' number (default: -1) global - {not available when compiled without the |+folding| - feature} Sets 'foldlevel' when starting to edit another buffer in a window. Useful to always start editing with all folds closed (value zero), some folds closed (one) or no folds closed (99). @@ -2643,8 +2477,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldmarker'* *'fmr'* *E536* 'foldmarker' 'fmr' string (default: "{{{,}}}") local to window - {not available when compiled without the |+folding| - feature} The start and end marker used when 'foldmethod' is "marker". There must be one comma, which separates the start and end marker. The marker is a literal string (a regular expression would be too slow). @@ -2653,8 +2485,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldmethod'* *'fdm'* 'foldmethod' 'fdm' string (default: "manual") local to window - {not available when compiled without the |+folding| - feature} The kind of folding used for the current window. Possible values: |fold-manual| manual Folds are created manually. |fold-indent| indent Lines with equal indent form a fold. @@ -2666,8 +2496,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldminlines'* *'fml'* 'foldminlines' 'fml' number (default: 1) local to window - {not available when compiled without the |+folding| - feature} Sets the number of screen lines above which a fold can be displayed closed. Also for manually closed folds. With the default value of one a fold can only be closed if it takes up two or more screen lines. @@ -2679,8 +2507,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldnestmax'* *'fdn'* 'foldnestmax' 'fdn' number (default: 20) local to window - {not available when compiled without the |+folding| - feature} Sets the maximum nesting of folds for the "indent" and "syntax" methods. This avoids that too many folds will be created. Using more than 20 doesn't work, because the internal limit is 20. @@ -2689,8 +2515,6 @@ A jump table for the options with a short description can be found at |Q_op|. 'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix, search,tag,undo") global - {not available when compiled without the |+folding| - feature} Specifies for which type of commands folds will be opened, if the command moves the cursor into a closed fold. It is a comma separated list of items. @@ -2725,8 +2549,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldtext'* *'fdt'* 'foldtext' 'fdt' string (default: "foldtext()") local to window - {not available when compiled without the |+folding| - feature} An expression which is used to specify the text displayed for a closed fold. See |fold-foldtext|. @@ -2736,6 +2558,38 @@ A jump table for the options with a short description can be found at |Q_op|. It is not allowed to change text or jump to another window while evaluating 'foldtext' |textlock|. + *'formatexpr'* *'fex'* +'formatexpr' 'fex' string (default "") + local to buffer + Expression which is evaluated to format a range of lines for the |gq| + operator or automatic formatting (see 'formatoptions'). When this + option is empty 'formatprg' is used. + + The |v:lnum| variable holds the first line to be formatted. + The |v:count| variable holds the number of lines to be formatted. + The |v:char| variable holds the character that is going to be + inserted if the expression is being evaluated due to + automatic formatting. This can be empty. Don't insert + it yet! + + Example: > + :set formatexpr=mylang#Format() +< This will invoke the mylang#Format() function in the + autoload/mylang.vim file in 'runtimepath'. |autoload| + + The expression is also evaluated when 'textwidth' is set and adding + text beyond that limit. This happens under the same conditions as + when internal formatting is used. Make sure the cursor is kept in the + same spot relative to the text then! The |mode()| function will + return "i" or "R" in this situation. + + When the expression evaluates to non-zero Vim will fall back to using + the internal format mechanism. + + The expression will be evaluated in the |sandbox| when set from a + modeline, see |sandbox-option|. That stops the option from working, + since changing the buffer text is not allowed. + *'formatoptions'* *'fo'* 'formatoptions' 'fo' string (default: "tcqj", Vi default: "vt") local to buffer @@ -2761,7 +2615,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'formatprg'* *'fp'* 'formatprg' 'fp' string (default "") - global + global or local to buffer |global-local| The name of an external program that will be used to format the lines selected with the |gq| operator. The program must take the input on stdin and produce the output on stdout. The Unix program "fmt" is @@ -2774,49 +2628,20 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. - *'formatexpr'* *'fex'* -'formatexpr' 'fex' string (default "") - local to buffer - {not available when compiled without the |+eval| - feature} - Expression which is evaluated to format a range of lines for the |gq| - operator or automatic formatting (see 'formatoptions'). When this - option is empty 'formatprg' is used. - - The |v:lnum| variable holds the first line to be formatted. - The |v:count| variable holds the number of lines to be formatted. - The |v:char| variable holds the character that is going to be - inserted if the expression is being evaluated due to - automatic formatting. This can be empty. Don't insert - it yet! - - Example: > - :set formatexpr=mylang#Format() -< This will invoke the mylang#Format() function in the - autoload/mylang.vim file in 'runtimepath'. |autoload| - - The expression is also evaluated when 'textwidth' is set and adding - text beyond that limit. This happens under the same conditions as - when internal formatting is used. Make sure the cursor is kept in the - same spot relative to the text then! The |mode()| function will - return "i" or "R" in this situation. - - When the expression evaluates to non-zero Vim will fall back to using - the internal format mechanism. - - The expression will be evaluated in the |sandbox| when set from a - modeline, see |sandbox-option|. That stops the option from working, - since changing the buffer text is not allowed. - *'fsync'* *'fs'* -'fsync' 'fs' boolean (default on) +'fsync' 'fs' boolean (default off) global - When on, the library function fsync() will be called after writing a - file. This will flush a file to disk, ensuring that it is safely - written even on filesystems which do metadata-only journaling. This - will force the harddrive to spin up on Linux systems running in laptop - mode, so it may be undesirable in some situations. Be warned that - turning this off increases the chances of data loss after a crash. + When on, the OS function fsync() will be called after saving a file + (|:write|, |writefile()|, …), |swap-file| and |shada-file|. This + flushes the file to disk, ensuring that it is safely written. + Slow on some systems: writing buffers, quitting Nvim, and other + operations may sometimes take a few seconds. + + Files are ALWAYS flushed ('fsync' is ignored) when: + - |CursorHold| event is triggered + - |:preserve| is called + - system signals low battery life + - Nvim exits abnormally *'gdefault'* *'gd'* *'nogdefault'* *'nogd'* 'gdefault' 'gd' boolean (default off) @@ -2831,6 +2656,10 @@ A jump table for the options with a short description can be found at |Q_op|. :s///g subst. one subst. all :s///gg subst. all subst. one + DEPRECATED: Setting this option may break plugins that are not aware + of this option. Also, many users get confused that adding the /g flag + has the opposite effect of that it normally does. + *'grepformat'* *'gfm'* 'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m") global @@ -2840,8 +2669,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'grepprg'* *'gp'* 'grepprg' 'gp' string (default "grep -n ", - Unix: "grep -n $* /dev/null", - Win32: "findstr /n" or "grep -n") + Unix: "grep -n $* /dev/null") global or local to buffer |global-local| Program to use for the |:grep| command. This option may contain '%' and '#' characters, which are expanded like when used in a command- @@ -2856,33 +2684,24 @@ A jump table for the options with a short description can be found at |Q_op|. |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|. See also the section |:make_makeprg|, since most of the comments there apply equally to 'grepprg'. - For Win32, the default is "findstr /n" if "findstr.exe" can be found, - otherwise it's "grep -n". This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549* -'guicursor' 'gcr' string (default "n-v-c:block-Cursor/lCursor, - ve:ver35-Cursor, - o:hor50-Cursor, - i-ci:ver25-Cursor/lCursor, - r-cr:hor20-Cursor/lCursor, - sm:block-Cursor - -blinkwait175-blinkoff150-blinkon175", - for Windows console: - "n-v-c:block,o:hor50,i-ci:hor15, - r-cr:hor30,sm:block") - global - {only available when compiled with GUI enabled, and - for Windows console} - This option tells Vim what the cursor should look like in different - modes. It fully works in the GUI. In a Windows console, only - the height of the cursor can be changed. This can be done by - specifying a block cursor, or a percentage for a vertical or - horizontal cursor. - For a console the 't_SI' and 't_EI' escape sequences are used. - - The option is a comma separated list of parts. Each part consist of a +'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20") + global + Configures the cursor style for each mode. Works in the GUI and many + terminals. See |tui-cursor-shape|. + + To disable cursor-styling, reset the option: > + :set guicursor= + +< To enable mode shapes, "Cursor" highlight, and blinking: > + :set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50 + \,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor + \,sm:block-blinkwait175-blinkoff150-blinkon175 + +< The option is a comma separated list of parts. Each part consists of a mode-list and an argument-list: mode-list:argument-list,mode-list:argument-list,.. The mode-list is a dash separated list of these modes: @@ -2910,27 +2729,30 @@ A jump table for the options with a short description can be found at |Q_op|. the cursor starts blinking, blinkon is the time that the cursor is shown and blinkoff is the time that the cursor is not shown. The times are in msec. When one - of the numbers is zero, there is no blinking. The - default is: "blinkwait700-blinkon400-blinkoff250". - These numbers are used for a missing entry. This - means that blinking is enabled by default. To switch - blinking off you can use "blinkon0". The cursor only - blinks when Vim is waiting for input, not while - executing a command. - To make the cursor blink in an xterm, see - |xterm-blink|. - {group-name} - a highlight group name, that sets the color and font - for the cursor + of the numbers is zero, there is no blinking. E.g.: > + :set guicursor=n:blinkon0 +< {group-name} + Highlight group name that sets the color and font for + the cursor. |inverse|/reverse and no group-name are + interpreted as "the host terminal default cursor + colors" which usually invert bg and fg colors. {group-name}/{group-name} Two highlight group names, the first is used when no language mappings are used, the other when they are. |language-mapping| Examples of parts: - n-c-v:block-nCursor in Normal, Command-line and Visual mode, use a + n-c-v:block-nCursor In Normal, Command-line and Visual mode, use a block cursor with colors from the "nCursor" highlight group + n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20 + In Normal et al. modes, use a block cursor + with the default colors defined by the host + terminal. In Insert-likes modes, use + a vertical bar cursor with colors from + "Cursor" highlight group. In Replace-likes + modes, use a underline cursor with + default colors. i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150 In Insert and Command-line Insert mode, use a 30% vertical bar cursor with colors from the @@ -2950,7 +2772,6 @@ A jump table for the options with a short description can be found at |Q_op|. *E235* *E596* 'guifont' 'gfn' string (default "") global - {only available when compiled with GUI enabled} This is a list of fonts which will be used for the GUI version of Vim. In its simplest form the value is just one font name. When the font cannot be found you will get an error message. To try other @@ -2979,8 +2800,7 @@ A jump table for the options with a short description can be found at |Q_op|. :set guifont=* < will bring up a font requester, where you can pick the font you want. - The font name depends on the GUI used. See |setting-guifont| for a - way to set 'guifont' for various systems. + The font name depends on the GUI used. For Mac OSX you can use something like this: > :set guifont=Monaco:h10 @@ -3017,8 +2837,6 @@ A jump table for the options with a short description can be found at |Q_op|. *E250* *E252* *E234* *E597* *E598* 'guifontset' 'gfs' string (default "") global - {only available when compiled with GUI enabled and - with the |+xfontset| feature} When not empty, specifies two (or more) fonts to be used. The first one for normal English, the second one for your special language. See |xfontset|. @@ -3039,15 +2857,13 @@ A jump table for the options with a short description can be found at |Q_op|. *'guifontwide'* *'gfw'* *E231* *E533* *E534* 'guifontwide' 'gfw' string (default "") global - {only available when compiled with GUI enabled} When not empty, specifies a comma-separated list of fonts to be used for double-width characters. The first font that can be loaded is used. Note: The size of these fonts must be exactly twice as wide as the one specified with 'guifont' and the same height. - 'guifontwide' is only used when 'encoding' is set to "utf-8" and - 'guifontset' is empty or invalid. + 'guifontwide' is only used when 'guifontset' is empty or invalid. When 'guifont' is set and a valid font is found in it and 'guifontwide' is empty Vim will attempt to find a matching double-width font and set 'guifontwide' to it. @@ -3056,22 +2872,9 @@ A jump table for the options with a short description can be found at |Q_op|. If set and valid, 'guifontwide' is used for IME instead of 'guifont'. - *'guiheadroom'* *'ghr'* -'guiheadroom' 'ghr' number (default 50) - global - {only for X11 GUI} - The number of pixels subtracted from the screen height when fitting - the GUI window on the screen. Set this before the GUI is started, - e.g., in your |gvimrc| file. When zero, the whole screen height will - be used by the window. When positive, the specified number of pixel - lines will be left for window decorations and other items on the - screen. Set it to a negative value to allow windows taller than the - screen. - *'guioptions'* *'go'* 'guioptions' 'go' string (default "egmrLT" (MS-Windows)) global - {only available when compiled with GUI enabled} This option only has an effect in the GUI version of Vim. It is a sequence of letters which describes what components and options of the GUI should be used. @@ -3096,7 +2899,7 @@ A jump table for the options with a short description can be found at |Q_op|. The same applies to the modeless selection. *'go-P'* 'P' Like autoselect but using the "+ register instead of the "* - register. + register. *'go-A'* 'A' Autoselect for the modeless selection. Like 'a', but only applies to the modeless selection. @@ -3125,7 +2928,7 @@ A jump table for the options with a short description can be found at |Q_op|. that this flag must be added in the vimrc file, before switching on syntax or filetype recognition (when the |gvimrc| file is sourced the system menu has already been loaded; the - ":syntax on" and ":filetype on" commands load the menu too). + `:syntax on` and `:filetype on` commands load the menu too). *'go-g'* 'g' Grey menu items: Make menu items that are not active grey. If 'g' is not included inactive menu items are not shown at all. @@ -3164,20 +2967,17 @@ A jump table for the options with a short description can be found at |Q_op|. removing it after the GUI has started has no effect. - *'guipty'* *'noguipty'* -'guipty' Removed. |vim-differences| {Nvim} - *'guitablabel'* *'gtl'* 'guitablabel' 'gtl' string (default empty) global - {only available when compiled with GUI enabled and - with the |+windows| feature} When nonempty describes the text to use in a label of the GUI tab pages line. When empty and when the result is empty Vim will use a default label. See |setting-guitablabel| for more info. The format of this option is like that of 'statusline'. 'guitabtooltip' is used for the tooltip, see below. + The expression will be evaluated in the |sandbox| when set from a + modeline, see |sandbox-option|. Only used when the GUI tab pages line is displayed. 'e' must be present in 'guioptions'. For the non-GUI tab pages line 'tabline' is @@ -3186,8 +2986,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'guitabtooltip'* *'gtt'* 'guitabtooltip' 'gtt' string (default empty) global - {only available when compiled with GUI enabled and - with the |+windows| feature} When nonempty describes the text to use in a tooltip for the GUI tab pages line. When empty Vim will use a default tooltip. This option is otherwise just like 'guitablabel' above. @@ -3212,8 +3010,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'helpheight'* *'hh'* 'helpheight' 'hh' number (default 20) global - {not available when compiled without the |+windows| - feature} Minimal initial height of the help window when it is opened with the ":help" command. The initial height of the help window is half of the current window, or (when the 'ea' option is on) the same as other @@ -3223,8 +3019,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'helplang'* *'hlg'* 'helplang' 'hlg' string (default: messages language or empty) global - {only available when compiled with the |+multi_lang| - feature} Comma separated list of languages. Vim will use the first language for which the desired help can be found. The English help will always be used as a last resort. You can add "en" to prefer English over @@ -3253,109 +3047,6 @@ A jump table for the options with a short description can be found at |Q_op|. WARNING: It's easy to forget that you have changes in hidden buffers. Think twice when using ":q!" or ":qa!". - *'highlight'* *'hl'* -'highlight' 'hl' string (default (as a single string): - "8:SpecialKey,~:EndOfBuffer,z:TermCursor, - Z:TermCursorNC,@:NonText,d:Directory, - e:ErrorMsg,i:IncSearch,l:Search, - m:MoreMsg,M:ModeMsg,n:LineNr, - N:CursorLineNr,r:Question,s:StatusLine, - S:StatusLineNC,c:VertSplit,t:Title, - v:Visual,w:WarningMsg,W:WildMenu, - f:Folded,F:FoldColumn,A:DiffAdd, - C:DiffChange,D:DiffDelete,T:DiffText, - >:SignColumn,B:SpellBad,P:SpellCap, - R:SpellRare,L:SpellLocal,-:Conceal, - +:Pmenu,=:PmenuSel,x:PmenuSbar, - X:PmenuThumb") - global - This option can be used to set highlighting mode for various - occasions. It is a comma separated list of character pairs. The - first character in a pair gives the occasion, the second the mode to - use for that occasion. The occasions are: - |hl-SpecialKey| 8 Meta and special keys listed with ":map" - |hl-EndOfBuffer| ~ lines after the last line in the buffer - |hl-TermCursor| z Cursor in a focused terminal - |hl-TermCursorNC| Z Cursor in an unfocused terminal - |hl-NonText| @ '@' at the end of the window and - characters from 'showbreak' - |hl-Directory| d directories in CTRL-D listing and other special - things in listings - |hl-ErrorMsg| e error messages - |hl-IncSearch| i 'incsearch' highlighting - |hl-Search| l last search pattern highlighting (see 'hlsearch') - |hl-MoreMsg| m |more-prompt| - |hl-ModeMsg| M Mode (e.g., "-- INSERT --") - |hl-LineNr| n line number for ":number" and ":#" commands, and - when 'number' or 'relativenumber' option is set. - |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is - set. - |hl-Question| r |hit-enter| prompt and yes/no questions - |hl-StatusLine| s status line of current window |status-line| - |hl-StatusLineNC| S status lines of not-current windows - |hl-Title| t Titles for output from ":set all", ":autocmd" etc. - |hl-VertSplit| c column used to separate vertically split windows - |hl-Visual| v Visual mode - |hl-WarningMsg| w warning messages - |hl-WildMenu| W wildcard matches displayed for 'wildmenu' - |hl-Folded| f line used for closed folds - |hl-FoldColumn| F 'foldcolumn' - |hl-DiffAdd| A added line in diff mode - |hl-DiffChange| C changed line in diff mode - |hl-DiffDelete| D deleted line in diff mode - |hl-DiffText| T inserted text in diff mode - |hl-SignColumn| > column used for |signs| - |hl-SpellBad| B misspelled word |spell| - |hl-SpellCap| P word that should start with capital |spell| - |hl-SpellRare| R rare word |spell| - |hl-SpellLocal| L word from other region |spell| - |hl-Conceal| - the placeholders used for concealed characters - (see 'conceallevel') - |hl-Pmenu| + popup menu normal line - |hl-PmenuSel| = popup menu normal line - |hl-PmenuSbar| x popup menu scrollbar - |hl-PmenuThumb| X popup menu scrollbar thumb - - The display modes are: - r reverse (termcap entry "mr" and "me") - i italic (termcap entry "ZH" and "ZR") - b bold (termcap entry "md" and "me") - s standout (termcap entry "so" and "se") - u underline (termcap entry "us" and "ue") - c undercurl (termcap entry "Cs" and "Ce") - n no highlighting - - no highlighting - : use a highlight group - The default is used for occasions that are not included. - When using the ':' display mode, this must be followed by the name of - a highlight group. A highlight group can be used to define any type - of highlighting, including using color. See |:highlight| on how to - define one. The default uses a different group for each occasion. - See |highlight-default| for the default highlight groups. - - *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* -'hlsearch' 'hls' boolean (default on) - global - {not available when compiled without the - |+extra_search| feature} - When there is a previous search pattern, highlight all its matches. - The type of highlighting used can be set with the 'l' occasion in the - 'highlight' option. This uses the "Search" highlight group by - default. Note that only the matching text is highlighted, any offsets - are not applied. - See also: 'incsearch' and |:match|. - When you get bored looking at the highlighted matches, you can turn it - off with |:nohlsearch|. This does not change the option value, as - soon as you use a search command, the highlighting comes back. - 'redrawtime' specifies the maximum time spent on finding matches. - When the search pattern can match an end-of-line, Vim will try to - highlight all of the matched text. However, this depends on where the - search starts. This will be the first line in the window or the first - line below a closed fold. A match in a previous line which is not - drawn may not continue in a newly drawn line. - You can specify whether the highlight status is restored on startup - with the 'h' flag in 'shada' |shada-h|. - *'history'* *'hi'* 'history' 'hi' number (Vim default: 10000, Vi default: 0) global @@ -3378,11 +3069,28 @@ A jump table for the options with a short description can be found at |Q_op|. This is useful if you have a non-Hebrew keyboard. See |rileft.txt|. + *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* +'hlsearch' 'hls' boolean (default on) + global + When there is a previous search pattern, highlight all its matches. + The |hl-Search| highlight group determines the highlighting. Note that + only the matching text is highlighted, any offsets are not applied. + See also: 'incsearch' and |:match|. + When you get bored looking at the highlighted matches, you can turn it + off with |:nohlsearch|. This does not change the option value, as + soon as you use a search command, the highlighting comes back. + 'redrawtime' specifies the maximum time spent on finding matches. + When the search pattern can match an end-of-line, Vim will try to + highlight all of the matched text. However, this depends on where the + search starts. This will be the first line in the window or the first + line below a closed fold. A match in a previous line which is not + drawn may not continue in a newly drawn line. + You can specify whether the highlight status is restored on startup + with the 'h' flag in 'shada' |shada-h|. + *'icon'* *'noicon'* 'icon' boolean (default off, on when title can be restored) global - {not available when compiled without the |+title| - feature} When on, the icon text of the window will be set to the value of 'iconstring' (if it is not empty), or to the name of the file currently being edited. Only the last part of the name is used. @@ -3392,15 +3100,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'iconstring'* 'iconstring' string (default "") global - {not available when compiled without the |+title| - feature} When this option is not empty, it will be used for the icon text of the window. This happens only when the 'icon' option is on. Only works if the terminal supports setting window icon text When this option contains printf-style '%' items, they will be expanded according to the rules used for 'statusline'. See 'titlestring' for example settings. - {not available when compiled without the |+statusline| feature} *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 'ignorecase' 'ic' boolean (default off) @@ -3411,17 +3116,9 @@ A jump table for the options with a short description can be found at |Q_op|. Can be overruled by using "\c" or "\C" in the pattern, see |/ignorecase|. - *'imactivatefunc'* *'imaf'* -'imactivatefunc' 'imaf' Removed. |vim-differences| {Nvim} - - *'imactivatekey'* *'imak'* -'imactivatekey' 'imak' Removed. |vim-differences| {Nvim} - *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'* 'imcmdline' 'imc' boolean (default off) global - {only available when compiled with the |+xim|, - |+multi_byte_ime| or |global-ime| features} When set the Input Method is always on when starting to edit a command line, unless entering a search pattern (see 'imsearch' for that). Setting this option is useful when your input method allows entering @@ -3431,8 +3128,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'imdisable'* *'imd'* *'noimdisable'* *'noimd'* 'imdisable' 'imd' boolean (default off, on for some systems (SGI)) global - {only available when compiled with the |+xim|, - |+multi_byte_ime| or |global-ime| features} When set the Input Method is never used. This is useful to disable the IM when it doesn't work properly. Currently this option is on by default for SGI/IRIX machines. This @@ -3473,14 +3168,21 @@ A jump table for the options with a short description can be found at |Q_op|. The value is set to 1 when it is not -1 and setting the 'keymap' option to a valid keymap name. - *'imstatusfunc'* *'imsf'* -'imstatusfunc' 'imsf' Removed. |vim-differences| {Nvim} + *'inccommand'* *'icm'* +'inccommand' 'icm' string (default "") + global + + "nosplit": Shows the effects of a command incrementally, as you type. + "split" : Also shows partial off-screen results in a preview window. + + Works for |:substitute|, |:smagic|, |:snomagic|. |hl-Substitute| + + If the preview is too slow (exceeds 'redrawtime') then 'inccommand' is + automatically disabled until |Command-line-mode| is done. *'include'* *'inc'* 'include' 'inc' string (default "^\s*#\s*include") global or local to buffer |global-local| - {not available when compiled without the - |+find_in_path| feature} Pattern to be used to find an include command. It is a search pattern, just like for the "/" command (See |pattern|). The default value is for C programs. This option is used for the commands "[i", @@ -3496,8 +3198,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'includeexpr'* *'inex'* 'includeexpr' 'inex' string (default "") local to buffer - {not available when compiled without the - |+find_in_path| or |+eval| features} Expression to be used to transform the string found with the 'include' option to a file name. Mostly useful to change "." to "/" for Java: > :set includeexpr=substitute(v:fname,'\\.','/','g') @@ -3520,15 +3220,27 @@ A jump table for the options with a short description can be found at |Q_op|. so far, matches. The matched string is highlighted. If the pattern is invalid or not found, nothing is shown. The screen will be updated often, this is only useful on fast terminals. - Note that the match will be shown, but the cursor will return to its +< Note that the match will be shown, but the cursor will return to its original position when no match is found and when pressing <Esc>. You still need to finish the search command with <Enter> to move the cursor to the match. + You can use the CTRL-G and CTRL-T keys to move to the next and + previous match. |c_CTRL-G| |c_CTRL-T| Vim only searches for about half a second. With a complicated pattern and/or a lot of text the match may not be found. This is to avoid that Vim hangs while you are typing the pattern. - The highlighting can be set with the 'i' flag in 'highlight'. - See also: 'hlsearch'. + The |hl-IncSearch| highlight group determines the highlighting. + When 'hlsearch' is on, all matched strings are highlighted too while + typing a search command. See also: 'hlsearch'. + If you don't want to turn 'hlsearch' on, but want to highlight all + matches while searching, you can turn on and off 'hlsearch' with + autocmd. Example: > + augroup vimrc-incsearch-highlight + autocmd! + autocmd CmdlineEnter /,\? :set hlsearch + autocmd CmdlineLeave /,\? :set nohlsearch + augroup END +< CTRL-L can be used to add one character from after the current match to the command line. If 'ignorecase' and 'smartcase' are set and the command line has no uppercase characters, the added character is @@ -3597,7 +3309,7 @@ A jump table for the options with a short description can be found at |Q_op|. if you want to use Vim as a modeless editor. These Insert mode commands will be useful: - Use the cursor keys to move around. - - Use CTRL-O to execute one Normal mode command |i_CTRL-O|). When + - Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When this is a mapping, it is executed as if 'insertmode' was off. Normal mode remains active until the mapping is finished. - Use CTRL-L to execute a number of Normal mode commands, then use @@ -3675,7 +3387,7 @@ A jump table for the options with a short description can be found at |Q_op|. Identifiers are used in recognizing environment variables and after a match of the 'define' option. It is also used for "\i" in a |pattern|. See 'isfname' for a description of the format of this - option. + option. For '@' only characters up to 255 are used. Careful: If you change this option, it might break expanding environment variables. E.g., when '/' is included and Vim tries to expand "$HOME/.local/share/nvim/shada/main.shada". Maybe you should @@ -3687,8 +3399,9 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer Keywords are used in searching and recognizing with many commands: "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See - 'isfname' for a description of the format of this option. For C - programs you could use "a-z,A-Z,48-57,_,.,-,>". + 'isfname' for a description of the format of this option. For '@' + characters above 255 check the "word" character class. + For C programs you could use "a-z,A-Z,48-57,_,.,-,>". For a help file it is set to all non-blank printable characters except '*', '"' and '|' (so that CTRL-] on a command finds the help for that command). @@ -3712,7 +3425,7 @@ A jump table for the options with a short description can be found at |Q_op|. 128 - 159 "~@" - "~_" 160 - 254 "| " - "|~" 255 "~?" - When 'encoding' is a Unicode one, illegal bytes from 128 to 255 are + Illegal bytes from 128 to 255 (invalid UTF-8) are displayed as <xx>, with the hexadecimal value of the byte. When 'display' contains "uhex" all unprintable characters are displayed as <xx>. @@ -3732,14 +3445,9 @@ A jump table for the options with a short description can be found at |Q_op|. Insert two spaces after a '.', '?' and '!' with a join command. Otherwise only one space is inserted. - *'key'* -'key' Removed. |vim-differences| {Nvim} - *'keymap'* *'kmp'* *E544* 'keymap' 'kmp' string (default "") local to buffer - {only available when compiled with the |+keymap| - feature} Name of a keyboard mapping. See |mbyte-keymap|. Setting this option to a valid keymap name has the side effect of setting 'iminsert' to one, so that the keymap becomes effective. @@ -3767,7 +3475,7 @@ A jump table for the options with a short description can be found at |Q_op|. help. (Note that previously setting the global option to the empty value did this, which is now deprecated.) When the first character is ":", the command is invoked as a Vim - command prefixed with [count]. {Nvim} + command prefixed with [count]. When "man" or "man -s" is used, Vim will automatically translate a [count] for the "K" command to a section number. See |option-backslash| about including spaces and backslashes. @@ -3780,8 +3488,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'langmap'* *'lmap'* *E357* *E358* 'langmap' 'lmap' string (default "") global - {only available when compiled with the |+langmap| - feature} This option allows switching your keyboard into a special language mode. When you are typing text in Insert mode the characters are inserted directly. When in Normal mode the 'langmap' option takes @@ -3790,6 +3496,8 @@ A jump table for the options with a short description can be found at |Q_op|. be able to execute Normal mode commands. This is the opposite of the 'keymap' option, where characters are mapped in Insert mode. + Also consider resetting 'langremap' to avoid 'langmap' applies to + characters resulting from a mapping. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -3823,8 +3531,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'langmenu'* *'lm'* 'langmenu' 'lm' string (default "") global - {only available when compiled with the |+menu| and - |+multi_lang| features} Language to use for menu translation. Tells which file is loaded from the "lang" directory in 'runtimepath': > "lang/menu_" . &langmenu . ".vim" @@ -3844,12 +3550,12 @@ A jump table for the options with a short description can be found at |Q_op|. :source $VIMRUNTIME/menu.vim < Warning: This deletes all menus that you defined yourself! - *'langnoremap'* *'lnr'* -'langnoremap' 'lnr' boolean (default on) + *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'* +'langremap' 'lrm' boolean (default off) global - When on, setting 'langmap' does not apply to characters resulting from + When off, setting 'langmap' does not apply to characters resulting from a mapping. If setting 'langmap' disables some of your mappings, make - sure this option is set. + sure this option is off. *'laststatus'* *'ls'* 'laststatus' 'ls' number (default 2) @@ -3873,8 +3579,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 'linebreak' 'lbr' boolean (default off) local to window - {not available when compiled without the |+linebreak| - feature} If on, Vim will wrap long lines at a character in 'breakat' rather than at the last character that fits on the screen. Unlike 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, @@ -3898,12 +3602,9 @@ A jump table for the options with a short description can be found at |Q_op|. use this command to get the tallest window possible: > :set lines=999 < Minimum value is 2, maximum value is 1000. - If you get less lines than expected, check the 'guiheadroom' option. - When you set this option and Vim is unable to change the physical - number of lines of the display, the display may be messed up. *'linespace'* *'lsp'* -'linespace' 'lsp' number (default 0, 1 for Win32 GUI) +'linespace' 'lsp' number (default 0) global {only in the GUI} Number of pixel lines inserted between characters. Useful if the font @@ -3917,8 +3618,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'lisp'* *'nolisp'* 'lisp' boolean (default off) local to buffer - {not available when compiled without the |+lispindent| - feature} Lisp mode: When <Enter> is typed in insert mode set the indent for the next line to Lisp standards (well, sort of). Also happens with "cc" or "S". 'autoindent' must also be on for this to work. The 'p' @@ -3932,8 +3631,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'lispwords'* *'lw'* 'lispwords' 'lw' string (default is very long) global or local to buffer |global-local| - {not available when compiled without the |+lispindent| - feature} Comma separated list of words that influence the Lisp indenting. |'lisp'| @@ -3959,6 +3656,7 @@ A jump table for the options with a short description can be found at |Q_op|. global Strings to use in 'list' mode and for the |:list| command. It is a comma separated list of string settings. + *lcs-eol* eol:c Character to show at the end of each line. When omitted, there is no extra character at the end of the @@ -3993,16 +3691,14 @@ A jump table for the options with a short description can be found at |Q_op|. omitted. The characters ':' and ',' should not be used. UTF-8 characters can - be used when 'encoding' is "utf-8", otherwise only printable - characters are allowed. All characters must be single width. + be used. All characters must be single width. Examples: > :set lcs=tab:>-,trail:- :set lcs=tab:>-,eol:<,nbsp:% :set lcs=extends:>,precedes:< -< The "NonText" highlighting will be used for "eol", "extends" and - "precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail". - |hl-NonText| |hl-SpecialKey| +< |hl-NonText| highlighting will be used for "eol", "extends" and + "precedes". |hl-Whitespace| for "nbsp", "space", "tab" and "trail". *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'* 'loadplugins' 'lpl' boolean (default on) @@ -4013,24 +3709,20 @@ A jump table for the options with a short description can be found at |Q_op|. Note that using the "-u NONE" and "--noplugin" command line arguments reset this option. |-u| |--noplugin| - *'macatsui'* *'nomacatsui'* -'macatsui' Removed. |vim-differences| {Nvim} - *'magic'* *'nomagic'* 'magic' boolean (default on) global Changes the special characters that can be used in search patterns. See |pattern|. - NOTE: To avoid portability problems with using patterns, always keep - this option at the default "on". Only switch it off when working with - old Vi scripts. In any other situation write patterns that work when - 'magic' is on. Include "\M" when you want to |/\M|. + WARNING: Switching this option off most likely breaks plugins! That + is because many patterns assume it's on and will fail when it's off. + Only switch it off when working with old Vi scripts. In any other + situation write patterns that work when 'magic' is on. Include "\M" + when you want to |/\M|. *'makeef'* *'mef'* 'makeef' 'mef' string (default: "") global - {not available when compiled without the |+quickfix| - feature} Name of the errorfile for the |:make| command (see |:make_makeprg|) and the |:grep| command. When it is empty, an internally generated temp file will be used. @@ -4043,6 +3735,20 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'makeencoding'* *'menc'* +'makeencoding' 'menc' string (default "") + global or local to buffer |global-local| + Encoding used for reading the output of external commands. When empty, + encoding is not converted. + This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, + `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, + and `:laddfile`. + + This would be mostly useful when you use MS-Windows. If |+iconv| is + enabled and GNU libiconv is used, setting 'makeencoding' to "char" has + the same effect as setting to the system locale encoding. Example: > + :set makeencoding=char " system locale is used +< *'makeprg'* *'mp'* 'makeprg' 'mp' string (default "make") global or local to buffer |global-local| @@ -4079,7 +3785,7 @@ A jump table for the options with a short description can be found at |Q_op|. :au FileType c,cpp,java set mps+==:; < For a more advanced way of using "%", see the matchit.vim plugin in - the $VIMRUNTIME/macros directory. |add-local-help| + the $VIMRUNTIME/plugin directory. |add-local-help| *'matchtime'* *'mat'* 'matchtime' 'mat' number (default 5) @@ -4089,27 +3795,20 @@ A jump table for the options with a short description can be found at |Q_op|. set a time. This is to be compatible with Nvi. *'maxcombine'* *'mco'* -'maxcombine' 'mco' number (default 2) - global - {only available when compiled with the |+multi_byte| - feature} - The maximum number of combining characters supported for displaying. - Only used when 'encoding' is "utf-8". - The default is OK for most languages. Hebrew may require 4. - Maximum value is 6. - Even when this option is set to 2 you can still edit text with more - combining characters, you just can't see them. Use |g8| or |ga|. - See |mbyte-combining|. +'maxcombine' 'mco' Removed. |vim-differences| + Nvim always displays up to 6 combining characters. You can still edit + text with more than 6 combining characters, you just can't see them. + Use |g8| or |ga|. See |mbyte-combining|. *'maxfuncdepth'* *'mfd'* 'maxfuncdepth' 'mfd' number (default 100) global - {not available when compiled without the |+eval| - feature} Maximum depth of function calls for user functions. This normally catches endless recursion. When using a recursive function with more depth, set 'maxfuncdepth' to a bigger number. But this will use more memory, there is the danger of failing when memory is exhausted. + Increasing this limit above 200 also changes the maximum for Ex + command recursion, see |E169|. See also |:function|. *'maxmapdepth'* *'mmd'* *E223* @@ -4121,16 +3820,6 @@ A jump table for the options with a short description can be found at |Q_op|. because the 'w' is used before the next mapping is done. See also |key-mapping|. - *'maxmem'* *'mm'* -'maxmem' 'mm' number (default between 256 to 5120 (system - dependent) or half the amount of memory - available) - global - Maximum amount of memory (in Kbyte) to use for one buffer. When this - limit is reached allocating extra memory for a buffer will cause - other memory to be freed. The maximum usable value is about 2000000. - Use this to work without a limit. Also see 'maxmemtot'. - *'maxmempattern'* *'mmp'* 'maxmempattern' 'mmp' number (default 1000) global @@ -4142,27 +3831,14 @@ A jump table for the options with a short description can be found at |Q_op|. Running into the limit often means that the pattern is very inefficient or too complex. This may already happen with the pattern "\(.\)*" on a very long line. ".*" works much better. - Vim may run out of memory before hitting the 'maxmempattern' limit. - - *'maxmemtot'* *'mmt'* -'maxmemtot' 'mmt' number (default between 2048 and 10240 (system - dependent) or half the amount of memory - available) - global - Maximum amount of memory in Kbyte to use for all buffers together. - The maximum usable value is about 2000000 (2 Gbyte). Use this to work - without a limit. - On 64 bit machines higher values might work. But hey, do you really - need more than 2 Gbyte for text editing? Keep in mind that text is - stored in the swap file, one can edit files > 2 Gbyte anyway. We do - need the memory to store undo info. - Also see 'maxmem'. + Might also happen on redraw, when syntax rules try to match a complex + text structure. + Vim may run out of memory before hitting the 'maxmempattern' limit, in + which case you get an "Out of memory" error instead. *'menuitems'* *'mis'* 'menuitems' 'mis' number (default 25) global - {not available when compiled without the |+menu| - feature} Maximum number of items to use in a menu. Used for menus that are generated from a list of items, e.g., the Buffers menu. Changing this option has no direct effect, the menu must be refreshed first. @@ -4170,8 +3846,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'mkspellmem'* *'msm'* 'mkspellmem' 'msm' string (default "460000,2000,500") global - {not available when compiled without the |+syntax| - feature} Parameters for |:mkspell|. This tunes when to start compressing the word tree. Compression can be slow when there are many words, but it's needed to avoid running out of memory. The amount of memory used @@ -4221,7 +3895,7 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer When off the buffer contents cannot be changed. The 'fileformat' and 'fileencoding' options also can't be changed. - Can be reset with the |-M| command line argument. + Can be reset on startup with the |-M| command line argument. *'modified'* *'mod'* *'nomodified'* *'nomod'* 'modified' 'mod' boolean (default off) @@ -4245,6 +3919,8 @@ A jump table for the options with a short description can be found at |Q_op|. an explanation. When 'buftype' is "nowrite" or "nofile" this option may be set, but will be ignored. + Note that the text may actually be the same, e.g. 'modified' is set + when using "rA" on an "A". *'more'* *'nomore'* 'more' boolean (Vim default: on, Vi default: off) @@ -4254,12 +3930,17 @@ A jump table for the options with a short description can be found at |Q_op|. listing continues until finished. *'mouse'* *E538* -'mouse' string (default "a") +'mouse' string (default "") global - Enable the use of the mouse. Only works for certain terminals. - For using the mouse in the GUI, see |gui-mouse|. The mouse can be - enabled for different modes: + Enables mouse support. For example, to enable the mouse in Normal mode + and Visual mode: > + :set mouse=nv +< + To temporarily disable mouse support, hold the shift key while using + the mouse. + + Mouse support can be enabled for different modes: n Normal mode v Visual mode i Insert mode @@ -4267,17 +3948,42 @@ A jump table for the options with a short description can be found at |Q_op|. h all previous modes when editing a help file a all previous modes r for |hit-enter| and |more-prompt| prompt - Normally you would enable the mouse in all four modes with: > - :set mouse=a -< When the mouse is not enabled, the GUI will still use the mouse for - modeless selection. This doesn't move the text cursor. - See |mouse-using|. Also see |'clipboard'|. + Left-click anywhere in a text buffer to place the cursor there. This + works with operators too, e.g. type |d| then left-click to delete text + from the current cursor position to the position where you clicked. + + Drag the |status-line| or vertical separator of a window to resize it. + + If enabled for "v" (Visual mode) then double-click selects word-wise, + triple-click makes it line-wise, and quadruple-click makes it + rectangular block-wise. + + For scrolling with a mouse wheel see |scroll-mouse-wheel|. Note: When enabling the mouse in a terminal, copy/paste will use the - "* register if there is access to an X-server. The xterm handling of - the mouse buttons can still be used by keeping the shift key pressed. - Also see the 'clipboard' option. + "* register if possible. See also 'clipboard'. + + Related options: + 'mousefocus' window focus follows mouse pointer + 'mousemodel' what mouse button does which action + 'mousehide' hide mouse pointer while typing text + 'selectmode' whether to start Select mode or Visual mode + + The :behave command provides some "profiles" for mouse behavior. + *:behave* *:be* + :be[have] {model} Set behavior for mouse and selection. Valid + arguments are: + mswin MS-Windows behavior + xterm Xterm behavior + + Using ":behave" changes these options: + option mswin xterm ~ + 'selectmode' "mouse,key" "" + 'mousemodel' "popup" "extend" + 'keymodel' "startsel,stopsel" "" + 'selection' "exclusive" "inclusive" + *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'* 'mousefocus' 'mousef' boolean (default off) @@ -4297,7 +4003,7 @@ A jump table for the options with a short description can be found at |Q_op|. The mouse pointer is restored when the mouse is moved. *'mousemodel'* *'mousem'* -'mousemodel' 'mousem' string (default "extend", "popup" for Windows) +'mousemodel' 'mousem' string (default "extend") global Sets the model to use for the mouse. The name mostly specifies what the right mouse button is used for: @@ -4324,10 +4030,30 @@ A jump table for the options with a short description can be found at |Q_op|. In the "popup" model the right mouse button produces a pop-up menu. You need to define this first, see |popup-menu|. + In a terminal the popup menu works if Vim is compiled with the + |+insert_expand| option. Note that you can further refine the meaning of buttons with mappings. - See |gui-mouse-mapping|. But mappings are NOT used for modeless - selection (because that's handled in the GUI code directly). + See |mouse-overview|. But mappings are NOT used for modeless selection. + + Example: > + :map <S-LeftMouse> <RightMouse> + :map <S-LeftDrag> <RightDrag> + :map <S-LeftRelease> <RightRelease> + :map <2-S-LeftMouse> <2-RightMouse> + :map <2-S-LeftDrag> <2-RightDrag> + :map <2-S-LeftRelease> <2-RightRelease> + :map <3-S-LeftMouse> <3-RightMouse> + :map <3-S-LeftDrag> <3-RightDrag> + :map <3-S-LeftRelease> <3-RightRelease> + :map <4-S-LeftMouse> <4-RightMouse> + :map <4-S-LeftDrag> <4-RightDrag> + :map <4-S-LeftRelease> <4-RightRelease> +< + Mouse commands requiring the CTRL modifier can be simulated by typing + the "g" key before using the mouse: + "g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click) + "g<RightMouse>" is "<C-RightMouse> ("CTRL-T") The 'mousemodel' option is set by the |:behave| command. @@ -4335,8 +4061,6 @@ A jump table for the options with a short description can be found at |Q_op|. 'mouseshape' 'mouses' string (default "i:beam,r:beam,s:updown,sd:cross, m:no,ml:up-arrow,v:rightup-arrow") global - {only available when compiled with the |+mouseshape| - feature} This option tells Vim what the mouse pointer should look like in different modes. The option is a comma separated list of parts, much like used for 'guicursor'. Each part consist of a mode/location-list @@ -4399,9 +4123,8 @@ A jump table for the options with a short description can be found at |Q_op|. *'mousetime'* *'mouset'* 'mousetime' 'mouset' number (default 500) global - Only for GUI, Windows and Unix with xterm. Defines the maximum - time in msec between two mouse clicks for the second click to be - recognized as a multi click. + Defines the maximum time in msec between two mouse clicks for the + second click to be recognized as a multi click. *'nrformats'* *'nf'* 'nrformats' 'nf' string (default "bin,hex") @@ -4411,7 +4134,7 @@ A jump table for the options with a short description can be found at |Q_op|. respectively; see |CTRL-A| for more info on these commands. alpha If included, single alphabetical characters will be incremented or decremented. This is useful for a list with a - letter index a), b), etc. *octal-nrformats* + letter index a), b), etc. *octal-nrformats* octal If included, numbers that start with a zero will be considered to be octal. Example: Using CTRL-A on "007" results in "010". hex If included, numbers starting with "0x" or "0X" will be @@ -4430,18 +4153,17 @@ A jump table for the options with a short description can be found at |Q_op|. Print the line number in front of each line. When the 'n' option is excluded from 'cpoptions' a wrapped line will not use the column of line numbers. - The 'numberwidth' option can be used to set the room used for the line - number. + Use the 'numberwidth' option to adjust the room for the line number. When a long, wrapped line doesn't start with the first character, '-' characters are put before the number. - See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for - the number. + For highlighting see |hl-LineNr|, |hl-CursorLineNr|, and the + |:sign-define| "numhl" argument. *number_relativenumber* The 'relativenumber' option changes the displayed number to be relative to the cursor. Together with 'number' there are these four combinations (cursor in line 3): - 'nonu' 'nu' 'nonu' 'nu' + 'nonu' 'nu' 'nonu' 'nu' 'nornu' 'nornu' 'rnu' 'rnu' |apple | 1 apple | 2 apple | 2 apple @@ -4452,8 +4174,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'numberwidth'* *'nuw'* 'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8) local to window - {only available when compiled with the |+linebreak| - feature} Minimal number of columns to use for the line number. Only relevant when the 'number' or 'relativenumber' option is set or printing lines with a line number. Since one space is always between the number and @@ -4468,8 +4188,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'omnifunc'* *'ofu'* 'omnifunc' 'ofu' string (default: empty) local to buffer - {not available when compiled without the |+eval| - or |+insert_expand| features} This option specifies a function to be used for Insert mode omni completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| See |complete-functions| for an explanation of how the function is @@ -4502,7 +4220,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'packpath'* *'pp'* 'packpath' 'pp' string (default: see 'runtimepath') - {not in Vi} Directories used to find packages. See |packages|. @@ -4515,7 +4232,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'paste'* *'nopaste'* 'paste' boolean (default off) global - You probably don't have to set this option: |bracketed-paste-mode|. + This option is obsolete; |bracketed-paste-mode| is built-in. Put Vim in Paste mode. This is useful if you want to cut or copy some text from one window and paste it in Vim. This will avoid @@ -4579,7 +4296,8 @@ A jump table for the options with a short description can be found at |Q_op|. Note that typing <F10> in paste mode inserts "<F10>", since in paste mode everything is inserted literally, except the 'pastetoggle' key sequence. - When the value has several bytes 'ttimeoutlen' applies. + No timeout is used, this means that a multi-key 'pastetoggle' can not + be triggered manually. *'pex'* *'patchexpr'* 'patchexpr' 'pex' string (default "") @@ -4596,11 +4314,11 @@ A jump table for the options with a short description can be found at |Q_op|. copy of the original file will be kept. The name of the copy is the name of the original file with the string in the 'patchmode' option appended. This option should start with a dot. Use a string like - ".org". 'backupdir' must not be empty for this to work (Detail: The - backup file is renamed to the patchmode file after the new file has - been successfully written, that's why it must be possible to write a - backup file). If there was no file to be backed up, an empty file is - created. + ".orig" or ".org". 'backupdir' must not be empty for this to work + (Detail: The backup file is renamed to the patchmode file after the + new file has been successfully written, that's why it must be possible + to write a backup file). If there was no file to be backed up, an + empty file is created. When the 'backupskip' pattern matches, a patchmode file is not made. Using 'patchmode' for compressed files appends the extension at the end (e.g., "file.gz.orig"), thus the resulting name isn't always @@ -4636,7 +4354,6 @@ A jump table for the options with a short description can be found at |Q_op|. "http://www.vim.org" will make ":find index.html" work. - Search upwards and downwards in a directory tree using "*", "**" and ";". See |file-searching| for info and syntax. - {not available when compiled without the |+path_extra| feature} - Careful with '\' characters, type two to get one in the option: > :set path=.,c:\\include < Or just use '/' instead: > @@ -4679,8 +4396,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'previewheight'* *'pvh'* 'previewheight' 'pvh' number (default 12) global - {not available when compiled without the |+windows| or - |+quickfix| features} Default height for a preview window. Used for |:ptag| and associated commands. Used for |CTRL-W_}| when no count is given. @@ -4688,8 +4403,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'pvw'* *'nopvw'* *E590* 'previewwindow' 'pvw' boolean (default off) local to window - {not available when compiled without the |+windows| or - |+quickfix| features} Identifies the preview window. Only one window can have this option set. It's normally not set directly, but by using one of the commands |:ptag|, |:pedit|, etc. @@ -4697,65 +4410,52 @@ A jump table for the options with a short description can be found at |Q_op|. *'printdevice'* *'pdev'* 'printdevice' 'pdev' string (default empty) global - {only available when compiled with the |+printer| - feature} The name of the printer to be used for |:hardcopy|. See |pdev-option|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'printencoding'* *'penc'* -'printencoding' 'penc' String (default empty, except for some systems) +'printencoding' 'penc' string (default empty, except for some systems) global - {only available when compiled with the |+printer| - and |+postscript| features} Sets the character encoding used when printing. See |penc-option|. *'printexpr'* *'pexpr'* -'printexpr' 'pexpr' String (default: see below) +'printexpr' 'pexpr' string (default: see below) global - {only available when compiled with the |+printer| - and |+postscript| features} Expression used to print the PostScript produced with |:hardcopy|. See |pexpr-option|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. *'printfont'* *'pfn'* 'printfont' 'pfn' string (default "courier") global - {only available when compiled with the |+printer| - feature} The name of the font that will be used for |:hardcopy|. See |pfn-option|. *'printheader'* *'pheader'* 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N") global - {only available when compiled with the |+printer| - feature} The format of the header produced in |:hardcopy| output. See |pheader-option|. *'printmbcharset'* *'pmbcs'* 'printmbcharset' 'pmbcs' string (default "") global - {only available when compiled with the |+printer|, - |+postscript| and |+multi_byte| features} The CJK character set to be used for CJK output from |:hardcopy|. See |pmbcs-option|. *'printmbfont'* *'pmbfn'* 'printmbfont' 'pmbfn' string (default "") global - {only available when compiled with the |+printer|, - |+postscript| and |+multi_byte| features} List of font names to be used for CJK output from |:hardcopy|. See |pmbfn-option|. *'printoptions'* *'popt'* 'printoptions' 'popt' string (default "") global - {only available when compiled with |+printer| feature} List of items that control the format of the output of |:hardcopy|. See |popt-option|. @@ -4767,12 +4467,34 @@ A jump table for the options with a short description can be found at |Q_op|. *'pumheight'* *'ph'* 'pumheight' 'ph' number (default 0) global - {not available when compiled without the - |+insert_expand| feature} Determines the maximum number of items to show in the popup menu for Insert mode completion. When zero as much space as available is used. |ins-completion-menu|. + *'pyxversion'* *'pyx'* +'pyxversion' 'pyx' number (default depends on the build) + global + Specifies the python version used for pyx* functions and commands + |python_x|. The default value is as follows: + + |provider| installed Default ~ + |+python| and |+python3| 0 + only |+python| 2 + only |+python3| 3 + + Available values are 0, 2 and 3. + If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of + any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3` + sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets + to 2 if Python 2 is available. + See also: |has-pythonx| + + If only |+python| or |+python3| are available, + 'pyxversion' has no effect. The pyx* functions and commands are + always the same as the installed version. + + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. *'quoteescape'* *'qe'* 'quoteescape' 'qe' string (default "\") @@ -4793,14 +4515,13 @@ A jump table for the options with a short description can be found at |Q_op|. buffer, unless the 'Z' flag is in 'cpoptions'. When using the ":view" command the 'readonly' option is set for the newly edited buffer. + See 'modifiable' for disallowing changes to the buffer. *'redrawtime'* *'rdt'* 'redrawtime' 'rdt' number (default 2000) global - {only available when compiled with the |+reltime| - feature} - The time in milliseconds for redrawing the display. This applies to - searching for patterns for 'hlsearch' and |:match| highlighting. + Time in milliseconds for redrawing the display. Applies to + 'hlsearch', 'inccommand' and |:match| highlighting. When redrawing takes more than this many milliseconds no further matches will be highlighted. This is used to avoid that Vim hangs when using a very complicated pattern. @@ -4860,9 +4581,6 @@ A jump table for the options with a short description can be found at |Q_op|. For the ":substitute" command the number of substitutions is used instead of the number of lines. - *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* -'restorescreen' 'rs' Removed. |vim-differences| {Nvim} - *'revins'* *'ri'* *'norevins'* *'nori'* 'revins' 'ri' boolean (default off) global @@ -4897,10 +4615,8 @@ A jump table for the options with a short description can be found at |Q_op|. The 'rightleft' option must be set for 'rightleftcmd' to take effect. *'ruler'* *'ru'* *'noruler'* *'noru'* -'ruler' 'ru' boolean (default off) +'ruler' 'ru' boolean (default on) global - {not available when compiled without the - |+cmdline_info| feature} Show the line and column number of the cursor position, separated by a comma. When there is room, the relative position of the displayed text in the file is shown on the far right: @@ -4927,8 +4643,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'rulerformat'* *'ruf'* 'rulerformat' 'ruf' string (default empty) global - {not available when compiled without the |+statusline| - feature} When this option is not empty, it determines the content of the ruler string, as displayed for the 'ruler' option. The format of this option is like that of 'statusline'. @@ -4970,6 +4684,7 @@ A jump table for the options with a short description can be found at |Q_op|. keymap/ key mapping files |mbyte-keymap| lang/ menu translations |:menutrans| menu.vim GUI menus |menu.vim| + pack/ packages |:packadd| plugin/ plugin scripts |write-plugin| print/ files for printing |postscript-print-encoding| spell/ spell checking files |spell| @@ -4996,6 +4711,10 @@ A jump table for the options with a short description can be found at |Q_op|. ordering. This is for preferences to overrule or add to the distributed defaults or system-wide settings (rarely needed). + More entries are added when using |packages|. If it gets very long + then `:set rtp` will be truncated, use `:echo &rtp` to see the full + string. + Note that, unlike 'path', no wildcards like "**" are allowed. Normal wildcards are allowed, but can significantly slow down searching for runtime files. For speed, use as few items as possible and avoid @@ -5012,6 +4731,8 @@ A jump table for the options with a short description can be found at |Q_op|. to find files which replace a distributed runtime files. You can put a directory after $VIMRUNTIME to find files which add to distributed runtime files. + When Vim is started with |--clean| the home directory entries are not + included. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -5024,11 +4745,19 @@ A jump table for the options with a short description can be found at |Q_op|. be used as the new value for 'scroll'. Reset to half the window height with ":set scroll=0". + *'scrollback'* *'scbk'* +'scrollback' 'scbk' number (default: 10000 + in normal buffers: -1) + local to buffer + Maximum number of lines kept beyond the visible screen. Lines at the + top are deleted if new lines exceed this limit. + Only in |terminal| buffers. + -1 means "unlimited" for normal buffers, 100000 otherwise. + Minimum is 1. + *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'* 'scrollbind' 'scb' boolean (default off) local to window - {not available when compiled without the |+scrollbind| - feature} See also |scroll-binding|. When this option is set, the current window scrolls as other scrollbind windows (windows that also have this option set) scroll. This option is useful for viewing the @@ -5062,8 +4791,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'scrollopt'* *'sbo'* 'scrollopt' 'sbo' string (default "ver,jump") global - {not available when compiled without the |+scrollbind| - feature} This is a comma-separated list of words that specifies how 'scrollbind' windows should behave. 'sbo' stands for ScrollBind Options. @@ -5127,6 +4854,8 @@ A jump table for the options with a short description can be found at |Q_op|. "inclusive" means that the last character of the selection is included in an operation. For example, when "x" is used to delete the selection. + When "old" is used and 'virtualedit' allows the cursor to move past + the end of line the line break still isn't included. Note that when "exclusive" is used and selecting from the end backwards, you cannot include the last character of a line, when starting in Normal mode and 'virtualedit' empty. @@ -5178,6 +4907,8 @@ A jump table for the options with a short description can be found at |Q_op|. tabpages all tab pages; without this only the current tab page is restored, so that you can make a session for each tab page separately + terminal include terminal windows where the command can be + restored unix with Unix end-of-line format (single <NL>), even when on Windows or DOS winpos position of the whole Vim window @@ -5250,8 +4981,8 @@ A jump table for the options with a short description can be found at |Q_op|. saved. When not included, the value of 'history' is used. *shada-c* c Dummy option, kept for compatibility reasons. Has no actual - effect. Current encoding state is described in - |shada-encoding|. + effect: ShaDa always uses UTF-8 and 'encoding' value is fixed + to UTF-8 as well. *shada-f* f Whether file marks need to be stored. If zero, file marks ('0 to '9, 'A to 'Z) are not stored. When not present or when @@ -5263,10 +4994,10 @@ A jump table for the options with a short description can be found at |Q_op|. has been used since the last search command. *shada-n* n Name of the shada file. The name must immediately follow - the 'n'. Must be the last one! If the "-i" argument was - given when starting Vim, that file name overrides the one - given here with 'shada'. Environment variables are expanded - when opening the file, not when setting the option. + the 'n'. Must be at the end of the option! If the "-i" + argument was given when starting Vim, that file name overrides + the one given here with 'shada'. Environment variables are + expanded when opening the file, not when setting the option. *shada-r* r Removable media. The argument is a string (up to the next ','). This parameter can be given several times. Each @@ -5345,17 +5076,19 @@ A jump table for the options with a short description can be found at |Q_op|. to escape quote: 'a\"b"' is the same as "a\b". Note that such processing is done after |:set| did its own round of unescaping, so to keep yourself sane use |:let-&| like shown above. + *shell-powershell* + To use powershell (on Windows): > + set shell=powershell shellquote=( shellpipe=\| shellredir=> shellxquote= + set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command - This option cannot be set from a |modeline| or in the |sandbox|, for +< This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'shellcmdflag'* *'shcf'* -'shellcmdflag' 'shcf' string (default: "-c"; - Windows, when 'shell' does not - contain "sh" somewhere: "/c") +'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/s /c") global Flag passed to the shell to execute "!" and ":!" commands; e.g., - "bash.exe -c ls" or "cmd.exe /c dir". For Windows + `bash.exe -c ls` or `cmd.exe /s /c "dir"`. For Windows systems, the default is set according to the value of 'shell', to reduce the need to set this option by the user. On Unix it can have more than one flag. Each white space separated @@ -5363,15 +5096,12 @@ A jump table for the options with a short description can be found at |Q_op|. See |option-backslash| about including spaces and backslashes. See |shell-unquoting| which talks about separating this option into multiple arguments. - Also see |dos-shell| for Windows. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'shellpipe'* *'sp'* 'shellpipe' 'sp' string (default ">", "| tee", "|& tee" or "2>&1| tee") global - {not available when compiled without the |+quickfix| - feature} String to be used to put the output of the ":make" command in the error file. See also |:make_makeprg|. See |option-backslash| about including spaces and backslashes. @@ -5413,7 +5143,7 @@ A jump table for the options with a short description can be found at |Q_op|. third-party shells on Windows systems, such as the MKS Korn Shell or bash, where it should be "\"". The default is adjusted according the value of 'shell', to reduce the need to set this option by the - user. See |dos-shell|. + user. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -5445,7 +5175,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'* 'shellslash' 'ssl' boolean (default off) global - {only for MSDOS and MS-Windows} + {only for Windows} When set, a forward slash is used when expanding file names. This is useful when a Unix-like shell is used instead of command.com or cmd.exe. Backward slashes can still be typed, but they are changed to @@ -5462,31 +5192,24 @@ A jump table for the options with a short description can be found at |Q_op|. global When on, use temp files for shell commands. When off use a pipe. When using a pipe is not possible temp files are used anyway. - Currently a pipe is only supported on Unix and MS-Windows 2K and - later. You can check it with: > - :if has("filterpipe") -< The advantage of using a pipe is that nobody can read the temp file + The advantage of using a pipe is that nobody can read the temp file and the 'shell' command does not need to support redirection. The advantage of using a temp file is that the file type and encoding can be detected. The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|, |FilterWritePost| autocommands event are not triggered when 'shelltemp' is off. + |system()| does not respect this option, it always uses pipes. *'shellxescape'* *'sxe'* -'shellxescape' 'sxe' string (default: ""; - for Windows: "\"&|<>()@^") +'shellxescape' 'sxe' string (default: "") global When 'shellxquote' is set to "(" then the characters listed in this option will be escaped with a '^' character. This makes it possible to execute most external commands with cmd.exe. *'shellxquote'* *'sxq'* -'shellxquote' 'sxq' string (default: ""; - for Win32, when 'shell' is cmd.exe: "(" - for Win32, when 'shell' contains "sh" - somewhere: "\"" - for Unix, when using system(): "\"") +'shellxquote' 'sxq' string (default: "", Windows: "\"") global Quoting character(s), put around the command passed to the shell, for the "!" and ":!" commands. Includes the redirection. See @@ -5495,12 +5218,6 @@ A jump table for the options with a short description can be found at |Q_op|. When the value is '(' then ')' is appended. When the value is '"(' then ')"' is appended. When the value is '(' then also see 'shellxescape'. - This is an empty string by default on most systems, but is known to be - useful for on Win32 version, either for cmd.exe which automatically - strips off the first and last quote on a command, or 3rd-party shells - such as the MKS Korn Shell or bash, where it should be "\"". The - default is adjusted according the value of 'shell', to reduce the need - to set this option by the user. See |dos-shell|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -5520,7 +5237,7 @@ A jump table for the options with a short description can be found at |Q_op|. function to get the effective shiftwidth value. *'shortmess'* *'shm'* -'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "") +'shortmess' 'shm' string (Vim default "filnxtToOF", Vi default: "") global This option helps to avoid all the |hit-enter| prompts caused by file messages, for example with CTRL-G, and to avoid some other messages. @@ -5570,14 +5287,9 @@ A jump table for the options with a short description can be found at |Q_op|. shm=a Abbreviation, but no loss of information. shm=at Abbreviation, and truncate message when necessary. - *'shortname'* *'sn'* *'noshortname'* *'nosn'* -'shortname' 'sn' Removed. |vim-differences| {Nvim} - *'showbreak'* *'sbr'* *E595* 'showbreak' 'sbr' string (default "") global - {not available when compiled without the |+linebreak| - feature} String to put at the start of lines that have been wrapped. Useful values are "> " or "+++ ": > :set showbreak=>\ @@ -5587,18 +5299,14 @@ A jump table for the options with a short description can be found at |Q_op|. < Only printable single-cell characters are allowed, excluding <Tab> and comma (in a future version the comma might be used to separate the part that is shown at the end and at the start of a line). - The characters are highlighted according to the '@' flag in - 'highlight'. + The |hl-NonText| highlight group determines the highlighting. Note that tabs after the showbreak will be displayed differently. If you want the 'showbreak' to appear in between line numbers, add the "n" flag to 'cpoptions'. *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* -'showcmd' 'sc' boolean (Vim default: on (off for Unix), - Vi default: off) +'showcmd' 'sc' boolean (Vim default: on, Vi default: off) global - {not available when compiled without the - |+cmdline_info| feature} Show (partial) command in the last line of the screen. Set this option off if your terminal is slow. In Visual mode the size of the selected area is shown: @@ -5646,16 +5354,11 @@ A jump table for the options with a short description can be found at |Q_op|. 'showmode' 'smd' boolean (Vim default: on, Vi default: off) global If in Insert, Replace or Visual mode put a message on the last line. - Use the 'M' flag in 'highlight' to set the type of highlighting for - this message. - When |XIM| may be used the message will include "XIM". But this - doesn't mean XIM is really active. + The |hl-ModeMsg| highlight group determines the highlighting. *'showtabline'* *'stal'* 'showtabline' 'stal' number (default 1) global - {not available when compiled without the |+windows| - feature} The value of this option specifies when the line with tab page labels will be displayed: 0: never @@ -5666,14 +5369,13 @@ A jump table for the options with a short description can be found at |Q_op|. See |tab-page| for more information about tab pages. *'sidescroll'* *'ss'* -'sidescroll' 'ss' number (default 0) +'sidescroll' 'ss' number (default 1) global The minimal number of columns to scroll horizontally. Used only when the 'wrap' option is off and the cursor is moved off of the screen. When it is zero the cursor will be put in the middle of the screen. - When using a slow terminal set it to a large number or 0. When using - a fast terminal use a small number or 1. Not used for "zh" and "zl" - commands. + When using a slow terminal set it to a large number or 0. Not used + for "zh" and "zl" commands. *'sidescrolloff'* *'siso'* 'sidescrolloff' 'siso' number (default 0) @@ -5689,10 +5391,18 @@ A jump table for the options with a short description can be found at |Q_op|. Example: Try this together with 'sidescroll' and 'listchars' as in the following example to never allow the cursor to move - onto the "extends" character: + onto the "extends" character: > :set nowrap sidescroll=1 listchars=extends:>,precedes:< :set sidescrolloff=1 +< + *'signcolumn'* *'scl'* +'signcolumn' 'scl' string (default "auto") + local to window + Whether or not to draw the signcolumn. Valid values are: + "auto" only when there is a sign to display + "no" never + "yes" always *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'* @@ -5708,8 +5418,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'smartindent'* *'si'* *'nosmartindent'* *'nosi'* 'smartindent' 'si' boolean (default off) local to buffer - {not available when compiled without the - |+smartindent| feature} Do smart autoindenting when starting a new line. Works for C-like programs, but can also be used for other languages. 'cindent' does something like this, works better in most cases, but is more strict, @@ -5769,16 +5477,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'spell'* *'nospell'* 'spell' boolean (default off) local to window - {not available when compiled without the |+syntax| - feature} When on spell checking will be done. See |spell|. The languages are specified with 'spelllang'. *'spellcapcheck'* *'spc'* 'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+") local to buffer - {not available when compiled without the |+syntax| - feature} Pattern to locate the end of a sentence. The following word will be checked to start with a capital letter. If not then it is highlighted with SpellCap |hl-SpellCap| (unless the word is also badly spelled). @@ -5792,8 +5496,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spellfile'* *'spf'* 'spellfile' 'spf' string (default empty) local to buffer - {not available when compiled without the |+syntax| - feature} Name of the word list file where words are added for the |zg| and |zw| commands. It must end in ".{encoding}.add". You need to include the path, otherwise the file is placed in the current directory. @@ -5818,8 +5520,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spelllang'* *'spl'* 'spelllang' 'spl' string (default "en") local to buffer - {not available when compiled without the |+syntax| - feature} A comma separated list of word list names. When the 'spell' option is on spellchecking will be done for these languages. Example: > set spelllang=en_us,nl,medical @@ -5843,9 +5543,6 @@ A jump table for the options with a short description can be found at |Q_op|. (_xx is an underscore, two letters and followed by a non-letter). This is mainly for testing purposes. You must make sure the correct encoding is used, Vim doesn't check it. - When 'encoding' is set the word lists are reloaded. Thus it's a good - idea to set 'spelllang' after setting 'encoding' to avoid loading the - files twice. How the related spell files are found is explained here: |spell-load|. If the |spellfile.vim| plugin is active and you use a language name @@ -5861,8 +5558,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spellsuggest'* *'sps'* 'spellsuggest' 'sps' string (default "best") global - {not available when compiled without the |+syntax| - feature} Methods used for spelling suggestions. Both for the |z=| command and the |spellsuggest()| function. This is a comma-separated list of items: @@ -5907,7 +5602,7 @@ A jump table for the options with a short description can be found at |Q_op|. word. The expression must evaluate to a List of Lists, each with a suggestion and a score. Example: - [['the', 33], ['that', 44]] + [['the', 33], ['that', 44]] ~ Set 'verbose' and use |z=| to see the scores that the internal methods use. A lower score is better. This may invoke |spellsuggest()| if you temporarily @@ -5926,8 +5621,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* 'splitbelow' 'sb' boolean (default off) global - {not available when compiled without the |+windows| - feature} When on, splitting a window will put the new window below the current one. |:split| @@ -5953,8 +5646,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'statusline'* *'stl'* *E540* *E542* 'statusline' 'stl' string (default empty) global or local to window |global-local| - {not available when compiled without the |+statusline| - feature} When nonempty, this option determines the content of the status line. Also see |status-line|. @@ -6101,7 +5792,7 @@ A jump table for the options with a short description can be found at |Q_op|. line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is currently being drawn. The expression will evaluate in this context. - The variable "actual_curbuf" is set to the 'bufnr()' number of the + The variable "g:actual_curbuf" is set to the `bufnr()` number of the real current buffer. The 'statusline' option will be evaluated in the |sandbox| if set from @@ -6159,8 +5850,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'suffixesadd'* *'sua'* 'suffixesadd' 'sua' string (default "") local to buffer - {not available when compiled without the - |+file_in_path| feature} Comma separated list of suffixes, which are used when searching for a file for the "gf", "[I", etc. commands. Example: > :set suffixesadd=.java @@ -6182,13 +5871,11 @@ A jump table for the options with a short description can be found at |Q_op|. Also see |swap-file|. If you want to open a new buffer without creating a swap file for it, use the |:noswapfile| modifier. + See 'directory' for where the swap file is created. This option is used together with 'bufhidden' and 'buftype' to specify special kinds of buffers. See |special-buffers|. - *'swapsync'* *'sws'* -'swapsync' 'sws' Removed. |vim-differences| {Nvim} - *'switchbuf'* *'swb'* 'switchbuf' 'swb' string (default "") global @@ -6213,8 +5900,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'synmaxcol'* *'smc'* 'synmaxcol' 'smc' number (default 3000) local to buffer - {not available when compiled without the |+syntax| - feature} Maximum column in which to search for syntax items. In long lines the text after this column is not highlighted and following lines may not be highlighted correctly, because the syntax state is cleared. @@ -6225,8 +5910,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'syntax'* *'syn'* 'syntax' 'syn' string (default empty) local to buffer - {not available when compiled without the |+syntax| - feature} When this option is set, the syntax with this name is loaded, unless syntax highlighting has been switched off with ":syntax off". Otherwise this option does not always reflect the current syntax (the @@ -6254,8 +5937,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'tabline'* *'tal'* 'tabline' 'tal' string (default empty) global - {not available when compiled without the |+windows| - feature} When nonempty, this option determines the content of the tab pages line at the top of the Vim window. When empty Vim will use a default tab pages line. See |setting-tabline| for more info. @@ -6277,8 +5958,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'tabpagemax'* *'tpm'* 'tabpagemax' 'tpm' number (default 50) global - {not available when compiled without the |+windows| - feature} Maximum number of tab pages to be opened by the |-p| command line argument or the ":tab all" command. |tabpage| @@ -6348,6 +6027,9 @@ A jump table for the options with a short description can be found at |Q_op|. By default, tag searches are case-sensitive. Case is ignored when 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is "ignore". + Also when 'tagcase' is "followscs" and 'smartcase' is set, or + 'tagcase' is "smart", and the pattern contains only lowercase + characters. When 'tagbsearch' is off, tags searching is slower when a full match exists, but faster when no full match exists. Tags in unsorted tags @@ -6361,12 +6043,13 @@ A jump table for the options with a short description can be found at |Q_op|. *'tagcase'* *'tc'* 'tagcase' 'tc' string (default "followic") global or local to buffer |global-local| - {not in Vi} This option specifies how case is handled when searching the tags file: followic Follow the 'ignorecase' option + followscs Follow the 'smartcase' and 'ignorecase' options ignore Ignore case match Match case + smart Ignore case unless an upper case letter is used *'taglength'* *'tl'* 'taglength' 'tl' number (default 0) @@ -6393,8 +6076,7 @@ A jump table for the options with a short description can be found at |Q_op|. a directory tree. See |file-searching|. E.g., "/lib/**/tags" will find all files named "tags" below "/lib". The filename itself cannot contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find - files called "tags?". {not available when compiled without the - |+path_extra| feature} + files called "tags?". The |tagfiles()| function can be used to get a list of the file names actually used. The use of |:set+=| and |:set-=| is preferred when adding or removing @@ -6412,9 +6094,6 @@ A jump table for the options with a short description can be found at |Q_op|. Resetting this option is useful when using a ":tag" command in a mapping which should not change the tagstack. - *'term'* *E529* *E530* *E531* -'term' Removed. |vim-differences| {Nvim} - *'termbidi'* *'tbidi'* *'notermbidi'* *'notbidi'* 'termbidi' 'tbidi' boolean (default off) @@ -6428,16 +6107,12 @@ A jump table for the options with a short description can be found at |Q_op|. 'arabicshape' is ignored, but 'rightleft' isn't changed automatically. For further details see |arabic.txt|. - *'termencoding'* *'tenc'* -'termencoding' 'tenc' Removed. |vim-differences| {Nvim} - *'termguicolors'* *'tgc'* 'termguicolors' 'tgc' boolean (default off) global When on, uses |highlight-guifg| and |highlight-guibg| attributes in the terminal (thus using 24-bit color). Requires a ISO-8613-3 compatible terminal. - Must be set at startup (in your |init.vim| or |--cmd|). *'terse'* *'noterse'* 'terse' boolean (default off) @@ -6468,7 +6143,7 @@ A jump table for the options with a short description can be found at |Q_op|. non-keyword characters (white space is preferred). Maximum line length is 510 bytes. To obtain a file to be used here, check out this ftp site: - [Sorry this link doesn't work anymore, do you know the right one?] + [Sorry this link doesn't work anymore, do you know the right one?] ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file. 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 @@ -6492,7 +6167,7 @@ A jump table for the options with a short description can be found at |Q_op|. for any key that can follow <c-f> in a mapping. *'ttimeout'* *'nottimeout'* -'ttimeout' boolean (default off) +'ttimeout' boolean (default on) global This option and 'ttimeoutlen' determine the behavior when part of a key code sequence has been received by the terminal UI. For example, @@ -6503,24 +6178,21 @@ A jump table for the options with a short description can be found at |Q_op|. *'timeoutlen'* *'tm'* 'timeoutlen' 'tm' number (default 1000) global - The time in milliseconds that is waited for a mapped sequence to - complete. + Time in milliseconds to wait for a mapped sequence to complete. *'ttimeoutlen'* *'ttm'* -'ttimeoutlen' 'ttm' number (default -1) +'ttimeoutlen' 'ttm' number (default 50) global - The time in milliseconds that is waited for a key code - sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G - when part of a command has been typed. + Time in milliseconds to wait for a key code sequence to complete. Also + used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has + been typed. *'title'* *'notitle'* -'title' boolean (default off, on when title can be restored) +'title' boolean (default off) global - {not available when compiled without the |+title| - feature} When on, the title of the window will be set to the value of 'titlestring' (if it is not empty), or to: - filename [+=-] (path) - VIM + filename [+=-] (path) - NVIM Where: filename the name of the file being edited - indicates the file cannot be modified, 'ma' off @@ -6528,17 +6200,11 @@ A jump table for the options with a short description can be found at |Q_op|. = indicates the file is read-only =+ indicates the file is read-only and modified (path) is the path of the file being edited - - VIM the server name |v:servername| or "VIM" - Only works if the terminal supports setting window titles - (currently Win32 console, all GUI versions and terminals with a non- - empty 't_ts' option - this is Unix xterm by default, where 't_ts' is - taken from the builtin termcap). + - NVIM the server name |v:servername| or "NVIM" *'titlelen'* 'titlelen' number (default 85) global - {not available when compiled without the |+title| - feature} Gives the percentage of 'columns' to use for the length of the window title. When the title is longer, only the end of the path name is shown. A '<' character before the path name is used to indicate this. @@ -6550,25 +6216,17 @@ A jump table for the options with a short description can be found at |Q_op|. 'titlelen' is also used for the 'titlestring' option. *'titleold'* -'titleold' string (default "Thanks for flying Vim") +'titleold' string (default "") global - {only available when compiled with the |+title| - feature} - This option will be used for the window title when exiting Vim if the - original title cannot be restored. Only happens if 'title' is on or - 'titlestring' is not empty. + If not empty, this option will be used to set the window title when + exiting. Only if 'title' is enabled. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'titlestring'* 'titlestring' string (default "") global - {not available when compiled without the |+title| - feature} When this option is not empty, it will be used for the title of the window. This happens only when the 'title' option is on. - Only works if the terminal supports setting window titles (currently - Win32 console, all GUI versions and terminals with a non-empty 't_ts' - option). When this option contains printf-style '%' items, they will be expanded according to the rules used for 'statusline'. Example: > @@ -6583,33 +6241,13 @@ A jump table for the options with a short description can be found at |Q_op|. separating space only when needed. NOTE: Use of special characters in 'titlestring' may cause the display to be garbled (e.g., when it contains a CR or NL character). - {not available when compiled without the |+statusline| feature} - - *'toolbar'* *'tb'* -'toolbar' 'tb' Removed. |vim-differences| {Nvim} - - *'toolbariconsize'* *'tbis'* -'toolbariconsize' 'tbis' Removed. |vim-differences| {Nvim} - - *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* -'ttybuiltin' 'tbi' Removed. |vim-differences| {Nvim} *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* -'ttyfast' 'tf' Removed. |vim-differences| {Nvim} - - *'ttymouse'* *'ttym'* -'ttymouse' 'ttym' Removed. |vim-differences| {Nvim} - - *'ttyscroll'* *'tsl'* -'ttyscroll' 'tsl' Removed. |vim-differences| {Nvim} +'ttyfast' 'tf' Removed. |vim-differences| - *'ttytype'* *'tty'* -'ttytype' 'tty' Alias for 'term'. Removed. |vim-differences| {Nvim} - - *'undodir'* *'udir'* *E926* + *'undodir'* *'udir'* *E5003* 'undodir' 'udir' string (default "$XDG_DATA_HOME/nvim/undo") global - {only when compiled with the |+persistent_undo| feature} List of directory names for undo files, separated with commas. See |'backupdir'| for details of the format. "." means using the directory of the file. The undo file name for @@ -6628,7 +6266,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'undofile'* *'noundofile'* *'udf'* *'noudf'* 'undofile' 'udf' boolean (default off) local to buffer - {only when compiled with the |+persistent_undo| feature} When on, Vim automatically saves undo history to an undo file when writing a buffer to a file, and restores undo history from the same file on buffer read. @@ -6665,7 +6302,7 @@ A jump table for the options with a short description can be found at |Q_op|. Save the whole buffer for undo when reloading it. This applies to the ":e!" command and reloading for when the buffer changed outside of Vim. |FileChangedShell| - The save only happens when this options is negative or when the number + The save only happens when this option is negative or when the number of lines is smaller than the value of this option. Set this option to zero to disable undo for a reload. @@ -6703,6 +6340,7 @@ A jump table for the options with a short description can be found at |Q_op|. Currently, these messages are given: >= 1 When the shada file is read or written. >= 2 When a file is ":source"'ed. + >= 3 UI info, terminal capabilities >= 5 Every searched tags file and include file. >= 8 Files for which a group of autocommands is executed. >= 9 Every executed autocommand. @@ -6731,21 +6369,18 @@ A jump table for the options with a short description can be found at |Q_op|. *'viewdir'* *'vdir'* 'viewdir' 'vdir' string (default: "$XDG_DATA_HOME/nvim/view") global - {not available when compiled without the |+mksession| - feature} Name of the directory where to store files for |:mkview|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. *'viewoptions'* *'vop'* -'viewoptions' 'vop' string (default: "folds,options,cursor") +'viewoptions' 'vop' string (default: "folds,options,cursor,curdir") global - {not available when compiled without the |+mksession| - feature} Changes the effect of the |:mkview| command. It is a comma separated list of words. Each word enables saving and restoring something: word save and restore ~ cursor cursor position in file and in window + curdir local current directory, if set with |:lcd| folds manually created folds, opened/closed folds and local fold options options options and mappings local to a window or buffer (not @@ -6760,17 +6395,9 @@ A jump table for the options with a short description can be found at |Q_op|. with Unix. The Unix version of Vim cannot source dos format scripts, but the Windows version of Vim can source unix format scripts. - *'viminfo'* *'vi'* -'viminfo' 'vi' string - global - Deprecated alias for 'shada' option. Is kept for compatibility - reasons. - *'virtualedit'* *'ve'* 'virtualedit' 've' string (default "") global - {not available when compiled without the - |+virtualedit| feature} A comma separated list of these words: block Allow virtual editing in Visual block mode. insert Allow virtual editing in Insert mode. @@ -6796,14 +6423,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* 'visualbell' 'vb' boolean (default off) global - Use visual bell instead of beeping. The terminal code to display the - visual bell is given with 't_vb'. When no beep or flash is wanted, - use ":set vb t_vb=". - Note: When the GUI starts, 't_vb' is reset to its default value. You - might want to set it again in your |gvimrc|. - In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display - for 20 msec. If you want to use a different time, use "<Esc>|40f", - where 40 is the time in msec. Also see 'errorbells'. + Use visual bell instead of beeping. Also see 'errorbells'. *'warn'* *'nowarn'* 'warn' boolean (default on) @@ -6811,9 +6431,6 @@ A jump table for the options with a short description can be found at |Q_op|. Give a warning message when a shell command is used while the buffer has been changed. - *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'* -'weirdinvert' 'wiv' Removed. |vim-differences| {Nvim} - *'whichwrap'* *'ww'* 'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "") global @@ -6871,8 +6488,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildignore'* *'wig'* 'wildignore' 'wig' string (default "") global - {not available when compiled without the |+wildignore| - feature} A list of file patterns. A file that matches with one of these patterns is ignored when expanding |wildcards|, completing file or directory names, and influences the result of |expand()|, |glob()| and @@ -6898,8 +6513,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* 'wildmenu' 'wmnu' boolean (default on) global - {not available if compiled without the |+wildmenu| - feature} When 'wildmenu' is on, command-line completion operates in an enhanced mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, the possible matches are shown just above the command line, with the @@ -6975,8 +6588,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildoptions'* *'wop'* 'wildoptions' 'wop' string (default "") global - {not available when compiled without the |+wildignore| - feature} A list of words that change how command line completion is done. Currently only one word is allowed: tagfile When using CTRL-D to list matching tags, the kind of @@ -6995,8 +6606,7 @@ A jump table for the options with a short description can be found at |Q_op|. menu. This conflicts with the use of the ALT key for mappings and entering special characters. This option tells what to do: no Don't use ALT keys for menus. ALT key combinations can be - mapped, but there is no automatic handling. This can then be - done with the |:simalt| command. + mapped, but there is no automatic handling. yes ALT key handling is done by the windowing system. ALT key combinations cannot be mapped. menu Using ALT in combination with a character that is a menu @@ -7022,8 +6632,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winheight'* *'wh'* *E591* 'winheight' 'wh' number (default 1) global - {not available when compiled without the |+windows| - feature} Minimal number of lines for the current window. This is not a hard minimum, Vim will use fewer lines if there is not enough room. If the focus goes to a window that is smaller, its size is increased, at the @@ -7041,11 +6649,27 @@ A jump table for the options with a short description can be found at |Q_op|. 'winheight' applies to the current window. Use 'winminheight' to set the minimal height for other windows. + *'winhighlight'* *'winhl'* +'winhighlight' 'winhl' string (default empty) + local to window + Window-local highlights. Comma-delimited list of highlight + |group-name| pairs "{hl-builtin}:{hl},..." where each {hl-builtin} is + a built-in |highlight-groups| item to be overridden by {hl} group in + the window. Only built-in |highlight-groups| are supported, not + syntax highlighting (use |:ownsyntax| for that). + + Highlights of vertical separators are determined by the window to the + left of the separator. The 'tabline' highlight of a tabpage is + decided by the last-focused window of the tabpage. Highlights of + the popupmenu are determined by the current window. Highlights in the + message area cannot be overridden. + + Example: show a different color for non-current windows: > + set winhighlight=Normal:MyNormal,NormalNC:MyNormalNC +< *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 'winfixheight' 'wfh' boolean (default off) local to window - {not available when compiled without the |+windows| - feature} Keep the window height when windows are opened or closed and 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the |preview-window| and |quickfix-window|. @@ -7054,8 +6678,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'* 'winfixwidth' 'wfw' boolean (default off) local to window - {not available when compiled without the |+windows| - feature} Keep the window width when windows are opened or closed and 'equalalways' is set. Also for |CTRL-W_=|. The width may be changed anyway when running out of room. @@ -7063,8 +6685,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winminheight'* *'wmh'* 'winminheight' 'wmh' number (default 1) global - {not available when compiled without the |+windows| - feature} The minimal height of a window, when it's not the current window. This is a hard minimum, windows will never become smaller. When set to zero, windows may be "squashed" to zero lines (i.e. just a @@ -7170,8 +6790,9 @@ A jump table for the options with a short description can be found at |Q_op|. *'writedelay'* *'wd'* 'writedelay' 'wd' number (default 0) global - The number of microseconds to wait for each character sent to the - screen. When non-zero, characters are sent to the terminal one by - one. For debugging purposes. + The number of milliseconds to wait for each character sent to the + screen. When positive, characters are sent to the UI one by one. + When negative, all redrawn characters cause a delay, even if the + character already was displayed by the UI. For debugging purposes. - vim:tw=78:ts=8:ft=help:noet:norl: + vim:tw=78:ts=8:noet:ft=help:norl: |