diff options
Diffstat (limited to 'runtime/doc/options.txt')
| -rw-r--r-- | runtime/doc/options.txt | 1480 |
1 files changed, 707 insertions, 773 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b1af90a604..f47093782c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -52,14 +52,16 @@ achieve special effects. These options come in three forms: 'lines' Warning: This may have a lot of side effects. - *:set-args* *E487* *E521* + *:set-args* *:set=* *E487* *E521* :se[t] {option}={value} or :se[t] {option}:{value} Set string or number option to {value}. For numeric options the value can be given in decimal, hex (preceded with 0x) or octal (preceded with '0'). The old value can be inserted by typing 'wildchar' (by - default this is a <Tab>). See |cmdline-completion|. + default this is a <Tab>). Many string options with + fixed syntax also support completing known values. + See |cmdline-completion| and |complete-set-option|. White space between {option} and '=' is allowed and will be ignored. White space between '=' and {value} is not allowed. @@ -93,6 +95,9 @@ achieve special effects. These options come in three forms: When the option is a list of flags, {value} must be exactly as they appear in the option. Remove flags one by one to avoid problems. + The individual values from a comma separated list or + list of flags can be inserted by typing 'wildchar'. + See |complete-set-option|. Also see |:set-args| above. The {option} arguments to ":set" may be repeated. For example: > @@ -131,10 +136,26 @@ To include white space in a string option value it has to be preceded with a backslash. To include a backslash you have to use two. Effectively this means that the number of backslashes in an option value is halved (rounded down). +In options 'path', 'cdpath', and 'tags', spaces have to be preceded with three +backslashes instead because they can be separated by either commas or spaces. +Comma-separated options like 'backupdir' and 'tags' will also require commas +to be escaped with two backslashes, whereas this is not needed for +non-comma-separated ones like 'makeprg'. +When setting options using |:let| and |literal-string|, you need to use one +fewer layer of backslash. A few examples: > - :set tags=tags\ /usr/tags results in "tags /usr/tags" - :set tags=tags\\,file results in "tags\,file" - :set tags=tags\\\ file results in "tags\ file" + :set makeprg=make\ file results in "make file" + :let &makeprg='make file' (same as above) + :set makeprg=make\\\ file results in "make\ file" + :set tags=tags\ /usr/tags results in "tags" and "/usr/tags" + :set tags=tags\\\ file results in "tags file" + :let &tags='tags\ file' (same as above) + + :set makeprg=make,file results in "make,file" + :set makeprg=make\\,file results in "make\,file" + :set tags=tags,file results in "tags" and "file" + :set tags=tags\\,file results in "tags,file" + :let &tags='tags\,file' (same as above) The "|" character separates a ":set" command from a following command. To include the "|" in the option value, use "\|" instead. This example sets the @@ -189,6 +210,8 @@ opt+=val" the expansion is done before the adding or removing. Handling of local options *local-options* +Note: The following also applies to |global-local| options. + Some of the options only apply to a window or buffer. Each window or buffer has its own copy of this option, thus each can have its own value. This allows you to set 'list' in one window but not in another. And set @@ -238,6 +261,30 @@ The options local to a window are remembered for each buffer. This also happens when the buffer is not loaded, but they are lost when the buffer is wiped out |:bwipe|. +Special local window options *local-noglobal* + +The following local window options won't be copied over when new windows are +created, thus they behave slightly differently: + + Option Reason ~ + 'previewwindow' there can only be a single one + 'scroll' specific to existing window + 'winfixheight' specific to existing window + 'winfixwidth' specific to existing window + +Special local buffer options + +The following local buffer options won't be copied over when new buffers are +created, thus they behave slightly differently: + + Option Reason ~ + 'filetype' explicitly set by autocommands + 'syntax' explicitly set by autocommands + 'bufhidden' denote |special-buffers| + 'buftype' denote |special-buffers| + 'readonly' will be detected automatically + 'modified' will be detected automatically + *:setl* *:setlocal* :setl[ocal][!] ... Like ":set" but set only the value local to the current buffer or window. Not all options have a @@ -311,7 +358,6 @@ used. Thus it does the same as: > Note: In the future more global options can be made |global-local|. Using ":setlocal" on a global option might work differently then. - *option-value-function* Some options ('completefunc', 'omnifunc', 'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to a function name or a function @@ -401,20 +447,15 @@ the system, mostly it is something like 256 or 1024 characters. ============================================================================== 2. Automatically setting options *auto-setting* -Besides changing options with the ":set" command, there are three alternatives -to set options automatically for one or more files: - -1. When starting Vim initializations are read from various places. See - |initialization|. Most of them are performed for all editing sessions, - and some of them depend on the directory where Vim is started. - You can create an initialization file with |:mkvimrc|, |:mkview| and - |:mksession|. -2. If you start editing a new file, the automatic commands are executed. - This can be used to set options for files matching a particular pattern and - many other things. See |autocommand|. -3. If you start editing a new file, and the 'modeline' option is on, a - number of lines at the beginning and end of the file are checked for - modelines. This is explained here. +Besides changing options with the ":set" command, you can set options +automatically in various ways: + +1. With a |config| file or a |startup| argument. You can create an + initialization file with |:mkvimrc|, |:mkview| and |:mksession|. +2. |autocommand|s executed when you edit a file. +3. ".nvim.lua" files in the current directory, if 'exrc' is enabled. +4. |editorconfig| in the current buffer's directory or ancestors. +5. 'modeline' settings found at the beginning or end of the file. See below. *modeline* *vim:* *vi:* *ex:* *E520* There are two forms of modelines. The first form: @@ -580,16 +621,6 @@ supported use something like this: > *E355* A jump table for the options with a short description can be found at |Q_op|. - *'aleph'* *'al'* *aleph* *Aleph* -'aleph' 'al' number (default 224) - global - The ASCII code for the first letter of the Hebrew alphabet. The - routine that maps the keyboard in Hebrew mode, both in Insert mode - (when hkmap is set) and on the command-line (when hitting CTRL-_) - outputs the Hebrew characters in the range [aleph..aleph+26]. - aleph=128 applies to PC code, and aleph=224 applies to ISO 8859-8. - See |rileft.txt|. - *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'* 'allowrevins' 'ari' boolean (default off) global @@ -599,7 +630,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'revins'. *'ambiwidth'* *'ambw'* -'ambiwidth' 'ambw' string (default: "single") +'ambiwidth' 'ambw' string (default "single") global Tells Vim what to do with characters with East Asian Width Class Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek @@ -632,18 +663,8 @@ A jump table for the options with a short description can be found at |Q_op|. set to one of CJK locales. See Unicode Standard Annex #11 (https://www.unicode.org/reports/tr11). - *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* -'autochdir' 'acd' boolean (default off) - global - When on, Vim will change the current working directory whenever you - open a file, switch buffers, delete a buffer or open/close a window. - It will change to the directory containing the file which was opened - or selected. When a buffer has no name it also has no directory, thus - the current directory won't change when navigating to it. - Note: When this option is on some plugins may not work. - *'arabic'* *'arab'* *'noarabic'* *'noarab'* -'arabic' 'arab' boolean (default off) +'arabic' 'arab' boolean (default off) local to window This option can be set to start editing Arabic text. Setting this option will: @@ -660,9 +681,8 @@ A jump table for the options with a short description can be found at |Q_op|. option). Also see |arabic.txt|. - *'arabicshape'* *'arshape'* - *'noarabicshape'* *'noarshape'* -'arabicshape' 'arshape' boolean (default on) + *'arabicshape'* *'arshape'* *'noarabicshape'* *'noarshape'* +'arabicshape' 'arshape' boolean (default on) global When on and 'termbidi' is off, the required visual character corrections that need to take place for displaying the Arabic language @@ -677,6 +697,16 @@ A jump table for the options with a short description can be found at |Q_op|. Arabic is a complex language which requires other settings, for further details see |arabic.txt|. + *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* +'autochdir' 'acd' boolean (default off) + global + When on, Vim will change the current working directory whenever you + open a file, switch buffers, delete a buffer or open/close a window. + It will change to the directory containing the file which was opened + or selected. When a buffer has no name it also has no directory, thus + the current directory won't change when navigating to it. + Note: When this option is on some plugins may not work. + *'autoindent'* *'ai'* *'noautoindent'* *'noai'* 'autoindent' 'ai' boolean (default on) local to buffer @@ -691,13 +721,8 @@ A jump table for the options with a short description can be found at |Q_op|. line. When 'smartindent' or 'cindent' is on the indent is changed in a different way. - The 'autoindent' option is reset when the 'paste' option is set and - restored when 'paste' is reset. - {small difference from Vi: After the indent is deleted when typing - <Esc> or <CR>, the cursor position when moving up or down is after the - deleted indent; Vi puts the cursor somewhere in the deleted indent}. - *'autoread'* *'ar'* *'noautoread'* *'noar'* + *'autoread'* *'ar'* *'noautoread'* *'noar'* 'autoread' 'ar' boolean (default on) global or local to buffer |global-local| When a file has been detected to have been changed outside of Vim and @@ -709,7 +734,8 @@ A jump table for the options with a short description can be found at |Q_op|. using the global value: > :set autoread< < - *'autowrite'* *'aw'* *'noautowrite'* *'noaw'* + + *'autowrite'* *'aw'* *'noautowrite'* *'noaw'* 'autowrite' 'aw' boolean (default off) global Write the contents of the file, if it has been modified, on each @@ -723,8 +749,11 @@ A jump table for the options with a short description can be found at |Q_op|. 'autowriteall' for that. Some buffers will not be written, specifically when 'buftype' is "nowrite", "nofile", "terminal" or "prompt". + USE WITH CARE: If you make temporary changes to a buffer that you + don't want to be saved this option may cause it to be saved anyway. + Renaming the buffer with ":file {name}" may help avoid this. - *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* + *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* 'autowriteall' 'awa' boolean (default off) global Like 'autowrite', but also used for commands ":edit", ":enew", ":quit", @@ -732,7 +761,7 @@ A jump table for the options with a short description can be found at |Q_op|. Setting this option also implies that Vim behaves like 'autowrite' has been set. - *'background'* *'bg'* + *'background'* *'bg'* 'background' 'bg' string (default "dark") global When set to "dark" or "light", adjusts the default color groups for @@ -762,7 +791,7 @@ A jump table for the options with a short description can be found at |Q_op|. option, you must load syntax.vim again to see the result. This can be done with ":syntax on". - *'backspace'* *'bs'* + *'backspace'* *'bs'* 'backspace' 'bs' string (default "indent,eol,start") global Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert @@ -779,13 +808,6 @@ A jump table for the options with a short description can be found at |Q_op|. When the value is empty, Vi compatible backspacing is used, none of the ways mentioned for the items above are possible. - For backwards compatibility with version 5.4 and earlier: - value effect ~ - 0 same as ":set backspace=" (Vi compatible) - 1 same as ":set backspace=indent,eol" - 2 same as ":set backspace=indent,eol,start" - 3 same as ":set backspace=indent,eol,nostop" - *'backup'* *'bk'* *'nobackup'* *'nobk'* 'backup' 'bk' boolean (default off) global @@ -801,7 +823,7 @@ A jump table for the options with a short description can be found at |Q_op|. oldest version of a file. *'backupcopy'* *'bkc'* -'backupcopy' 'bkc' string (default: "auto") +'backupcopy' 'bkc' string (default "auto") global or local to buffer |global-local| When writing a file and a backup is made, this option tells how it's done. This is a comma-separated list of words. @@ -897,8 +919,7 @@ A jump table for the options with a short description can be found at |Q_op|. - Careful with '\' characters, type one before a space, type two to get one in the option (see |option-backslash|), for example: > :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces -< - For backwards compatibility with Vim version 3.0 a '>' at the start - of the option is removed. +< See also 'backup' and 'writebackup' options. If you want to hide your backup files on Unix, consider this value: > :set backupdir=./.backup,~/.backup,.,/tmp @@ -910,7 +931,7 @@ 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. - *'backupext'* *'bex'* *E589* + *'backupext'* *'bex'* *E589* 'backupext' 'bex' string (default "~") global String which is appended to a file name to make the name of the @@ -918,7 +939,7 @@ A jump table for the options with a short description can be found at |Q_op|. accidentally overwriting existing files with a backup file. You might prefer using ".bak", but make sure that you don't have files with ".bak" that you want to keep. - Only normal file name characters can be used; "/\*?[|<>" are illegal. + Only normal file name characters can be used; `/\*?[|<>` are illegal. If you like to keep a lot of backups, you could use a BufWritePre autocommand to change 'backupext' just before writing the file to @@ -927,9 +948,9 @@ A jump table for the options with a short description can be found at |Q_op|. < Use 'backupdir' to put the backup in a different directory. *'backupskip'* *'bsk'* -'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" - Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" - Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") +'backupskip' 'bsk' string (default "$TMPDIR/*,$TMP/*,$TEMP/*" + Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" + Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global A list of file patterns. When one of the patterns matches with the name of the file which is written, no backup file is created. Both @@ -945,7 +966,7 @@ A jump table for the options with a short description can be found at |Q_op|. backups if you don't care about losing the file. Note that environment variables are not expanded. If you want to use - $HOME you must expand it explicitly, e.g.: > + $HOME you must expand it explicitly, e.g.: >vim :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' < Note that the default also makes sure that "crontab -e" works (when a @@ -990,7 +1011,7 @@ A jump table for the options with a short description can be found at |Q_op|. indicate that an error occurred. It can be silenced by adding the "error" keyword. - *'binary'* *'bin'* *'nobinary'* *'nobin'* + *'binary'* *'bin'* *'nobinary'* *'nobin'* 'binary' 'bin' boolean (default off) local to buffer This option should be set before editing a binary file. You can also @@ -1020,7 +1041,7 @@ A jump table for the options with a short description can be found at |Q_op|. the last line if there is none; this would make the file longer). See the 'endofline' option. - *'bomb'* *'nobomb'* + *'bomb'* *'nobomb'* 'bomb' boolean (default off) local to buffer When writing a file and the following conditions are met, a BOM (Byte @@ -1046,14 +1067,14 @@ A jump table for the options with a short description can be found at |Q_op|. break if 'linebreak' is on. Only works for ASCII characters. *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'* -'breakindent' 'bri' boolean (default off) +'breakindent' 'bri' boolean (default off) local to window Every wrapped line will continue visually indented (same amount of space as the beginning of that line), thus preserving horizontal blocks of text. - *'breakindentopt'* *'briopt'* -'breakindentopt' 'briopt' string (default empty) + *'breakindentopt'* *'briopt'* +'breakindentopt' 'briopt' string (default "") local to window Settings for 'breakindent'. It can consist of the following optional items and must be separated by a comma: @@ -1084,7 +1105,7 @@ A jump table for the options with a short description can be found at |Q_op|. (default: off) *'browsedir'* *'bsdir'* -'browsedir' 'bsdir' string (default: "last") +'browsedir' 'bsdir' string (default "last") global Which directory to use for the file browser: last Use same directory as with last file browser, where a @@ -1094,8 +1115,8 @@ A jump table for the options with a short description can be found at |Q_op|. {path} Use the specified directory *'bufhidden'* *'bh'* -'bufhidden' 'bh' string (default: "") - local to buffer +'bufhidden' 'bh' string (default "") + local to buffer |local-noglobal| This option specifies what happens when a buffer is no longer displayed in a window: <empty> follow the global 'hidden' option @@ -1117,7 +1138,7 @@ A jump table for the options with a short description can be found at |Q_op|. special kinds of buffers. See |special-buffers|. *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85* -'buflisted' 'bl' boolean (default: on) +'buflisted' 'bl' boolean (default on) local to buffer When this option is set, the buffer shows up in the buffer list. If it is reset it is not used for ":bnext", "ls", the Buffers menu, etc. @@ -1126,8 +1147,8 @@ A jump table for the options with a short description can be found at |Q_op|. But not when moving to a buffer with ":buffer". *'buftype'* *'bt'* *E382* -'buftype' 'bt' string (default: "") - local to buffer +'buftype' 'bt' string (default "") + local to buffer |local-noglobal| The value of this option specifies the type of a buffer: <empty> normal buffer acwrite buffer will always be written with |BufWriteCmd|s @@ -1174,7 +1195,7 @@ A jump table for the options with a short description can be found at |Q_op|. |FileWriteCmd| or |FileAppendCmd| autocommands. *'casemap'* *'cmp'* -'casemap' 'cmp' string (default: "internal,keepascii") +'casemap' 'cmp' string (default "internal,keepascii") global Specifies details about changing the case of letters. It may contain these words, separated by a comma: @@ -1186,16 +1207,18 @@ A jump table for the options with a short description can be found at |Q_op|. case mapping, the current locale is not effective. This probably only matters for Turkish. - *'cdhome'* *'cdh'* -'cdhome' 'cdh' boolean (default: off) + *'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'* +'cdhome' 'cdh' boolean (default off) global When on, |:cd|, |:tcd| and |:lcd| without an argument changes the current working directory to the |$HOME| directory like in Unix. When off, those commands just print the current directory name. On Unix this option has no effect. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. - *'cdpath'* *'cd'* *E344* *E346* -'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") + *'cdpath'* *'cd'* *E344* *E346* +'cdpath' 'cd' string (default equivalent to $CDPATH or ",,") global This is a list of directories which will be searched when using the |:cd|, |:tcd| and |:lcd| commands, provided that the directory being @@ -1213,8 +1236,8 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. (parts of 'cdpath' can be passed to the shell to expand file names). - *'cedit'* -'cedit' string (default: CTRL-F) + *'cedit'* +'cedit' string (default CTRL-F) global The key used in Command-line Mode to open the command-line window. Only non-printable keys are allowed. @@ -1225,15 +1248,15 @@ A jump table for the options with a short description can be found at |Q_op|. < |Nvi| also has this option, but it only uses the first character. See |cmdwin|. - *'channel'* -'channel' number (default: 0) + *'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 "") +'charconvert' 'ccv' string (default "") global 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 @@ -1268,7 +1291,7 @@ 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. - *'cindent'* *'cin'* *'nocindent'* *'nocin'* + *'cindent'* *'cin'* *'nocindent'* *'nocin'* 'cindent' 'cin' boolean (default off) local to buffer Enables automatic C program indenting. See 'cinkeys' to set the keys @@ -1281,9 +1304,8 @@ A jump table for the options with a short description can be found at |Q_op|. See |C-indenting|. When you don't like the way 'cindent' works, try the 'smartindent' option or 'indentexpr'. - This option is not used when 'paste' is set. - *'cinkeys'* *'cink'* + *'cinkeys'* *'cink'* 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e") local to buffer A list of keys that, when typed in Insert mode, cause reindenting of @@ -1299,6 +1321,14 @@ A jump table for the options with a short description can be found at |Q_op|. program. See |cinoptions-values| for the values of this option, and |C-indenting| for info on C indenting in general. + *'cinscopedecls'* *'cinsd'* +'cinscopedecls' 'cinsd' string (default "public,protected,private") + local to buffer + Keywords that are interpreted as a C++ scope declaration by |cino-g|. + Useful e.g. for working with the Qt framework that defines additional + scope declarations "signals", "public slots" and "private slots": > + set cinscopedecls+=signals,public\ slots,private\ slots +< *'cinwords'* *'cinw'* 'cinwords' 'cinw' string (default "if,else,while,do,for,switch") @@ -1310,15 +1340,7 @@ A jump table for the options with a short description can be found at |Q_op|. matter, include the keyword both the uppercase and lowercase: "if,If,IF". - *'cinscopedecls'* *'cinsd'* -'cinscopedecls' 'cinsd' string (default "public,protected,private") - local to buffer - Keywords that are interpreted as a C++ scope declaration by |cino-g|. - Useful e.g. for working with the Qt framework that defines additional - scope declarations "signals", "public slots" and "private slots": > - set cinscopedecls+=signals,public\ slots,private\ slots - -< *'clipboard'* *'cb'* + *'clipboard'* *'cb'* 'clipboard' 'cb' string (default "") global This option is a list of comma-separated names. @@ -1342,11 +1364,11 @@ A jump table for the options with a short description can be found at |Q_op|. register. When "unnamed" is also included to the option, yank and delete operations (but not put) will additionally copy the text into register - '*'. See |clipboard|. + "*". See |clipboard|. *'cmdheight'* *'ch'* 'cmdheight' 'ch' number (default 1) - global or local to tab page + global or local to tab page |global-local| Number of screen lines to use for the command-line. Helps avoiding |hit-enter| prompts. The value of this option is stored with the tab page, so that each tab @@ -1376,7 +1398,7 @@ A jump table for the options with a short description can be found at |Q_op|. The screen column can be an absolute number, or a number preceded with '+' or '-', which is added to or subtracted from 'textwidth'. > - :set cc=+1 " highlight column after 'textwidth' + :set cc=+1 " highlight column after 'textwidth' :set cc=+1,+2,+3 " highlight three columns after 'textwidth' :hi ColorColumn ctermbg=lightgrey guibg=lightgrey < @@ -1400,22 +1422,21 @@ A jump table for the options with a short description can be found at |Q_op|. < Minimum value is 12, maximum value is 10000. *'comments'* *'com'* *E524* *E525* -'comments' 'com' string (default - "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-") +'comments' 'com' string (default "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•") local to buffer A comma-separated list of strings that can start a comment line. See |format-comments|. See |option-backslash| about using backslashes to insert a space. *'commentstring'* *'cms'* *E537* -'commentstring' 'cms' string (default "/*%s*/") +'commentstring' 'cms' string (default "") local to buffer 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|. + comment text. For example, C uses "/*%s*/". Currently only used to + add markers for folding, see |fold-marker|. *'complete'* *'cpt'* *E535* -'complete' 'cpt' string (default: ".,w,b,u,t") +'complete' 'cpt' string (default ".,w,b,u,t") local to buffer This option specifies how keyword completion |ins-completion| works when CTRL-P or CTRL-N are used. It is also used for whole-line @@ -1439,6 +1460,7 @@ A jump table for the options with a short description can be found at |Q_op|. |i_CTRL-X_CTRL-D| ] tag completion t same as "]" + f scan the buffer names (as opposed to buffer contents) Unloaded buffers are not loaded, thus their autocmds |:autocmd| are not executed, this may lead to unexpected completions from some files @@ -1450,7 +1472,7 @@ A jump table for the options with a short description can be found at |Q_op|. |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions). *'completefunc'* *'cfu'* -'completefunc' 'cfu' string (default: empty) +'completefunc' 'cfu' string (default "") local to buffer This option specifies a function to be used for Insert mode completion with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U| @@ -1461,23 +1483,8 @@ 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. - *'completeslash'* *'csl'* -'completeslash' 'csl' string (default: "") - local to buffer - {only for MS-Windows} - When this option is set it overrules 'shellslash' for completion: - - When this option is set to "slash", a forward slash is used for path - completion in insert mode. This is useful when editing HTML tag, or - Makefile with 'noshellslash' on MS-Windows. - - When this option is set to "backslash", backslash is used. This is - useful when editing a batch file with 'shellslash' set on MS-Windows. - - When this option is empty, same character is used as for - 'shellslash'. - For Insert mode completion the buffer-local value is used. For - command line completion the global value is used. - *'completeopt'* *'cot'* -'completeopt' 'cot' string (default: "menu,preview") +'completeopt' 'cot' string (default "menu,preview") global A comma-separated list of options for Insert mode completion |ins-completion|. The supported values are: @@ -1508,9 +1515,23 @@ A jump table for the options with a short description can be found at |Q_op|. select one from the menu. Only works in combination with "menu" or "menuone". + *'completeslash'* *'csl'* +'completeslash' 'csl' string (default "") + local to buffer + only for MS-Windows + When this option is set it overrules 'shellslash' for completion: + - When this option is set to "slash", a forward slash is used for path + completion in insert mode. This is useful when editing HTML tag, or + Makefile with 'noshellslash' on MS-Windows. + - When this option is set to "backslash", backslash is used. This is + useful when editing a batch file with 'shellslash' set on MS-Windows. + - When this option is empty, same character is used as for + 'shellslash'. + For Insert mode completion the buffer-local value is used. For + command line completion the global value is used. - *'concealcursor'* *'cocu'* -'concealcursor' 'cocu' string (default: "") + *'concealcursor'* *'cocu'* +'concealcursor' 'cocu' string (default "") local to window Sets the modes in which text in the cursor line can also be concealed. When the current mode is listed then concealing happens just like in @@ -1528,9 +1549,8 @@ A jump table for the options with a short description can be found at |Q_op|. Keep in mind that the cursor position is not always where it's displayed. E.g., when moving vertically it may change column. - *'conceallevel'* *'cole'* -'conceallevel' 'cole' number (default 0) +'conceallevel' 'cole' number (default 0) local to window Determine how text with the "conceal" syntax attribute |:syn-conceal| is shown: @@ -1552,7 +1572,7 @@ A jump table for the options with a short description can be found at |Q_op|. option. *'confirm'* *'cf'* *'noconfirm'* *'nocf'* -'confirm' 'cf' boolean (default off) +'confirm' 'cf' boolean (default off) global When 'confirm' is on, certain operations that would normally fail because of unsaved changes to a buffer, e.g. ":q" and ":e", @@ -1577,7 +1597,7 @@ A jump table for the options with a short description can be found at |Q_op|. See 'preserveindent'. *'cpoptions'* *'cpo'* *cpo* -'cpoptions' 'cpo' string (default: "aABceFs_") +'cpoptions' 'cpo' string (default "aABceFs_") global A sequence of single character flags. When a character is present this indicates Vi-compatible behavior. This is used for things where @@ -1811,7 +1831,7 @@ A jump table for the options with a short description can be found at |Q_op|. whitespace following the word in the motion. *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'* -'cursorbind' 'crb' boolean (default off) +'cursorbind' 'crb' boolean (default off) local to window When this option is set, as the cursor in the current window moves other cursorbound windows (windows that also have @@ -1821,7 +1841,6 @@ A jump table for the options with a short description can be found at |Q_op|. inserted and deleted lines (though not characters within a line) are taken into account. - *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'* 'cursorcolumn' 'cuc' boolean (default off) local to window @@ -1842,9 +1861,8 @@ A jump table for the options with a short description can be found at |Q_op|. When Visual mode is active the highlighting isn't used to make it easier to see the selected text. - - *'cursorlineopt'* *'culopt'* -'cursorlineopt' 'culopt' string (default: "number,line") + *'cursorlineopt'* *'culopt'* +'cursorlineopt' 'culopt' string (default "both") local to window Comma-separated list of settings for how 'cursorline' is displayed. Valid values: @@ -1860,8 +1878,7 @@ A jump table for the options with a short description can be found at |Q_op|. "line" and "screenline" cannot be used together. - - *'debug'* + *'debug'* 'debug' string (default "") global These values can be used: @@ -1876,17 +1893,16 @@ A jump table for the options with a short description can be found at |Q_op|. 'indentexpr'. *'define'* *'def'* -'define' 'def' string (default "^\s*#\s*define") +'define' 'def' string (default "") global or local to buffer |global-local| Pattern to be used to find a macro definition. It is a search pattern, just like for the "/" command. This option is used for the commands like "[i" and "[d" |include-search|. The 'isident' option is - used to recognize the defined name after the match: + used to recognize the defined name after the match: > {match with 'define'}{non-ID chars}{defined name}{non-ID char} - See |option-backslash| about inserting backslashes to include a space +< See |option-backslash| about inserting backslashes to include a space or backslash. - The default value is for C programs. For C++ this value would be - useful, to include const type declarations: > + For C++ this value would be useful, to include const type declarations: > ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\) < You can also use "\ze" just before the name and continue the pattern to check what is following. E.g. for Javascript, if a function is @@ -1900,7 +1916,7 @@ 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) +'delcombine' 'deco' boolean (default off) global If editing Unicode and this option is set, backspace and Normal mode "x" delete each combining character on its own. When it is off (the @@ -1938,13 +1954,13 @@ A jump table for the options with a short description can be found at |Q_op|. uses another default. Backticks cannot be used in this option for security reasons. - *'diff'* *'nodiff'* + *'diff'* *'nodiff'* 'diff' boolean (default off) local to window Join the current window in the group of windows that shows differences between files. See |diff-mode|. - *'dex'* *'diffexpr'* + *'diffexpr'* *'dex'* 'diffexpr' 'dex' string (default "") global Expression which is evaluated to obtain a diff file (either ed-style @@ -1952,7 +1968,7 @@ 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. - *'dip'* *'diffopt'* + *'diffopt'* *'dip'* 'diffopt' 'dip' string (default "internal,filler,closeoff") global Option settings for diff mode. It can consist of the following items. @@ -1969,7 +1985,8 @@ 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. When using zero the context is actually one, since folds require a line in between, also - for a deleted line. + for a deleted line. Set it to a very large + value (999999) to disable folding completely. See |fold-diff|. iblank Ignore changes where lines are all blank. Adds @@ -2045,7 +2062,7 @@ A jump table for the options with a short description can be found at |Q_op|. hunks of up to 30 lines each, or a 3 buffer diff with hunks of up to 20 lines each. - algorithm:{text} Use the specified diff algorithm with the + algorithm:{text} Use the specified diff algorithm with the internal diff engine. Currently supported algorithms are: myers the default algorithm @@ -2060,7 +2077,8 @@ A jump table for the options with a short description can be found at |Q_op|. :set diffopt=internal,filler,foldcolumn:3 :set diffopt-=internal " do NOT use the internal diff parser < - *'digraph'* *'dg'* *'nodigraph'* *'nodg'* + + *'digraph'* *'dg'* *'nodigraph'* *'nodg'* 'digraph' 'dg' boolean (default off) global Enable the entering of digraphs in Insert mode with {char1} <BS> @@ -2073,7 +2091,7 @@ A jump table for the options with a short description can be found at |Q_op|. Possible items: - The swap file will be created in the first directory where this is - possible. If it is not possible in any directory, but last + possible. If it is not possible in any directory, but last directory listed in the option does not exist, it is created. - Empty means that no swap file will be used (recovery is impossible!) and no |E303| error will be given. @@ -2102,23 +2120,17 @@ A jump table for the options with a short description can be found at |Q_op|. - Careful with '\' characters, type one before a space, type two to get one in the option (see |option-backslash|), for example: > :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces -< - For backwards compatibility with Vim version 3.0 a '>' at the start - of the option is removed. - Using "." first in the list is recommended. This means that editing - the same file twice will result in a warning. Using "/tmp" on Unix is - discouraged: When the system crashes you lose the swap file. - "/var/tmp" is often not cleared when rebooting, thus is a better - choice than "/tmp". But others on the computer may be able to see the - files, and it can contain a lot of files, your swap files get lost in - the crowd. That is why a "tmp" directory in your home directory is - tried first. - The use of |:set+=| and |:set-=| is preferred when adding or removing - directories from the list. This avoids problems when a future version - uses another default. +< + Editing the same file twice will result in a warning. Using "/tmp" on + is discouraged: if the system crashes you lose the swap file. And + others on the computer may be able to see the files. + Use |:set+=| and |:set-=| when adding or removing directories from the + list, this avoids problems if the Nvim default is changed. + This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. - *'display'* *'dy'* + *'display'* *'dy'* 'display' 'dy' string (default "lastline") global Change the way text is displayed. This is a comma-separated list of @@ -2147,8 +2159,8 @@ 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 - *'emoji'* *'emo'* *'noemoji'* *'noemo'* -'emoji' 'emo' boolean (default: on) + *'emoji'* *'emo'* *'noemoji'* *'noemo'* +'emoji' 'emo' boolean (default on) global When on all Unicode emoji characters are considered to be full width. This excludes "text emoji" characters, which are normally displayed as @@ -2156,8 +2168,9 @@ A jump table for the options with a short description can be found at |Q_op|. and it has been determined on trial-and-error basis. Use the |setcellwidths()| function to change the behavior. - *'encoding'* *'enc'* *E543* -'encoding' 'enc' + *'encoding'* *'enc'* +'encoding' 'enc' string (default "utf-8") + global String-encoding used internally and for |RPC| communication. Always UTF-8. @@ -2189,7 +2202,7 @@ A jump table for the options with a short description can be found at |Q_op|. be kept. Bu |