robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
aa1d8a2702
master
1*options.txt* Nvim 2 3 4 VIM REFERENCE MANUAL by Bram Moolenaar 5 6 7Options *options* 8 9For an overview of options see quickref.txt |option-list|. 10 11Vim has a number of internal variables and switches which can be set to 12achieve special effects. These options come in three forms: 13 boolean can only be on or off *boolean* *toggle* 14 number has a numeric value 15 string has a string value 16 17 Type |gO| to see the table of contents. 18 19============================================================================== 201. Setting options *set-option* *E764* 21 22 *:se* *:set* 23:se[t][!] Show all options that differ from their default value. 24 When [!] is present every option is on a separate 25 line. 26 27:se[t][!] all Show all options. 28 When [!] is present every option is on a separate 29 line. 30 31 *E518* *E519* 32:se[t] {option}? Show value of {option}. 33 NOTE: some legacy options were removed. |nvim-removed| 34 35:se[t] {option} Toggle option: set, switch it on. 36 Number option: show value. 37 String option: show value. 38 39:se[t] no{option} Toggle option: Reset, switch it off. 40 41 *:set-!* *:set-inv* 42:se[t] {option}! or 43:se[t] inv{option} Toggle option: Invert value. 44 45 *:set-default* *:set-&* *:set-&vi* *:set-&vim* 46:se[t] {option}& Reset option to its default value. 47:se[t] {option}&vi Reset option to its Vi default value. 48:se[t] {option}&vim Reset option to its Vim default value. 49 50:se[t] all& Set all options to their default value. The values of 51 these options are not changed: 52 'columns' 53 'lines' 54 Warning: This may have a lot of side effects. 55 56 *:set-args* *:set=* *E487* *E521* 57:se[t] {option}={value} or 58:se[t] {option}:{value} 59 Set string or number option to {value}. 60 For numeric options the value can be given in decimal, 61 hex (preceded with 0x) or octal (preceded with '0' or 62 '0o'). 63 The old value can be inserted by typing 'wildchar' (by 64 default this is a <Tab>). Many string options with 65 fixed syntax also support completing known values. 66 See |cmdline-completion| and |complete-set-option|. 67 White space between {option} and '=' is allowed and 68 will be ignored. White space between '=' and {value} 69 is not allowed. 70 See |option-backslash| for using white space and 71 backslashes in {value}. 72 73:se[t] {option}+={value} *:set+=* 74 Add the {value} to a number option, or append the 75 {value} to a string option. When the option is a 76 comma-separated list, a comma is added, unless the 77 value was empty. 78 If the option is a list of flags, superfluous flags 79 are removed. When adding a flag that was already 80 present the option value doesn't change. 81 When the option supports "key:value" items and {value} 82 contains a "key:value" item or multiple 83 comma-separated items, each item is processed 84 individually: 85 - A "key:value" item where the key already exists with 86 a different value: the old item is removed and the 87 new item is appended to the end. 88 - A "key:value" item that is an exact duplicate is 89 left unchanged. 90 - Other items that already exist are left unchanged. 91 - New items are appended to the end. 92 Also see |:set-args| above. 93 94:se[t] {option}^={value} *:set^=* 95 Multiply the {value} to a number option, or prepend 96 the {value} to a string option. When the option is a 97 comma-separated list, a comma is added, unless the 98 value was empty. 99 When the option supports "key:value" items and {value} 100 contains a "key:value" item or multiple 101 comma-separated items, each item is processed 102 individually. Works like |:set+=| but new items are 103 prepended to the beginning instead of appended. 104 Also see |:set-args| above. 105 106:se[t] {option}-={value} *:set-=* 107 Subtract the {value} from a number option, or remove 108 the {value} from a string option, if it is there. 109 If the {value} is not found in a string option, there 110 is no error or warning. When the option is a comma- 111 separated list, a comma is deleted, unless the option 112 becomes empty. 113 When the option is a list of flags, {value} must be 114 exactly as they appear in the option. Remove flags 115 one by one to avoid problems. 116 When the option supports "key:value" items and {value} 117 contains a "key:value" item or multiple 118 comma-separated items, each item is processed 119 individually. A "key:value" item removes the existing 120 item with that key regardless of its value. A "key:" 121 item also removes by key match. 122 The individual values from a comma separated list or 123 list of flags can be inserted by typing 'wildchar'. 124 See |complete-set-option|. 125 Also see |:set-args| above. 126 127The {option} arguments to ":set" may be repeated. For example: > 128 :set ai nosi sw=3 ts=3 129If you make an error in one of the arguments, an error message will be given 130and the following arguments will be ignored. 131 132 *:set-verbose* 133When 'verbose' is non-zero, displaying an option value will also tell where it 134was last set. Example: > 135 :verbose set shiftwidth cindent? 136< shiftwidth=4 ~ 137 Last set from modeline line 1 ~ 138 cindent ~ 139 Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~ 140This is only done when specific option values are requested, not for ":verbose 141set all" or ":verbose set" without an argument. 142When the option was set by hand there is no "Last set" message. 143When the option was set while executing a function, user command or 144autocommand, the script in which it was defined is reported. 145A few special texts: 146 Last set from modeline line 1 ~ 147 Option was set in a |modeline|. 148 Last set from --cmd argument ~ 149 Option was set with command line argument |--cmd| or +. 150 Last set from -c argument ~ 151 Option was set with command line argument |-c|, +, |-S| or 152 |-q|. 153 Last set from environment variable ~ 154 Option was set from $VIMINIT. 155 Last set from error handler ~ 156 Option was cleared when evaluating it resulted in an error. 157 158 *option-backslash* 159To include white space in a string option value it has to be preceded with a 160backslash. To include a backslash you have to use two. Effectively this 161means that the number of backslashes in an option value is halved (rounded 162down). 163In options 'path', 'cdpath', and 'tags', spaces have to be preceded with three 164backslashes instead because they can be separated by either commas or spaces. 165Comma-separated options like 'backupdir' and 'tags' will also require commas 166to be escaped with two backslashes, whereas this is not needed for 167non-comma-separated ones like 'makeprg'. 168When setting options using |:let| and |literal-string|, you need to use one 169fewer layer of backslash. 170A few examples: > 171 :set makeprg=make\ file results in "make file" 172 :let &makeprg='make file' (same as above) 173 :set makeprg=make\\\ file results in "make\ file" 174 :set tags=tags\ /usr/tags results in "tags" and "/usr/tags" 175 :set tags=tags\\\ file results in "tags file" 176 :let &tags='tags\ file' (same as above) 177 178 :set makeprg=make,file results in "make,file" 179 :set makeprg=make\\,file results in "make\,file" 180 :set tags=tags,file results in "tags" and "file" 181 :set tags=tags\\,file results in "tags\,file" 182 :let &tags='tags\,file' (same as above) 183 184The "|" character separates a ":set" command from a following command. To 185include the "|" in the option value, use "\|" instead. This example sets the 186'titlestring' option to "hi|there": > 187 :set titlestring=hi\|there 188This sets the 'titlestring' option to "hi" and 'iconstring' to "there": > 189 :set titlestring=hi|set iconstring=there 190 191Similarly, the double quote character starts a comment. To include the '"' in 192the option value, use '\"' instead. This example sets the 'titlestring' 193option to "hi "there"": > 194 :set titlestring=hi\ \"there\" 195 196For Win32 backslashes in file names are mostly not removed. More precise: For 197options that expect a file name (those where environment variables are 198expanded) a backslash before a normal file name character is not removed. But 199a backslash before a special character (space, backslash, comma, etc.) is used 200like explained above. 201There is one special situation, when the value starts with "\\": > 202 :set dir=\\machine\path results in "\\machine\path" 203 :set dir=\\\\machine\\path results in "\\machine\path" 204 :set dir=\\path\\file results in "\\path\file" (wrong!) 205For the first one the start is kept, but for the second one the backslashes 206are halved. This makes sure it works both when you expect backslashes to be 207halved and when you expect the backslashes to be kept. The third gives a 208result which is probably not what you want. Avoid it. 209 210 *add-option-flags* *remove-option-flags* 211 *E539* 212Some options are a list of flags. When you want to add a flag to such an 213option, without changing the existing ones, you can do it like this: > 214 :set guioptions+=a 215Remove a flag from an option like this: > 216 :set guioptions-=a 217This removes the 'a' flag from 'guioptions'. 218Note that you should add or remove one flag at a time. If 'guioptions' has 219the value "ab", using "set guioptions-=ba" won't work, because the string "ba" 220doesn't appear. 221 222 *:set_env* *expand-env* *expand-environment-var* 223Environment variables in specific string options will be expanded. If the 224environment variable exists the '$' and the following environment variable 225name is replaced with its value. If it does not exist the '$' and the name 226are not modified. Any non-id character (not a letter, digit or '_') may 227follow the environment variable name. That character and what follows is 228appended to the value of the environment variable. Examples: > 229 :set term=$TERM.new 230 :set path=/usr/$INCLUDE,$HOME/include,. 231When adding or removing a string from an option with ":set opt-=val" or ":set 232opt+=val" the expansion is done before the adding or removing. 233 234 235Handling of local options *local-options* 236 237Note: The following also applies to |global-local| options. 238 239Some of the options only apply to a window or buffer. Each window or buffer 240has its own copy of this option, thus each can have its own value. This 241allows you to set 'list' in one window but not in another. And set 242'shiftwidth' to 3 in one buffer and 4 in another. 243 244The following explains what happens to these local options in specific 245situations. You don't really need to know all of this, since Vim mostly uses 246the option values you would expect. Unfortunately, doing what the user 247expects is a bit complicated... 248 249When splitting a window, the local options are copied to the new window. Thus 250right after the split the contents of the two windows look the same. 251 252When editing a new buffer, its local option values must be initialized. Since 253the local options of the current buffer might be specifically for that buffer, 254these are not used. Instead, for each buffer-local option there also is a 255global value, which is used for new buffers. With ":set" both the local and 256global value is changed. With "setlocal" only the local value is changed, 257thus this value is not used when editing a new buffer. 258 259When editing a buffer that has been edited before, the options from the window 260that was last closed are used again. If this buffer has been edited in this 261window, the values from back then are used. Otherwise the values from the 262last closed window where the buffer was edited last are used. 263 264":setlocal" can be used to set a local window option specifically for a type 265of buffer. When you edit another buffer in the same window, you don't want to 266keep using these local window options. Meanwhile ":set" also sets a global 267value of a local window option, which is used when editing another buffer. 268Each window has its own copy of these global values, making them local to the 269window, but global to all buffers in the window. With this you can do: > 270 :e one 271 :set list 272 :e two 273Now the 'list' option will also be set in "two", since with the ":set list" 274command you have also set the global value. > 275 :set nolist 276 :e one 277 :setlocal list 278 :e two 279Now the 'list' option is not set, because ":set nolist" resets the global 280value, ":setlocal list" only changes the local value and ":e two" gets the 281global value. Note that if you do this next: > 282 :e one 283You will get back the 'list' value as it was the last time you edited "one". 284The options local to a window are remembered for each buffer. This also 285happens when the buffer is not loaded, but they are lost when the buffer is 286wiped out |:bwipe|. 287 288Special local window options *local-noglobal* 289 290The following local window options won't be copied over when new windows are 291created, thus they behave slightly differently: 292 293 Option Reason ~ 294 'previewwindow' there can only be a single one 295 'scroll' specific to existing window 296 'winfixbuf' specific to existing window 297 'winfixheight' specific to existing window 298 'winfixwidth' specific to existing window 299 'winpinned' specific to existing window 300 301Special local buffer options 302 303The following local buffer options won't be copied over when new buffers are 304created, thus they behave slightly differently: 305 306 Option Reason ~ 307 'filetype' explicitly set by autocommands 308 'syntax' explicitly set by autocommands 309 'bufhidden' denote |special-buffers| 310 'buftype' denote |special-buffers| 311 'readonly' will be detected automatically 312 'modified' will be detected automatically 313 314 *:setl* *:setlocal* 315:setl[ocal][!] ... Like ":set" but set only the value local to the 316 current buffer or window. Not all options have a 317 local value. If the option does not have a local 318 value the global value is set. 319 With the "all" argument: display local values for all 320 local options. 321 Without argument: Display local values for all local 322 options which are different from the default. 323 When displaying a specific local option, show the 324 local value. For a global/local boolean option, when 325 the global value is being used, "--" is displayed 326 before the option name. 327 For a global option the global value is 328 shown (but that might change in the future). 329 330:se[t] {option}< Set the effective value of {option} to its global 331 value. 332 For |global-local| options, the local value is removed, 333 so that the global value will be used. 334 For all other options, the global value is copied to 335 the local value. 336 337:setl[ocal] {option}< Set the effective value of {option} to its global 338 value by copying the global value to the local value. 339 340Note that the behaviour for |global-local| options is slightly different 341between string and number-based options. 342 343 *:setg* *:setglobal* 344:setg[lobal][!] ... Like ":set" but set only the global value for a local 345 option without changing the local value. 346 When displaying an option, the global value is shown. 347 With the "all" argument: display global values for all 348 local options. 349 Without argument: display global values for all local 350 options which are different from the default. 351 352For buffer-local and window-local options: 353 Command global value local value condition ~ 354 :set option=value set set 355 :setlocal option=value - set 356:setglobal option=value set - 357 :set option? - display local value is set 358 :set option? display - local value is not set 359 :setlocal option? - display 360:setglobal option? display - 361 362 363Global options with a local value *global-local* 364 365Options are global when you mostly use one value for all buffers and windows. 366For some global options it's useful to sometimes have a different local value. 367You can set the local value with ":setlocal". That buffer or window will then 368use the local value, while other buffers and windows continue using the global 369value. 370 371For example, you have two windows, both on C source code. They use the global 372'makeprg' option. If you do this in one of the two windows: > 373 :set makeprg=gmake 374then the other window will switch to the same value. There is no need to set 375the 'makeprg' option in the other C source window too. 376However, if you start editing a Perl file in a new window, you want to use 377another 'makeprg' for it, without changing the value used for the C source 378files. You use this command: > 379 :setlocal makeprg=perlmake 380You can switch back to using the global value by making the local value empty: > 381 :setlocal makeprg= 382This only works for a string option. For a number or boolean option you need 383to use the "<" flag, like this: > 384 :setlocal autoread< 385Note that for non-boolean and non-number options using "<" copies the global 386value to the local value, it doesn't switch back to using the global value 387(that matters when the global value changes later). You can also use: > 388 :set path< 389This will make the local value of 'path' empty, so that the global value is 390used. Thus it does the same as: > 391 :setlocal path= 392Note: In the future more global options can be made |global-local|. Using 393":setlocal" on a global option might work differently then. 394 395 *option-value-function* 396Some options ('completefunc', 'findfunc', 'omnifunc', 'operatorfunc', 397'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') can be set to a function 398name, a |Funcref|, a |lambda|, or a Lua function. 399Examples: 400> 401 set opfunc=MyOpFunc 402 set opfunc=function('MyOpFunc') 403 set opfunc=funcref('MyOpFunc') 404 set opfunc={a\ ->\ MyOpFunc(a)} 405 406Set to a script-local function: > 407 set opfunc=s:MyLocalFunc 408 set opfunc=<SID>MyLocalFunc 409 410Set using a funcref variable: > 411 let Fn = function('MyTagFunc') 412 let &tagfunc = Fn 413 414Set using a lambda expression: > 415 let &tagfunc = {t -> MyTagFunc(t)} 416 417Set using a variable with lambda expression: > 418 let L = {a, b, c -> MyTagFunc(a, b , c)} 419 let &tagfunc = L 420 421Set to a Lua function (from Lua): >lua 422 vim.o.operatorfunc = function(motion) … end 423< 424The value read back from the option reflects how it was set: 425- A Function name or |Funcref| reads back as the function name. 426- A Vimscript |lambda| or partial reads back as an evaluatable string, e.g. 427 `function('<lambda>2')` or `function('MyFunc', [10])`. 428- A |script-local| ("s:") name is expanded to `<SNR>` form. 429- A Lua function is returned as itself from Lua, or as a `"<Lua …>"` hint 430 from Vimscript/RPC. 431 - Note: Lua functions cannot be serialized, so it cannot be saved/restored 432 by |:mksession| |:mkview| |:mkvimrc|. 433 434Calling a function in an expr option *expr-option-function* 435 436The value of an "expr" option ('charconvert', 'diffexpr', 'foldexpr', 437'foldtext', 'formatexpr', 'includeexpr', 'indentexpr', 'patchexpr') is a 438Vimscript expression that is evaluated to get a value. Context is passed in 439|v:| variables, e.g. 'foldexpr' is evaluated for each line with |v:lnum| set. 440 441The evaluation can have quite a bit of overhead. One way to minimize the 442overhead, and also to keep the option value very simple, is to define a 443function and set the option to call it without arguments. A |v:lua-call| can 444also be used. Example: >vim 445 lua << EOF 446 function _G.MyFoldFunc() 447 -- ... compute fold level for line v:lnum 448 return level 449 end 450 EOF 451 set foldexpr=v:lua.MyFoldFunc() 452 453From Lua the option can also be set directly to a function, which is called 454with no arguments (read the context from |v:| variables): >lua 455 vim.wo.foldexpr = function() return vim.v.lnum == 1 and '>1' or '1' end 456< 457The value read back from the option follows the same rules as 458|option-value-function|: a string reads back as itself, and a Lua function 459reads back as the function (from Lua) or a `"<Lua …>"` hint (Vimscript/RPC). 460 461 462Setting the filetype 463 464:setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* 465 Set the 'filetype' option to {filetype}, unless it was 466 already set (non-empty) in a sequence of (nested) 467 autocommands. 468 This is short for: > 469 :if !did_filetype() 470 : setlocal filetype={filetype} 471 :endif 472< Used in a filetype.vim file to avoid setting the 473 'filetype' option twice, causing different settings 474 and syntax files to be loaded. 475 476 When the optional FALLBACK argument is present, a 477 later :setfiletype command will override the 478 'filetype'. This is to be used for filetype 479 detections that are just a guess. |did_filetype()| 480 will return false after this command. 481 482 *option-window* *optwin* 483:bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options* 484:opt[ions] Open a window for viewing and setting all options. 485 Options are grouped by function. 486 Offers short help for each option. Hit <CR> on the 487 short help to open a help window with more help for 488 the option. 489 Modify the value of the option and hit <CR> on the 490 "set" line to set the new value. For window and 491 buffer specific options, the last accessed window is 492 used to set the option value in, unless this is a help 493 window, in which case the window below help window is 494 used (skipping the option-window). 495 496 *$HOME* 497Using "~" is like using "$HOME", but it is only recognized at the start of an 498option and after a space or comma. 499 500On Unix systems "~user" can be used too. It is replaced by the home directory 501of user "user". Example: > 502 :set path=~mool/include,/usr/include,. 503 504On Unix systems the form "${HOME}" can be used too. The name between {} can 505contain non-id characters then. Note that if you want to use this for the 506"gf" command, you need to add the '{' and '}' characters to 'isfname'. 507 508NOTE: expanding environment variables and "~/" is only done with the ":set" 509command, not when assigning a value to an option with ":let". 510 511 *$HOME-windows* 512On MS-Windows, if $HOME is not defined as an environment variable, then 513at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. 514If $HOMEDRIVE is not set then $USERPROFILE is used. 515 516This expanded value is not exported to the environment, this matters when 517running an external command: > 518 :echo system('set | findstr ^HOME=') 519and > 520 :echo luaeval('os.getenv("HOME")') 521should echo nothing (an empty string) despite exists('$HOME') being true. 522When setting $HOME to a non-empty string it will be exported to the 523subprocesses. 524 525 526Note the maximum length of an expanded option is limited. How much depends on 527the system, mostly it is something like 256 or 1024 characters. 528 529============================================================================== 5302. Automatically setting options *auto-setting* 531 532Besides changing options with the ":set" command, you can set options 533automatically in various ways: 534 5351. With a |config| file or a |startup| argument. You can create an 536 initialization file with |:mkvimrc|, |:mkview| and |:mksession|. 5372. |autocommand|s executed when you edit a file. 5383. ".nvim.lua" files in the current directory, if 'exrc' is enabled. 5394. |editorconfig| in the current buffer's directory or ancestors. 5405. 'modeline' settings found at the beginning or end of the file. See below. 541 542 *modeline* *vim:* *vi:* *ex:* *E520* 543There are two forms of modelines. The first form: 544 [text{white}]{vi:|vim:|ex:}[white]{options} 545 546[text{white}] empty or any text followed by at least one blank 547 character (<Space> or <Tab>); "ex:" always requires at 548 least one blank character 549{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:" 550[white] optional white space 551{options} a list of option settings, separated with white space 552 or ':', where each part between ':' is the argument 553 for a ":set" command (can be empty) 554 555Examples: 556 vi:noai:sw=3 ts=6 ~ 557 vim: tw=77 ~ 558 559The second form (this is compatible with some versions of Vi): 560 561 [text{white}]{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text] 562 563[text{white}] empty or any text followed by at least one blank 564 character (<Space> or <Tab>); "ex:" always requires at 565 least one blank character 566{vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:" 567[white] optional white space 568se[t] the string "set " or "se " (note the space); When 569 "Vim" is used it must be "set". 570{options} a list of options, separated with white space, which 571 is the argument for a ":set" command 572: a colon 573[text] any text or empty 574 575Examples: > 576 /* vim: set ai tw=75: */ 577 /* Vim: set ai tw=75: */ 578 579The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the 580chance that a normal word like "lex:" is caught. There is one exception: 581"vi:" and "vim:" can also be at the start of the line (for compatibility with 582version 3.0). Using "ex:" at the start of the line will be ignored (this 583could be short for "example:"). 584 585If the modeline is disabled within a modeline, subsequent modelines will be 586ignored. This is to allow turning off modeline on a per-file basis. This is 587useful when a line looks like a modeline but isn't. For example, it would be 588good to start a YAML file containing strings like "vim:" with 589 # vim: nomodeline ~ 590so as to avoid modeline misdetection. Following options on the same line 591after modeline deactivation, if any, are still evaluated (but you would 592normally not have any). 593 594 *modeline-local* 595The options are set like with ":setlocal": The new value only applies to the 596buffer and window that contain the file. Although it's possible to set global 597options from a modeline, this is unusual. If you have two windows open and 598the files in it set the same global option to a different value, the result 599depends on which one was opened last. 600 601When editing a file that was already loaded, only the window-local options 602from the modeline are used. Thus if you manually changed a buffer-local 603option after opening the file, it won't be changed if you edit the same buffer 604in another window. But window-local options will be set. 605 606 *modeline-version* 607If the modeline is only to be used for some versions of Vim, the version 608number can be specified where "vim:" or "Vim:" is used: 609 vim{vers}: version {vers} or later 610 vim<{vers}: version before {vers} 611 vim={vers}: version {vers} 612 vim>{vers}: version after {vers} 613{vers} is 700 for Vim 7.0 (hundred times the major version plus minor). 614For example, to use a modeline only for Vim 7.0: > 615 /* vim700: set foldmethod=marker */ 616To use a modeline for Vim after version 7.2: > 617 /* vim>702: set cole=2: */ 618There can be no blanks between "vim" and the ":". 619The modeline is ignored if {vers} does not fit in an integer. 620 621 622The number of lines that are checked can be set with the 'modelines' option. 623If 'modeline' is off or 'modelines' is 0 no lines are checked. 624 625Note that for the first form all of the rest of the line is used, thus a line 626like: > 627 /* vi:ts=4: */ 628will give an error message for the trailing "*/". This line is OK: > 629 /* vi:set ts=4: */ 630 631If an error is detected the rest of the line is skipped. 632 633If you want to include a ':' in a set command precede it with a '\'. The 634backslash in front of the ':' will be removed. Example: > 635 /* vi:set fillchars=stl\:^,vert\:\|: */ 636This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash 637before the ':' is removed. Thus to include "\:" you have to specify "\\:". 638 *E992* *no-modeline-option* 639No other commands than "set" are supported, for security reasons (somebody 640might create a Trojan horse text file with modelines). And not all options 641can be set. For some options a flag is set, so that when the value is used 642the |sandbox| is effective. Some options can only be set from the modeline 643when 'modelineexpr' is set (the default is off). 644 645Still, there is always a small risk that a modeline causes trouble. E.g., 646when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly. 647So disable modelines before editing untrusted text. The mail ftplugin does 648this, for example. 649 650Hint: If you would like to do something else than setting an option, you could 651define an autocommand that checks the file for a specific string. For 652example: > 653 au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif 654And define a function SetVar() that does something with the line containing 655"VAR". 656 657============================================================================== 6583. Options summary *option-summary* 659 660In the list below all the options are mentioned with their full name and with 661an abbreviation if there is one. Both forms may be used. 662 663In this document when a boolean option is "set" that means that ":set option" 664is entered. When an option is "reset", ":set nooption" is used. 665 666Most options are the same in all windows and buffers. There are a few that 667are specific to how the text is presented in a window. These can be set to a 668different value in each window. For example the 'list' option can be set in 669one window and reset in another for the same text, giving both types of view 670at the same time. There are a few options that are specific to a certain 671file. These can have a different value for each file or buffer. For example 672the 'textwidth' option can be 78 for a normal text file and 0 for a C 673program. 674 675 global one option for all buffers and windows 676 local to window each window has its own copy of this option 677 local to buffer each buffer has its own copy of this option 678 679When creating a new window the option values from the currently active window 680are used as a default value for the window-specific options. For the 681buffer-specific options this depends on the 's' and 'S' flags in the 682'cpoptions' option. If 's' is included (which is the default) the values for 683buffer options are copied from the currently active buffer when a buffer is 684first entered. If 'S' is present the options are copied each time the buffer 685is entered, this is almost like having global options. If 's' and 'S' are not 686present, the options are copied from the currently active buffer when the 687buffer is created. 688 689Hidden options *hidden-options* 690 691Not all options are supported in all versions. This depends on the supported 692features and sometimes on the system. A remark about this is in curly braces 693below. When an option is not supported, it is called a hidden option. Trying 694to get the value of a hidden option will not give an error, it will return the 695default value for that option instead. You can't change the value of a hidden 696option. 697 698To test if "foo" is a valid option name, use something like this: > 699 if exists('&foo') 700This also returns true for a hidden option. To test if option "foo" is really 701supported use something like this: > 702 if exists('+foo') 703< 704 *E355* 705A jump table for the options with a short description can be found at |Q_op|. 706 707 *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'* 708'allowrevins' 'ari' boolean (default off) 709 global 710 Allow CTRL-_ in Insert mode. This is default off, to avoid that users 711 that accidentally type CTRL-_ instead of SHIFT-_ get into reverse 712 Insert mode, and don't know how to get out. See 'revins'. 713 714 *'ambiwidth'* *'ambw'* 715'ambiwidth' 'ambw' string (default "single") 716 global 717 Tells Vim what to do with characters with East Asian Width Class 718 Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek 719 letters, Cyrillic letters). 720 721 There are currently two possible values: 722 "single": Use the same width as characters in US-ASCII. This is 723 expected by most users. 724 "double": Use twice the width of ASCII characters. 725 *E834* *E835* 726 The value "double" cannot be used if 'listchars' or 'fillchars' 727 contains a character that would be double width. These errors may 728 also be given when calling setcellwidths(). 729 730 The values are overruled for characters specified with 731 |setcellwidths()|. 732 733 There are a number of CJK fonts for which the width of glyphs for 734 those characters are solely based on how many octets they take in 735 legacy/traditional CJK encodings. In those encodings, Euro, 736 Registered sign, Greek/Cyrillic letters are represented by two octets, 737 therefore those fonts have "wide" glyphs for them. This is also 738 true of some line drawing characters used to make tables in text 739 file. Therefore, when a CJK font is used for GUI Vim or 740 Vim is running inside a terminal (emulators) that uses a CJK font 741 (or Vim is run inside an xterm invoked with "-cjkwidth" option.), 742 this option should be set to "double" to match the width perceived 743 by Vim with the width of glyphs in the font. Perhaps it also has 744 to be set to "double" under CJK MS-Windows when the system locale is 745 set to one of CJK locales. See Unicode Standard Annex #11 746 (https://www.unicode.org/reports/tr11). 747 748 *'arabic'* *'arab'* *'noarabic'* *'noarab'* 749'arabic' 'arab' boolean (default off) 750 local to window 751 This option can be set to start editing Arabic text. 752 Setting this option will: 753 - Set the 'rightleft' option, unless 'termbidi' is set. 754 - Set the 'arabicshape' option, unless 'termbidi' is set. 755 - Set the 'keymap' option to "arabic"; in Insert mode CTRL-^ toggles 756 between typing English and Arabic key mapping. 757 - Set the 'delcombine' option 758 759 Resetting this option will: 760 - Reset the 'rightleft' option. 761 - Disable the use of 'keymap' (without changing its value). 762 Note that 'arabicshape' and 'delcombine' are not reset (it is a global 763 option). 764 Also see |l10n-arabic.txt|. 765 766 *'arabicshape'* *'arshape'* *'noarabicshape'* *'noarshape'* 767'arabicshape' 'arshape' boolean (default on) 768 global 769 When on and 'termbidi' is off, the required visual character 770 corrections that need to take place for displaying the Arabic language 771 take effect. Shaping, in essence, gets enabled; the term is a broad 772 one which encompasses: 773 a) the changing/morphing of characters based on their location 774 within a word (initial, medial, final and stand-alone). 775 b) the enabling of the ability to compose characters 776 c) the enabling of the required combining of some characters 777 When disabled the display shows each character's true stand-alone 778 form. 779 Arabic is a complex language which requires other settings, for 780 further details see |l10n-arabic.txt|. 781 782 *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* 783'autochdir' 'acd' boolean (default off) 784 global 785 When on, Nvim will change its global |current-directory| to the parent 786 of the current file, whenever you open a file, switch buffers, delete 787 a buffer or open/close a window. 788 789 When a buffer has no name it also has no directory, thus the current 790 directory won't change when navigating to it. 791 792 Note: When this option is on some plugins may not work. 793 794 Alternatively, consider using |:bcd|, |:lcd|, or |:tcd| in an autocmd, 795 to selectively set a local (not global) directory. See |project-dir|. 796 797 *'autocomplete'* *'ac'* *'noautocomplete'* *'noac'* 798'autocomplete' 'ac' boolean (default off) 799 global or local to buffer |global-local| 800 When on, Vim shows a completion menu as you type, similar to using 801 |i_CTRL-N|, but triggered automatically. See |ins-autocompletion|. 802 803 *'autocompletedelay'* *'acl'* 804'autocompletedelay' 'acl' number (default 0) 805 global 806 Delay in milliseconds before the autocomplete menu appears after 807 typing. If you prefer it not to open too quickly, set this value 808 slightly above your typing speed. See |ins-autocompletion|. 809 810 *'autocompletetimeout'* *'act'* 811'autocompletetimeout' 'act' number (default 80) 812 global 813 Initial timeout (in milliseconds) for the decaying time-sliced 814 completion algorithm. Starts at this value, halves for each slower 815 source until a minimum is reached. All sources run, but slower ones 816 are quickly de-prioritized. The default is tuned so the popup menu 817 opens within ~200ms even with multiple slow sources on a slow system. 818 Changing this value is rarely needed. Only 80 or higher is valid. 819 Special case: when 'complete' contains "F" or "o" (function sources), 820 a longer timeout is used, allowing up to ~1s for sources such as LSP 821 servers that may sometimes take longer (e.g., while loading modules). 822 See |ins-autocompletion|. 823 824 *'autoindent'* *'ai'* *'noautoindent'* *'noai'* 825'autoindent' 'ai' boolean (default on) 826 local to buffer 827 Copy indent from current line when starting a new line (typing <CR> 828 in Insert mode or when using the "o" or "O" command). If you do not 829 type anything on the new line except <BS> or CTRL-D and then type 830 <Esc>, CTRL-O or <CR>, the indent is deleted again. Moving the cursor 831 to another line has the same effect, unless the 'I' flag is included 832 in 'cpoptions'. 833 When autoindent is on, formatting (with the "gq" command or when you 834 reach 'textwidth' in Insert mode) uses the indentation of the first 835 line. 836 When 'smartindent' or 'cindent' is on the indent is changed in 837 a different way. 838 839 *'autoread'* *'ar'* *'noautoread'* *'noar'* 840'autoread' 'ar' boolean (default on) 841 global or local to buffer |global-local| 842 When a file was changed outside of Nvim, automatically read it again. 843 Skipped if the file was deleted (so you still have the last-available 844 text). If the file appears again, then it is read; you can |undo| to 845 see the previous contents. |timestamp| 846 847 This is driven (partially) by OS filewatcher events |uv_fs_event_t|, 848 so buffers are updated immediately (instead of only on focus-change or 849 shell-commands). 850 851 If this option has a local value, use this command to switch back to 852 using the global value: >vim 853 set autoread< 854< 855 856 *'autowrite'* *'aw'* *'noautowrite'* *'noaw'* 857'autowrite' 'aw' boolean (default off) 858 global 859 Write the contents of the file, if it has been modified, on each 860 `:next`, `:rewind`, `:last`, `:first`, `:previous`, `:tag`, `:stop`, 861 `:suspend`, `:!`, `:make`, `:terminal`, CTRL-] or CTRL-^ command; and 862 when a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command 863 switches to another file. 864 A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is 865 set to "hide" and `:next` is used. 866 Note that for some commands the 'autowrite' option is not used, see 867 'autowriteall' for that. 868 Some buffers will not be written, specifically when 'buftype' is 869 "nowrite", "nofile", "terminal" or "prompt". 870 USE WITH CARE: If you make temporary changes to a buffer that you 871 don't want to be saved this option may cause it to be saved anyway. 872 Renaming the buffer with ":file {name}" may help avoid this. 873 874 *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* 875'autowriteall' 'awa' boolean (default off) 876 global 877 Like 'autowrite', but also used for commands `:edit`, `:enew`, 878 `:quit`, `:qall`, `:exit`, `:xit`, `:recover` and closing the Vim 879 window. 880 Setting this option also implies that Vim behaves like 'autowrite' has 881 been set. 882 883 *'background'* *'bg'* 884'background' 'bg' string (default "dark") 885 global 886 When set to "dark" or "light", adjusts the default color groups for 887 that background type. The |TUI| or other UI sets this on startup 888 if it can detect the background color, and re-detects it whenever a UI 889 attaches later, unless 'background' was set explicitly. When multiple 890 UIs are attached they share one value, decided by "last wins" (may 891 not be the most recently-attached UI, since it depends on response 892 speed). 893 894 This option does NOT change the background color, it tells Nvim what 895 the "inherited" (terminal/GUI) background looks like. See |:hi-normal| 896 to set the background color explicitly. 897 *g:colors_name* 898 When a color scheme is loaded (the "g:colors_name" variable is set) 899 changing 'background' will cause the color scheme to be reloaded. If 900 the color scheme adjusts to the value of 'background' this will work. 901 However, if the color scheme sets 'background' itself the effect may 902 be undone. First delete the "g:colors_name" variable when needed. 903 904 Historically, this option was set in the vimrc file. Example: >vim 905 if $TERM ==# "xterm" 906 set background=dark 907 endif 908< When this option is changed, the defaults for highlight groups 909 will change. To override those defaults, place ":highlight" commands 910 AFTER setting the 'background' option. 911 912 *'backspace'* *'bs'* 913'backspace' 'bs' string (default "indent,eol,start") 914 global 915 Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert 916 mode. This is a list of items, separated by commas. Each item allows 917 a way to backspace over something: 918 value effect ~ 919 indent allow backspacing over autoindent 920 eol allow backspacing over line breaks (join lines) 921 start allow backspacing over the start of insert; CTRL-W and CTRL-U 922 stop once at the start of insert. 923 nostop like start, except CTRL-W and CTRL-U do not stop at the start 924 of insert. 925 926 When the value is empty, Vi compatible backspacing is used, none of 927 the ways mentioned for the items above are possible. 928 929 *'backup'* *'bk'* *'nobackup'* *'nobk'* 930'backup' 'bk' boolean (default off) 931 global 932 Make a backup before overwriting a file. Leave it around after the 933 file has been successfully written. If you do not want to keep the 934 backup file, but you do want a backup while the file is being 935 written, reset this option and set the 'writebackup' option (this is 936 the default). If you do not want a backup file at all reset both 937 options (use this if your file system is almost full). See the 938 |backup-table| for more explanations. 939 When the 'backupskip' pattern matches, a backup is not made anyway. 940 When 'patchmode' is set, the backup may be renamed to become the 941 oldest version of a file. 942 943 *'backupcopy'* *'bkc'* 944'backupcopy' 'bkc' string (default "auto") 945 global or local to buffer |global-local| 946 When writing a file and a backup is made, this option tells how it's 947 done. This is a comma-separated list of words. 948 949 The main values are: 950 "yes" make a copy of the file and overwrite the original one 951 "no" rename the file and write a new one 952 "auto" one of the previous, what works best 953 954 Extra values that can be combined with the ones above are: 955 "breaksymlink" always break symlinks when writing 956 "breakhardlink" always break hardlinks when writing 957 958 Making a copy and overwriting the original file: 959 - Takes extra time to copy the file. 960 + When the file has special attributes, is a (hard/symbolic) link or 961 has a resource fork, all this is preserved. 962 - When the file is a link the backup will have the name of the link, 963 not of the real file. 964 965 Renaming the file and writing a new one: 966 + It's fast. 967 - Sometimes not all attributes of the file can be copied to the new 968 file. 969 - When the file is a link the new file will not be a link. 970 971 The "auto" value is the middle way: When Vim sees that renaming the 972 file is possible without side effects (the attributes can be passed on 973 and the file is not a link) that is used. When problems are expected, 974 a copy will be made. 975 976 The "breaksymlink" and "breakhardlink" values can be used in 977 combination with any of "yes", "no" and "auto". When included, they 978 force Vim to always break either symbolic or hard links by doing 979 exactly what the "no" option does, renaming the original file to 980 become the backup and writing a new file in its place. This can be 981 useful for example in source trees where all the files are symbolic or 982 hard links and any changes should stay in the local source tree, not 983 be propagated back to the original source. 984 *crontab* 985 One situation where "no" and "auto" will cause problems: A program 986 that opens a file, invokes Vim to edit that file, and then tests if 987 the open file was changed (through the file descriptor) will check the 988 backup file instead of the newly created file. "crontab -e" is an 989 example, as are several |file-watcher| daemons like inotify. In that 990 case you probably want to switch this option. 991 992 When a copy is made, the original file is truncated and then filled 993 with the new text. This means that protection bits, owner and 994 symbolic links of the original file are unmodified. The backup file, 995 however, is a new file, owned by the user who edited the file. The 996 group of the backup is set to the group of the original file. If this 997 fails, the protection bits for the group are made the same as for 998 others. 999 1000 When the file is renamed, this is the other way around: The backup has 1001 the same attributes of the original file, and the newly written file 1002 is owned by the current user. When the file was a (hard/symbolic) 1003 link, the new file will not! That's why the "auto" value doesn't 1004 rename when the file is a link. The owner and group of the newly 1005 written file will be set to the same ones as the original file, but 1006 the system may refuse to do this. In that case the "auto" value will 1007 again not rename the file. 1008 1009 *'backupdir'* *'bdir'* 1010'backupdir' 'bdir' string (default ".,$XDG_STATE_HOME/nvim/backup//") 1011 global 1012 Disallowed in |modeline|. |no-modeline-option| 1013 List of directories for the backup file, separated with commas. 1014 - The backup file will be created in the first directory in the list 1015 where this is possible. If none of the directories exist Nvim will 1016 attempt to create the last directory in the list. 1017 - Empty means that no backup file will be created ('patchmode' is 1018 impossible!). Writing may fail because of this. 1019 - A directory "." means to put the backup file in the same directory 1020 as the edited file. 1021 - A directory starting with "./" (or ".\" for MS-Windows) means to put 1022 the backup file relative to where the edited file is. The leading 1023 "." is replaced with the path name of the edited file. 1024 ("." inside a directory name has no special meaning). 1025 - Spaces after the comma are ignored, other spaces are considered part 1026 of the directory name. To have a space at the start of a directory 1027 name, precede it with a backslash. 1028 - To include a comma in a directory name precede it with a backslash. 1029 - A directory name may end in an '/'. 1030 - For Unix and Win32, if a directory ends in two path separators "//", 1031 the swap file name will be built from the complete path to the file 1032 with all path separators changed to percent '%' signs. This will 1033 ensure file name uniqueness in the backup directory. 1034 On Win32, it is also possible to end with "\\". However, When a 1035 separating comma is following, you must use "//", since "\\" will 1036 include the comma in the file name. Therefore it is recommended to 1037 use '//', instead of '\\'. 1038 - Environment variables are expanded |:set_env|. 1039 - Careful with '\' characters, type one before a space, type two to 1040 get one in the option (see |option-backslash|), for example: >vim 1041 set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces 1042< 1043 See also 'backup' and 'writebackup' options. 1044 If you want to hide your backup files on Unix, consider this value: >vim 1045 set backupdir=./.backup,~/.backup,.,/tmp 1046< You must create a ".backup" directory in each directory and in your 1047 home directory for this to work properly. 1048 The use of |:set+=| and |:set-=| is preferred when adding or removing 1049 directories from the list. This avoids problems when a future version 1050 uses another default. 1051 1052 *'backupext'* *'bex'* *E589* 1053'backupext' 'bex' string (default "~") 1054 global 1055 String which is appended to a file name to make the name of the 1056 backup file. The default is quite unusual, because this avoids 1057 accidentally overwriting existing files with a backup file. You might 1058 prefer using ".bak", but make sure that you don't have files with 1059 ".bak" that you want to keep. 1060 Only normal file name characters can be used; `/\*?[|<>` are illegal. 1061 1062 If you like to keep a lot of backups, you could use a BufWritePre 1063 autocommand to change 'backupext' just before writing the file to 1064 include a timestamp. >vim 1065 au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~' 1066< Use 'backupdir' to put the backup in a different directory. 1067 1068 *'backupskip'* *'bsk'* 1069'backupskip' 'bsk' string (default "$TMPDIR/*,$TMP/*,$TEMP/*" 1070 Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" 1071 Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") 1072 global 1073 A list of file patterns. When one of the patterns matches with the 1074 name of the file which is written, no backup file is created. Both 1075 the specified file name and the full path name of the file are used. 1076 The pattern is used like with |:autocmd|, see |autocmd-pattern|. 1077 Watch out for special characters, see |option-backslash|. 1078 When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the 1079 default value. "/tmp/*" is only used for Unix. 1080 1081 WARNING: Not having a backup file means that when Vim fails to write 1082 your buffer correctly and then, for whatever reason, Vim exits, you 1083 lose both the original file and what you were writing. Only disable 1084 backups if you don't care about losing the file. 1085 1086 Note that environment variables are not expanded. If you want to use 1087 $HOME you must expand it explicitly, e.g.: >vim 1088 let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' 1089 1090< Note that the default also makes sure that "crontab -e" works (when a 1091 backup would be made by renaming the original file crontab won't see 1092 the newly created file). Also see 'backupcopy' and |crontab|. 1093 1094 *'belloff'* *'bo'* 1095'belloff' 'bo' string (default "all") 1096 global 1097 Specifies for which events the bell will not be rung. It is a comma- 1098 separated list of items. For each item that is present, the bell will 1099 be silenced. This is most useful to specify specific events in insert 1100 mode to be silenced. 1101 You can also make it flash by using 'visualbell'. 1102 1103 item meaning when present ~ 1104 all All events. 1105 backspace When hitting <BS> or <Del> and deleting results in an 1106 error. 1107 cursor Fail to move around using the cursor keys or 1108 <PageUp>/<PageDown> in |Insert-mode|. 1109 complete Error occurred when using |i_CTRL-X_CTRL-K| or 1110 |i_CTRL-X_CTRL-T|. 1111 copy Cannot copy char from insert mode using |i_CTRL-Y| or 1112 |i_CTRL-E|. 1113 ctrlg Unknown Char after <C-G> in Insert mode. 1114 error Other Error occurred (e.g. try to join last line) 1115 (mostly used in |Normal-mode| or |Cmdline-mode|). 1116 esc hitting <Esc> in |Normal-mode|. 1117 hangul Ignored. 1118 lang Calling the beep module for Lua/Mzscheme/TCL. 1119 mess No output available for |g<|. 1120 showmatch Error occurred for 'showmatch' function. 1121 operator Empty region error |cpo-E|. 1122 register Unknown register after <C-R> in |Insert-mode|. 1123 shell Bell from shell output |:!|. 1124 spell Error happened on spell suggest. 1125 term Bell from |:terminal| output. 1126 wildmode More matches in |cmdline-completion| available 1127 (depends on the 'wildmode' setting). 1128 1129 This is most useful to fine tune when in Insert mode the bell should 1130 be rung. For Normal mode and Ex commands, the bell is often rung to 1131 indicate that an error occurred. It can be silenced by adding the 1132 "error" keyword. 1133 1134 *'binary'* *'bin'* *'nobinary'* *'nobin'* 1135'binary' 'bin' boolean (default off) 1136 local to buffer 1137 This option should be set before editing a binary file. You can also 1138 use the |-b| Vim argument. When this option is switched on a few 1139 options will be changed (also when it already was on): 1140 'textwidth' will be set to 0 1141 'wrapmargin' will be set to 0 1142 'modeline' will be off 1143 'expandtab' will be off 1144 Also, 'fileformat' and 'fileformats' options will not be used, the 1145 file is read and written like 'fileformat' was "unix" (a single <NL> 1146 separates lines). 1147 The 'fileencoding' and 'fileencodings' options will not be used, the 1148 file is read without conversion. 1149 NOTE: When you start editing a(nother) file while the 'bin' option is 1150 on, settings from autocommands may change the settings again (e.g., 1151 'textwidth'), causing trouble when editing. You might want to set 1152 'bin' again when the file has been loaded. 1153 The previous values of these options are remembered and restored when 1154 'bin' is switched from on to off. Each buffer has its own set of 1155 saved option values. 1156 To edit a file with 'binary' set you can use the |++bin| argument. 1157 This avoids you have to do ":set bin", which would have effect for all 1158 files you edit. 1159 When writing a file the <EOL> for the last line is only written if 1160 there was one in the original file (normally Vim appends an <EOL> to 1161 the last line if there is none; this would make the file longer). See 1162 the 'endofline' option. 1163 1164 *'bomb'* *'nobomb'* 1165'bomb' boolean (default off) 1166 local to buffer 1167 When writing a file and the following conditions are met, a BOM (Byte 1168 Order Mark) is prepended to the file: 1169 - this option is on 1170 - the 'binary' option is off 1171 - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big 1172 endian variants. 1173 Some applications use the BOM to recognize the encoding of the file. 1174 Often used for UCS-2 files on MS-Windows. For other applications it 1175 causes trouble, for example: "cat file1 file2" makes the BOM of file2 1176 appear halfway through the resulting file. Gcc doesn't accept a BOM. 1177 When Vim reads a file and 'fileencodings' starts with "ucs-bom", a 1178 check for the presence of the BOM is done and 'bomb' set accordingly. 1179 Unless 'binary' is set, it is removed from the first line, so that you 1180 don't see it when editing. When you don't change the options, the BOM 1181 will be restored when writing the file. 1182 1183 *'breakat'* *'brk'* 1184'breakat' 'brk' string (default " ^I!@*-+;:,./?") 1185 global 1186 This option lets you choose which characters might cause a line 1187 break if 'linebreak' is on. Only works for ASCII characters. 1188 1189 *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'* 1190'breakindent' 'bri' boolean (default off) 1191 local to window 1192 Every wrapped line will continue visually indented (same amount of 1193 space as the beginning of that line), thus preserving horizontal 1194 blocks of text. 1195 1196 *'breakindentopt'* *'briopt'* 1197'breakindentopt' 'briopt' string (default "") 1198 local to window 1199 Settings for 'breakindent'. It can consist of the following optional 1200 items and must be separated by a comma: 1201 min:{n} Minimum text width that will be kept after 1202 applying 'breakindent', even if the resulting 1203 text should normally be narrower. This prevents 1204 text indented almost to the right window border 1205 occupying lots of vertical space when broken. 1206 (default: 20) 1207 shift:{n} After applying 'breakindent', the wrapped line's 1208 beginning will be shifted by the given number of 1209 characters. It permits dynamic French paragraph 1210 indentation (negative) or emphasizing the line 1211 continuation (positive). 1212 (default: 0) 1213 sbr Display the 'showbreak' value before applying the 1214 additional indent. 1215 (default: off) 1216 list:{n} Adds an additional indent for lines that match a 1217 numbered or bulleted list (using the 1218 'formatlistpat' setting). 1219 (default: 0) 1220 list:-1 Uses the width of a match with 'formatlistpat' for 1221 indentation. 1222 column:{n} Indent at column {n}. Will overrule the other 1223 sub-options. Note: an additional indent may be 1224 added for the 'showbreak' setting. 1225 (default: off) 1226 1227 *'bufhidden'* *'bh'* 1228'bufhidden' 'bh' string (default "") 1229 local to buffer |local-noglobal| 1230 This option specifies what happens when a buffer is no longer 1231 displayed in a window: 1232 <empty> follow the global 'hidden' option 1233 hide hide the buffer (don't unload it), even if 'hidden' is 1234 not set 1235 unload unload the buffer, even if 'hidden' is set; the 1236 |:hide| command will also unload the buffer 1237 delete delete the buffer from the buffer list, even if 1238 'hidden' is set; the |:hide| command will also delete 1239 the buffer, making it behave like |:bdelete| 1240 wipe wipe the buffer from the buffer list, even if 1241 'hidden' is set; the |:hide| command will also wipe 1242 out the buffer, making it behave like |:bwipeout| 1243 1244 CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer 1245 are lost without a warning. Also, these values may break autocommands 1246 that switch between buffers temporarily. 1247 This option is used together with 'buftype' and 'swapfile' to specify 1248 special kinds of buffers. See |special-buffers|. 1249 1250 *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85* 1251'buflisted' 'bl' boolean (default on) 1252 local to buffer 1253 When this option is set, the buffer shows up in the buffer list. If 1254 it is reset it is not used for ":bnext", "ls", the Buffers menu, etc. 1255 This option is reset by Vim for buffers that are only used to remember 1256 a file name or marks. Vim sets it when starting to edit a buffer. 1257 But not when moving to a buffer with ":buffer". 1258 1259 *'buftype'* *'bt'* *E382* 1260'buftype' 'bt' string (default "") 1261 local to buffer |local-noglobal| 1262 The value of this option specifies the type of a buffer: 1263 (empty) Normal buffer. 1264 acwrite Buffer will always be written with |BufWriteCmd|. 1265 help Help buffer (do not set this manually). 1266 nofile Buffer is not a file, will not be written. 1267 nowrite Buffer represents a filepath (such as a directory), 1268 but will not be written. 1269 prompt Buffer where only the last section can be edited, for 1270 use by plugins. |prompt-buffer| 1271 quickfix List of errors |:cwindow| or locations |:lwindow| 1272 terminal |terminal-emulator| buffer 1273 1274 This option is used together with 'bufhidden' and 'swapfile' to 1275 specify special kinds of buffers. See |special-buffers|. 1276 Also see |win_gettype()|, which returns the type of the window. 1277 1278 Be careful with changing this option, it can have many side effects! 1279 One such effect is that Vim will not check the timestamp of the file, 1280 if the file is changed by another program this will not be noticed. 1281 1282 A "quickfix" buffer is only used for the error list and the location 1283 list. This value is set by the |:cwindow| and |:lwindow| commands and 1284 you are not supposed to change it. 1285 1286 "nofile" and "nowrite" buffers are similar: 1287 both: The buffer is not to be written to disk, ":w" doesn't 1288 work (":w filename" does work though). 1289 both: The buffer is never considered to be 'modified'. 1290 There is no warning when the changes will be lost, for 1291 example when you quit Vim. 1292 both: A swap file is only created when using too much memory 1293 (when 'swapfile' has been reset there is never a swap 1294 file). 1295 nofile only: The buffer name is fixed, it is not handled like a 1296 file name. It is not modified in response to a |:cd| 1297 command. 1298 both: When using ":e bufname" and already editing "bufname" 1299 the buffer is made empty and autocommands are 1300 triggered as usual for |:edit|. 1301 *E676* 1302 "acwrite" implies that the buffer name is not related to a file, like 1303 "nofile", but it will be written. Thus, in contrast to "nofile" and 1304 "nowrite", ":w" does work and a modified buffer can't be abandoned 1305 without saving. For writing there must be matching |BufWriteCmd|, 1306 |FileWriteCmd| or |FileAppendCmd| autocommands. 1307 1308 *'busy'* 1309'busy' number (default 0) 1310 local to buffer 1311 Sets a buffer "busy" status. Indicated in the default statusline. 1312 When busy status is larger then 0 busy flag is shown in statusline. 1313 The semantics of "busy" are arbitrary, typically decided by the plugin that owns the buffer. 1314 1315 *'casemap'* *'cmp'* 1316'casemap' 'cmp' string (default "internal,keepascii") 1317 global 1318 Specifies details about changing the case of letters. It may contain 1319 these words, separated by a comma: 1320 internal Use internal case mapping functions, the current 1321 locale does not change the case mapping. When 1322 "internal" is omitted, the towupper() and towlower() 1323 system library functions are used when available. 1324 keepascii For the ASCII characters (0x00 to 0x7f) use the US 1325 case mapping, the current locale is not effective. 1326 This probably only matters for Turkish. 1327 1328 *'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'* 1329'cdhome' 'cdh' boolean (default on on Unix, off on Windows) 1330 global 1331 Disallowed in |modeline|. |no-modeline-option| 1332 When on, |:cd|, |:tcd|, |:lcd| and |:bcd| without an argument changes the 1333 current working directory to the |$HOME| directory like in Unix. 1334 When off, those commands just print the current directory name. 1335 1336 *'cdpath'* *'cd'* *E344* *E346* 1337'cdpath' 'cd' string (default equivalent to $CDPATH or ",,") 1338 global 1339 Disallowed in |modeline|. |no-modeline-option| 1340 This is a list of directories which will be searched when using the 1341 |:cd|, |:tcd|, |:lcd| and |:bcd| commands, provided that the directory being 1342 searched for has a relative path, not an absolute part starting with 1343 "/", "./" or "../", the 'cdpath' option is not used then. 1344 The 'cdpath' option's value has the same form and semantics as 1345 'path'. Also see |file-searching|. 1346 The default value is taken from $CDPATH, with a "," prepended to look 1347 in the current directory first. 1348 If the default value taken from $CDPATH is not what you want, include 1349 a modified version of the following command in your vimrc file to 1350 override it: >vim 1351 let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') 1352< Environment variables are expanded |:set_env|. 1353 (parts of 'cdpath' can be passed to the shell to expand file names). 1354 1355 *'cedit'* 1356'cedit' string (default CTRL-F) 1357 global 1358 The key used in Command-line Mode to open the command-line window. 1359 Only non-printable keys are allowed. 1360 The key can be specified as a single character, but it is difficult to 1361 type. The preferred way is to use |key-notation| (e.g. <Up>, <C-F>) or 1362 a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: >vim 1363 set cedit=^Y 1364 set cedit=<Esc> 1365< |Nvi| also has this option, but it only uses the first character. 1366 See |cmdwin|. 1367 1368 *'channel'* 1369'channel' number (default 0) 1370 local to buffer 1371 |channel| connected to the buffer, or 0 if no channel is connected. 1372 In a |:terminal| buffer this is the terminal channel. 1373 Read-only. 1374 1375 *'charconvert'* *'ccv'* *E202* *E214* *E513* 1376'charconvert' 'ccv' string (default "") 1377 global 1378 Disallowed in |modeline|. |no-modeline-option| 1379 An expression that is used for character encoding conversion. It is 1380 evaluated when a file that is to be read or has been written has a 1381 different encoding from what is desired. 1382 'charconvert' is not used when the internal iconv() function is 1383 supported and is able to do the conversion. Using iconv() is 1384 preferred, because it is much faster. 1385 'charconvert' is not used when reading stdin |--|, because there is no 1386 file to convert from. You will have to save the text in a file first. 1387 The expression must return zero, false or an empty string for success, 1388 non-zero or true for failure. 1389 See |encoding-names| for possible encoding names. 1390 Additionally, names given in 'fileencodings' and 'fileencoding' are 1391 used. 1392 Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8" 1393 is done internally by Vim, 'charconvert' is not used for this. 1394 Also used for Unicode conversion. 1395 Example: >lua 1396 vim.o.charconvert = function() 1397 vim.fn.system(('recode %s..%s <%s >%s'):format( 1398 vim.v.charconvert_from, vim.v.charconvert_to, 1399 vim.v.fname_in, vim.v.fname_out)) 1400 return vim.v.shell_error 1401 end 1402< The related Vim variables are: 1403 v:charconvert_from name of the current encoding 1404 v:charconvert_to name of the desired encoding 1405 v:fname_in name of the input file 1406 v:fname_out name of the output file 1407 Note that v:fname_in and v:fname_out will never be the same. 1408 1409 The advantage of using a function call without arguments is that it is 1410 faster, see |expr-option-function|. 1411 1412 If the 'charconvert' expression starts with s: or |<SID>|, then it is 1413 replaced with the script ID (|local-function|). Example: >vim 1414 set charconvert=s:MyConvert() 1415 set charconvert=<SID>SomeConvert() 1416< Otherwise the expression is evaluated in the context of the script 1417 where the option was set, thus script-local items are available. 1418 1419 *'chistory'* *'chi'* *E1542* *E1543* 1420'chistory' 'chi' number (default 10) 1421 global 1422 Number of quickfix lists that should be remembered for the quickfix 1423 stack. Must be between 1 and 100. If the option is set to a value 1424 that is lower than the amount of entries in the quickfix list stack, 1425 entries will be removed starting from the oldest one. If the current 1426 quickfix list was removed, then the quickfix list at top of the stack 1427 (the most recently created) will be used in its place. For additional 1428 info, see |quickfix-stack|. 1429 1430 *'cindent'* *'cin'* *'nocindent'* *'nocin'* 1431'cindent' 'cin' boolean (default off) 1432 local to buffer 1433 Enables automatic C program indenting. See 'cinkeys' to set the keys 1434 that trigger reindenting in insert mode and 'cinoptions' to set your 1435 preferred indent style. 1436 If 'indentexpr' is not empty, it overrules 'cindent'. 1437 If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty, 1438 the "=" operator indents using this algorithm rather than calling an 1439 external program. 1440 See |C-indenting|. 1441 When you don't like the way 'cindent' works, try the 'smartindent' 1442 option or 'indentexpr'. 1443 1444 *'cinkeys'* *'cink'* 1445'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e") 1446 local to buffer 1447 A list of keys that, when typed in Insert mode, cause reindenting of 1448 the current line. Only used if 'cindent' is on and 'indentexpr' is 1449 empty. 1450 For the format of this option see |cinkeys-format|. 1451 See |C-indenting|. 1452 1453 *'cinoptions'* *'cino'* 1454'cinoptions' 'cino' string (default "") 1455 local to buffer 1456 The 'cinoptions' affect the way 'cindent' reindents lines in a C 1457 program. See |cinoptions-values| for the values of this option, and 1458 |C-indenting| for info on C indenting in general. 1459 1460 *'cinscopedecls'* *'cinsd'* 1461'cinscopedecls' 'cinsd' string (default "public,protected,private") 1462 local to buffer 1463 Keywords that are interpreted as a C++ scope declaration by |cino-g|. 1464 Useful e.g. for working with the Qt framework that defines additional 1465 scope declarations "signals", "public slots" and "private slots": >vim 1466 set cinscopedecls+=signals,public\ slots,private\ slots 1467< 1468 1469 *'cinwords'* *'cinw'* 1470'cinwords' 'cinw' string (default "if,else,while,do,for,switch") 1471 local to buffer 1472 These keywords start an extra indent in the next line when 1473 'smartindent' or 'cindent' is set. For 'cindent' this is only done at 1474 an appropriate place (inside {}). 1475 Note that 'ignorecase' isn't used for 'cinwords'. If case doesn't 1476 matter, include the keyword both the uppercase and lowercase: 1477 "if,If,IF". 1478 1479 *'clipboard'* *'cb'* 1480'clipboard' 'cb' string (default "") 1481 global 1482 This option is a list of comma-separated names. 1483 These names are recognized: 1484 1485 *clipboard-unnamed* 1486 unnamed When included, Vim will use the clipboard register "*" 1487 for all yank, delete, change and put operations which 1488 would normally go to the unnamed register. When a 1489 register is explicitly specified, it will always be 1490 used regardless of whether "unnamed" is in 'clipboard' 1491 or not. The clipboard register can always be 1492 explicitly accessed using the "* notation. Also see 1493 |clipboard|. 1494 1495 *clipboard-unnamedplus* 1496 unnamedplus A variant of the "unnamed" flag which uses the 1497 clipboard register "+" (|quoteplus|) instead of 1498 register "*" for all yank, delete, change and put 1499 operations which would normally go to the unnamed 1500 register. When "unnamed" is also included to the 1501 option, yank and delete operations (but not put) 1502 will additionally copy the text into register 1503 "*". See |clipboard|. 1504 1505 *'cmdheight'* *'ch'* 1506'cmdheight' 'ch' number (default 1) 1507 global or local to tabpage 1508 Number of screen lines to use for the command-line. Helps avoiding 1509 |hit-enter| prompts. 1510 The value of this option is stored with the tabpage, so that each 1511 tabpage can have a different value. 1512 1513 When 'cmdheight' is zero, there is no command-line unless it is being 1514 used. The command-line will cover the last line of the screen when 1515 shown. 1516 1517 WARNING: `cmdheight=0` is EXPERIMENTAL. Works better with |ui2| enabled. 1518 1519 *'cmdwinheight'* *'cwh'* 1520'cmdwinheight' 'cwh' number (default 7) 1521 global 1522 Number of screen lines to use for the command-line window. |cmdwin| 1523 1524 *'colorcolumn'* *'cc'* 1525'colorcolumn' 'cc' string (default "") 1526 local to window 1527 'colorcolumn' is a comma-separated list of screen columns that are 1528 highlighted with ColorColumn |hl-ColorColumn|. Useful to align 1529 text. Will make screen redrawing slower. 1530 The screen column can be an absolute number, or a number preceded with 1531 '+' or '-', which is added to or subtracted from 'textwidth'. >vim 1532 1533 set cc=+1 " highlight column after 'textwidth' 1534 set cc=+1,+2,+3 " highlight three columns after 'textwidth' 1535 hi ColorColumn ctermbg=lightgrey guibg=lightgrey 1536< 1537 When 'textwidth' is zero then the items with '-' and '+' are not used. 1538 A maximum of 256 columns are highlighted. 1539 1540 *'columns'* *'co'* *E594* 1541'columns' 'co' number (default 80 or terminal width) 1542 global 1543 Number of columns of the screen. Normally this is set by the terminal 1544 initialization and does not have to be set by hand. 1545 When Vim is running in the GUI or in a resizable window, setting this 1546 option will cause the window size to be changed. When you only want 1547 to use the size for the GUI, put the command in your |ginit.vim| file. 1548 When you set this option and Vim is unable to change the physical 1549 number of columns of the display, the display may be messed up. For 1550 the GUI it is always possible and Vim limits the number of columns to 1551 what fits on the screen. You can use this command to get the widest 1552 window possible: >vim 1553 set columns=9999 1554< Minimum value is 12, maximum value is 10000. 1555 1556 *'comments'* *'com'* *E524* *E525* 1557'comments' 'com' string (default "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•") 1558 local to buffer 1559 A comma-separated list of strings that can start a comment line. See 1560 |format-comments|. See |option-backslash| about using backslashes to 1561 insert a space. 1562 1563 *'commentstring'* *'cms'* *E537* 1564'commentstring' 'cms' string (default "") 1565 local to buffer 1566 A template for a comment. The "%s" in the value is replaced with the 1567 comment text, and should be padded with a space when possible. 1568 Used for |commenting| and to add markers for folding, see |fold-marker|. 1569 1570 *'complete'* *'cpt'* *E535* 1571'complete' 'cpt' string (default ".,w,b,u,t") 1572 local to buffer 1573 This option controls how completion |ins-completion| behaves when 1574 using CTRL-P, CTRL-N, or |ins-autocompletion|. It is also used for 1575 whole-line completion |i_CTRL-X_CTRL-L|. It indicates the type of 1576 completion and the places to scan. It is a comma-separated list of 1577 flags: 1578 . scan the current buffer ('wrapscan' is ignored) 1579 w scan buffers from other windows 1580 b scan other loaded buffers that are in the buffer list 1581 u scan the unloaded buffers that are in the buffer list 1582 U scan the buffers that are not in the buffer list 1583 k scan the files given with the 'dictionary' option 1584 kspell use the currently active spell checking |spell| 1585 k{dict} scan the file {dict}. Several "k" flags can be given, 1586 patterns are valid too. For example: >vim 1587 set cpt=k/usr/dict/*,k~/spanish 1588< s scan the files given with the 'thesaurus' option 1589 s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns 1590 are valid too. 1591 i scan current and included files 1592 d scan current and included files for defined name or macro 1593 |i_CTRL-X_CTRL-D| 1594 ] tag completion 1595 t same as "]" 1596 f scan the buffer names (as opposed to buffer contents) 1597 F{func} call the function {func}. Multiple "F" flags may be 1598 specified. Refer to |complete-functions| for details on how 1599 the function is invoked and what it should return. The value 1600 can be the name of a function or a |Funcref|. For |Funcref| 1601 values, spaces must be escaped with a backslash ('\'), and 1602 commas with double backslashes ('\\') (see |option-backslash|). 1603 Unlike other sources, functions can provide completions 1604 starting from a non-keyword character before the cursor, and 1605 their start position for replacing text may differ from other 1606 sources. If the Dict returned by the {func} includes 1607 `{"refresh": "always"}`, the function will be invoked again 1608 whenever the leading text changes. 1609 If generating matches is potentially slow, call 1610 |complete_check()| periodically to keep Vim responsive. This 1611 is especially important for |ins-autocompletion|. 1612 F equivalent to using "F{func}", where the function is taken 1613 from the 'completefunc' option. 1614 o equivalent to using "F{func}", where the function is taken 1615 from the 'omnifunc' option. 1616 1617 Unloaded buffers are not loaded, thus their autocmds |:autocmd| are 1618 not executed, this may lead to unexpected completions from some files 1619 (gzipped files for example). Unloaded buffers are not scanned for 1620 whole-line completion. 1621 1622 CTRL-N, CTRL-P, and |ins-autocompletion| can be used for any 1623 'iskeyword'-based completion (dictionary |i_CTRL-X_CTRL-K|, included 1624 patterns |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]|, and normal 1625 expansions). With the "F" and "o" flags in 'complete', non-keywords 1626 can also be completed. 1627 1628 An optional match limit can be specified for a completion source by 1629 appending a caret ("^") followed by a {count} to the source flag. 1630 For example: ".^9,w,u,t^5" limits matches from the current buffer to 9 1631 and from tags to 5. Other sources remain unlimited. 1632 Note: The match limit takes effect only during forward completion 1633 (CTRL-N) and is ignored during backward completion (CTRL-P). 1634 1635 This option cannot be set in a modeline when 'modelineexpr' is off. 1636 1637 *'completefunc'* *'cfu'* 1638'completefunc' 'cfu' string (default "") 1639 local to buffer 1640 Disallowed in |modeline|. |no-modeline-option| 1641 This option specifies a function to be used for Insert mode completion 1642 with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U| 1643 See |complete-functions| for an explanation of how the function is 1644 invoked and what it should return. The value can be the name of a 1645 function, a |lambda| or a |Funcref|. See |option-value-function| for 1646 more information. 1647 1648 *'completeitemalign'* *'cia'* 1649'completeitemalign' 'cia' string (default "abbr,kind,menu") 1650 global 1651 A comma-separated list of strings that controls the alignment and 1652 display order of items in the popup menu during Insert mode 1653 completion. The supported values are "abbr", "kind", and "menu". 1654 These values allow customizing how |complete-items| are shown in the 1655 popup menu. Note: must always contain those three values in any 1656 order. 1657 1658 *'completeopt'* *'cot'* 1659'completeopt' 'cot' string (default "menu,popup") 1660 global or local to buffer |global-local| 1661 A comma-separated list of options for Insert mode completion 1662 |ins-completion|. The supported values are: 1663 1664 fuzzy Enable |fuzzy-matching| for completion candidates. This 1665 allows for more flexible and intuitive matching, where 1666 characters can be skipped and matches can be found even 1667 if the exact sequence is not typed (disabled for thesaurus 1668 completion |compl-thesaurus|). 1669 1670 longest 1671 When 'autocomplete' is not active, only the longest common 1672 prefix of the matches is inserted (disabled for thesaurus 1673 completion |compl-thesaurus|). If the popup menu is 1674 displayed, you can use CTRL-L to add more characters. 1675 Whether case is ignored depends on the type of completion. 1676 For buffer text the 'ignorecase' option applies. 1677 1678 When 'autocomplete' is active and no completion item is 1679 selected, the longest common prefix of the matches is 1680 inserted after the cursor. The prefix is taken either 1681 from all displayed items or only from items in the current 1682 buffer. The inserted text is highlighted with 1683 |hl-PreInsert|, and the cursor position does not change 1684 (similar to `"preinsert"`). Press CTRL-Y to accept. 1685 See also |preinserted()|. 1686 1687 menu Use a popup menu to show the possible completions. The 1688 menu is only shown when there is more than one match. 1689 |ins-completion-menu| 1690 1691 menuone Use the popup menu also when there is only one match. 1692 Useful when there is additional information about the 1693 match, e.g., what file it comes from. 1694 1695 nearest Matches are listed based on their proximity to the cursor 1696 position, unlike the default behavior, which only 1697 considers proximity for matches appearing below the 1698 cursor. This applies only to matches from the current 1699 buffer. No effect if "fuzzy" is present. 1700 1701 noinsert Do not insert any text for a match until the user selects 1702 a match from the menu. Only works in combination with 1703 "menu" or "menuone". No effect if "longest" is present. 1704 1705 noselect Same as "noinsert", except that no menu item is 1706 pre-selected. Takes precedence over "noinsert". Enabled 1707 automatically when 'autocomplete' is on, unless 1708 "preinsert" is also enabled. 1709 1710 nosort Disable sorting of completion candidates based on fuzzy 1711 scores when "fuzzy" is enabled. Candidates will appear 1712 in their original order. 1713 1714 popup Show extra information about the currently selected 1715 completion in a popup window. Only works in combination 1716 with "menu" or "menuone". Overrides "preview". 1717 1718 preinsert 1719 Inserts the text of the first completion candidate beyond 1720 the current leader, highlighted with |hl-PreInsert|. 1721 The cursor does not move. 1722 Requires "fuzzy" to be unset, and either "menuone" in 1723 'completeopt' or 'autocomplete' enabled. When 1724 'autocomplete' is enabled, this does not work if 1725 'ignorecase' is set without 'infercase'. 1726 See also |preinserted()|. 1727 1728 preselect 1729 When one of |complete-items| has its "preselect" field set 1730 (e.g., as indicated by an LSP server), select the first 1731 such item in the |popupmenu-completion|. Takes precedence 1732 over "noselect". 1733 1734 Unlike the implicit selection behavior (when "noselect" is 1735 not set), this preserves the original sort order and 1736 navigates to the preselect item rather than always 1737 selecting the first item. 1738 1739 preview Show extra information about the currently selected 1740 completion in the preview window. Only works in 1741 combination with "menu" or "menuone". 1742 1743 Only "fuzzy", "longest", "popup", "preinsert", "preselect" and 1744 "preview" have an effect when 'autocomplete' is enabled. 1745 1746 This option does not apply to |cmdline-completion|. See 'wildoptions' 1747 for that. 1748 1749 *'completeslash'* *'csl'* 1750'completeslash' 'csl' string (default "") 1751 local to buffer 1752 only modifiable in MS-Windows 1753 When this option is set it overrules 'shellslash' for completion: 1754 - When this option is set to "slash", a forward slash is used for path 1755 completion in insert mode. This is useful when editing HTML tag, or 1756 Makefile with 'noshellslash' on MS-Windows. 1757 - When this option is set to "backslash", backslash is used. This is 1758 useful when editing a batch file with 'shellslash' set on 1759 MS-Windows. 1760 - When this option is empty, same character is used as for 1761 'shellslash'. 1762 For Insert mode completion the buffer-local value is used. For 1763 command line completion the global value is used. 1764 1765 *'completetimeout'* *'cto'* 1766'completetimeout' 'cto' number (default 0) 1767 global 1768 Like 'autocompletetimeout', but applies to |i_CTRL-N| and |i_CTRL-P| 1769 completion. Value of 0 disables the timeout; positive values allowed. 1770 1771 *'concealcursor'* *'cocu'* 1772'concealcursor' 'cocu' string (default "") 1773 local to window 1774 Sets the modes in which text in the cursor line can also be concealed. 1775 When the current mode is listed then concealing happens just like in 1776 other lines. 1777 n Normal mode 1778 v Visual mode 1779 i Insert mode 1780 c Command line editing, for 'incsearch' 1781 1782 'v' applies to all lines in the Visual area, not only the cursor. 1783 A useful value is "nc". This is used in help files. So long as you 1784 are moving around text is concealed, but when starting to insert text 1785 or selecting a Visual area the concealed text is displayed, so that 1786 you can see what you are doing. 1787 Keep in mind that the cursor position is not always where it's 1788 displayed. E.g., when moving vertically it may change column. 1789 1790 *'conceallevel'* *'cole'* 1791'conceallevel' 'cole' number (default 0) 1792 local to window 1793 Determine how text with the "conceal" syntax attribute |:syn-conceal| 1794 is shown: 1795 1796 Value Effect ~ 1797 0 Text is shown normally 1798 1 Each block of concealed text is replaced with one 1799 character. If the syntax item does not have a custom 1800 replacement character defined (see |:syn-cchar|) the 1801 character defined in 'listchars' is used. 1802 It is highlighted with the "Conceal" highlight group. 1803 2 Concealed text is completely hidden unless it has a 1804 custom replacement character defined (see 1805 |:syn-cchar|). 1806 3 Concealed text is completely hidden. 1807 1808 Note: in the cursor line concealed text is not hidden, so that you can 1809 edit and copy the text. This can be changed with the 'concealcursor' 1810 option. 1811 1812 *'confirm'* *'cf'* *'noconfirm'* *'nocf'* 1813'confirm' 'cf' boolean (default off) 1814 global 1815 When 'confirm' is on, certain operations that would normally 1816 fail because of unsaved changes to a buffer, e.g. ":q" and ":e", 1817 instead raise a dialog asking if you wish to save the current 1818 file(s). You can still use a ! to unconditionally |abandon| a buffer. 1819 If 'confirm' is off you can still activate confirmation for one 1820 command only (this is most useful in mappings) with the |:confirm| 1821 command. 1822 Also see the |confirm()| function and the 'v' flag in 'guioptions'. 1823 1824 *'copyindent'* *'ci'* *'nocopyindent'* *'noci'* 1825'copyindent' 'ci' boolean (default off) 1826 local to buffer 1827 Copy the structure of the existing lines indent when autoindenting a 1828 new line. Normally the new indent is reconstructed by a series of 1829 tabs followed by spaces as required (unless 'expandtab' is enabled, 1830 in which case only spaces are used). Enabling this option makes the 1831 new line copy whatever characters were used for indenting on the 1832 existing line. 'expandtab' has no effect on these characters, a Tab 1833 remains a Tab. If the new indent is greater than on the existing 1834 line, the remaining space is filled in the normal manner. 1835 See 'preserveindent'. 1836 1837 *'cpoptions'* *'cpo'* *cpo* 1838'cpoptions' 'cpo' string (default "aABceFs_") 1839 global 1840 A sequence of single character flags. When a character is present 1841 this indicates Vi-compatible behavior. This is used for things where 1842 not being Vi-compatible is mostly or sometimes preferred. 1843 'cpoptions' stands for "compatible-options". 1844 Commas can be added for readability. 1845 To avoid problems with flags that are added in the future, use the 1846 "+=" and "-=" feature of ":set" |add-option-flags|. 1847 1848 contains behavior ~ 1849 *cpo-a* 1850 a When included, a ":read" command with a file name 1851 argument will set the alternate file name for the 1852 current window. 1853 *cpo-A* 1854 A When included, a ":write" command with a file name 1855 argument will set the alternate file name for the 1856 current window. 1857 *cpo-b* 1858 b "\|" in a ":map" command is recognized as the end of 1859 the map command. The '\' is included in the mapping, 1860 the text after the '|' is interpreted as the next 1861 command. Use a CTRL-V instead of a backslash to 1862 include the '|' in the mapping. Applies to all 1863 mapping, abbreviation, menu and autocmd commands. 1864 See also |map_bar|. 1865 *cpo-B* 1866 B A backslash has no special meaning in mappings, 1867 abbreviations, user commands and the "to" part of the 1868 menu commands. Remove this flag to be able to use a 1869 backslash like a CTRL-V. For example, the command 1870 ":map X \<Esc>" results in X being mapped to: 1871 'B' included: "\^[" (^[ is a real <Esc>) 1872 'B' excluded: "<Esc>" (5 characters) 1873 *cpo-c* 1874 c Searching continues at the end of any match at the 1875 cursor position, but not further than the start of the 1876 next line. When not present searching continues 1877 one character from the cursor position. With 'c' 1878 "abababababab" only gets three matches when repeating 1879 "/abab", without 'c' there are five matches. 1880 *cpo-C* 1881 C Do not concatenate sourced lines that start with a 1882 backslash. See |line-continuation|. 1883 *cpo-d* 1884 d Using "./" in the 'tags' option doesn't mean to use 1885 the tags file relative to the current file, but the 1886 tags file in the current directory. 1887 *cpo-D* 1888 D Can't use CTRL-K to enter a digraph after Normal mode 1889 commands with a character argument, like |r|, |f| and 1890 |t|. 1891 *cpo-e* 1892 e When executing a register with ":@r", always add a 1893 <CR> to the last line, also when the register is not 1894 linewise. If this flag is not present, the register 1895 is not linewise and the last line does not end in a 1896 <CR>, then the last line is put on the command-line 1897 and can be edited before hitting <CR>. 1898 *cpo-E* 1899 E It is an error when using "y", "d", "c", "g~", "gu" or 1900 "gU" on an Empty region. The operators only work when 1901 at least one character is to be operated on. Example: 1902 This makes "y0" fail in the first column. 1903 *cpo-f* 1904 f When included, a ":read" command with a file name 1905 argument will set the file name for the current 1906 buffer, if the current buffer doesn't have a file name 1907 yet. 1908 *cpo-F* 1909 F When included, a ":write" command with a file name 1910 argument will set the file name for the current 1911 buffer, if the current buffer doesn't have a file name 1912 yet. Also see |cpo-P|. 1913 *cpo-i* 1914 i When included, interrupting the reading of a file will 1915 leave it modified. 1916 *cpo-I* 1917 I When moving the cursor up or down just after inserting 1918 indent for 'autoindent', do not delete the indent. 1919 *cpo-J* 1920 J A |sentence| has to be followed by two spaces after 1921 the '.', '!' or '?'. A <Tab> is not recognized as 1922 white space. 1923 *cpo-K* 1924 K Don't wait for a key code to complete when it is 1925 halfway through a mapping. This breaks mapping 1926 <F1><F1> when only part of the second <F1> has been 1927 read. It enables cancelling the mapping by typing 1928 <F1><Esc>. 1929 *cpo-l* 1930 l Backslash in a [] range in a search pattern is taken 1931 literally, only "\]", "\^", "\-" and "\\" are special. 1932 See |/[]| 1933 'l' included: "/[ \t]" finds <Space>, '\' and 't' 1934 'l' excluded: "/[ \t]" finds <Space> and <Tab> 1935 *cpo-L* 1936 L When the 'list' option is set, 'wrapmargin', 1937 'textwidth', 'softtabstop' and Virtual Replace mode 1938 (see |gR|) count a <Tab> as two characters, instead of 1939 the normal behavior of a <Tab>. 1940 *cpo-m* 1941 m When included, a showmatch will always wait half a 1942 second. When not included, a showmatch will wait half 1943 a second or until a character is typed. 'showmatch' 1944 *cpo-M* 1945 M When excluded, "%" matching will take backslashes into 1946 account. Thus in "( \( )" and "\( ( \)" the outer 1947 parenthesis match. When included "%" ignores 1948 backslashes, which is Vi compatible. 1949 *cpo-n* 1950 n When included, the column used for 'number' and 1951 'relativenumber' will also be used for text of wrapped 1952 lines. 1953 *cpo-o* 1954 o Line offset to search command is not remembered for 1955 next search. 1956 *cpo-O* 1957 O Don't complain if a file is being overwritten, even 1958 when it didn't exist when editing it. This is a 1959 protection against a file unexpectedly created by 1960 someone else. Vi didn't complain about this. 1961 *cpo-P* 1962 P When included, a ":write" command that appends to a 1963 file will set the file name for the current buffer, if 1964 the current buffer doesn't have a file name yet and 1965 the 'F' flag is also included |cpo-F|. 1966 *cpo-q* 1967 q When joining multiple lines leave the cursor at the 1968 position where it would be when joining two lines. 1969 *cpo-r* 1970 r Redo ("." command) uses "/" to repeat a search 1971 command, instead of the actually used search string. 1972 *cpo-R* 1973 R Remove marks from filtered lines. Without this flag 1974 marks are kept like |:keepmarks| was used. 1975 *cpo-s* 1976 s Set buffer options when entering the buffer for the 1977 first time. This is like it is in Vim version 3.0. 1978 And it is the default. If not present the options are 1979 set when the buffer is created. 1980 *cpo-S* 1981 S Set buffer options always when entering a buffer 1982 (except 'readonly', 'fileformat', 'filetype' and 1983 'syntax'). This is the (most) Vi compatible setting. 1984 The options are set to the values in the current 1985 buffer. When you change an option and go to another 1986 buffer, the value is copied. Effectively makes the 1987 buffer options global to all buffers. 1988 1989 's' 'S' copy buffer options 1990 no no when buffer created 1991 yes no when buffer first entered (default) 1992 X yes each time when buffer entered (vi comp.) 1993 *cpo-t* 1994 t Search pattern for the tag command is remembered for 1995 "n" command. Otherwise Vim only puts the pattern in 1996 the history for search pattern, but doesn't change the 1997 last used search pattern. 1998 *cpo-u* 1999 u Undo is Vi compatible. See |undo-two-ways|. 2000 *cpo-v* 2001 v Backspaced characters remain visible on the screen in 2002 Insert mode. Without this flag the characters are 2003 erased from the screen right away. With this flag the 2004 screen newly typed text overwrites backspaced 2005 characters. 2006 *cpo-W* 2007 W Don't overwrite a readonly file. When omitted, ":w!" 2008 overwrites a readonly file, if possible. 2009 *cpo-x* 2010 x <Esc> on the command-line executes the command-line. 2011 The default in Vim is to abandon the command-line, 2012 because <Esc> normally aborts a command. |c_<Esc>| 2013 *cpo-X* 2014 X When using a count with "R" the replaced text is 2015 deleted only once. Also when repeating "R" with "." 2016 and a count. 2017 *cpo-y* 2018 y A yank command can be redone with ".". Think twice if 2019 you really want to use this, it may break some 2020 plugins, since most people expect "." to only repeat a 2021 change. 2022 *cpo-Z* 2023 Z When using "w!" while the 'readonly' option is set, 2024 don't reset 'readonly'. 2025 *cpo-!* 2026 ! When redoing a filter command, use the last used 2027 external command, whatever it was. Otherwise the last 2028 used -filter- command is used. 2029 *cpo-$* 2030 $ When making a change to one line, don't redisplay the 2031 line, but put a '$' at the end of the changed text. 2032 The changed text will be overwritten when you type the 2033 new text. The line is redisplayed if you type any 2034 command that moves the cursor from the insertion 2035 point. 2036 *cpo-%* 2037 % Vi-compatible matching is done for the "%" command. 2038 Does not recognize "#if", "#endif", etc. 2039 Does not recognize "/*" and "*/". 2040 Parens inside single and double quotes are also 2041 counted, causing a string that contains a paren to 2042 disturb the matching. For example, in a line like 2043 "if (strcmp("foo(", s))" the first paren does not 2044 match the last one. When this flag is not included, 2045 parens inside single and double quotes are treated 2046 specially. When matching a paren outside of quotes, 2047 everything inside quotes is ignored. When matching a 2048 paren inside quotes, it will find the matching one (if 2049 there is one). This works very well for C programs. 2050 This flag is also used for other features, such as 2051 C-indenting. 2052 *cpo-+* 2053 + When included, a ":write file" command will reset the 2054 'modified' flag of the buffer, even though the buffer 2055 itself may still be different from its file. 2056 *cpo->* 2057 > When appending to a register, put a line break before 2058 the appended text. 2059 *cpo-;* 2060 ; When using |,| or |;| to repeat the last |t| search 2061 and the cursor is right in front of the searched 2062 character, the cursor won't move. When not included, 2063 the cursor would skip over it and jump to the 2064 following occurrence. 2065 *cpo-~* 2066 ~ When included, don't resolve symbolic links when 2067 changing directory with |:cd|, |:tcd|, |:lcd|, or |:bcd|. 2068 This preserves the symbolic link path in buffer names 2069 and when displaying the current directory. When 2070 excluded (default), symbolic links are resolved to 2071 their target paths. 2072 *cpo-_* 2073 _ When using |cw| on a word, do not include the 2074 whitespace following the word in the motion. 2075 2076 *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'* 2077'cursorbind' 'crb' boolean (default off) 2078 local to window 2079 When this option is set, as the cursor in the current 2080 window moves other cursorbound windows (windows that also have 2081 this option set) move their cursors to the corresponding line and 2082 column. This option is useful for viewing the 2083 differences between two versions of a file (see 'diff'); in diff mode, 2084 inserted and deleted lines (though not characters within a line) are 2085 taken into account. 2086 2087 *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'* 2088'cursorcolumn' 'cuc' boolean (default off) 2089 local to window 2090 Highlight the screen column of the cursor with CursorColumn 2091 |hl-CursorColumn|. Useful to align text. Will make screen redrawing 2092 slower. 2093 If you only want the highlighting in the current window you can use 2094 these autocommands: >vim 2095 au WinLeave * set nocursorline nocursorcolumn 2096 au WinEnter * set cursorline cursorcolumn 2097< 2098 2099 *'cursorline'* *'cul'* *'nocursorline'* *'nocul'* 2100'cursorline' 'cul' boolean (default off) 2101 local to window 2102 Highlighting used for the line the cursor is on: 2103 2104 CursorLine the text line |hl-CursorLine| 2105 CursorLineFold the fold column |hl-CursorLineFold| 2106 CursorLineSign the sign column |hl-CursorLineSign| 2107 CursorLineNr the line number, when 'cursorlineopt' contains 2108 "number" |hl-CursorLineNr| 2109 2110 Useful to easily spot the cursor. Will make screen redrawing slower. 2111 When Visual mode is active the highlighting isn't used to make it 2112 easier to see the selected text. 2113 2114 *'cursorlineopt'* *'culopt'* 2115'cursorlineopt' 'culopt' string (default "both") 2116 local to window 2117 Comma-separated list of settings for how 'cursorline' is displayed. 2118 Valid values: 2119 "line" Highlight the text line of the cursor with 2120 CursorLine |hl-CursorLine|. 2121 "screenline" Highlight only the screen line of the cursor with 2122 CursorLine |hl-CursorLine|. 2123 "number" Highlight the line number of the cursor with 2124 CursorLineNr |hl-CursorLineNr|. 2125 2126 Special value: 2127 "both" Alias for the values "line,number". 2128 2129 "line" and "screenline" cannot be used together. 2130 2131 *'debug'* 2132'debug' string (default "") 2133 global 2134 These values can be used: 2135 msg Error messages that would otherwise be omitted will be given 2136 anyway. 2137 throw Error messages that would otherwise be omitted will be given 2138 anyway and also throw an exception and set |v:errmsg|. 2139 beep A message will be given when otherwise only a beep would be 2140 produced. 2141 The values can be combined, separated by a comma. 2142 "msg" and "throw" are useful for debugging 'foldexpr', 'formatexpr' or 2143 'indentexpr'. 2144 2145 *'define'* *'def'* 2146'define' 'def' string (default "") 2147 global or local to buffer |global-local| 2148 Pattern to be used to find a macro definition. It is a search 2149 pattern, just like for the "/" command. This option is used for the 2150 commands like "[i" and "[d" |include-search|. The 'isident' option is 2151 used to recognize the defined name after the match: > 2152 {match with 'define'}{non-ID chars}{defined name}{non-ID char} 2153< See |option-backslash| about inserting backslashes to include a space 2154 or backslash. 2155 For C++ this value would be useful, to include const type declarations: > 2156 ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\) 2157< You can also use "\ze" just before the name and continue the pattern 2158 to check what is following. E.g. for Javascript, if a function is 2159 defined with `func_name = function(args)`: > 2160 ^\s*\ze\i\+\s*=\s*function( 2161< If the function is defined with `func_name : function() {...`: > 2162 ^\s*\ze\i\+\s*[:]\s*(*function\s*( 2163< When using the ":set" command, you need to double the backslashes! 2164 To avoid that use `:let` with a single quote string: >vim 2165 let &l:define = '^\s*\ze\k\+\s*=\s*function(' 2166< 2167 2168 *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'* 2169'delcombine' 'deco' boolean (default off) 2170 global 2171 If editing Unicode and this option is set, backspace and Normal mode 2172 "x" delete each combining character on its own. When it is off (the 2173 default) the character along with its combining characters are 2174 deleted. 2175 Note: When 'delcombine' is set "xx" may work differently from "2x"! 2176 2177 This is useful for Arabic, Hebrew and many other languages where one 2178 may have combining characters overtop of base characters, and want 2179 to remove only the combining ones. 2180 2181 *'dictionary'* *'dict'* 2182'dictionary' 'dict' string (default "") 2183 global or local to buffer |global-local| 2184 List of file names, separated by commas, that are used to lookup words 2185 for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should 2186 contain a list of words. This can be one word per line, or several 2187 words per line, separated by non-keyword characters (white space is 2188 preferred). Maximum line length is 510 bytes. 2189 2190 When this option is empty or an entry "spell" is present, and spell 2191 checking is enabled, words in the word lists for the currently active 2192 'spelllang' are used. See |spell|. 2193 2194 To include a comma in a file name precede it with a backslash. Spaces 2195 after a comma are ignored, otherwise spaces are included in the file 2196 name. See |option-backslash| about using backslashes. 2197 Environment variables are expanded |:set_env|. 2198 This has nothing to do with the |Dictionary| variable type. 2199 Where to find a list of words? 2200 - BSD/macOS include the "/usr/share/dict/words" file. 2201 - Try "apt install spell" to get the "/usr/share/dict/words" file on 2202 apt-managed systems (Debian/Ubuntu). 2203 The use of |:set+=| and |:set-=| is preferred when adding or removing 2204 directories from the list. This avoids problems when a future version 2205 uses another default. 2206 Backticks cannot be used in this option for security reasons. 2207 2208 *'diff'* *'nodiff'* 2209'diff' boolean (default off) 2210 local to window 2211 Join the current window in the group of windows that shows differences 2212 between files. See |diff-mode|. 2213 2214 *'diffanchors'* *'dia'* 2215'diffanchors' 'dia' string (default "") 2216 global or local to buffer |global-local| 2217 List of {address} in each buffer, separated by commas, that are 2218 considered anchors when used for diffing. It's valid to specify "$+1" 2219 for 1 past the last line. "%" cannot be used for this option. There 2220 can be at most 20 anchors set for each buffer. 2221 2222 Each anchor line splits the buffer (the split happens above the 2223 anchor), with each part being diff'ed separately before the final 2224 result is joined. When more than one {address} are provided, the 2225 anchors will be sorted internally by line number. If using buffer 2226 local options, each buffer should have the same number of anchors 2227 (extra anchors will be ignored). This option is only used when 2228 'diffopt' has "anchor" set. See |diff-anchors| for more details and 2229 examples. 2230 *E1550* 2231 If some of the {address} do not resolve to a line in each buffer (e.g. 2232 a pattern search that does not match anything), none of the anchors 2233 will be used. 2234 *E1562* 2235 Diff anchors can only be used when there are no hidden diff buffers. 2236 2237 *'diffexpr'* *'dex'* 2238'diffexpr' 'dex' string (default "") 2239 global 2240 Disallowed in |modeline|. |no-modeline-option| 2241 Expression which is evaluated to obtain a diff file (either ed-style 2242 or unified-style) from two versions of a file. See |diff-diffexpr|. 2243 2244 *'diffopt'* *'dip'* 2245'diffopt' 'dip' string (default "internal,filler,closeoff,indent-heuristic,inline:char,linematch:40") 2246 global 2247 Option settings for diff mode. It can consist of the following items. 2248 All are optional. Items must be separated by a comma. 2249 2250 algorithm:{text} Use the specified diff algorithm with the 2251 internal diff engine. Currently supported 2252 algorithms are: 2253 myers the default algorithm 2254 minimal spend extra time to generate the 2255 smallest possible diff 2256 patience patience diff algorithm 2257 histogram histogram diff algorithm 2258 2259 anchor Anchor specific lines in each buffer to be 2260 aligned with each other if 'diffanchors' is 2261 set. See |diff-anchors|. 2262 2263 closeoff When a window is closed where 'diff' is set 2264 and there is only one window remaining in the 2265 same tabpage with 'diff' set, execute 2266 `:diffoff` in that window. This undoes a 2267 `:diffsplit` command. 2268 2269 context:{n} Use a context of {n} lines between a change 2270 and a fold that contains unchanged lines. 2271 When omitted a context of six lines is used. 2272 When using zero the context is actually one, 2273 since folds require a line in between, also 2274 for a deleted line. Set it to a very large 2275 value (999999) to disable folding completely. 2276 See |fold-diff|. 2277 2278 filler Show filler lines, to keep the text 2279 synchronized with a window that has inserted 2280 lines at the same position. Mostly useful 2281 when windows are side-by-side and 'scrollbind' 2282 is set. 2283 2284 foldcolumn:{n} Set the 'foldcolumn' option to {n} when 2285 starting diff mode. Without this 2 is used. 2286 2287 followwrap Follow the 'wrap' option and leave as it is. 2288 2289 horizontal Start diff mode with horizontal splits (unless 2290 explicitly specified otherwise). 2291 2292 hiddenoff Do not use diff mode for a buffer when it 2293 becomes hidden. 2294 2295 iblank Ignore changes where lines are all blank. 2296 Adds the "-B" flag to the "diff" command if 2297 'diffexpr' is empty. Check the documentation 2298 of the "diff" command for what this does 2299 exactly. 2300 NOTE: the diff windows will get out of sync, 2301 because no differences between blank lines are 2302 taken into account. 2303 2304 icase Ignore changes in case of text. "a" and "A" 2305 are considered the same. Adds the "-i" flag 2306 to the "diff" command if 'diffexpr' is empty. 2307 2308 indent-heuristic 2309 Use the indent heuristic for the internal 2310 diff library. 2311 2312 inline:{text} Highlight inline differences within a change. 2313 See |view-diffs|. Supported values are: 2314 2315 none Do not perform inline highlighting. 2316 simple Highlight from first different 2317 character to the last one in each 2318 line. This is the default if no 2319 `inline:` value is set. 2320 char Use internal diff to perform a 2321 character-wise diff and highlight the 2322 difference. 2323 word Use internal diff to perform a 2324 |word|-wise diff and highlight the 2325 difference. Non-alphanumeric 2326 multi-byte characters such as emoji 2327 and CJK characters are considered 2328 individual words. Small gaps of 2329 non-word characters (5 bytes or less) 2330 between changes are merged into a 2331 single highlight block. 2332 2333 internal Use the internal diff library. This is 2334 ignored when 'diffexpr' is set. *E960* 2335 When running out of memory when writing a 2336 buffer or the diff is larger than 1 GB this 2337 item will be ignored for diffs involving that 2338 buffer. Set the 'verbose' option to see when 2339 this happens. 2340 2341 iwhite Ignore changes in amount of white space. Adds 2342 the "-b" flag to the "diff" command if 2343 'diffexpr' is empty. Check the documentation 2344 of the "diff" command for what this does 2345 exactly. It should ignore adding trailing 2346 white space, but not leading white space. 2347 2348 iwhiteall Ignore all white space changes. Adds 2349 the "-w" flag to the "diff" command if 2350 'diffexpr' is empty. Check the documentation 2351 of the "diff" command for what this does 2352 exactly. 2353 2354 iwhiteeol Ignore white space changes at end of line. 2355 Adds the "-Z" flag to the "diff" command if 2356 'diffexpr' is empty. Check the documentation 2357 of the "diff" command for what this does 2358 exactly. 2359 2360 linematch:{n} Align and mark changes between the most 2361 similar lines between the buffers. When the 2362 total number of lines in the diff hunk exceeds 2363 {n}, the lines will not be aligned because for 2364 very large diff hunks there will be a 2365 noticeable lag. A reasonable setting is 2366 "linematch:60", as this will enable alignment 2367 for a 2 buffer diff hunk of 30 lines each, or 2368 a 3 buffer diff hunk of 20 lines each. 2369 Implicitly sets "filler" when this is set. 2370 2371 vertical Start diff mode with vertical splits (unless 2372 explicitly specified otherwise). 2373 2374 Examples: >vim 2375 set diffopt=internal,filler,context:4 2376 set diffopt= 2377 set diffopt=internal,filler,foldcolumn:3 2378 set diffopt-=internal " do NOT use the internal diff parser 2379< 2380 2381 *'digraph'* *'dg'* *'nodigraph'* *'nodg'* 2382'digraph' 'dg' boolean (default off) 2383 global 2384 Enable the entering of digraphs in Insert mode with {char1} <BS> 2385 {char2}. See |digraphs|. 2386 2387 *'directory'* *'dir'* 2388'directory' 'dir' string (default "$XDG_STATE_HOME/nvim/swap//") 2389 global 2390 Disallowed in |modeline|. |no-modeline-option| 2391 List of directory names for the swap file, separated with commas. 2392 2393 Possible items: 2394 - The swap file will be created in the first directory where this is 2395 possible. If it is not possible in any directory, but last 2396 directory listed in the option does not exist, it is created. 2397 - Empty means that no swap file will be used (recovery is 2398 impossible!) and no |E303| error will be given. 2399 - A directory "." means to put the swap file in the same directory as 2400 the edited file. On Unix, a dot is prepended to the file name, so 2401 it doesn't show in a directory listing. On MS-Windows the "hidden" 2402 attribute is set and a dot prepended if possible. 2403 - A directory starting with "./" (or ".\" for MS-Windows) means to put 2404 the swap file relative to where the edited file is. The leading "." 2405 is replaced with the path name of the edited file. 2406 - For Unix and Win32, if a directory ends in two path separators "//", 2407 the swap file name will be built from the complete path to the file 2408 with all path separators replaced by percent '%' signs (including 2409 the colon following the drive letter on Win32). This will ensure 2410 file name uniqueness in the preserve directory. 2411 On Win32, it is also possible to end with "\\". However, When a 2412 separating comma is following, you must use "//", since "\\" will 2413 include the comma in the file name. Therefore it is recommended to 2414 use '//', instead of '\\'. 2415 - Spaces after the comma are ignored, other spaces are considered part 2416 of the directory name. To have a space at the start of a directory 2417 name, precede it with a backslash. 2418 - To include a comma in a directory name precede it with a backslash. 2419 - A directory name may end in an ':' or '/'. 2420 - Environment variables are expanded |:set_env|. 2421 - Careful with '\' characters, type one before a space, type two to 2422 get one in the option (see |option-backslash|), for example: >vim 2423 set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces 2424< 2425 Editing the same file twice will result in a warning. Using "/tmp" on 2426 is discouraged: if the system crashes you lose the swap file. And 2427 others on the computer may be able to see the files. 2428 Use |:set+=| and |:set-=| when adding or removing directories from the 2429 list, this avoids problems if the Nvim default is changed. 2430 2431 *'display'* *'dy'* 2432'display' 'dy' string (default "lastline") 2433 global 2434 Change the way text is displayed. This is a comma-separated list of 2435 flags: 2436 lastline When included, as much as possible of the last line 2437 in a window will be displayed. "@@@" is put in the 2438 last columns of the last screen line to indicate the 2439 rest of the line is not displayed. 2440 truncate Like "lastline", but "@@@" is displayed in the first 2441 column of the last screen line. Overrules "lastline". 2442 uhex Show unprintable characters hexadecimal as <xx> 2443 instead of using ^C and ~C. 2444 msgsep Obsolete flag. Allowed but takes no effect. |msgsep| 2445 2446 When neither "lastline" nor "truncate" is included, a last line that 2447 doesn't fit is replaced with "@" lines. 2448 2449 The "@" character can be changed by setting the "lastline" item in 2450 'fillchars'. The character is highlighted with |hl-NonText|. 2451 2452 *'eadirection'* *'ead'* 2453'eadirection' 'ead' string (default "both") 2454 global 2455 Tells when the 'equalalways' option applies: 2456 ver vertically, width of windows is not affected 2457 hor horizontally, height of windows is not affected 2458 both width and height of windows is affected 2459 2460 *'emoji'* *'emo'* *'noemoji'* *'noemo'* 2461'emoji' 'emo' boolean (default on) 2462 global 2463 When on all Unicode emoji characters are considered to be full width. 2464 This excludes "text emoji" characters, which are normally displayed as 2465 single width. However, such "text emoji" are treated as full-width 2466 emoji if they are followed by the U+FE0F variant selector. 2467 2468 Unfortunately there is no good specification for this and it has been 2469 determined on trial-and-error basis. Use the |setcellwidths()| 2470 function to change the behavior. 2471 2472 *'encoding'* *'enc'* 2473'encoding' 'enc' string (default "utf-8") 2474 global 2475 String-encoding used internally and for |RPC| communication. 2476 Always UTF-8. 2477 2478 See 'fileencoding' to control file-content encoding. 2479 2480 *'endoffile'* *'eof'* *'noendoffile'* *'noeof'* 2481'endoffile' 'eof' boolean (default off) 2482 local to buffer 2483 Indicates that a CTRL-Z character was found at the end of the file 2484 when reading it. Normally only happens when 'fileformat' is "dos". 2485 When writing a file and this option is off and the 'binary' option 2486 is on, or 'fixeol' option is off, no CTRL-Z will be written at the 2487 end of the file. 2488 See |eol-and-eof| for example settings. 2489 2490 *'endofline'* *'eol'* *'noendofline'* *'noeol'* 2491'endofline' 'eol' boolean (default on) 2492 local to buffer 2493 When writing a file and this option is off and the 'binary' option 2494 is on, or 'fixeol' option is off, no <EOL> will be written for the 2495 last line in the file. This option is automatically set or reset when 2496 starting to edit a new file, depending on whether file has an <EOL> 2497 for the last line in the file. Normally you don't have to set or 2498 reset this option. 2499 When 'binary' is off and 'fixeol' is on the value is not used when 2500 writing the file. When 'binary' is on or 'fixeol' is off it is used 2501 to remember the presence of a <EOL> for the last line in the file, so 2502 that when you write the file the situation from the original file can 2503 be kept. But you can change it if you want to. 2504 See |eol-and-eof| for example settings. 2505 2506 *'equalalways'* *'ea'* *'noequalalways'* *'noea'* 2507'equalalways' 'ea' boolean (default on) 2508 global 2509 When on, all the windows are automatically made the same size after 2510 splitting or closing a window. This also happens the moment the 2511 option is switched on. When off, splitting a window will reduce the 2512 size of the current window and leave the other windows the same. When 2513 closing a window the extra lines are given to the window next to it 2514 (depending on 'splitbelow' and 'splitright'). 2515 When mixing vertically and horizontally split windows, a minimal size 2516 is computed and some windows may be larger if there is room. The 2517 'eadirection' option tells in which direction the size is affected. 2518 Changing the height and width of a window can be avoided by setting 2519 'winfixheight' and 'winfixwidth', respectively. 2520 If a window size is specified when creating a new window sizes are 2521 currently not equalized (it's complicated, but may be implemented in 2522 the future). 2523 2524 *'equalprg'* *'ep'* 2525'equalprg' 'ep' string (default "") 2526 global or local to buffer |global-local| 2527 Disallowed in |modeline|. |no-modeline-option| 2528 External program to use for "=" command. When this option is empty 2529 the internal formatting functions are used; either 'lisp', 'cindent' 2530 or 'indentexpr'. 2531 Environment variables are expanded |:set_env|. See |option-backslash| 2532 about including spaces and backslashes. 2533 2534 *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'* 2535'errorbells' 'eb' boolean (default off) 2536 global 2537 Ring the bell (beep or screen flash) for error messages. This only 2538 makes a difference for error messages, the bell will be used always 2539 for a lot of errors without a message (e.g., hitting <Esc> in Normal 2540 mode). See 'visualbell' to make the bell behave like a screen flash 2541 or do nothing. See 'belloff' to finetune when to ring the bell. 2542 2543 *'errorfile'* *'ef'* 2544'errorfile' 'ef' string (default "errors.err") 2545 global 2546 Disallowed in |modeline|. |no-modeline-option| 2547 Name of the errorfile for the QuickFix mode (see |:cf|). 2548 When the "-q" command-line argument is used, 'errorfile' is set to the 2549 following argument. See |-q|. 2550 NOT used for the ":make" command. See 'makeef' for that. 2551 Environment variables are expanded |:set_env|. 2552 See |option-backslash| about including spaces and backslashes. 2553 2554 *'errorformat'* *'efm'* 2555'errorformat' 'efm' string (default is very long) 2556 global or local to buffer |global-local| 2557 Scanf-like description of the format for the lines in the error file 2558 (see |errorformat|). 2559 2560 *'eventignore'* *'ei'* 2561'eventignore' 'ei' string (default "") 2562 global 2563 A list of autocommand event names, which are to be ignored. 2564 When set to "all" or when "all" is one of the items, all autocommand 2565 events are ignored, autocommands will not be executed. 2566 Otherwise this is a comma-separated list of event names. Example: >vim 2567 set ei=WinEnter,WinLeave 2568< 2569 To ignore all but some events, a "-" prefix can be used: >vim 2570 :set ei=all,-WinLeave 2571< 2572 2573 *'eventignorewin'* *'eiw'* 2574'eventignorewin' 'eiw' string (default "") 2575 local to window 2576 Similar to 'eventignore' but applies to a particular window and its 2577 buffers, for which window and buffer related autocommands can be 2578 ignored indefinitely without affecting the global 'eventignore'. 2579 2580 Note: The following events are considered to happen outside of a 2581 window context and thus cannot be ignored by 'eventignorewin': 2582 2583 |ChanClose|, 2584 |ChanInfo|, 2585 |ChanOpen|, 2586 |CmdAtom|, 2587 |CmdUndefined|, 2588 |CmdlineChanged|, 2589 |CmdlineEnter|, 2590 |CmdlineLeave|, 2591 |CmdlineLeavePre|, 2592 |CmdwinEnter|, 2593 |CmdwinLeave|, 2594 |ColorScheme|, 2595 |ColorSchemePre|, 2596 |CompleteChanged|, 2597 |CompleteDone|, 2598 |CompleteDonePre|, 2599 |DiagnosticChanged|, 2600 |DiffUpdated|, 2601 |DirChanged|, 2602 |DirChangedPre|, 2603 |ExitPre|, 2604 |FocusGained|, 2605 |FocusLost|, 2606 |FuncUndefined|, 2607 |LspAttach|, 2608 |LspDetach|, 2609 |LspNotify|, 2610 |LspProgress|, 2611 |LspRequest|, 2612 |LspTokenUpdate|, 2613 |MarkSet|, 2614 |MenuPopup|, 2615 |ModeChanged|, 2616 |OptionSet|, 2617 |PackChanged|, 2618 |PackChangedPre|, 2619 |Progress|, 2620 |QuickFixCmdPost|, 2621 |QuickFixCmdPre|, 2622 |QuitPre|, 2623 |RemoteReply|, 2624 |SafeState|, 2625 |SessionLoadPost|, 2626 |SessionLoadPre|, 2627 |SessionWritePost|, 2628 |SessionWritePre|, 2629 |ShellCmdPost|, 2630 |Signal|, 2631 |SourceCmd|, 2632 |SourcePost|, 2633 |SourcePre|, 2634 |SpellFileMissing|, 2635 |StdinReadPost|, 2636 |StdinReadPre|, 2637 |SwapExists|, 2638 |Syntax|, 2639 |TabClosed|, 2640 |TabClosedPre|, 2641 |TabEnter|, 2642 |TabLeave|, 2643 |TabMoved|, 2644 |TabNew|, 2645 |TabNewEntered|, 2646 |TermClose|, 2647 |TermEnter|, 2648 |TermLeave|, 2649 |TermOpen|, 2650 |TermRequest|, 2651 |TermResponse|, 2652 |UIEnter|, 2653 |UILeave|, 2654 |User|, 2655 |VimEnter|, 2656 |VimLeave|, 2657 |VimLeavePre|, 2658 |VimResized|, 2659 |VimResume|, 2660 |VimSuspend|, 2661 |WinNew|, 2662 |WinNewPre| 2663 2664 *'expandtab'* *'et'* *'noexpandtab'* *'noet'* 2665'expandtab' 'et' boolean (default off) 2666 local to buffer 2667 In Insert mode: Use the appropriate number of spaces to insert a 2668 <Tab>. Spaces are used in indents with the '>' and '<' commands and 2669 when 'autoindent' is on. To insert a real tab when 'expandtab' is 2670 on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|. 2671 2672 *'exrc'* *'ex'* *'noexrc'* *'noex'* *project-config* *workspace-config* 2673'exrc' 'ex' boolean (default off) 2674 global 2675 Disallowed in |modeline|. |no-modeline-option| 2676 Enables project-local configuration. Nvim will execute any .nvim.lua, 2677 .nvimrc, or .exrc file found in the |current-directory| and all parent 2678 directories (ordered upwards), if the files are in the |trust| list. 2679 Use |:trust| to manage trusted files. See also |vim.secure.read()|. 2680 2681 Unset 'exrc' to stop further searching of 'exrc' files in parent 2682 directories, similar to |editorconfig.root|. 2683 2684 To get its own location, a Lua exrc file can use |debug.getinfo()|. 2685 See |lua-script-location|. 2686 2687 Compare 'exrc' to |editorconfig|: 2688 - 'exrc' can execute any code; editorconfig only specifies settings. 2689 - 'exrc' is Nvim-specific; editorconfig works in other editors. 2690 2691 To achieve project-local LSP configuration: 2692 1. Enable 'exrc'. 2693 2. Place LSP configs at ".nvim/lsp/*.lua" in your project root. 2694 3. Create ".nvim.lua" in your project root directory with this line: >lua 2695 vim.cmd[[set runtimepath+=.nvim]] 2696< 2697 2698 *'fileencoding'* *'fenc'* *E213* 2699'fileencoding' 'fenc' string (default "") 2700 local to buffer 2701 File-content encoding for the current buffer. Conversion is done with 2702 iconv() or as specified with 'charconvert'. 2703 2704 When 'fileencoding' is not UTF-8, conversion will be done when 2705 writing the file. For reading see below. 2706 When 'fileencoding' is empty, the file will be saved with UTF-8 2707 encoding (no conversion when reading or writing a file). 2708 2709 WARNING: Conversion to a non-Unicode encoding can cause loss of 2710 information! 2711 2712 See |encoding-names| for the possible values. Additionally, values may be 2713 specified that can be handled by the converter, see 2714 |mbyte-conversion|. 2715 2716 When reading a file 'fileencoding' will be set from 'fileencodings'. 2717 To read a file in a certain encoding it won't work by setting 2718 'fileencoding', use the |++enc| argument. One exception: when 2719 'fileencodings' is empty the value of 'fileencoding' is used. 2720 For a new file the global value of 'fileencoding' is used. 2721 2722 Prepending "8bit-" and "2byte-" has no meaning here, they are ignored. 2723 When the option is set, the value is converted to lowercase. Thus 2724 you can set it with uppercase values too. '_' characters are 2725 replaced with '-'. If a name is recognized from the list at 2726 |encoding-names|, it is replaced by the standard name. For example 2727 "ISO8859-2" becomes "iso-8859-2". 2728 2729 When this option is set, after starting to edit a file, the 'modified' 2730 option is set, because the file would be different when written. 2731 2732 Keep in mind that changing 'fenc' from a modeline happens 2733 AFTER the text has been read, thus it applies to when the file will be 2734 written. If you do set 'fenc' in a modeline, you might want to set 2735 'nomodified' to avoid not being able to ":q". 2736 2737 This option cannot be changed when 'modifiable' is off. 2738 2739 *'fileencodings'* *'fencs'* 2740'fileencodings' 'fencs' string (default "ucs-bom,utf-8,default,latin1") 2741 global 2742 This is a list of character encodings considered when starting to edit 2743 an existing file. When a file is read, Vim tries to use the first 2744 mentioned character encoding. If an error is detected, the next one 2745 in the list is tried. When an encoding is found that works, 2746 'fileencoding' is set to it. If all fail, 'fileencoding' is set to 2747 an empty string, which means that UTF-8 is used. 2748 WARNING: Conversion can cause loss of information! You can use 2749 the |++bad| argument to specify what is done with characters 2750 that can't be converted. 2751 For an empty file or a file with only ASCII characters most encodings 2752 will work and the first entry of 'fileencodings' will be used (except 2753 "ucs-bom", which requires the BOM to be present). If you prefer 2754 another encoding use an BufReadPost autocommand event to test if your 2755 preferred encoding is to be used. Example: >vim 2756 au BufReadPost * if search('\S', 'w') == 0 | 2757 \ set fenc=iso-2022-jp | endif 2758< This sets 'fileencoding' to "iso-2022-jp" if the file does not contain 2759 non-blank characters. 2760 When the |++enc| argument is used then the value of 'fileencodings' is 2761 not used. 2762 Note that 'fileencodings' is not used for a new file, the global value 2763 of 'fileencoding' is used instead. You can set it with: >vim 2764 setglobal fenc=iso-8859-2 2765< This means that a non-existing file may get a different encoding than 2766 an empty file. 2767 The special value "ucs-bom" can be used to check for a Unicode BOM 2768 (Byte Order Mark) at the start of the file. It must not be preceded 2769 by "utf-8" or another Unicode encoding for this to work properly. 2770 An entry for an 8-bit encoding (e.g., "latin1") should be the last, 2771 because Vim cannot detect an error, thus the encoding is always 2772 accepted. 2773 The special value "default" can be used for the encoding from the 2774 environment. It is useful when your environment uses a non-latin1 2775 encoding, such as Russian. 2776 When a file contains an illegal UTF-8 byte sequence it won't be 2777 recognized as "utf-8". You can use the |8g8| command to find the 2778 illegal byte sequence. 2779 WRONG VALUES: WHAT'S WRONG: 2780 latin1,utf-8 "latin1" will always be used 2781 utf-8,ucs-bom,latin1 BOM won't be recognized in a utf-8 2782 file 2783 cp1250,latin1 "cp1250" will always be used 2784 If 'fileencodings' is empty, 'fileencoding' is not modified. 2785 See 'fileencoding' for the possible values. 2786 Setting this option does not have an effect until the next time a file 2787 is read. 2788 2789 *'fileformat'* *'ff'* 2790'fileformat' 'ff' string (default Windows: "dos", Unix: "unix") 2791 local to buffer 2792 This gives the <EOL> of the current buffer, which is used for 2793 reading/writing the buffer from/to a file: 2794 dos <CR><NL> 2795 unix <NL> 2796 mac <CR> 2797 When "dos" is used, CTRL-Z at the end of a file is ignored. 2798 See |file-formats| and |file-read|. 2799 For the character encoding of the file see 'fileencoding'. 2800 When 'binary' is set, the value of 'fileformat' is ignored, file I/O 2801 works like it was set to "unix". 2802 This option is set automatically when starting to edit a file and 2803 'fileformats' is not empty and 'binary' is off. 2804 When this option is set, after starting to edit a file, the 'modified' 2805 option is set, because the file would be different when written. 2806 This option cannot be changed when 'modifiable' is off. 2807 2808 *'fileformats'* *'ffs'* 2809'fileformats' 'ffs' string (default Windows: "dos,unix", Unix: "unix,dos") 2810 global 2811 This gives the end-of-line (<EOL>) formats that will be tried when 2812 starting to edit a new buffer and when reading a file into an existing 2813 buffer: 2814 - When empty, the format defined with 'fileformat' will be used 2815 always. It is not set automatically. 2816 - When set to one name, that format will be used whenever a new buffer 2817 is opened. 'fileformat' is set accordingly for that buffer. The 2818 'fileformats' name will be used when a file is read into an existing 2819 buffer, no matter what 'fileformat' for that buffer is set to. 2820 - When more than one name is present, separated by commas, automatic 2821 <EOL> detection will be done when reading a file. When starting to 2822 edit a file, a check is done for the <EOL>: 2823 1. If all lines end in <CR><NL>, and 'fileformats' includes "dos", 2824 'fileformat' is set to "dos". 2825 2. If a <NL> is found and 'fileformats' includes "unix", 2826 'fileformat' is set to "unix". Note that when a <NL> is found 2827 without a preceding <CR>, "unix" is preferred over "dos". 2828 3. If 'fileformat' has not yet been set, and if a <CR> is found, and 2829 if 'fileformats' includes "mac", 'fileformat' is set to "mac". 2830 This means that "mac" is only chosen when: 2831 "unix" is not present or no <NL> is found in the file, and 2832 "dos" is not present or no <CR><NL> is found in the file. 2833 Except: if "unix" was chosen, but there is a <CR> before 2834 the first <NL>, and there appear to be more <CR>s than <NL>s in 2835 the first few lines, "mac" is used. 2836 4. If 'fileformat' is still not set, the first name from 2837 'fileformats' is used. 2838 When reading a file into an existing buffer, the same is done, but 2839 this happens like 'fileformat' has been set appropriately for that 2840 file only, the option is not changed. 2841 When 'binary' is set, the value of 'fileformats' is not used. 2842 2843 When Vim starts up with an empty buffer the first item is used. You 2844 can overrule this by setting 'fileformat' in your .vimrc. 2845 2846 For systems with a Dos-like <EOL> (<CR><NL>), when reading files that 2847 are ":source"ed and for vimrc files, automatic <EOL> detection may be 2848 done: 2849 - When 'fileformats' is empty, there is no automatic detection. Dos 2850 format will be used. 2851 - When 'fileformats' is set to one or more names, automatic detection 2852 is done. This is based on the first <NL> in the file: If there is a 2853 <CR> in front of it, Dos format is used, otherwise Unix format is 2854 used. 2855 Also see |file-formats|. 2856 2857 *'fileignorecase'* *'fic'* *'nofileignorecase'* *'nofic'* 2858'fileignorecase' 'fic' boolean (default on for systems where case in file 2859 names is normally ignored) 2860 global 2861 When set, case is ignored when using file and directory names. 2862 2863 This option is on by default on systems where the filesystem is 2864 traditionally case-insensitive (for example MS-Windows and macOS). 2865 However, Vim cannot determine at runtime whether a particular 2866 filesystem is case-sensitive or case-insensitive. 2867 2868 See 'wildignorecase' for only ignoring case when doing completion. 2869 2870 *'filetype'* *'ft'* 2871'filetype' 'ft' string (default "") 2872 local to buffer |local-noglobal| 2873 When this option is set, the FileType autocommand event is triggered. 2874 All autocommands that match with the value of this option will be 2875 executed. Thus the value of 'filetype' is used in place of the file 2876 name. 2877 Otherwise this option does not always reflect the current file type. 2878 This option is normally set when the file type is detected. To enable 2879 this use the ":filetype on" command. |:filetype| 2880 Setting this option to a different value is most useful in a modeline, 2881 for a file for which the file type is not automatically recognized. 2882 Example, for in an IDL file: >c 2883 /* vim: set filetype=idl : */ 2884< |FileType| |filetypes| 2885 When a dot appears in the value then this separates two filetype 2886 names, it should therefore not be used for a filetype. Example: >c 2887 /* vim: set filetype=c.doxygen : */ 2888< This will use the "c" filetype first, then the "doxygen" filetype. 2889 This works both for filetype plugins and for syntax files. More than 2890 one dot may appear. 2891 This option is not copied to another buffer, independent of the 's' or 2892 'S' flag in 'cpoptions'. 2893 Only alphanumeric characters, '-' and '_' can be used (and a '.' is 2894 allowed as delimiter when combining different filetypes). 2895 2896 *'fillchars'* *'fcs'* 2897'fillchars' 'fcs' string (default "") 2898 global or local to window |global-local| 2899 Characters to fill the statuslines, vertical separators, special 2900 lines in the window and truncated text in the |ins-completion-menu|. 2901 It is a comma-separated list of items. Each item has a name, a colon 2902 and the value of that item: |E1511| 2903 2904 item default Used for ~ 2905 stl ' ' statusline of the current window 2906 stlnc ' ' statusline of the non-current windows 2907 wbr ' ' window bar 2908 horiz '─' or '-' horizontal separators |:split| 2909 horizup '┴' or '-' upwards facing horizontal separator 2910 horizdown '┬' or '-' downwards facing horizontal separator 2911 vert '│' or '|' vertical separators |:vsplit| 2912 vertleft '┤' or '|' left facing vertical separator 2913 vertright '├' or '|' right facing vertical separator 2914 verthoriz '┼' or '+' overlapping vertical and horizontal 2915 separator 2916 fold '·' or '-' filling 'foldtext' 2917 foldopen '-' mark the beginning of a fold 2918 foldclose '+' show a closed fold 2919 foldsep '│' or '|' open fold middle marker 2920 foldinner none character to show instead of the 2921 numeric foldlevel when it would be 2922 repeated in a narrow 'foldcolumn' 2923 diff '-' deleted lines of the 'diff' option 2924 msgsep ' ' message separator 'display' 2925 eob '~' empty lines at the end of a buffer 2926 lastline '@' 'display' contains lastline/truncate 2927 trunc '>' truncated text in the 2928 |ins-completion-menu|. 2929 truncrl '<' same as "trunc" in 'rightleft' mode 2930 2931 Any one that is omitted will fall back to the default. 2932 2933 Note that "horiz", "horizup", "horizdown", "vertleft", "vertright" and 2934 "verthoriz" are only used when 'laststatus' is 3, since only vertical 2935 window separators are used otherwise. 2936 2937 If 'ambiwidth' is "double" then "horiz", "horizup", "horizdown", 2938 "vert", "vertleft", "vertright", "verthoriz", "foldsep" and "fold" 2939 default to single-byte alternatives. 2940 2941 Example: >vim 2942 set fillchars=stl:\ ,stlnc:\ ,vert:│,fold:·,diff:- 2943< 2944 All items support single-byte and multibyte characters. But 2945 double-width characters are not supported. |E1512| 2946 2947 The highlighting used for these items: 2948 item highlight group ~ 2949 stl StatusLine |hl-StatusLine| 2950 stlnc StatusLineNC |hl-StatusLineNC| 2951 wbr WinBar |hl-WinBar| or |hl-WinBarNC| 2952 horiz WinSeparator |hl-WinSeparator| 2953 horizup WinSeparator |hl-WinSeparator| 2954 horizdown WinSeparator |hl-WinSeparator| 2955 vert WinSeparator |hl-WinSeparator| 2956 vertleft WinSeparator |hl-WinSeparator| 2957 vertright WinSeparator |hl-WinSeparator| 2958 verthoriz WinSeparator |hl-WinSeparator| 2959 fold Folded |hl-Folded| 2960 foldopen FoldColumn |hl-FoldColumn| 2961 foldclose FoldColumn |hl-FoldColumn| 2962 foldsep FoldColumn |hl-FoldColumn| 2963 diff DiffDelete |hl-DiffDelete| 2964 msgsep MsgSeparator |hl-MsgSeparator| 2965 eob EndOfBuffer |hl-EndOfBuffer| 2966 lastline NonText |hl-NonText| 2967 trunc one of the many Popup menu highlighting groups like 2968 |hl-PmenuSel| 2969 truncrl same as "trunc" 2970 2971 *'findfunc'* *'ffu'* *E1514* 2972'findfunc' 'ffu' string (default "") 2973 global or local to buffer |global-local| 2974 Disallowed in |modeline|. |no-modeline-option| 2975 Function that is called to obtain the filename(s) for the |:find| 2976 command. When this option is empty, the internal |file-searching| 2977 mechanism is used. 2978 2979 The value can be the name of a function, a |lambda| or a |Funcref|. 2980 See |option-value-function| for more information. 2981 2982 The function is called with two arguments. The first argument is a 2983 |String| and is the |:find| command argument. The second argument is 2984 a |Boolean| and is set to |v:true| when the function is called to get 2985 a List of command-line completion matches for the |:find| command. 2986 The function should return a List, which is handled similarly to the 2987 return value of a |:command-completion-customlist| function. 2988 2989 The function can process all the directories specified in 'path'. 2990 2991 If a match is found, the function should return a |List| containing 2992 one or more file names. If a match is not found, the function 2993 should return an empty List. 2994 2995 If any errors are encountered during the function invocation, an 2996 empty List is used as the return value. 2997 2998 It is not allowed to change text or jump to another window while 2999 executing the 'findfunc' |textlock|. 3000 3001 3002 Examples: 3003 >lua 3004 -- Use vim.fn.glob() 3005 vim.o.findfunc = function(cmdarg, cmdcomplete) 3006 local pat = cmdcomplete and (cmdarg .. '*') or cmdarg 3007 return vim.fn.glob(pat, false, true) 3008 end 3009 3010 -- Use the "git ls-files" output 3011 vim.o.findfunc = function(cmdarg, cmdcomplete) 3012 local fnames = vim.fn.systemlist('git ls-files') 3013 return vim.tbl_filter(function(v) 3014 return v:lower():find(cmdarg:lower(), 1, true) ~= nil 3015 end, fnames) 3016 end 3017< 3018 3019 *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* 3020'fixendofline' 'fixeol' boolean (default on) 3021 local to buffer 3022 When writing a file and this option is on, <EOL> at the end of file 3023 will be restored if missing. Turn this option off if you want to 3024 preserve the situation from the original file. 3025 When the 'binary' option is set the value of this option doesn't 3026 matter. 3027 See the 'endofline' option. 3028 See |eol-and-eof| for example settings. 3029 3030 *'foldclose'* *'fcl'* 3031'foldclose' 'fcl' string (default "") 3032 global 3033 When set to "all", a fold is closed when the cursor isn't in it and 3034 its level is higher than 'foldlevel'. Useful if you want folds to 3035 automatically close when moving out of them. 3036 3037 *'foldcolumn'* *'fdc'* 3038'foldcolumn' 'fdc' string (default "0") 3039 local to window 3040 When and how to draw the foldcolumn. Valid values are: 3041 "auto": resize to the minimum amount of folds to display. 3042 "auto:[1-9]": resize to accommodate multiple folds up to the 3043 selected level 3044 "0": to disable foldcolumn 3045 "[1-9]": to display a fixed number of columns 3046 See |folding|. 3047 3048 *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'* 3049'foldenable' 'fen' boolean (default on) 3050 local to window 3051 When off, all folds are open. This option can be used to quickly 3052 switch between showing all text unfolded and viewing the text with 3053 folds (including manually opened or closed folds). It can be toggled 3054 with the |zi| command. The 'foldcolumn' will remain blank when 3055 'foldenable' is off. 3056 This option is set by commands that create a new fold or close a fold. 3057 See |folding|. 3058 3059 *'foldexpr'* *'fde'* 3060'foldexpr' 'fde' string (default "0") 3061 local to window 3062 The expression used for when 'foldmethod' is "expr". It is evaluated 3063 for each line to obtain its fold level. The context is set to the 3064 script where 'foldexpr' was set, script-local items can be accessed. 3065 See |fold-expr| for the usage. 3066 3067 The expression will be evaluated in the |sandbox| if set from a 3068 modeline, see |sandbox-option|. 3069 This option can't be set from a |modeline| when the 'diff' option is 3070 on or the 'modelineexpr' option is off. 3071 3072 It is not allowed to change text or jump to another window while 3073 evaluating 'foldexpr' |textlock|. 3074 3075 *'foldignore'* *'fdi'* 3076'foldignore' 'fdi' string (default "#") 3077 local to window 3078 Used only when 'foldmethod' is "indent". Lines starting with 3079 characters in 'foldignore' will get their fold level from surrounding 3080 lines. White space is skipped before checking for this character. 3081 The default "#" works well for C programs. See |fold-indent|. 3082 3083 *'foldlevel'* *'fdl'* 3084'foldlevel' 'fdl' number (default 0) 3085 local to window 3086 Sets the fold level: Folds with a higher level will be closed. 3087 Setting this option to zero will close all folds. Higher numbers will 3088 close fewer folds. 3089 This option is set by commands like |zm|, |zM| and |zR|. 3090 See |fold-foldlevel|. 3091 3092 *'foldlevelstart'* *'fdls'* 3093'foldlevelstart' 'fdls' number (default -1) 3094 global 3095 Sets 'foldlevel' when starting to edit another buffer in a window. 3096 Useful to always start editing with all folds closed (value zero), 3097 some folds closed (one) or no folds closed (99). 3098 This is done before reading any modeline, thus a setting in a modeline 3099 overrules this option. Starting to edit a file for |diff-mode| also 3100 ignores this option and closes all folds. 3101 It is also done before BufReadPre autocommands, to allow an autocmd to 3102 overrule the 'foldlevel' value for specific files. 3103 When the value is negative, it is not used. 3104 3105 *'foldmarker'* *'fmr'* *E536* 3106'foldmarker' 'fmr' string (default "{{{,}}}") 3107 local to window 3108 The start and end marker used when 'foldmethod' is "marker". There 3109 must be one comma, which separates the start and end marker. The 3110 marker is a literal string (a regular expression would be too slow). 3111 See |fold-marker|. 3112 3113 *'foldmethod'* *'fdm'* 3114'foldmethod' 'fdm' string (default "manual") 3115 local to window 3116 The kind of folding used for the current window. Possible values: 3117 |fold-manual| manual Folds are created manually. 3118 |fold-indent| indent Lines with equal indent form a fold. 3119 |fold-expr| expr 'foldexpr' gives the fold level of a line. 3120 |fold-marker| marker Markers are used to specify folds. 3121 |fold-syntax| syntax Syntax highlighting items specify folds. 3122 |fold-diff| diff Fold text that is not changed. 3123 3124 *'foldminlines'* *'fml'* 3125'foldminlines' 'fml' number (default 1) 3126 local to window 3127 Sets the number of screen lines above which a fold can be displayed 3128 closed. Also for manually closed folds. With the default value of 3129 one a fold can only be closed if it takes up two or more screen lines. 3130 Set to zero to be able to close folds of just one screen line. 3131 Note that this only has an effect on what is displayed. After using 3132 "zc" to close a fold, which is displayed open because it's smaller 3133 than 'foldminlines', a following "zc" may close a containing fold. 3134 3135 *'foldnestmax'* *'fdn'* 3136'foldnestmax' 'fdn' number (default 20) 3137 local to window 3138 Sets the maximum nesting of folds for the "indent" and "syntax" 3139 methods. This avoids that too many folds will be created. Using more 3140 than 20 doesn't work, because the internal limit is 20. 3141 3142 *'foldopen'* *'fdo'* 3143'foldopen' 'fdo' string (default "block,hor,mark,percent,quickfix,search,tag,undo") 3144 global 3145 Specifies for which type of commands folds will be opened, if the 3146 command moves the cursor into a closed fold. It is a comma-separated 3147 list of items. 3148 NOTE: When the command is part of a mapping this option is not used. 3149 Add the |zv| command to the mapping to get the same effect. 3150 (rationale: the mapping may want to control opening folds itself) 3151 3152 item commands ~ 3153 all any 3154 block (, {, [[, [{, etc. 3155 hor horizontal movements: "l", "w", "fx", etc. 3156 insert any command in Insert mode 3157 jump far jumps: "G", "gg", etc. 3158 mark jumping to a mark: "'m", CTRL-O, etc. 3159 percent "%" 3160 quickfix ":cn", ":crew", ":make", etc. 3161 search search for a pattern: "/", "n", "*", "gd", etc. 3162 (not for a search pattern in a ":" command) 3163 Also for |[s| and |]s|. 3164 tag jumping to a tag: ":ta", CTRL-T, etc. 3165 undo undo or redo: "u" and CTRL-R 3166 When a movement command is used for an operator (e.g., "dl" or "y%") 3167 this option is not used. This means the operator will include the 3168 whole closed fold. 3169 Note that vertical movements are not here, because it would make it 3170 very difficult to move onto a closed fold. 3171 In insert mode the folds containing the cursor will always be open 3172 when text is inserted. 3173 To close folds you can re-apply 'foldlevel' with the |zx| command or 3174 set the 'foldclose' option to "all". 3175 3176 *'foldtext'* *'fdt'* 3177'foldtext' 'fdt' string (default "foldtext()") 3178 local to window 3179 An expression which is used to specify the text displayed for a closed 3180 fold. The context is set to the script where 'foldexpr' was set, 3181 script-local items can be accessed. See |fold-foldtext| for the 3182 usage. 3183 3184 The expression will be evaluated in the |sandbox| if set from a 3185 modeline, see |sandbox-option|. 3186 This option cannot be set in a modeline when 'modelineexpr' is off. 3187 3188 It is not allowed to change text or jump to another window while 3189 evaluating 'foldtext' |textlock|. 3190 3191 When set to an empty string, foldtext is disabled, and the line 3192 is displayed normally with highlighting and no line wrapping. 3193 3194 *'follow'* *'nofollow'* 3195'follow' boolean (default off) 3196 local to buffer 3197 Enables |multicursor| follow-mode: cursor-relative motions performed 3198 by the primary cursor, cascade to all cursors |mcursor|. Toggled by 3199 |q=| (buffer-local). 3200 3201 *'formatexpr'* *'fex'* 3202'formatexpr' 'fex' string (default "") 3203 local to buffer 3204 Expression which is evaluated to format a range of lines for the |gq| 3205 operator or automatic formatting (see 'formatoptions'). When this 3206 option is empty 'formatprg' is used. 3207 3208 The |v:lnum| variable holds the first line to be formatted. 3209 The |v:count| variable holds the number of lines to be formatted. 3210 The |v:char| variable holds the character that is going to be 3211 inserted if the expression is being evaluated due to 3212 automatic formatting. This can be empty. Don't insert 3213 it yet! 3214 3215 Example: >vim 3216 set formatexpr=mylang#Format() 3217< This will invoke the mylang#Format() function in the 3218 autoload/mylang.vim file in 'runtimepath'. |autoload| 3219 3220 The advantage of using a function call without arguments is that it is 3221 faster, see |expr-option-function|. 3222 3223 The expression is also evaluated when 'textwidth' is set and adding 3224 text beyond that limit. This happens under the same conditions as 3225 when internal formatting is used. Make sure the cursor is kept in the 3226 same spot relative to the text then! The |mode()| function will 3227 return "i" or "R" in this situation. 3228 3229 When the expression evaluates to non-zero Vim will fall back to using 3230 the internal format mechanism. 3231 3232 If the expression starts with s: or |<SID>|, then it is replaced with 3233 the script ID (|local-function|). Example: >vim 3234 set formatexpr=s:MyFormatExpr() 3235 set formatexpr=<SID>SomeFormatExpr() 3236< Otherwise, the expression is evaluated in the context of the script 3237 where the option was set, thus script-local items are available. 3238 3239 The expression will be evaluated in the |sandbox| when set from a 3240 modeline, see |sandbox-option|. That stops the option from working, 3241 since changing the buffer text is not allowed. 3242 This option cannot be set in a modeline when 'modelineexpr' is off. 3243 3244 *'formatlistpat'* *'flp'* 3245'formatlistpat' 'flp' string (default "^\s*\d\+[\]:.)}\t ]\s*") 3246 local to buffer 3247 A pattern that is used to recognize a list header. This is used for 3248 the "n" flag in 'formatoptions'. 3249 The pattern must match exactly the text that will be the indent for 3250 the line below it. You can use |/\ze| to mark the end of the match 3251 while still checking more characters. There must be a character 3252 following the pattern, when it matches the whole line it is handled 3253 like there is no match. 3254 The default recognizes a number, followed by an optional punctuation 3255 character and white space. 3256 3257 *'formatoptions'* *'fo'* 3258'formatoptions' 'fo' string (default "tcqj") 3259 local to buffer 3260 This is a sequence of letters which describes how automatic 3261 formatting is to be done. 3262 See |fo-table| for possible values and |gq| for how to format text. 3263 Commas can be inserted for readability. 3264 To avoid problems with flags that are added in the future, use the 3265 "+=" and "-=" feature of ":set" |add-option-flags|. 3266 3267 *'formatprg'* *'fp'* 3268'formatprg' 'fp' string (default "") 3269 global or local to buffer |global-local| 3270 Disallowed in |modeline|. |no-modeline-option| 3271 External program used to format lines with |gq|. Ignored if 3272 'formatexpr' is set. 3273 3274 If empty, the internal |C-indenting| function will be used. 3275 3276 The program must take input on stdin and produce output on stdout. The 3277 Unix program "fmt" is such a program. Environment variables are 3278 expanded |:set_env|. See |option-backslash| about including spaces 3279 and backslashes. 3280 3281 *'fsync'* *'fs'* *'nofsync'* *'nofs'* 3282'fsync' 'fs' boolean (default on) 3283 global or local to buffer |global-local| 3284 Disallowed in |modeline|. |no-modeline-option| 3285 When on, the OS function fsync() will be called after saving a file 3286 (|:write|, |writefile()|, …), |swap-file|, |undo-persistence| and |shada-file|. 3287 This flushes the file to disk, ensuring that it is safely written. 3288 Slow on some systems: writing buffers, quitting Nvim, and other 3289 operations may sometimes take a few seconds. 3290 3291 Files are ALWAYS flushed ('fsync' is ignored) when: 3292 - |CursorHold| event is triggered 3293 - |:preserve| is called 3294 - system signals low battery life 3295 - Nvim exits abnormally 3296 3297 This is a |global-local| option, so it can be set per buffer, for 3298 example when writing to a slow filesystem. 3299 3300 *'grepformat'* *'gfm'* 3301'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m") 3302 global or local to buffer |global-local| 3303 Format to recognize for the ":grep" command output. 3304 This is a scanf-like string that uses the same format as the 3305 'errorformat' option: see |errorformat|. 3306 3307 Defaults to "%f:%l:%c:%m" if ripgrep ('grepprg') is available. 3308 3309 *'grepprg'* *'gp'* 3310'grepprg' 'gp' string (default see below) 3311 global or local to buffer |global-local| 3312 Disallowed in |modeline|. |no-modeline-option| 3313 Program to use for the |:grep| command. 3314 Note: if you change this then you must also update 'grepformat'. 3315 3316 May contain "%" and "#" characters, are expanded per |cmdline-special|. 3317 The placeholder "$*" specifies where the arguments will be included. 3318 Environment variables are expanded |:set_env|. See |option-backslash| 3319 about including spaces and backslashes. 3320 3321 Special value: When 'grepprg' is set to "internal" the |:grep| command 3322 works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like 3323 |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|. 3324 3325 See also |:make_makeprg|, most of the comments there apply to 'grepprg'. 3326 3327 Defaults to: 3328 - "rg --vimgrep -uu " if ripgrep is available (|:checkhealth|), 3329 - "grep -HIn $* /dev/null" on Unix, 3330 - "findstr /n $* nul" on Windows. 3331 3332 Ripgrep may perform additional filtering such as using .gitignore rules 3333 and skipping hidden files. This is disabled by default (via "-u") to 3334 more closely match the behaviour of standard grep. 3335 You can make ripgrep match Vim's case handling using the 3336 -i/--ignore-case and -S/--smart-case options. Handle |OptionSet| to 3337 dynamically update 'grepprg' when e.g. 'ignorecase' is changed. 3338 3339 *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549* 3340'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20,t:block-blinkon500-blinkoff500-TermCursor") 3341 global 3342 Configures the cursor style for each mode. Works in the GUI and many 3343 terminals. See |tui-cursor-shape|. 3344 3345 To disable cursor-styling, reset the option: >vim 3346 set guicursor= 3347 3348< To enable mode shapes, "Cursor" highlight, and blinking: >vim 3349 set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50 3350 \,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor 3351 \,sm:block-blinkwait175-blinkoff150-blinkon175 3352 3353< The option is a comma-separated list of parts. Each part consists of a 3354 mode-list and an argument-list: 3355 mode-list:argument-list,mode-list:argument-list,.. 3356 The mode-list is a dash separated list of these modes: 3357 n Normal mode 3358 v Visual mode 3359 ve Visual mode with 'selection' "exclusive" (same as 'v', 3360 if not specified) 3361 o Operator-pending mode 3362 i Insert mode 3363 r Replace mode 3364 c Command-line Normal (append) mode 3365 ci Command-line Insert mode 3366 cr Command-line Replace mode 3367 sm showmatch in Insert mode 3368 t Terminal mode 3369 a all modes 3370 The argument-list is a dash separated list of these arguments: 3371 hor{N} horizontal bar, {N} percent of the character height 3372 ver{N} vertical bar, {N} percent of the character width 3373 block block cursor, fills the whole character 3374 - Only one of the above three should be present. 3375 - Default is "block" for each mode. 3376 blinkwait{N} *cursor-blinking* 3377 blinkon{N} 3378 blinkoff{N} 3379 blink times for cursor: blinkwait is the delay before 3380 the cursor starts blinking, blinkon is the time that 3381 the cursor is shown and blinkoff is the time that the 3382 cursor is not shown. Times are in msec. When one of 3383 the numbers is zero, there is no blinking. E.g.: >vim 3384 set guicursor=n:blinkon0 3385< 3386 Default is "blinkon0" for each mode. 3387 {group-name} 3388 Highlight group that decides the color and font of the 3389 cursor. 3390 In the |TUI|: 3391 - |inverse|/reverse and no group-name are interpreted 3392 as "host-terminal default cursor colors" which 3393 typically means "inverted bg and fg colors". 3394 - |ctermfg| and |guifg| are ignored. 3395 {group-name}/{group-name} 3396 Two highlight group names, the first is used when 3397 no language mappings are used, the other when they 3398 are. |language-mapping| 3399 3400 Examples of parts: 3401 n-c-v:block-nCursor In Normal, Command-line and Visual mode, use a 3402 block cursor with colors from the "nCursor" 3403 highlight group 3404 n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20 3405 In Normal et al. modes, use a block cursor 3406 with the default colors defined by the host 3407 terminal. In Insert-like modes, use 3408 a vertical bar cursor with colors from 3409 "Cursor" highlight group. In Replace-like 3410 modes, use an underline cursor with 3411 default colors. 3412 i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150 3413 In Insert and Command-line Insert mode, use a 3414 30% vertical bar cursor with colors from the 3415 "iCursor" highlight group. Blink a bit 3416 faster. 3417 3418 The 'a' mode is different. It will set the given argument-list for 3419 all modes. It does not reset anything to defaults. This can be used 3420 to do a common setting for all modes. For example, to switch off 3421 blinking: "a:blinkon0" 3422 3423 Examples of cursor highlighting: >vim 3424 highlight Cursor gui=reverse guifg=NONE guibg=NONE 3425 " Note: gui=reverse overrides colors. 3426 highlight Cursor gui=NONE guifg=bg guibg=fg 3427< 3428 3429 *'guifont'* *'gfn'* *E235* *E596* 3430'guifont' 'gfn' string (default "DejaVu Sans Mono,Courier New,monospace" 3431 Mac: "SF Mono,Menlo,Monaco,Courier New,monospace" 3432 Linux: "Source Code Pro,DejaVu Sans Mono,Courier New,monospace" 3433 MS-Windows: "Cascadia Code,Cascadia Mono,Consolas,Courier New,monospace") 3434 global 3435 This is a list of fonts which will be used for the GUI version of Vim. 3436 In its simplest form the value is just one font name. When 3437 the font cannot be found you will get an error message. To try other 3438 font names a list can be specified, font names separated with commas. 3439 The first valid font is used. 3440 3441 Spaces after a comma are ignored. To include a comma in a font name 3442 precede it with a backslash. Setting an option requires an extra 3443 backslash before a space and a backslash. See also 3444 |option-backslash|. For example: >vim 3445 set guifont=Screen15,\ 7x13,font\\,with\\,commas 3446< will make Vim try to use the font "Screen15" first, and if it fails it 3447 will try to use "7x13" and then "font,with,commas" instead. 3448 3449 If none of the fonts can be loaded, Vim will keep the current setting. 3450 If an empty font list is given, Vim will try using other resource 3451 settings (for X, it will use the Vim.font resource), and finally it 3452 will try some builtin default which should always be there ("7x13" in 3453 the case of X). The font names given should be "normal" fonts. Vim 3454 will try to find the related bold and italic fonts. 3455 3456 For Win32 and Mac OS: >vim 3457 set guifont=* 3458< will bring up a font requester, where you can pick the font you want. 3459 3460 The font name depends on the GUI used. 3461 3462 For Mac OSX you can use something like this: >vim 3463 set guifont=Monaco:h10 3464< *E236* 3465 Note that the fonts must be mono-spaced (all characters have the same 3466 width). 3467 3468 To preview a font on X11, you might be able to use the "xfontsel" 3469 program. The "xlsfonts" program gives a list of all available fonts. 3470 3471 For the Win32 GUI *E244* *E245* 3472 - takes these options in the font name: 3473 hXX - height is XX (points, can be floating-point) 3474 wXX - width is XX (points, can be floating-point) 3475 b - bold 3476 i - italic 3477 u - underline 3478 s - strikeout 3479 cXX - character set XX. Valid charsets are: ANSI, ARABIC, 3480 BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, 3481 HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, 3482 SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC. 3483 Normally you would use "cDEFAULT". 3484 3485 Use a ':' to separate the options. 3486 - A '_' can be used in the place of a space, so you don't need to use 3487 backslashes to escape the spaces. 3488 - Examples: >vim 3489 set guifont=courier_new:h12:w5:b:cRUSSIAN 3490 set guifont=Andale_Mono:h7.5:w4.5 3491< 3492 3493 *'guifontwide'* *'gfw'* *E231* *E533* *E534* 3494'guifontwide' 'gfw' string (default "") 3495 global 3496 Comma-separated list of fonts to be used for double-width characters. 3497 The first font that can be loaded is used. 3498 Note: The size of these fonts must be exactly twice as wide as the one 3499 specified with 'guifont' and the same height. 3500 3501 When 'guifont' has a valid font and 'guifontwide' is empty Vim will 3502 attempt to set 'guifontwide' to a matching double-width font. 3503 3504 *'helpfile'* *'hf'* 3505'helpfile' 'hf' string (default "$VIMRUNTIME/doc/help.txt") 3506 global 3507 Disallowed in |modeline|. |no-modeline-option| 3508 Name of the main help file. All distributed help files should be 3509 placed together in one directory. Additionally, all "doc" directories 3510 in 'runtimepath' will be used. 3511 Environment variables are expanded |:set_env|. For example: 3512 "$VIMRUNTIME/doc/help.txt". If $VIMRUNTIME is not set, $VIM is also 3513 tried. Also see |$VIMRUNTIME| and |option-backslash| about including 3514 spaces and backslashes. 3515 3516 *'helpheight'* *'hh'* 3517'helpheight' 'hh' number (default 20) 3518 global 3519 Minimal initial height of the help window when it is opened with the 3520 ":help" command. The initial height of the help window is half of the 3521 current window, or (when the 'ea' option is on) the same as other 3522 windows. When the height is less than 'helpheight', the height is 3523 set to 'helpheight'. Set to zero to disable. 3524 3525 *'helplang'* *'hlg'* 3526'helplang' 'hlg' string (default messages language or empty) 3527 global 3528 Comma-separated list of languages. Vim will use the first language 3529 for which the desired help can be found. The English help will always 3530 be used as a last resort. You can add "en" to prefer English over 3531 another language, but that will only find tags that exist in that 3532 language and not in the English help. 3533 Example: >vim 3534 set helplang=de,it 3535< This will first search German, then Italian and finally English help 3536 files. 3537 When using |CTRL-]| and ":help!" in a non-English help file Vim will 3538 try to find the tag in the current language before using this option. 3539 See |help-translated|. 3540 3541 *'hidden'* *'hid'* *'nohidden'* *'nohid'* 3542'hidden' 'hid' boolean (default on) 3543 global 3544 When off a buffer is unloaded (including loss of undo information) 3545 when it is |abandon|ed. When on a buffer becomes hidden when it is 3546 |abandon|ed. A buffer displayed in another window does not become 3547 hidden, of course. 3548 3549 Commands that move through the buffer list sometimes hide a buffer 3550 although the 'hidden' option is off when these three are true: 3551 - the buffer is modified 3552 - 'autowrite' is off or writing is not possible 3553 - the '!' flag was used 3554 Also see |windows|. 3555 3556 To hide a specific buffer use the 'bufhidden' option. 3557 'hidden' is set for one command with ":hide {command}" |:hide|. 3558 3559 *'history'* *'hi'* 3560'history' 'hi' number (default 10000) 3561 global 3562 A history of ":" commands, and a history of previous search patterns 3563 is remembered. This option decides how many entries may be stored in 3564 each of these histories (see |cmdline-editing| and 'messagesopt' for 3565 the number of messages to remember). 3566 The maximum value is 10000. 3567 3568 *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* 3569'hlsearch' 'hls' boolean (default on) 3570 global 3571 When there is a previous search pattern, highlight all its matches. 3572 The |hl-Search| highlight group determines the highlighting for all 3573 matches not under the cursor while the |hl-CurSearch| highlight group 3574 (if defined) determines the highlighting for the match under the 3575 cursor. If |hl-CurSearch| is not defined, then |hl-Search| is used for 3576 both. Note that only the matching text is highlighted, any offsets 3577 are not applied. 3578 See also: 'incsearch' and |:match|. 3579 When you get bored looking at the highlighted matches, you can turn it 3580 off with |:nohlsearch|. This does not change the option value, as 3581 soon as you use a search command, the highlighting comes back. 3582 'redrawtime' specifies the maximum time spent on finding matches. 3583 When the search pattern can match an end-of-line, Vim will try to 3584 highlight all of the matched text. However, this depends on where the 3585 search starts. This will be the first line in the window or the first 3586 line below a closed fold. A match in a previous line which is not 3587 drawn may not continue in a newly drawn line. 3588 You can specify whether the highlight status is restored on startup 3589 with the 'h' flag in 'shada' |shada-h|. 3590 3591 *'icon'* *'noicon'* 3592'icon' boolean (default off, on when title can be restored) 3593 global 3594 When on, the icon text of the window will be set to the value of 3595 'iconstring' (if it is not empty), or to the name of the file 3596 currently being edited. Only the last part of the name is used. 3597 Overridden by the 'iconstring' option. 3598 Only works if the terminal supports setting window icons. 3599 3600 *'iconstring'* 3601'iconstring' string (default "") 3602 global 3603 When this option is not empty, it will be used for the icon text of 3604 the window. This happens only when the 'icon' option is on. 3605 Only works if the terminal supports setting window icon text 3606 When this option contains printf-style '%' items, they will be 3607 expanded according to the rules used for 'statusline'. See 3608 'titlestring' for example settings. 3609 This option cannot be set in a modeline when 'modelineexpr' is off. 3610 3611 *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 3612'ignorecase' 'ic' boolean (default off) 3613 global 3614 Ignore case in search patterns, |cmdline-completion|, when 3615 searching in the tags file, |expr-==| and for Insert-mode completion 3616 |ins-completion|. 3617 Also see 'smartcase' and 'tagcase'. 3618 Can be overruled by using "\c" or "\C" in the pattern, see 3619 |/ignorecase|. 3620 3621 *'iminsert'* *'imi'* 3622'iminsert' 'imi' number (default 0) 3623 local to buffer 3624 Specifies whether :lmap or an Input Method (IM) is to be used in 3625 Insert mode. Valid values: 3626 0 :lmap is off and IM is off 3627 1 :lmap is ON and IM is off 3628 2 :lmap is off and IM is ON 3629 To always reset the option to zero when leaving Insert mode with <Esc> 3630 this can be used: >vim 3631 inoremap <ESC> <ESC>:set iminsert=0<CR> 3632< This makes :lmap and IM turn off automatically when leaving Insert 3633 mode. 3634 Note that this option changes when using CTRL-^ in Insert mode 3635 |i_CTRL-^|. 3636 The value is set to 1 when setting 'keymap' to a valid keymap name. 3637 It is also used for the argument of commands like "r" and "f". 3638 3639 *'imsearch'* *'ims'* 3640'imsearch' 'ims' number (default -1) 3641 local to buffer 3642 Specifies whether :lmap or an Input Method (IM) is to be used when 3643 entering a search pattern. Valid values: 3644 -1 the value of 'iminsert' is used, makes it look like 3645 'iminsert' is also used when typing a search pattern 3646 0 :lmap is off and IM is off 3647 1 :lmap is ON and IM is off 3648 2 :lmap is off and IM is ON 3649 Note that this option changes when using CTRL-^ in Command-line mode 3650 |c_CTRL-^|. 3651 The value is set to 1 when it is not -1 and setting the 'keymap' 3652 option to a valid keymap name. 3653 3654 *'inccommand'* *'icm'* 3655'inccommand' 'icm' string (default "nosplit") 3656 global 3657 When nonempty, shows the effects of |:substitute|, |:smagic|, 3658 |:snomagic| and user commands with the |:command-preview| flag as you 3659 type. 3660 3661 Possible values: 3662 nosplit Shows the effects of a command incrementally in the 3663 buffer. 3664 split Like "nosplit", but also shows partial off-screen 3665 results in a preview window. 3666 3667 If the preview for built-in commands is too slow (exceeds 3668 'redrawtime') then 'inccommand' is automatically disabled until 3669 |Command-line-mode| is done. 3670 3671 *'include'* *'inc'* 3672'include' 'inc' string (default "") 3673 global or local to buffer |global-local| 3674 Pattern to be used to find an include command. It is a search 3675 pattern, just like for the "/" command (See |pattern|). This option 3676 is used for the commands "[i", "]I", "[d", etc. 3677 Normally the 'isfname' option is used to recognize the file name that 3678 comes after the matched pattern. But if "\zs" appears in the pattern 3679 then the text matched from "\zs" to the end, or until "\ze" if it 3680 appears, is used as the file name. Use this to include characters 3681 that are not in 'isfname', such as a space. You can then use 3682 'includeexpr' to process the matched text. 3683 See |option-backslash| about including spaces and backslashes. 3684 3685 *'includeexpr'* *'inex'* 3686'includeexpr' 'inex' string (default "") 3687 local to buffer 3688 Expression to be used to transform the string found with the 'include' 3689 option to a file name. Mostly useful to change "." to "/" for Java: >vim 3690 setlocal includeexpr=substitute(v:fname,'\\.','/','g') 3691< The "v:fname" variable will be set to the file name that was detected. 3692 Note the double backslash: the `:set` command first halves them, then 3693 one remains in the value, where "\." matches a dot literally. For 3694 simple character replacements `tr()` avoids the need for escaping: >vim 3695 setlocal includeexpr=tr(v:fname,'.','/') 3696< 3697 Also used for the |gf| command if an unmodified file name can't be 3698 found. Allows doing "gf" on the name after an 'include' statement. 3699 Note: Not used for |<cfile>|. 3700 3701 If the expression starts with s: or |<SID>|, then it is replaced with 3702 the script ID (|local-function|). Example: >vim 3703 setlocal includeexpr=s:MyIncludeExpr() 3704 setlocal includeexpr=<SID>SomeIncludeExpr() 3705< Otherwise, the expression is evaluated in the context of the script 3706 where the option was set, thus script-local items are available. 3707 3708 It is more efficient if the value is just a function call without 3709 arguments, see |expr-option-function|. 3710 3711 The expression will be evaluated in the |sandbox| when set from a 3712 modeline, see |sandbox-option|. 3713 This option cannot be set in a modeline when 'modelineexpr' is off. 3714 3715 It is not allowed to change text or jump to another window while 3716 evaluating 'includeexpr' |textlock|. 3717 3718 *'incsearch'* *'is'* *'noincsearch'* *'nois'* 3719'incsearch' 'is' boolean (default on) 3720 global 3721 While typing a search command, show where the pattern, as it was typed 3722 so far, matches. The matched string is highlighted. If the pattern 3723 is invalid or not found, nothing is shown. The screen will be updated 3724 often, this is only useful on fast terminals. 3725 Note that the match will be shown, but the cursor will return to its 3726 original position when no match is found and when pressing <Esc>. You 3727 still need to finish the search command with <Enter> to move the 3728 cursor to the match. 3729 You can use the CTRL-G and CTRL-T keys to move to the next and 3730 previous match. |c_CTRL-G| |c_CTRL-T| 3731 Vim only searches for about half a second. With a complicated 3732 pattern and/or a lot of text the match may not be found. This is to 3733 avoid that Vim hangs while you are typing the pattern. 3734 The |hl-IncSearch| highlight group determines the highlighting. 3735 When 'hlsearch' is on, all matched strings are highlighted too while 3736 typing a search command. See also: 'hlsearch'. 3737 If you don't want to turn 'hlsearch' on, but want to highlight all 3738 matches while searching, you can turn on and off 'hlsearch' with 3739 autocmd. Example: >vim 3740 augroup vimrc-incsearch-highlight 3741 autocmd! 3742 autocmd CmdlineEnter [\/\?] :set hlsearch 3743 autocmd CmdlineLeave [\/\?] :set nohlsearch 3744 augroup END 3745< 3746 CTRL-L can be used to add one character from after the current match 3747 to the command line. If 'ignorecase' and 'smartcase' are set and the 3748 command line has no uppercase characters, the added character is 3749 converted to lowercase. 3750 CTRL-R CTRL-W can be used to add the word at the end of the current 3751 match, excluding the characters that were already typed (starting from 3752 the beginning of the word). 3753 3754 *'indentexpr'* *'inde'* 3755'indentexpr' 'inde' string (default "") 3756 local to buffer 3757 Expression which is evaluated to obtain the proper indent for a line. 3758 It is used when a new line is created, for the |=| operator and 3759 in Insert mode as specified with the 'indentkeys' option. 3760 When this option is not empty, it overrules the 'cindent' and 3761 'smartindent' indenting. When 'lisp' is set, this option is 3762 only used when 'lispoptions' contains "expr:1". 3763 The expression is evaluated with |v:lnum| set to the line number for 3764 which the indent is to be computed. The cursor is also in this line 3765 when the expression is evaluated (but it may be moved around). 3766 3767 If the expression starts with s: or |<SID>|, then it is replaced with 3768 the script ID (|local-function|). Example: >vim 3769 set indentexpr=s:MyIndentExpr() 3770 set indentexpr=<SID>SomeIndentExpr() 3771< Otherwise, the expression is evaluated in the context of the script 3772 where the option was set, thus script-local items are available. 3773 3774 The advantage of using a function call without arguments is that it is 3775 faster, see |expr-option-function|. 3776 3777 The expression must return the number of spaces worth of indent. It 3778 can return "-1" to keep the current indent (this means 'autoindent' is 3779 used for the indent). 3780 Functions useful for computing the indent are |indent()|, |cindent()| 3781 and |lispindent()|. 3782 The evaluation of the expression must not have side effects! It must 3783 not change the text, jump to another window, etc. Afterwards the 3784 cursor position is always restored, thus the cursor may be moved. 3785 Normally this option would be set to call a function: >vim 3786 set indentexpr=GetMyIndent() 3787< Error messages will be suppressed, unless the 'debug' option contains 3788 "msg". 3789 See |indent-expression|. 3790 3791 The expression will be evaluated in the |sandbox| when set from a 3792 modeline, see |sandbox-option|. 3793 This option cannot be set in a modeline when 'modelineexpr' is off. 3794 3795 It is not allowed to change text or jump to another window while 3796 evaluating 'indentexpr' |textlock|. 3797 3798 *'indentkeys'* *'indk'* 3799'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e") 3800 local to buffer 3801 A list of keys that, when typed in Insert mode, cause reindenting of 3802 the current line. Only happens if 'indentexpr' isn't empty. 3803 The format is identical to 'cinkeys', see |indentkeys-format|. 3804 See |C-indenting| and |indent-expression|. 3805 3806 *'infercase'* *'inf'* *'noinfercase'* *'noinf'* 3807'infercase' 'inf' boolean (default off) 3808 local to buffer 3809 When doing keyword completion in insert mode |ins-completion|, and 3810 'ignorecase' is also on, the case of the match is adjusted depending 3811 on the typed text. If the typed text contains a lowercase letter 3812 where the match has an upper case letter, the completed part is made 3813 lowercase. If the typed text has no lowercase letters and the match 3814 has a lowercase letter where the typed text has an uppercase letter, 3815 and there is a letter before it, the completed part is made uppercase. 3816 With 'noinfercase' the match is used as-is. 3817 3818 *'isfname'* *'isf'* 3819'isfname' 'isf' string (default for Windows: 3820 "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],@-@,!,~,=" 3821 otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=") 3822 global 3823 The characters specified by this option are included in file names and 3824 path names. Filenames are used for commands like "gf", "[i" and in 3825 the tags file. It is also used for "\f" in a |pattern|. 3826 Multi-byte characters 256 and above are always included, only the 3827 characters up to 255 are specified with this option. 3828 For UTF-8 the characters 0xa0 to 0xff are included as well. 3829 Think twice before adding white space to this option. Although a 3830 space may appear inside a file name, the effect will be that Vim 3831 doesn't know where a file name starts or ends when doing completion. 3832 It most likely works better without a space in 'isfname'. 3833 3834 Note that on systems using a backslash as path separator, Vim tries to 3835 do its best to make it work as you would expect. That is a bit 3836 tricky, since Vi originally used the backslash to escape special 3837 characters. Vim will not remove a backslash in front of a normal file 3838 name character on these systems, but it will on Unix and alikes. The 3839 '&' and '^' are not included by default, because these are special for 3840 cmd.exe. 3841 3842 The format of this option is a list of parts, separated with commas. 3843 Each part can be a single character number or a range. A range is two 3844 character numbers with '-' in between. A character number can be a 3845 decimal number between 0 and 255 or the ASCII character itself (does 3846 not work for digits). Example: 3847 "_,-,128-140,#-43" (include '_' and '-' and the range 3848 128 to 140 and '#' to 43) 3849 If a part starts with '^', the following character number or range 3850 will be excluded from the option. The option is interpreted from left 3851 to right. Put the excluded character after the range where it is 3852 included. To include '^' itself use it as the last character of the 3853 option or the end of a range. Example: 3854 "^a-z,#,^" (exclude 'a' to 'z', include '#' and '^') 3855 If the character is '@', all characters where isalpha() returns TRUE 3856 are included. Normally these are the characters a to z and A to Z, 3857 plus accented characters. To include '@' itself use "@-@". Examples: 3858 "@,^a-z" All alphabetic characters, excluding lower 3859 case ASCII letters. 3860 "a-z,A-Z,@-@" All letters plus the '@' character. 3861 A comma can be included by using it where a character number is 3862 expected. Example: 3863 "48-57,,,_" Digits, comma and underscore. 3864 A comma can be excluded by prepending a '^'. Example: 3865 " -~,^,,9" All characters from space to '~', excluding 3866 comma, plus <Tab>. 3867 See |option-backslash| about including spaces and backslashes. 3868 3869 *'isident'* *'isi'* 3870'isident' 'isi' string (default for Windows: 3871 "@,48-57,_,128-167,224-235" 3872 otherwise: "@,48-57,_,192-255") 3873 global 3874 The characters given by this option are included in identifiers. 3875 Identifiers are used in recognizing environment variables and after a 3876 match of the 'define' option. It is also used for "\i" in a 3877 |pattern|. See 'isfname' for a description of the format of this 3878 option. For '@' only characters up to 255 are used. 3879 Careful: If you change this option, it might break expanding 3880 environment variables. E.g., when '/' is included and Vim tries to 3881 expand "$HOME/.local/state/nvim/shada/main.shada". Maybe you should 3882 change 'iskeyword' instead. 3883 3884 *'iskeyword'* *'isk'* 3885'iskeyword' 'isk' string (default "@,48-57,_,192-255") 3886 local to buffer 3887 Keywords are used in searching and recognizing with many commands: 3888 "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See 3889 'isfname' for a description of the format of this option. For '@' 3890 characters above 255 check the "word" character class (any character 3891 that is categorized as a letter, number or emoji according to the 3892 Unicode general category). 3893 3894 Note that there is a difference between the "\k" character class and 3895 the |word| motion. The former matches any word character, while the 3896 latter stops at a change of the character class. 3897 3898 For C programs you could use "a-z,A-Z,48-57,_,.,-,>". 3899 For a help file it is set to all non-blank printable characters except 3900 "*", '"' and '|' (so that CTRL-] on a command finds the help for that 3901 command). 3902 When the 'lisp' option is on the '-' character is always included. 3903 This option also influences syntax highlighting, unless the syntax 3904 uses |:syn-iskeyword|. 3905 3906 *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'* 3907'joinspaces' 'js' boolean (default off) 3908 global 3909 Insert two spaces after a '.', '?' and '!' with a join command. 3910 Otherwise only one space is inserted. 3911 3912 *'jumpoptions'* *'jop'* 3913'jumpoptions' 'jop' string (default "clean") 3914 global 3915 List of words that change the behavior of the |jumplist|. 3916 stack Make the jumplist behave like the tagstack. 3917 Relative location of entries in the jumplist is 3918 preserved at the cost of discarding subsequent entries 3919 when navigating backwards in the jumplist and then 3920 jumping to a location. |jumplist-stack| 3921 3922 view When moving through the jumplist, |changelist|, 3923 |alternate-file|, using |mark-motions| or when popping 3924 the |tagstack| try to restore the |mark-view| in which 3925 the action occurred. 3926 3927 clean Remove unloaded buffers from the jumplist. 3928 3929 *'keymap'* *'kmp'* *E544* 3930'keymap' 'kmp' string (default "") 3931 local to buffer 3932 Name of a keyboard mapping. See |mbyte-keymap|. 3933 Setting this option to a valid keymap name has the side effect of 3934 setting 'iminsert' to one, so that the keymap becomes effective. 3935 'imsearch' is also set to one, unless it was -1 3936 Only alphanumeric characters, '.', '-' and '_' can be used. 3937 3938 *'keymodel'* *'km'* 3939'keymodel' 'km' string (default "") 3940 global 3941 List of comma-separated words, which enable special things that keys 3942 can do. These values can be used: 3943 startsel Using a shifted special key starts selection (either 3944 Select mode or Visual mode, depending on "key" being 3945 present in 'selectmode'). 3946 stopsel Using a not-shifted special key stops selection. 3947 Special keys in this context are the cursor keys, <End>, <Home>, 3948 <PageUp> and <PageDown>. 3949 3950 *'keywordprg'* *'kp'* 3951'keywordprg' 'kp' string (default ":Man", Windows: ":help") 3952 global or local to buffer |global-local| 3953 Disallowed in |modeline|. |no-modeline-option| 3954 Program to use for the |K| command. Environment variables are 3955 expanded |:set_env|. 3956 3957 Special cases: 3958 - ":help" opens the |word| at cursor using |:help|. (Note that 3959 previously setting the global option to the empty value did this, 3960 which is now deprecated.) 3961 - ":help!" performs |:help!| (DWIM) on the |WORD| at cursor. 3962 - If the value starts with ":", it is invoked as an Ex command 3963 and [count] is passed as the first argument, if present. 3964 - If "man" or "man -s", [count] is the manpage section number. 3965 3966 See |option-backslash| about including spaces and backslashes. 3967 3968 Example: >vim 3969 set keywordprg=:help! 3970 set keywordprg=man\ -s 3971 set keywordprg=:Man 3972< 3973 3974 *'langmap'* *'lmap'* *E357* *E358* 3975'langmap' 'lmap' string (default "") 3976 global 3977 Disallowed in |modeline|. |no-modeline-option| 3978 This option allows switching your keyboard into a special language 3979 mode. When you are typing text in Insert mode the characters are 3980 inserted directly. When in Normal mode the 'langmap' option takes 3981 care of translating these special characters to the original meaning 3982 of the key. This means you don't have to change the keyboard mode to 3983 be able to execute Normal mode commands. 3984 This is the opposite of the 'keymap' option, where characters are 3985 mapped in Insert mode. 3986 Also consider setting 'langremap' to off, to prevent 'langmap' from 3987 applying to characters resulting from a mapping. 3988 3989 Example (for Greek, in UTF-8): *greek* >vim 3990 set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz 3991< Example (exchanges meaning of z and y for commands): >vim 3992 set langmap=zy,yz,ZY,YZ 3993< 3994 The 'langmap' option is a list of parts, separated with commas. Each 3995 part can be in one of two forms: 3996 1. A list of pairs. Each pair is a "from" character immediately 3997 followed by the "to" character. Examples: "aA", "aAbBcC". 3998 2. A list of "from" characters, a semicolon and a list of "to" 3999 characters. Example: "abc;ABC" 4000 Example: "aA,fgh;FGH,cCdDeE" 4001 Special characters need to be preceded with a backslash. These are 4002 ";", ',', '"', '|' and backslash itself. 4003 4004 This will allow you to activate vim actions without having to switch 4005 back and forth between the languages. Your language characters will 4006 be understood as normal vim English characters (according to the 4007 langmap mappings) in the following cases: 4008 o Normal/Visual mode (commands, buffer/register names, user mappings) 4009 o Insert/Replace Mode: Register names after CTRL-R 4010 o Insert/Replace Mode: Mappings 4011 Characters entered in Command-line mode will NOT be affected by 4012 this option. Note that this option can be changed at any time 4013 allowing to switch between mappings for different languages/encodings. 4014 Use a mapping to avoid having to type it each time! 4015 4016 *'langmenu'* *'lm'* 4017'langmenu' 'lm' string (default "") 4018 global 4019 Language to use for menu translation. Tells which file is loaded 4020 from the "lang" directory in 'runtimepath': >vim 4021 "lang/menu_" .. &langmenu .. ".vim" 4022< (without the spaces). For example, to always use the Dutch menus, no 4023 matter what $LANG is set to: >vim 4024 set langmenu=nl_NL.ISO_8859-1 4025< When 'langmenu' is empty, |v:lang| is used. 4026 Only normal file name characters can be used, `/\*?[|<>` are illegal. 4027 If your $LANG is set to a non-English language but you do want to use 4028 the English menus: >vim 4029 set langmenu=none 4030< This option must be set before loading menus, switching on filetype 4031 detection or syntax highlighting. Once the menus are defined setting 4032 this option has no effect. But you could do this: >vim 4033 source $VIMRUNTIME/delmenu.vim 4034 set langmenu=de_DE.ISO_8859-1 4035 source $VIMRUNTIME/menu.vim 4036< Warning: This deletes all menus that you defined yourself! 4037 4038 *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'* 4039'langremap' 'lrm' boolean (default off) 4040 global 4041 When off, setting 'langmap' does not apply to characters resulting 4042 from a mapping. If setting 'langmap' disables some of your mappings, 4043 make sure this option is off. 4044 4045 *'laststatus'* *'ls'* 4046'laststatus' 'ls' number (default 2) 4047 global 4048 The value of this option influences when the last window will have a 4049 status line: 4050 0: never 4051 1: only if there are at least two windows 4052 2: always 4053 3: always and ONLY the last window 4054 4055 Here "last window" means the last window in a column, i.e. the bottom- 4056 most one, just above the command line. 4057 4058 The screen looks nicer with a status line if you have several 4059 windows, but it takes another screen line. |status-line| 4060 4061 *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'* 4062'lazyredraw' 'lz' boolean (default off) 4063 global 4064 When this option is set, the screen will not be redrawn while 4065 executing macros, registers and other commands that have not been 4066 typed. Also, updating the window title is postponed. To force an 4067 update use |:redraw|. 4068 This may occasionally cause display errors. It is only meant to be 4069 set temporarily when performing an operation where redrawing may cause 4070 flickering or cause a slowdown. 4071 4072 *'lhistory'* *'lhi'* 4073'lhistory' 'lhi' number (default 10) 4074 local to window 4075 Like 'chistory', but for the location list stack associated with a 4076 window. If the option is changed in either the location list window 4077 itself or the window that is associated with the location list stack, 4078 the new value will also be applied to the other one. This means this 4079 value will always be the same for a given location list window and its 4080 corresponding window. See |quickfix-stack| for additional info. 4081 4082 *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 4083'linebreak' 'lbr' boolean (default off) 4084 local to window 4085 If on, Vim will wrap long lines at a character in 'breakat' rather 4086 than at the last character that fits on the screen. Unlike 4087 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, 4088 it only affects the way the file is displayed, not its contents. 4089 If 'breakindent' is set, line is visually indented. Then, the value 4090 of 'showbreak' is used to put in front of wrapped lines. This option 4091 is not used when the 'wrap' option is off. 4092 Note that <Tab> characters after an <EOL> are mostly not displayed 4093 with the right amount of white space. 4094 4095 *'lines'* *E593* 4096'lines' number (default 24 or terminal height) 4097 global 4098 Number of lines of the Vim window. 4099 Normally you don't need to set this. It is done automatically by the 4100 terminal initialization code. 4101 When Vim is running in the GUI or in a resizable window, setting this 4102 option will cause the window size to be changed. When you only want 4103 to use the size for the GUI, put the command in your |gvimrc| file. 4104 Vim limits the number of lines to what fits on the screen. You can 4105 use this command to get the tallest window possible: >vim 4106 set lines=999 4107< Minimum value is 2, maximum value is 1000. 4108 4109 *'linespace'* *'lsp'* 4110'linespace' 'lsp' number (default 0) 4111 global 4112 only in the GUI 4113 Number of pixel lines inserted between characters. Useful if the font 4114 uses the full character cell height, making lines touch each other. 4115 When non-zero there is room for underlining. 4116 With some fonts there can be too much room between lines (to have 4117 space for ascents and descents). Then it makes sense to set 4118 'linespace' to a negative value. This may cause display problems 4119 though! 4120 4121 *'lisp'* *'nolisp'* 4122'lisp' boolean (default off) 4123 local to buffer 4124 Lisp mode: When <Enter> is typed in insert mode set the indent for 4125 the next line to Lisp standards (well, sort of). Also happens with 4126 "cc" or "S". 'autoindent' must also be on for this to work. 4127 Also see 'lispwords'. 4128 The '-' character is included in keyword characters. Redefines the 4129 "=" operator to use this same indentation algorithm rather than 4130 calling an external program if 'equalprg' is empty. 4131 4132 *'lispoptions'* *'lop'* 4133'lispoptions' 'lop' string (default "") 4134 local to buffer 4135 Comma-separated list of items that influence the Lisp indenting when 4136 enabled with the 'lisp' option. Currently only one item is supported: 4137 expr:1 use 'indentexpr' for Lisp indenting when it is set 4138 expr:0 do not use 'indentexpr' for Lisp indenting (default) 4139 Note that when using 'indentexpr' the `=` operator indents all the 4140 lines, otherwise the first line is not indented (Vi-compatible). 4141 4142 *'lispwords'* *'lw'* 4143'lispwords' 'lw' string (default is very long) 4144 global or local to buffer |global-local| 4145 Comma-separated list of words that influence the Lisp indenting when 4146 enabled with the 'lisp' option. 4147 4148 *'list'* *'nolist'* 4149'list' boolean (default off) 4150 local to window 4151 List mode: By default, show tabs as ">", trailing spaces as "-", and 4152 non-breakable space characters as "+". Useful to see the difference 4153 between tabs and spaces and for trailing blanks. Further changed by 4154 the 'listchars' option. 4155 4156 When 'listchars' does not contain "tab" field, tabs are shown as "^I" 4157 or "<09>", like how unprintable characters are displayed. 4158 4159 The cursor is displayed at the start of the space a Tab character 4160 occupies, not at the end as usual in Normal mode. To get this cursor 4161 position while displaying Tabs with spaces, use: >vim 4162 let &list = v:true | let &lcs = 'tab: ' 4163< 4164 Note that list mode will also affect formatting (set with 'textwidth' 4165 or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for 4166 changing the way tabs are displayed. 4167 4168 *'listchars'* *'lcs'* 4169'listchars' 'lcs' string (default "tab:> ,trail:-,nbsp:+") 4170 global or local to window |global-local| 4171 Strings to use in 'list' mode and for the |:list| command. It is a 4172 comma-separated list of string settings. *E1511* 4173 4174 *lcs-eol* 4175 eol:c Character to show at the end of each line. When 4176 omitted, there is no extra character at the end of the 4177 line. 4178 *lcs-tab* 4179 tab:xy[z] Two or three characters to be used to show a tab. 4180 The third character is optional. 4181 4182 tab:xy The 'x' is always used, then 'y' as many times as will 4183 fit. Thus "tab:>-" displays: > 4184 > 4185 >- 4186 >-- 4187 etc. 4188< 4189 tab:xyz The 'z' is always used, then 'x' is prepended, and 4190 then 'y' is used as many times as will fit. Thus 4191 "tab:<->" displays: > 4192 > 4193 <> 4194 <-> 4195 <--> 4196 etc. 4197< 4198 When "tab:" is omitted, a tab is shown as ^I. 4199 *lcs-space* 4200 space:c Character to show for a space. When omitted, spaces 4201 are left blank. 4202 *lcs-multispace* 4203 multispace:c... 4204 One or more characters to use cyclically to show for 4205 multiple consecutive spaces. Overrides the "space" 4206 setting, except for single spaces. When omitted, the 4207 "space" setting is used. For example, 4208 `:set listchars=multispace:---+` shows ten consecutive 4209 spaces as: > 4210 ---+---+-- 4211< 4212 *lcs-lead* 4213 lead:c Character to show for leading spaces. When omitted, 4214 leading spaces are blank. Overrides the "space" and 4215 "multispace" settings for leading spaces. You can 4216 combine it with "tab:", for example: >vim 4217 set listchars+=tab:>-,lead:. 4218< 4219 *lcs-leadmultispace* *indent-guides* 4220 leadmultispace:c... 4221 Like the |lcs-multispace| value, but for leading 4222 spaces only. Also overrides |lcs-lead| for leading 4223 multiple spaces. 4224 `:set listchars=leadmultispace:---+` shows ten 4225 consecutive leading spaces as: > 4226 ---+---+--XXX 4227< 4228 Where "XXX" denotes the first non-blank characters in 4229 the line. 4230 4231 Combined with |lcs-leadtab|, this can be used to show 4232 "indentation guides" (vertical lines). 4233 For example, with 'shiftwidth' 2: >vim 4234 set list listchars=leadtab:\ \ │,tab:\ \ │,leadmultispace:\ \ │ 4235< For richer rendering (per-level colors, treesitter-aware 4236 scopes, etc.) use a third-party plugin. 4237 *lcs-leadtab* 4238 leadtab:xy[z] 4239 Like |lcs-tab|, but only for leading tabs. When 4240 omitted, the "tab" setting is used for leading tabs. 4241 |lcs-tab| must also be set for this to work. *E1572* 4242 You can combine it with "tab:", for example: >vim 4243 let &listchars = 'tab:>-,leadtab:. ' 4244< This shows leading tabs as periods(.) and other tabs 4245 as ">--". 4246 *lcs-trail* 4247 trail:c Character to show for trailing spaces. When omitted, 4248 trailing spaces are blank. Overrides the "space" and 4249 "multispace" settings for trailing spaces. 4250 *lcs-extends* 4251 extends:c Character to show in the last column, when 'wrap' is 4252 off and the line continues beyond the right of the 4253 screen. 4254 *lcs-precedes* 4255 precedes:c Character to show in the first visible column of the 4256 physical line, when there is text preceding the 4257 character visible in the first column. 4258 *lcs-conceal* 4259 conceal:c Character to show in place of concealed text, when 4260 'conceallevel' is set to 1. A space when omitted. 4261 *lcs-nbsp* 4262 nbsp:c Character to show for a non-breakable space character 4263 (0xA0 (160 decimal) and U+202F). Left blank when 4264 omitted. 4265 4266 The characters ':' and ',' should not be used. UTF-8 characters can 4267 be used. All characters must be single width. *E1512* 4268 4269 Each character can be specified as hex: >vim 4270 set listchars=eol:\\x24 4271 set listchars=eol:\\u21b5 4272 set listchars=eol:\\U000021b5 4273< Note that a double backslash is used. The number of hex characters 4274 must be exactly 2 for \\x, 4 for \\u and 8 for \\U. 4275 4276 Examples: >vim 4277 set lcs=tab:>-,trail:- 4278 set lcs=tab:>-,eol:<,nbsp:% 4279 set lcs=extends:>,precedes:< 4280< |hl-NonText| highlighting will be used for "eol", "extends" and 4281 "precedes". |hl-Whitespace| for "nbsp", "space", "tab", "multispace", 4282 "lead" and "trail". 4283 4284 *'loadplugins'* *'lpl'* *'noloadplugins'* *'nolpl'* 4285'loadplugins' 'lpl' boolean (default on) 4286 global 4287 When on the plugin scripts are loaded when starting up |load-plugins|. 4288 This option can be reset in your |vimrc| file to disable the loading 4289 of plugins. 4290 Note that using the "-u NONE" and "--noplugin" command line arguments 4291 reset this option. |-u| |--noplugin| 4292 4293 *'makeef'* *'mef'* 4294'makeef' 'mef' string (default "") 4295 global 4296 Disallowed in |modeline|. |no-modeline-option| 4297 Name of the errorfile for the |:make| command (see |:make_makeprg|) 4298 and the |:grep| command. 4299 When it is empty, an internally generated temp file will be used. 4300 When "##" is included, it is replaced by a number to make the name 4301 unique. This makes sure that the ":make" command doesn't overwrite an 4302 existing file. 4303 NOT used for the ":cf" command. See 'errorfile' for that. 4304 Environment variables are expanded |:set_env|. 4305 See |option-backslash| about including spaces and backslashes. 4306 4307 *'makeencoding'* *'menc'* 4308'makeencoding' 'menc' string (default "") 4309 global or local to buffer |global-local| 4310 Encoding used for reading the output of external commands. When 4311 empty, encoding is not converted. 4312 This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, 4313 `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, 4314 and `:laddfile`. 4315 4316 This would be mostly useful when you use MS-Windows. If iconv is 4317 enabled, setting 'makeencoding' to "char" has the same effect as 4318 setting to the system locale encoding. Example: >vim 4319 set makeencoding=char " system locale is used 4320< 4321 4322 *'makeprg'* *'mp'* 4323'makeprg' 'mp' string (default "make") 4324 global or local to buffer |global-local| 4325 Disallowed in |modeline|. |no-modeline-option| 4326 Program to use for the ":make" command. See |:make_makeprg|. 4327 This option may contain '%' and '#' characters (see |:_%| and |:_#|), 4328 which are expanded to the current and alternate file name. Use |::S| 4329 to escape file names in case they contain special characters. 4330 Environment variables are expanded |:set_env|. See |option-backslash| 4331 about including spaces and backslashes. 4332 Note that a '|' must be escaped twice: once for ":set" and once for 4333 the interpretation of a command. When you use a filter called 4334 "myfilter" do it like this: >vim 4335 set makeprg=gmake\ \\\|\ myfilter 4336< The placeholder "$*" can be given (even multiple times) to specify 4337 where the arguments will be included, for example: >vim 4338 set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*} 4339< 4340 4341 *'matchpairs'* *'mps'* 4342'matchpairs' 'mps' string (default "(:),{:},[:]") 4343 local to buffer 4344 Characters that form pairs. The |%| command jumps from one to the 4345 other. 4346 Only character pairs are allowed that are different, thus you cannot 4347 jump between two double quotes. 4348 The characters must be separated by a colon. 4349 The pairs must be separated by a comma. Example for including '<' and 4350 '>' (for HTML): >vim 4351 set mps+=<:> 4352 4353< A more exotic example, to jump between the '=' and ';' in an 4354 assignment, useful for languages like C and Java: >vim 4355 au FileType c,cpp,java set mps+==:; 4356 4357< For a more advanced way of using "%", see the matchit.vim plugin in 4358 the $VIMRUNTIME/plugin directory. |add-local-help| 4359 4360 *'matchtime'* *'mat'* 4361'matchtime' 'mat' number (default 5) 4362 global 4363 Tenths of a second to show the matching paren, when 'showmatch' is 4364 set. Note that this is not in milliseconds, like other options that 4365 set a time. This is to be compatible with Nvi. 4366 4367 *'maxfuncdepth'* *'mfd'* 4368'maxfuncdepth' 'mfd' number (default 100) 4369 global 4370 Maximum depth of function calls for user functions. This normally 4371 catches endless recursion. When using a recursive function with 4372 more depth, set 'maxfuncdepth' to a bigger number. But this will use 4373 more memory, there is the danger of failing when memory is exhausted. 4374 Increasing this limit above 200 also changes the maximum for Ex 4375 command recursion, see |E169|. 4376 See also |:function|. 4377 Also used for maximum depth of callback functions. 4378 4379 *'maxmapdepth'* *'mmd'* *E223* 4380'maxmapdepth' 'mmd' number (default 1000) 4381 global 4382 Maximum number of times a mapping is done without resulting in a 4383 character to be used. This normally catches endless mappings, like 4384 ":map x y" with ":map y x". It still does not catch ":map g wg", 4385 because the 'w' is used before the next mapping is done. See also 4386 |key-mapping|. 4387 4388 *'maxmempattern'* *'mmp'* 4389'maxmempattern' 'mmp' number (default 1000) 4390 global 4391 Maximum amount of memory (in Kbyte) to use for pattern matching. 4392 The maximum value is about 2000000. Use this to work without a limit. 4393 *E363* 4394 When Vim runs into the limit it gives an error message and mostly 4395 behaves like CTRL-C was typed. 4396 Running into the limit often means that the pattern is very 4397 inefficient or too complex. This may already happen with the pattern 4398 `\(.\)*` on a very long line. `.*` works much better. 4399 Might also happen on redraw, when syntax rules try to match a complex 4400 text structure. 4401 Vim may run out of memory before hitting the 'maxmempattern' limit, in 4402 which case you get an "Out of memory" error instead. 4403 4404 *'maxsearchcount'* *'msc'* 4405'maxsearchcount' 'msc' number (default 999) 4406 global 4407 Maximum number of matches shown for the search count status |shm-S| 4408 When the number of matches exceeds this value, Vim shows ">" instead 4409 of the exact count to keep searching fast. 4410 Note: larger values may impact performance. 4411 The value must be between 1 and 9999. See also the |searchcount()| 4412 function. 4413 4414 *'menuitems'* *'mis'* 4415'menuitems' 'mis' number (default 25) 4416 global 4417 Maximum number of items to use in a menu. Used for menus that are 4418 generated from a list of items, e.g., the Buffers menu. Changing this 4419 option has no direct effect, the menu must be refreshed first. 4420 4421 *'messagesopt'* *'mopt'* 4422'messagesopt' 'mopt' string (default "hit-enter,history:500,progress:c") 4423 global 4424 Option settings for outputting messages. It can consist of the 4425 following items. Items must be separated by a comma. 4426 4427 history:{n} Determines how many entries are remembered in the 4428 |:messages| history. The maximum value is 10000. 4429 Setting it to zero clears the message history. 4430 This item must always be present. 4431 4432 hit-enter Use a |hit-enter| prompt when the message is longer than 4433 'cmdheight' size. 4434 4435 maxheight:{n} |ui2| only. Maximum height of the expanded cmdline 4436 for message display, as a percentage of 'lines'. 4437 A message longer than this is "collapsed", with 4438 a `[+x]` "spill" indicator. (default: 50) 4439 4440 pager:{key} |ui2| only. Key that enters the message pager after an 4441 interactive |:| command showed a collapsed message. Use 4442 |key-notation|, e.g. `<CR>`. A literal comma must be 4443 given as "<Char-44>". Empty: no such key. 4444 4445 progress:{s} Determines where to show progress messages. 4446 Valid values are: 4447 - empty: Progress messages not shown in cmdline. 4448 - "c": Progress messages are shown in cmdline. 4449 4450 timeout:{n} |ui2| only. Time in milliseconds that a message is 4451 visible in the message window. 4452 4453 wait:{n} Deprecated with |ui2|. 4454 Instead of a |hit-enter| prompt, simply wait for {n} 4455 milliseconds so the user has a chance to read the 4456 message. Maximum {n} is 10000. Use 0 to disable the 4457 wait (user won't see any "hit-enter" messages). 4458 Ignored when "hit-enter" is present, but required when 4459 "hit-enter" is not present. 4460 4461 *'mkspellmem'* *'msm'* 4462'mkspellmem' 'msm' string (default "460000,2000,500") 4463 global 4464 Disallowed in |modeline|. |no-modeline-option| 4465 Parameters for |:mkspell|. This tunes when to start compressing the 4466 word tree. Compression can be slow when there are many words, but 4467 it's needed to avoid running out of memory. The amount of memory used 4468 per word depends very much on how similar the words are, that's why 4469 this tuning is complicated. 4470 4471 There are three numbers, separated by commas: > 4472 {start},{inc},{added} 4473< 4474 For most languages the uncompressed word tree fits in memory. {start} 4475 gives the amount of memory in Kbyte that can be used before any 4476 compression is done. It should be a bit smaller than the amount of 4477 memory that is available to Vim. 4478 4479 When going over the {start} limit the {inc} number specifies the 4480 amount of memory in Kbyte that can be allocated before another 4481 compression is done. A low number means compression is done after 4482 less words are added, which is slow. A high number means more memory 4483 will be allocated. 4484 4485 After doing compression, {added} times 1024 words can be added before 4486 the {inc} limit is ignored and compression is done when any extra 4487 amount of memory is needed. A low number means there is a smaller 4488 chance of hitting the {inc} limit, less memory is used but it's 4489 slower. 4490 4491 The languages for which these numbers are important are Italian and 4492 Hungarian. The default works for when you have about 512 Mbyte. If 4493 you have 1 Gbyte you could use: >vim 4494 set mkspellmem=900000,3000,800 4495< If you have less than 512 Mbyte |:mkspell| may fail for some 4496 languages, no matter what you set 'mkspellmem' to. 4497 Environment variables are expanded |:set_env|. 4498 4499 *'modeline'* *'ml'* *'nomodeline'* *'noml'* 4500'modeline' 'ml' boolean (default on (off for root)) 4501 local to buffer 4502 If 'modeline' is on 'modelines' gives the number of lines that is 4503 checked for set commands. If 'modeline' is off or 'modelines' is zero 4504 no lines are checked. See |modeline|. 4505 4506 *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'* 4507'modelineexpr' 'mle' boolean (default off) 4508 global 4509 Disallowed in |modeline|. |no-modeline-option| 4510 When on allow some options that are an expression to be set in the 4511 modeline. Check the option for whether it is affected by 4512 'modelineexpr'. Also see |modeline|. 4513 4514 *'modelines'* *'mls'* 4515'modelines' 'mls' number (default 5) 4516 global 4517 If 'modeline' is on 'modelines' gives the number of lines that is 4518 checked for set commands. If 'modeline' is off or 'modelines' is zero 4519 no lines are checked. See |modeline|. 4520 4521 *'modifiable'* *'ma'* *'nomodifiable'* *'noma'* *E21* 4522'modifiable' 'ma' boolean (default on) 4523 local to buffer 4524 When off the buffer contents cannot be changed. The 'fileformat' and 4525 'fileencoding' options also can't be changed. 4526 Can be reset on startup with the |-M| command line argument. 4527 4528 *'modified'* *'mod'* *'nomodified'* *'nomod'* 4529'modified' 'mod' boolean (default off) 4530 local to buffer |local-noglobal| 4531 When on, the buffer is considered to be modified. This option is set 4532 when: 4533 1. A change was made to the text since it was last written. Using the 4534 |undo| command to go back to the original text will reset the 4535 option. But undoing changes that were made before writing the 4536 buffer will set the option again, since the text is different from 4537 when it was written. 4538 2. 'fileformat' or 'fileencoding' is different from its original 4539 value. The original value is set when the buffer is read or 4540 written. A ":set nomodified" command also resets the original 4541 values to the current values and the 'modified' option will be 4542 reset. 4543 Similarly for 'eol' and 'bomb'. 4544 This option is not set when a change is made to the buffer as the 4545 result of a BufNewFile, BufRead/BufReadPost, BufWritePost, 4546 FileAppendPost or VimLeave autocommand event. See |gzip-example| for 4547 an explanation. 4548 4549 When 'buftype' is "prompt", 'modified' is not implicitly set when the 4550 buffer is changed, but a user or plugin may explicitly set it. 4551 4552 When 'buftype' is "nowrite" or "nofile", this option may be set, but 4553 will be ignored. 4554 4555 Note that the text may actually be the same, e.g. 'modified' is set 4556 when using "rA" on an "A". 4557 4558 *'more'* *'nomore'* 4559'more' boolean (default on) 4560 global 4561 When on, listings pause when the whole screen is filled. You will get 4562 the |more-prompt|. When this option is off there are no pauses, the 4563 listing continues until finished. 4564 4565 *'mouse'* 4566'mouse' string (default "nvi") 4567 global 4568 Enables mouse support. For example, to enable the mouse in Normal mode 4569 and Visual mode: >vim 4570 set mouse=nv 4571< 4572 To temporarily disable mouse support, hold the shift key while using 4573 the mouse. 4574 4575 Mouse support can be enabled for different modes: 4576 n Normal mode 4577 v Visual mode 4578 i Insert mode 4579 c Command-line mode 4580 h all previous modes when editing a help file 4581 a all previous modes 4582 r for |hit-enter| and |more-prompt| prompt 4583 4584 Left-click anywhere in a text buffer to place the cursor there. This 4585 works with operators too, e.g. type |d| then left-click to delete text 4586 from the current cursor position to the position where you clicked. 4587 4588 Drag the |status-line| or vertical separator of a window to resize it. 4589 4590 If enabled for "v" (Visual mode) then double-click selects word-wise, 4591 triple-click makes it line-wise, and quadruple-click makes it 4592 rectangular block-wise. 4593 4594 For scrolling with a mouse wheel see |scroll-mouse-wheel|. 4595 4596 Note: When enabling the mouse in a terminal, copy/paste will use the 4597 "* register if possible. See also 'clipboard'. 4598 4599 Related options: 4600 'mousefocus' window focus follows mouse pointer 4601 'mousemodel' what mouse button does which action 4602 'mousehide' hide mouse pointer while typing text 4603 'selectmode' whether to start Select mode or Visual mode 4604 4605 *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'* 4606'mousefocus' 'mousef' boolean (default off) 4607 global 4608 The window that the mouse pointer is on is automatically activated. 4609 When changing the window layout or window focus in another way, the 4610 mouse pointer is moved to the window with keyboard focus. Off is the 4611 default because it makes using the pull down menus a little goofy, as 4612 a pointer transit may activate a window unintentionally. 4613 4614 *'mousehide'* *'mh'* *'nomousehide'* *'nomh'* 4615'mousehide' 'mh' boolean (default on) 4616 global 4617 only in the GUI 4618 When on, the mouse pointer is hidden when characters are typed. 4619 The mouse pointer is restored when the mouse is moved. 4620 4621 *'mousemodel'* *'mousem'* 4622'mousemodel' 'mousem' string (default "popup_setpos") 4623 global 4624 Sets the model to use for the mouse. The name mostly specifies what 4625 the right mouse button is used for: 4626 extend Right mouse button extends a selection. This works 4627 like in an xterm. 4628 popup Right mouse button pops up a menu. The shifted left 4629 mouse button extends a selection. This works like 4630 with Microsoft Windows. 4631 popup_setpos Like "popup", but the cursor will be moved to the 4632 position where the mouse was clicked, and thus the 4633 selected operation will act upon the clicked object. 4634 If clicking inside a selection, that selection will 4635 be acted upon, i.e. no cursor move. This implies of 4636 course, that right clicking outside a selection will 4637 end Visual mode. 4638 4639 For a detailed description of 'mousemodel' behaviour see 4640 |mouse-mode-table|. Overview of what button does what for each model: 4641 4642 mouse extend popup(_setpos) ~ 4643 left click place cursor place cursor 4644 left drag start selection start selection 4645 shift-left search word extend selection 4646 right click extend selection popup menu (place cursor) 4647 right drag extend selection - 4648 middle click paste paste 4649 4650 In the "popup" model the right mouse button produces a pop-up menu. 4651 Nvim creates a default |popup-menu| but you can redefine it. 4652 4653 Note that you can further refine the meaning of buttons with mappings. 4654 See |mouse-overview|. But mappings are NOT used for modeless selection. 4655 4656 Example: >vim 4657 map <S-LeftMouse> <RightMouse> 4658 map <S-LeftDrag> <RightDrag> 4659 map <S-LeftRelease> <RightRelease> 4660 map <2-S-LeftMouse> <2-RightMouse> 4661 map <2-S-LeftDrag> <2-RightDrag> 4662 map <2-S-LeftRelease> <2-RightRelease> 4663 map <3-S-LeftMouse> <3-RightMouse> 4664 map <3-S-LeftDrag> <3-RightDrag> 4665 map <3-S-LeftRelease> <3-RightRelease> 4666 map <4-S-LeftMouse> <4-RightMouse> 4667 map <4-S-LeftDrag> <4-RightDrag> 4668 map <4-S-LeftRelease> <4-RightRelease> 4669< 4670 Mouse commands requiring the CTRL modifier can be simulated by typing 4671 the "g" key before using the mouse: 4672 "g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click) 4673 "g<RightMouse>" is "<C-RightMouse> ("CTRL-T") 4674 4675*'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'* *mouse-hover* 4676'mousemoveevent' 'mousemev' boolean (default off) 4677 global 4678 When on, mouse move events are delivered to the input queue and are 4679 available for mapping |<MouseMove>|. The default, off, avoids the 4680 mouse movement overhead except when needed. 4681 Warning: Setting this option can make pending mappings to be aborted 4682 when the mouse is moved. 4683 4684 *'mousescroll'* *E5080* 4685'mousescroll' string (default "ver:3,hor:6") 4686 global 4687 This option controls the number of lines / columns to scroll by when 4688 scrolling with a mouse wheel (|scroll-mouse-wheel|). The option is 4689 a comma-separated list. Each part consists of a direction and a count 4690 as follows: 4691 direction:count,direction:count 4692 Direction is one of either "hor" or "ver". "hor" controls horizontal 4693 scrolling and "ver" controls vertical scrolling. Count sets the amount 4694 to scroll by for the given direction, it should be a non negative 4695 integer. Each direction should be set at most once. If a direction 4696 is omitted, a default value is used (6 for horizontal scrolling and 3 4697 for vertical scrolling). You can disable mouse scrolling by using 4698 a count of 0. 4699 4700 Example: >vim 4701 set mousescroll=ver:5,hor:2 4702< Will make Nvim scroll 5 lines at a time when scrolling vertically, and 4703 scroll 2 columns at a time when scrolling horizontally. 4704 4705 *'mousetime'* *'mouset'* 4706'mousetime' 'mouset' number (default 500) 4707 global 4708 Defines the maximum time in msec between two mouse clicks for the 4709 second click to be recognized as a multi click. 4710 4711 *'nrformats'* *'nf'* 4712'nrformats' 'nf' string (default "bin,hex") 4713 local to buffer 4714 This defines what bases Vim will consider for numbers when using the 4715 CTRL-A and CTRL-X commands for adding to and subtracting from a number 4716 respectively; see |CTRL-A| for more info on these commands. 4717 alpha If included, single alphabetical characters will be 4718 incremented or decremented. This is useful for a list with a 4719 letter index a), b), etc. *octal-nrformats* 4720 octal If included, numbers that start with a zero will be considered 4721 to be octal. Example: Using CTRL-A on "007" results in "010". 4722 hex If included, numbers starting with "0x" or "0X" will be 4723 considered to be hexadecimal. Example: Using CTRL-X on 4724 "0x100" results in "0x0ff". 4725 bin If included, numbers starting with "0b" or "0B" will be 4726 considered to be binary. Example: Using CTRL-X on 4727 "0b1000" subtracts one, resulting in "0b0111". 4728 unsigned If included, numbers are recognized as unsigned. Thus a 4729 leading dash or negative sign won't be considered as part of 4730 the number. Examples: 4731 Using CTRL-X on "2020" in "9-2020" results in "9-2019" 4732 (without "unsigned" it would become "9-2021"). 4733 Using CTRL-A on "2020" in "9-2020" results in "9-2021" 4734 (without "unsigned" it would become "9-2019"). 4735 Using CTRL-X on "0" or CTRL-A on "18446744073709551615" 4736 (2^64 - 1) has no effect, overflow is prevented. 4737 blank If included, treat numbers as signed or unsigned based on 4738 preceding whitespace. If a number with a leading dash has its 4739 dash immediately preceded by a non-whitespace character (i.e., 4740 not a tab or a " "), the negative sign won't be considered as 4741 part of the number. For example: 4742 Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" 4743 (without "blank" it would become "Carbon-13"). 4744 Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" 4745 (because -8 is preceded by whitespace. If "unsigned" was 4746 set, it would result in "Carbon -7"). 4747 If this format is included, overflow is prevented as if 4748 "unsigned" were set. If both this format and "unsigned" are 4749 included, "unsigned" will take precedence. 4750 4751 Numbers which simply begin with a digit in the range 1-9 are always 4752 considered decimal. This also happens for numbers that are not 4753 recognized as octal or hex. 4754 4755 *'number'* *'nu'* *'nonumber'* *'nonu'* 4756'number' 'nu' boolean (default off) 4757 local to window 4758 Print the line number in front of each line. When the 'n' option is 4759 excluded from 'cpoptions' a wrapped line will not use the column of 4760 line numbers. 4761 Use the 'numberwidth' option to adjust the room for the line number. 4762 When a long, wrapped line doesn't start with the first character, '-' 4763 characters are put before the number. 4764 For highlighting see |hl-LineNr|, |hl-CursorLineNr|, and the 4765 |:sign-define| "numhl" argument. 4766 *number_relativenumber* 4767 The 'relativenumber' option changes the displayed number to be 4768 relative to the cursor. Together with 'number' there are these 4769 four combinations (cursor in line 3): 4770 4771 'nonu' 'nu' 'nonu' 'nu' 4772 'nornu' 'nornu' 'rnu' 'rnu' 4773 > 4774 |apple | 1 apple | 2 apple | 2 apple 4775 |pear | 2 pear | 1 pear | 1 pear 4776 |nobody | 3 nobody | 0 nobody |3 nobody 4777 |there | 4 there | 1 there | 1 there 4778< 4779 4780 *'numberwidth'* *'nuw'* 4781'numberwidth' 'nuw' number (default 4) 4782 local to window 4783 Minimal number of columns to use for the line number. Only relevant 4784 when the 'number' or 'relativenumber' option is set or printing lines 4785 with a line number. Since one space is always between the number and 4786 the text, there is one less character for the number itself. 4787 The value is the minimum width. A bigger width is used when needed to 4788 fit the highest line number in the buffer respectively the number of 4789 rows in the window, depending on whether 'number' or 'relativenumber' 4790 is set. Thus with the Vim default of 4 there is room for a line 4791 number up to 999. When the buffer has 1000 lines five columns will be 4792 used. The minimum value is 1, the maximum value is 20. 4793 4794 *'omnifunc'* *'ofu'* 4795'omnifunc' 'ofu' string (default "") 4796 local to buffer 4797 Disallowed in |modeline|. |no-modeline-option| 4798 This option specifies a function to be used for Insert mode omni 4799 completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| 4800 See |complete-functions| for an explanation of how the function is 4801 invoked and what it should return. The value can be the name of a 4802 function, a |lambda| or a |Funcref|. See |option-value-function| for 4803 more information. 4804 This option is usually set by a filetype plugin: 4805 |:filetype-plugin-on| 4806 4807 *'operatorfunc'* *'opfunc'* 4808'operatorfunc' 'opfunc' string (default "") 4809 global 4810 Disallowed in |modeline|. |no-modeline-option| 4811 This option specifies a function to be called by the |g@| operator. 4812 See |:map-operator| for more info and an example. The value can be 4813 the name of a function, a |lambda| or a |Funcref|. See 4814 |option-value-function| for more information. 4815 4816 *'packlockfile'* *'plf'* 4817'packlockfile' 'plf' string (default "$XDG_CONFIG_HOME/nvim/nvim-pack-lock.json") 4818 global 4819 Disallowed in |modeline|. |no-modeline-option| 4820 Path of |vim.pack-lockfile|. Must be set before the first usage of any 4821 |vim.pack| function. Environment variables are expanded |:set_env|. 4822 4823 *'packpath'* *'pp'* 4824'packpath' 'pp' string (default see 'runtimepath') 4825 global 4826 Disallowed in |modeline|. |no-modeline-option| 4827 Directories used to find packages. 4828 See |packages| and |packages-runtimepath|. 4829 Environment variables are expanded |:set_env|. 4830 4831 *'paragraphs'* *'para'* 4832'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp") 4833 global 4834 Specifies the nroff macros that separate paragraphs. These are pairs 4835 of two letters (see |object-motions|). 4836 4837 *'patchexpr'* *'pex'* 4838'patchexpr' 'pex' string (default "") 4839 global 4840 Disallowed in |modeline|. |no-modeline-option| 4841 Expression which is evaluated to apply a patch to a file and generate 4842 the resulting new version of the file. See |diff-patchexpr|. 4843 4844 *'patchmode'* *'pm'* *E205* *E206* 4845'patchmode' 'pm' string (default "") 4846 global 4847 When non-empty the oldest version of a file is kept. This can be used 4848 to keep the original version of a file if you are changing files in a 4849 source distribution. Only the first time that a file is written a 4850 copy of the original file will be kept. The name of the copy is the 4851 name of the original file with the string in the 'patchmode' option 4852 appended. This option should start with a dot. Use a string like 4853 ".orig" or ".org". 'backupdir' must not be empty for this to work 4854 (Detail: The backup file is renamed to the patchmode file after the 4855 new file has been successfully written, that's why it must be possible 4856 to write a backup file). If there was no file to be backed up, an 4857 empty file is created. 4858 When the 'backupskip' pattern matches, a patchmode file is not made. 4859 Using 'patchmode' for compressed files appends the extension at the 4860 end (e.g., "file.gz.orig"), thus the resulting name isn't always 4861 recognized as a compressed file. 4862 Only normal file name characters can be used, `/\*?[|<>` are illegal. 4863 4864 *'path'* *'pa'* *E343* *E345* *E347* *E854* 4865'path' 'pa' string (default ".,,") 4866 global or local to buffer |global-local| 4867 This is a list of directories which will be searched when using the 4868 |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands, 4869 provided that the file being searched for has a relative path (not 4870 starting with "/", "./" or "../"). The directories in the 'path' 4871 option may be relative or absolute. 4872 - Use commas to separate directory names: >vim 4873 set path=.,/usr/local/include,/usr/include 4874< - Spaces can also be used to separate directory names. To have a 4875 space in a directory name, precede it with an extra backslash, and 4876 escape the space: >vim 4877 set path=.,/dir/with\\\ space 4878< - To include a comma in a directory name precede it with an extra 4879 backslash: >vim 4880 set path=.,/dir/with\\,comma 4881< - To search relative to the directory of the current file, use: >vim 4882 set path=. 4883< - To search in the current directory use an empty string between two 4884 commas: >vim 4885 set path=,, 4886< - A directory name may end in a ':' or '/'. 4887 - Environment variables are expanded |:set_env|. 4888 - When using |netrw| URLs can be used. For example, adding 4889 "https://www.vim.org" will make ":find index.html" work. 4890 - Search upwards and downwards in a directory tree using "*", "**" and 4891 ";". See |file-searching| for info and syntax. 4892 - Careful with '\' characters, type two to get one in the option: >vim 4893 set path=.,c:\\include 4894< Or just use '/' instead: >vim 4895 set path=.,c:/include 4896< Don't forget "." or files won't even be found in the same directory as 4897 the file! 4898 The maximum length is limited. How much depends on the system, mostly 4899 it is something like 256 or 1024 characters. 4900 You can check if all the include files are found, using the value of 4901 'path', see |:checkpath|. 4902 The use of |:set+=| and |:set-=| is preferred when adding or removing 4903 directories from the list. This avoids problems when a future version 4904 uses another default. To remove the current directory use: >vim 4905 set path-= 4906< To add the current directory use: >vim 4907 set path+= 4908< To use an environment variable, you probably need to replace the 4909 separator. Here is an example to append $INCL, in which directory 4910 names are separated with a semicolon: >vim 4911 let &path = &path .. "," .. substitute($INCL, ';', ',', 'g') 4912< Replace the ';' with a ':' or whatever separator is used. Note that 4913 this doesn't work when $INCL contains a comma or white space. 4914 4915 *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'* 4916'preserveindent' 'pi' boolean (default off) 4917 local to buffer 4918 When changing the indent of the current line, preserve as much of the 4919 indent structure as possible. Normally the indent is replaced by a 4920 series of tabs followed by spaces as required (unless 'expandtab' is 4921 enabled, in which case only spaces are used). Enabling this option 4922 means the indent will preserve as many existing characters as possible 4923 for indenting, and only add additional tabs or spaces as required. 4924 'expandtab' does not apply to the preserved white space, a Tab remains 4925 a Tab. 4926 NOTE: When using ">>" multiple times the resulting indent is a mix of 4927 tabs and spaces. You might not like this. 4928 Also see 'copyindent'. 4929 Use |:retab| to clean up white space. 4930 4931 *'previewheight'* *'pvh'* 4932'previewheight' 'pvh' number (default 12) 4933 global 4934 Default height for a preview window. Used for |:ptag| and associated 4935 commands. Used for |CTRL-W_}| when no count is given. 4936 4937 *'previewpopup'* *'pvp'* 4938'previewpopup' 'pvp' string (default "") 4939 global 4940 When not empty a floating window is used for commands that would open 4941 a preview window. See |preview-popup|. 4942 The option is a comma-separated list of these items: 4943 height Height of the window. When omitted, it is derived from 4944 the content. 4945 width Width of the window. When omitted, it is derived from 4946 the content. 4947 border One of the 'winborder' styles. When omitted, 'winborder' 4948 is used. A custom (comma separated) border cannot be 4949 given here, use 'winborder'. 4950 The window background uses |hl-NormalFloat| and the border uses 4951 |hl-FloatBorder|. 4952 Not used for the insert completion info, add "popup" to 'completeopt' 4953 for that. 4954 4955 Example: >vim 4956 set previewpopup=height:10,width:60,border:rounded 4957< 4958 4959 *'previewwindow'* *'pvw'* *'nopreviewwindow'* *'nopvw'* *E590* 4960'previewwindow' 'pvw' boolean (default off) 4961 local to window |local-noglobal| 4962 Identifies the preview window. Only one window can have this option 4963 set. It's normally not set directly, but by using one of the commands 4964 |:ptag|, |:pedit|, etc. 4965 4966 *'pumblend'* *'pb'* 4967'pumblend' 'pb' number (default 0) 4968 global 4969 Enables pseudo-transparency for the |popup-menu|. Valid values are in 4970 the range of 0 for fully opaque popupmenu (disabled) to 100 for fully 4971 transparent background. Values between 0-30 are typically most useful. 4972 4973 It is possible to override the level for individual highlights within 4974 the popupmenu using |highlight-blend|. For instance, to enable 4975 transparency but force the current selected element to be fully opaque: >vim 4976 4977 set pumblend=15 4978 hi PmenuSel blend=0 4979< 4980 UI-dependent. Works best with RGB colors. 'termguicolors' 4981 4982 *'pumborder'* 4983'pumborder' string (default "") 4984 global 4985 Defines the default border style of popupmenu windows. See 'winborder' for 4986 valid values. |hl-PmenuBorder| is used for highlighting the border, and when 4987 style is "shadow" the |hl-PmenuShadow| and |hl-PmenuShadowThrough| groups are used. 4988 4989 This option also applies to mouse popup menus when 'mousemodel' is set to 4990 "popup" or "popup_setpos", which will display borders using the same style. 4991 4992 *'pumheight'* *'ph'* 4993'pumheight' 'ph' number (default 0) 4994 global 4995 Maximum number of items to show in the popup menu 4996 (|ins-completion-menu|). Zero means "use available screen space". 4997 4998 *'pummaxwidth'* *'pmw'* 4999'pummaxwidth' 'pmw' number (default 0) 5000 global 5001 Maximum width for the popup menu (|ins-completion-menu|). When zero, 5002 there is no maximum width limit, otherwise the popup menu will never be 5003 wider than this value. Truncated text will be indicated by "trunc" 5004 value of 'fillchars' option. 5005 5006 This option takes precedence over 'pumwidth'. 5007 5008 *'pumwidth'* *'pw'* 5009'pumwidth' 'pw' number (default 15) 5010 global 5011 Minimum width for the popup menu (|ins-completion-menu|). If the 5012 cursor column + 'pumwidth' exceeds screen width, the popup menu is 5013 nudged to fit on the screen. 5014 5015 *'pyxversion'* *'pyx'* 5016'pyxversion' 'pyx' number (default 3) 5017 global 5018 Disallowed in |modeline|. |no-modeline-option| 5019 Specifies the python version used for pyx* functions and commands 5020 |python_x|. As only Python 3 is supported, this always has the value 5021 `3`. Setting any other value is an error. 5022 5023 *'quickfixtextfunc'* *'qftf'* 5024'quickfixtextfunc' 'qftf' string (default "") 5025 global 5026 Disallowed in |modeline|. |no-modeline-option| 5027 This option specifies a function to be used to get the text to display 5028 in the quickfix and location list windows. This can be used to 5029 customize the information displayed in the quickfix or location window 5030 for each entry in the corresponding quickfix or location list. See 5031 |quickfix-window-function| for an explanation of how to write the 5032 function and an example. The value can be the name of a function, a 5033 |lambda| or a |Funcref|. See |option-value-function| for more 5034 information. 5035 5036 It is not allowed to change text or jump to another window while 5037 evaluating 'qftf' |textlock|. 5038 5039 *'quoteescape'* *'qe'* 5040'quoteescape' 'qe' string (default "\") 5041 local to buffer 5042 The characters that are used to escape quotes in a string. Used for 5043 objects like a', a" and a` |a'|. 5044 When one of the characters in this option is found inside a string, 5045 the following character will be skipped. The default value makes the 5046 text "foo\"bar\\" considered to be one string. 5047 5048 *'readonly'* *'ro'* *'noreadonly'* *'noro'* 5049'readonly' 'ro' boolean (default off) 5050 local to buffer |local-noglobal| 5051 If on, writes fail unless you use a '!'. Protects you from 5052 accidentally overwriting a file. Default on when Vim is started 5053 in read-only mode ("vim -R") or when the executable is called "view". 5054 When using ":w!" the 'readonly' option is reset for the current 5055 buffer, unless the 'Z' flag is in 'cpoptions'. 5056 When using the ":view" command the 'readonly' option is set for the 5057 newly edited buffer. 5058 See 'modifiable' for disallowing changes to the buffer. 5059 5060 *'redrawdebug'* *'rdb'* 5061'redrawdebug' 'rdb' string (default "") 5062 global 5063 Flags to change the way redrawing works, for debugging purposes. 5064 Most useful with 'writedelay' set to some reasonable value. 5065 Supports the following flags: 5066 compositor Indicate each redraw event handled by the compositor 5067 by briefly flashing the redrawn regions in colors 5068 indicating the redraw type. These are the highlight 5069 groups used (and their default colors): 5070 RedrawDebugNormal gui=reverse normal redraw passed through 5071 RedrawDebugClear guibg=Yellow clear event passed through 5072 RedrawDebugComposed guibg=Green redraw event modified by the 5073 compositor (due to 5074 overlapping grids, etc) 5075 RedrawDebugRecompose guibg=Red redraw generated by the 5076 compositor itself, due to a 5077 grid being moved or deleted. 5078 line introduce a delay after each line drawn on the screen. 5079 When using the TUI or another single-grid UI, "compositor" 5080 gives more information and should be preferred (every 5081 line is processed as a separate event by the compositor) 5082 flush introduce a delay after each "flush" event. 5083 nothrottle Turn off throttling of the message grid. This is an 5084 optimization that joins many small scrolls to one 5085 larger scroll when drawing the message area (with 5086 'display' msgsep flag active). 5087 invalid Enable stricter checking (abort) of inconsistencies 5088 of the internal screen state. This is mostly 5089 useful when running nvim inside a debugger (and 5090 the test suite). 5091 nodelta Send all internally redrawn cells to the UI, even if 5092 they are unchanged from the already displayed state. 5093 5094 *'redrawtime'* *'rdt'* 5095'redrawtime' 'rdt' number (default 2000) 5096 global 5097 Time in milliseconds for redrawing the display. Applies to 5098 'hlsearch', 'inccommand', |:match| highlighting, syntax highlighting, 5099 and async |LanguageTree:parse()|. 5100 When redrawing takes more than this many milliseconds no further 5101 matches will be highlighted. 5102 For syntax highlighting the time applies per window. When over the 5103 limit syntax highlighting is disabled until |CTRL-L| is used. 5104 This is used to avoid that Vim hangs when using a very complicated 5105 pattern. 5106 5107 *'regexpengine'* *'re'* 5108'regexpengine' 're' number (default 0) 5109 global 5110 This selects the default regexp engine. |two-engines| 5111 The possible values are: 5112 0 automatic selection 5113 1 old engine 5114 2 NFA engine 5115 Note that when using the NFA engine and the pattern contains something 5116 that is not supported the pattern will not match. This is only useful 5117 for debugging the regexp engine. 5118 Using automatic selection enables Vim to switch the engine, if the 5119 default engine becomes too costly. E.g., when the NFA engine uses too 5120 many states. This should prevent Vim from hanging on a combination of 5121 a complex pattern with long text. 5122 5123 *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'* 5124'relativenumber' 'rnu' boolean (default off) 5125 local to window 5126 Show the line number relative to the line with the cursor in front of 5127 each line. Relative line numbers help you use the |count| you can 5128 precede some vertical motion commands (e.g. j k + -) with, without 5129 having to calculate it yourself. Especially useful in combination 5130 with other commands (e.g. y d c < > gq gw =). 5131 When the 'n' option is excluded from 'cpoptions' a wrapped line will 5132 not use the column of line numbers. 5133 The 'numberwidth' option can be used to set the room used for the line 5134 number. 5135 When a long, wrapped line doesn't start with the first character, '-' 5136 characters are put before the number. 5137 See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for 5138 the number. 5139 5140 The number in front of the cursor line also depends on the value of 5141 'number', see |number_relativenumber| for all combinations of the two 5142 options. 5143 5144 *'report'* 5145'report' number (default 2) 5146 global 5147 Threshold for reporting number of lines changed. When the number of 5148 changed lines is more than 'report' a message will be given for most 5149 ":" commands. If you want it always, set 'report' to 0. 5150 For the ":substitute" command the number of substitutions is used 5151 instead of the number of lines. 5152 5153 *'revins'* *'ri'* *'norevins'* *'nori'* 5154'revins' 'ri' boolean (default off) 5155 global 5156 Inserting characters in Insert mode will work backwards. See "typing 5157 backwards" |ins-reverse|. This option can be toggled with the CTRL-_ 5158 command in Insert mode, when 'allowrevins' is set. 5159 5160 *'rightleft'* *'rl'* *'norightleft'* *'norl'* 5161'rightleft' 'rl' boolean (default off) 5162 local to window 5163 When on, display orientation becomes right-to-left, i.e., characters 5164 that are stored in the file appear from the right to the left. 5165 Using this option, it is possible to edit files for languages that 5166 are written from the right to the left such as Hebrew and Arabic. 5167 This option is per window, so it is possible to edit mixed files 5168 simultaneously, or to view the same file in both ways (this is 5169 useful whenever you have a mixed text file with both right-to-left 5170 and left-to-right strings so that both sets are displayed properly 5171 in different windows). Also see |rileft.txt|. 5172 5173 *'rightleftcmd'* *'rlc'* 5174'rightleftcmd' 'rlc' string (default "search") 5175 local to window 5176 Each word in this option enables the command line editing to work in 5177 right-to-left mode for a group of commands: 5178 5179 search "/" and "?" commands 5180 5181 This is useful for languages such as Hebrew, Arabic and Farsi. 5182 The 'rightleft' option must be set for 'rightleftcmd' to take effect. 5183 5184 *'ruler'* *'ru'* *'noruler'* *'noru'* 5185'ruler' 'ru' boolean (default on) 5186 global 5187 When on, show some buffer information in the ruler. Each window has 5188 its own ruler. The ruler of the active window is shown in the last 5189 line of the screen, unless 'cmdheight' is zero, or the window has a 5190 status line, which (by default) contains the window's ruler. 5191 5192 'rulerformat' determines the contents of the ruler. 5193 By default, the line and column number of the current cursor position 5194 are shown, separated by a comma. 5195 If the number of characters displayed is different from the number of 5196 bytes in the text (e.g., for a TAB or a multibyte character), both 5197 the text column (byte number) and the screen column are shown, 5198 separated with a dash. 5199 For an empty line "0-1" is shown. 5200 For an empty buffer the line number will also be zero: "0,0-1". 5201 Finally, the relative position of the displayed text in the file is 5202 shown on the far right: 5203 Top first line is visible 5204 Bot last line is visible 5205 All first and last line are visible 5206 45% relative position in the file 5207 5208 If you don't want to see the ruler all the time but want to know where 5209 you are, use "g CTRL-G" |g_CTRL-G|. 5210 When 'ruler' is on, the output of |CTRL-G| doen't contain the current 5211 line number of the cursor position. 5212 5213 *'rulerformat'* *'ruf'* 5214'rulerformat' 'ruf' string (default "%18(%l,%c%V%= %P%)%<") 5215 global 5216 This option determines the content of the ruler string, as displayed 5217 for the 'ruler' option. 5218 The format of this option is like that of 'statusline'. 5219 Setting to empty (`:set rulerformat=`) sets the value to the default. 5220 This option cannot be set in a modeline when 'modelineexpr' is off. 5221 5222 When 'ruler' is on, the default 'statusline' includes 'rulerformat'. 5223 5224 The default ruler width is 18 characters, which is configured with 5225 what looks like an item group. But there are some differences in this 5226 particular case. Most notably, the width is fixed and not a minimum, 5227 and the ruler is left-aligned, whereas the alignment of item groups is 5228 configurable and right-aligned by default. 5229 5230 When |ui2| is enabled, the ruler no longer has a fixed width and the 5231 item group syntax has no special meaning for 'rulerformat'. 5232 5233 *'runtimepath'* *'rtp'* *vimfiles* 5234'runtimepath' 'rtp' string (default "$XDG_CONFIG_HOME/nvim, 5235 $XDG_CONFIG_DIRS[1]/nvim, 5236 $XDG_CONFIG_DIRS[2]/nvim, 5237 … 5238 $XDG_DATA_HOME/nvim[-data]/site, 5239 $XDG_DATA_DIRS[1]/nvim/site, 5240 $XDG_DATA_DIRS[2]/nvim/site, 5241 … 5242 $VIMRUNTIME, 5243 … 5244 $XDG_DATA_DIRS[2]/nvim/site/after, 5245 $XDG_DATA_DIRS[1]/nvim/site/after, 5246 $XDG_DATA_HOME/nvim[-data]/site/after, 5247 … 5248 $XDG_CONFIG_DIRS[2]/nvim/after, 5249 $XDG_CONFIG_DIRS[1]/nvim/after, 5250 $XDG_CONFIG_HOME/nvim/after") 5251 global 5252 Disallowed in |modeline|. |no-modeline-option| 5253 List of directories to be searched for these runtime files: 5254 filetype.lua filetypes |new-filetype| 5255 autoload/ automatically loaded scripts |autoload-functions| 5256 colors/ color scheme files |:colorscheme| 5257 compiler/ compiler files |:compiler| 5258 doc/ documentation |write-local-help| 5259 ftplugin/ filetype plugins |write-filetype-plugin| 5260 indent/ indent scripts |indent-expression| 5261 keymap/ key mapping files |mbyte-keymap| 5262 lang/ menu translations |:menutrans| 5263 lsp/ LSP client configurations |lsp-config| 5264 lua/ |Lua| plugins 5265 menu.vim GUI menus |menu.vim| 5266 pack/ packages |:packadd| 5267 parser/ |treesitter| syntax parsers 5268 plugin/ plugin scripts |write-plugin| 5269 queries/ |treesitter| queries 5270 rplugin/ |remote-plugin| scripts 5271 spell/ spell checking files |spell| 5272 syntax/ syntax files |mysyntaxfile| 5273 tutor/ tutorial files |:Tutor| 5274 5275 And any other file searched for with the |:runtime| command. 5276 5277 Defaults are setup to search these locations: 5278 1. Your home directory, for personal preferences. 5279 Given by `stdpath("config")`. |$XDG_CONFIG_HOME| 5280 2. Directories which must contain configuration files according to 5281 |xdg| ($XDG_CONFIG_DIRS, defaults to /etc/xdg). This also contains 5282 preferences from system administrator. 5283 3. Data home directory, for plugins installed by user. 5284 Given by `stdpath("data")/site`. |$XDG_DATA_HOME| 5285 4. nvim/site subdirectories for each directory in $XDG_DATA_DIRS. 5286 This is for plugins which were installed by system administrator, 5287 but are not part of the Nvim distribution. XDG_DATA_DIRS defaults 5288 to /usr/local/share/:/usr/share/, so system administrators are 5289 expected to install site plugins to /usr/share/nvim/site. 5290 5. $VIMRUNTIME, for files distributed with Nvim. 5291 *after-directory* 5292 6, 7, 8, 9. In after/ subdirectories of 1, 2, 3 and 4, with reverse 5293 ordering. This is for preferences to overrule or add to the 5294 distributed defaults or system-wide settings (rarely needed). 5295 5296 *packages-runtimepath* 5297 "start" packages will also be searched (|runtime-search-path|) for 5298 runtime files after these, though such packages are not explicitly 5299 reported in &runtimepath. But "opt" packages are explicitly added to 5300 &runtimepath by |:packadd|. 5301 5302 Note that, unlike 'path', no wildcards like "**" are allowed. Normal 5303 wildcards are allowed, but can significantly slow down searching for 5304 runtime files. For speed, use as few items as possible and avoid 5305 wildcards. 5306 See |:runtime|. 5307 Example: >vim 5308 set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME 5309< This will use the directory "~/vimruntime" first (containing your 5310 personal Nvim runtime files), then "/mygroup/vim", and finally 5311 "$VIMRUNTIME" (the default runtime files). 5312 You can put a directory before $VIMRUNTIME to find files which replace 5313 distributed runtime files. You can put a directory after $VIMRUNTIME 5314 to find files which add to distributed runtime files. 5315 5316 With |--clean| the home directory entries are not included. 5317 Environment variables are expanded |:set_env|. 5318 5319 *'scroll'* *'scr'* 5320'scroll' 'scr' number (default half the window height) 5321 local to window |local-noglobal| 5322 Number of lines to scroll with CTRL-U and CTRL-D commands. Will be 5323 set to half the number of lines in the window when the window size 5324 changes. This may happen when enabling the |status-line| or 5325 'tabline' option after setting the 'scroll' option. 5326 If you give a count to the CTRL-U or CTRL-D command it will 5327 be used as the new value for 'scroll'. Reset to half the window 5328 height with ":set scroll=0". 5329 5330 *'scrollback'* *'scbk'* 5331'scrollback' 'scbk' number (default 10000) 5332 local to buffer 5333 Maximum number of lines kept beyond the visible screen. Lines at the 5334 top are deleted if new lines exceed this limit. 5335 Minimum is 1, maximum is 1000000. 5336 Only in |terminal| and |prompt-buffer| buffers. 5337 5338 Note: Lines that are not visible and kept in terminal scrollback are not 5339 reflown when the terminal buffer is resized horizontally. 5340 5341 *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'* 5342'scrollbind' 'scb' boolean (default off) 5343 local to window 5344 Enables synchronized scrolling (in all windows with this option set). 5345 Useful for comparing two versions of a file, see 'diff'. 5346 Behavior is controlled by 'scrollopt'. See |scroll-binding|. 5347 5348 This option is (usually) reset when splitting a window to edit another 5349 file: ":split | edit file" results in two windows with scroll-binding, 5350 but ":split file" does not. 5351 5352 Note: Consider calling |:syncbind| on |WinResized|, |WinEnter| events 5353 (scoped to relevant buffers). 5354 5355 *'scrolljump'* *'sj'* 5356'scrolljump' 'sj' number (default 1) 5357 global 5358 Minimal number of lines to scroll when the cursor gets off the 5359 screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E, 5360 CTRL-D). Useful if your terminal scrolls very slowly. 5361 When set to a negative number from -1 to -100 this is used as the 5362 percentage of the window height. Thus -50 scrolls half the window 5363 height. 5364 5365 *'scrolloff'* *'so'* 5366'scrolloff' 'so' number (default 0) 5367 global or local to window |global-local| 5368 Minimal number of screen lines to keep above and below the cursor. 5369 This will make some context visible around where you are working. If 5370 you set it to a very large value (999) the cursor line will always be 5371 in the middle of the window (except at the start or end of the file, 5372 see 'scrolloffpad', or when long lines wrap). 5373 After using the local value, go back the global value with one of 5374 these two: >vim 5375 setlocal scrolloff< 5376 setlocal scrolloff=-1 5377< For scrolling horizontally see 'sidescrolloff'. 5378 5379 *'scrolloffpad'* *'sop'* 5380'scrolloffpad' 'sop' number (default 0) 5381 global or local to window |global-local| 5382 When 'scrolloff' and 'scrolloffpad' are greater than zero, allow 5383 the cursor to remain centered when at the end of the file. 5384 Normally, 'scrolloff' will not keep the cursor centered at the 5385 end of the file. 5386 5387 A value of 0 disables this feature. Any value above 0 enables it. 5388 For a window-local value, -1 means to use the global value. 5389 Values below -1 are invalid. 5390 5391 Example: >vim 5392 :set scrolloff=99 scrolloffpad=1 5393< 5394 5395 After using the local value, go back the global value with one of 5396 these two: >vim 5397 setlocal scrolloffpad< 5398 setlocal scrolloffpad=-1 5399< 5400 5401 *'scrollopt'* *'sbo'* 5402'scrollopt' 'sbo' string (default "ver,jump") 5403 global 5404 This is a comma-separated list of words that specifies how 5405 'scrollbind' windows should behave. 'sbo' stands for ScrollBind 5406 Options. 5407 The following words are available: 5408 ver Bind vertical scrolling for 'scrollbind' windows 5409 hor Bind horizontal scrolling for 'scrollbind' windows 5410 jump Applies to the offset between two windows for vertical 5411 scrolling. This offset is the difference in the first 5412 displayed line of the bound windows. When moving 5413 around in a window, another 'scrollbind' window may 5414 reach a position before the start or after the end of 5415 the buffer. The offset is not changed though, when 5416 moving back the 'scrollbind' window will try to scroll 5417 to the desired position when possible. 5418 When now making that window the current one, two 5419 things can be done with the relative offset: 5420 1. When "jump" is not included, the relative offset is 5421 adjusted for the scroll position in the new current 5422 window. When going back to the other window, the 5423 new relative offset will be used. 5424 2. When "jump" is included, the other windows are 5425 scrolled to keep the same relative offset. When 5426 going back to the other window, it still uses the 5427 same relative offset. 5428 Also see |scroll-binding|. 5429 When 'diff' mode is active there always is vertical scroll binding, 5430 even when "ver" isn't there. 5431 5432 *'sections'* *'sect'* 5433'sections' 'sect' string (default "SHNHH HUnhsh") 5434 global 5435 Specifies the nroff macros that separate sections. These are pairs of 5436 two letters (See |object-motions|). The default makes a section start 5437 at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh". 5438 5439 *'selection'* *'sel'* 5440'selection' 'sel' string (default "inclusive") 5441 global 5442 This option defines the behavior of the selection. It is only used 5443 in Visual and Select mode. 5444 Possible values: 5445 value past line inclusive ~ 5446 old no yes 5447 inclusive yes yes 5448 exclusive yes no 5449 "past line" means that the cursor is allowed to be positioned one 5450 character past the line. 5451 "inclusive" means that the last character of the selection is included 5452 in an operation. For example, when "x" is used to delete the 5453 selection. 5454 When "old" is used and 'virtualedit' allows the cursor to move past 5455 the end of line the line break still isn't included. 5456 When "exclusive" is used, cursor position in visual mode will be 5457 adjusted for inclusive motions |inclusive-motion-selection-exclusive|. 5458 5459 Note: 5460 - When "exclusive" is used and selecting from the end backwards, you 5461 cannot include the last character of a line, when starting in Normal 5462 mode and 'virtualedit' empty. 5463 - when "exclusive" is used with a single character visual selection, 5464 Vim will behave as if the 'selection' is inclusive (in other words, 5465 you cannot visually select an empty region). 5466 5467 *'selectmode'* *'slm'* 5468'selectmode' 'slm' string (default "") 5469 global 5470 This is a comma-separated list of words, which specifies when to start 5471 Select mode instead of Visual mode, when a selection is started. 5472 Possible values: 5473 mouse when using the mouse 5474 key when using shifted special keys 5475 cmd when using "v", "V" or CTRL-V 5476 See |Select-mode|. 5477 5478 *'sessionoptions'* *'ssop'* 5479'sessionoptions' 'ssop' string (default "blank,buffers,curdir,folds,help,tabpages,winsize,terminal") 5480 global 5481 Changes the effect of the |:mksession| command. It is a comma- 5482 separated list of words. Each word enables saving and restoring 5483 something: 5484 word save and restore ~ 5485 blank empty windows 5486 buffers hidden and unloaded buffers, not just those in windows 5487 curdir the current directory 5488 folds manually created folds, opened/closed folds and local 5489 fold options 5490 globals global variables that start with an uppercase letter 5491 and contain at least one lowercase letter. Only 5492 String and Number types are stored. 5493 help the help window 5494 localoptions options and mappings local to a window or buffer (not 5495 global values for local options) 5496 options all options and mappings (also global values for local 5497 options), except Lua functions |option-value-function|. 5498 skiprtp exclude 'runtimepath' and 'packpath' from the options 5499 resize size of the Vim window: 'lines' and 'columns' 5500 sesdir the directory in which the session file is located 5501 will become the current directory (useful with 5502 projects accessed over a network from different 5503 systems) 5504 tabpages all tabpages; without this only the current tabpage 5505 is restored, so that you can make a session for each 5506 tabpage separately 5507 terminal include terminal windows where the command can be 5508 restored 5509 winpos position of the whole Vim window 5510 winsize window sizes 5511 slash |deprecated| Always enabled. Uses "/" in filenames. 5512 unix |deprecated| Always enabled. Uses "\n" line endings. 5513 5514 Don't include both "curdir" and "sesdir". When neither is included 5515 filenames are stored as absolute paths. 5516 If you leave out "options" many things won't work well after restoring 5517 the session. 5518 5519 *'shada'* *'sd'* *E526* *E527* *E528* 5520'shada' 'sd' string (default "!,'100,<50,s10,h,r/tmp/,r/private/") 5521 global 5522 Disallowed in |modeline|. |no-modeline-option| 5523 When non-empty, the shada file is read upon startup and written 5524 when exiting Vim (see |shada-file|). The string should be a comma- 5525 separated list of parameters, each consisting of a single character 5526 identifying the particular parameter, followed by a number or string 5527 which specifies the value of that parameter. If a particular 5528 character is left out, then the default value is used for that 5529 parameter. The following is a list of the identifying characters and 5530 the effect of their value. 5531 CHAR VALUE ~ 5532 *shada-!* 5533 ! When included, save and restore global variables that start 5534 with an uppercase letter, and don't contain a lowercase 5535 letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis" 5536 and "_K_L_M" are not. Nested List and Dict items may not be 5537 read back correctly, you end up with an empty item. 5538 *shada-quote* 5539 " Maximum number of lines saved for each register. Old name of 5540 the '<' item, with the disadvantage that you need to put a 5541 backslash before the ", otherwise it will be recognized as the 5542 start of a comment! 5543 *shada-%* 5544 % When included, save and restore the buffer list. If Vim is 5545 started with a file name argument, the buffer list is not 5546 restored. If Vim is started without a file name argument, the 5547 buffer list is restored from the shada file. Quickfix 5548 ('buftype'), unlisted ('buflisted'), unnamed and buffers on 5549 removable media (|shada-r|) are not saved. 5550 When followed by a number, the number specifies the maximum 5551 number of buffers that are stored. Without a number all 5552 buffers are stored. 5553 *shada-'* 5554 ' Maximum number of previously edited files for which the marks 5555 are remembered. This parameter must always be included when 5556 'shada' is non-empty. 5557 If non-zero, then the |jumplist| and the |changelist| are also 5558 stored in the shada file. 5559 *shada-/* 5560 / Maximum number of items in the search pattern history to be 5561 saved. If non-zero, then the previous search and substitute 5562 patterns are also saved. When not included, the value of 5563 'history' is used. 5564 *shada-:* 5565 : Maximum number of items in the command-line history to be 5566 saved. When not included, the value of 'history' is used. 5567 *shada-<* 5568 < Maximum number of lines saved for each register. If zero then 5569 registers are not saved. When not included, all lines are 5570 saved. '"' is the old name for this item. 5571 Also see the 's' item below: limit specified in KiB. 5572 *shada-@* 5573 @ Maximum number of items in the input-line history to be 5574 saved. When not included, the value of 'history' is used. 5575 *shada-c* 5576 c Dummy option, kept for compatibility reasons. Has no actual 5577 effect: ShaDa always uses UTF-8 and 'encoding' value is fixed 5578 to UTF-8 as well. 5579 *shada-f* 5580 f Whether file marks need to be stored. If zero, file marks ('0 5581 to '9, 'A to 'Z) are not stored. When not present or when 5582 non-zero, they are all stored. '0 is used for the current 5583 cursor position (when exiting or when doing |:wshada|). 5584 *shada-h* 5585 h Disable the effect of 'hlsearch' when loading the shada 5586 file. When not included, it depends on whether ":nohlsearch" 5587 has been used since the last search command. 5588 *shada-n* 5589 n Name of the shada file. The name must immediately follow 5590 the 'n'. Must be at the end of the option! If the 5591 'shadafile' option is set, that file name overrides the one 5592 given here with 'shada'. Environment variables are 5593 expanded when opening the file, not when setting the option. 5594 *shada-r* 5595 r Removable media. The argument is a string (up to the next 5596 ','). This parameter can be given several times. Each 5597 specifies the start of a path for which no marks will be 5598 stored. This is to avoid removable media. For Windows you 5599 could use "ra:,rb:". You can also use it for temp files, 5600 e.g., for Unix: "r/tmp". Case is ignored. 5601 *shada-s* 5602 s Maximum size of an item contents in KiB. If zero then nothing 5603 is saved. Unlike Vim this applies to all items, except for 5604 the buffer list and header. Full item size is off by three 5605 unsigned integers: with `s10` maximum item size may be 1 byte 5606 (type: 7-bit integer) + 9 bytes (timestamp: up to 64-bit 5607 integer) + 3 bytes (item size: up to 16-bit integer because 5608 2^8 < 10240 < 2^16) + 10240 bytes (requested maximum item 5609 contents size) = 10253 bytes. 5610 5611 Example: >vim 5612 set shada='50,<1000,s100,:0,n~/nvim/shada 5613< 5614 '50 Marks will be remembered for the last 50 files you 5615 edited. 5616 <1000 Contents of registers (up to 1000 lines each) will be 5617 remembered. 5618 s100 Items with contents occupying more then 100 KiB are 5619 skipped. 5620 :0 Command-line history will not be saved. 5621 n~/nvim/shada The name of the file to use is "~/nvim/shada". 5622 no / Since '/' is not specified, the default will be used, 5623 that is, save all of the search history, and also the 5624 previous search and substitute patterns. 5625 no % The buffer list will not be saved nor read back. 5626 no h 'hlsearch' highlighting will be restored. 5627 5628 When setting 'shada' from an empty value you can use |:rshada| to 5629 load the contents of the file, this is not done automatically. 5630 5631 *'shadafile'* *'sdf'* 5632'shadafile' 'sdf' string (default "") 5633 global 5634 Disallowed in |modeline|. |no-modeline-option| 5635 When non-empty, overrides the file name used for |shada| (viminfo). 5636 When equal to "NONE" no shada file will be read or written. 5637 This option can be set with the |-i| command line flag. The |--clean| 5638 command line flag sets it to "NONE". 5639 Environment variables are expanded |:set_env|. 5640 5641 *'shell'* *'sh'* *E91* 5642'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe") 5643 global 5644 Disallowed in |modeline|. |no-modeline-option| 5645 Name of the shell to use for ! and :! commands. When changing the 5646 value also check these options: 'shellpipe', 'shellslash' 5647 'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'. 5648 It is allowed to give an argument to the command, e.g. "csh -f". 5649 See |option-backslash| about including spaces and backslashes. 5650 Environment variables are expanded |:set_env|. 5651 5652 If the name of the shell contains a space, you need to enclose it in 5653 quotes. Example with quotes: >vim 5654 set shell=\"c:\program\ files\unix\sh.exe\"\ -f 5655< Note the backslash before each quote (to avoid starting a comment) and 5656 each space (to avoid ending the option value), so better use |:let-&| 5657 like this: >vim 5658 let &shell='"C:\Program Files\unix\sh.exe" -f' 5659< Also note that the "-f" is not inside the quotes, because it is not 5660 part of the command name. 5661 *shell-unquoting* 5662 Rules regarding quotes: 5663 1. Option is split on space and tab characters that are not inside 5664 quotes: "abc def" runs shell named "abc" with additional argument 5665 "def", '"abc def"' runs shell named "abc def" with no additional 5666 arguments (here and below: additional means “additional to 5667 'shellcmdflag'”). 5668 2. Quotes in option may be present in any position and any number: 5669 '"abc"', '"a"bc', 'a"b"c', 'ab"c"' and '"a"b"c"' are all equivalent 5670 to just "abc". 5671 3. Inside quotes backslash preceding backslash means one backslash. 5672 Backslash preceding quote means one quote. Backslash preceding 5673 anything else means backslash and next character literally: 5674 '"a\\b"' is the same as "a\b", '"a\\"b"' runs shell named literally 5675 'a"b', '"a\b"' is the same as "a\b" again. 5676 4. Outside of quotes backslash always means itself, it cannot be used 5677 to escape quote: 'a\"b"' is the same as "a\b". 5678 Note that such processing is done after |:set| did its own round of 5679 unescaping, so to keep yourself sane use |:let-&| like shown above. 5680 *shell-powershell* 5681 To use PowerShell: >vim 5682 set noshelltemp 5683 let &shell = 'powershell' 5684 let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ' 5685 let &shellcmdflag .= '[Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();' 5686 let &shellcmdflag .= '$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';' 5687 let &shellpipe = '> %s 2>&1' 5688 set shellquote= shellxquote= 5689< 5690 *shell-pwsh* 5691 To use pwsh, use the above settings with `let &shell = 'pwsh'`, and 5692 add: >vim 5693 let &shellcmdflag .= '$PSStyle.OutputRendering = ''PlainText'';' 5694 " Workaround (may not be needed in future version of pwsh): 5695 let $__SuppressAnsiEscapeSequences = 1 5696< 5697 5698 *'shellcmdflag'* *'shcf'* 5699'shellcmdflag' 'shcf' string (default "-c"; Windows, when 'shell' 5700 contains "cmd" somewhere: "/s /c") 5701 global 5702 Disallowed in |modeline|. |no-modeline-option| 5703 Flag passed to the shell to execute "!" and ":!" commands; e.g., 5704 `bash.exe -c ls` or `cmd.exe /s /c "dir"`. For MS-Windows, the 5705 default is set according to the value of 'shell', to reduce the need 5706 to set this option by the user. 5707 On Unix it can have more than one flag. Each white space separated 5708 part is passed as an argument to the shell command. 5709 See |option-backslash| about including spaces and backslashes. 5710 See |shell-unquoting| which talks about separating this option into 5711 multiple arguments. 5712 5713 *'shellpipe'* *'sp'* 5714'shellpipe' 'sp' string (default ">", "| tee", "|& tee" or "2>&1| tee") 5715 global 5716 Disallowed in |modeline|. |no-modeline-option| 5717 String to be used to put the output of the ":make" command in the 5718 error file. See also |:make_makeprg|. See |option-backslash| about 5719 including spaces and backslashes. 5720 The name of the temporary file can be represented by "%s" if necessary 5721 (the file name is appended automatically if no %s appears in the value 5722 of this option). 5723 For MS-Windows the default is "2>&1| tee". The stdout and stderr are 5724 saved in a file and echoed to the screen. 5725 For Unix the default is "| tee". The stdout of the compiler is saved 5726 in a file and echoed to the screen. If the 'shell' option contains 5727 "csh" (e.g. "tcsh") after initializations, the default becomes 5728 "|& tee". Otherwise, if it contains "sh" (e.g. "bash", "zsh"), the 5729 default becomes "2>&1| tee". This means that stderr is also included. 5730 Before using the 'shell' option a path is removed, thus "/bin/sh" uses 5731 "sh". 5732 The initialization of this option is done after reading the vimrc 5733 and the other initializations, so that when the 'shell' option is set 5734 there, the 'shellpipe' option changes automatically, unless it was 5735 explicitly set before. 5736 When 'shellpipe' is set to an empty string, no redirection of the 5737 ":make" output will be done. This is useful if you use a 'makeprg' 5738 that writes to 'makeef' by itself. If you want no piping, but do 5739 want to include the 'makeef', set 'shellpipe' to a single space. 5740 Don't forget to precede the space with a backslash: ":set sp=\ ". 5741 In the future pipes may be used for filtering and this option will 5742 become obsolete (at least for Unix). 5743 Note: When using a pipe like "| tee", you'll lose the exit code of the 5744 shell command. This might be configurable by your shell, look for 5745 the pipefail option (for bash and zsh, use ":set -o pipefail"). 5746 Only a single "%s" value is allowed. 5747 5748 *'shellquote'* *'shq'* 5749'shellquote' 'shq' string (default ""; Windows, when 'shell' 5750 contains "sh" somewhere: "\"") 5751 global 5752 Disallowed in |modeline|. |no-modeline-option| 5753 Quoting character(s), put around the command passed to the shell, for 5754 the "!" and ":!" commands. The redirection is kept outside of the 5755 quoting. See 'shellxquote' to include the redirection. It's 5756 probably not useful to set both options. 5757 This is an empty string by default. Only known to be useful for 5758 third-party shells on Windows systems, such as the MKS Korn Shell 5759 or bash, where it should be "\"". The default is adjusted according 5760 the value of 'shell', to reduce the need to set this option by the 5761 user. 5762 5763 *'shellredir'* *'srr'* 5764'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1") 5765 global 5766 Disallowed in |modeline|. |no-modeline-option| 5767 String to be used to put the output of a filter command in a temporary 5768 file. See also |:!|. See |option-backslash| about including spaces 5769 and backslashes. 5770 The name of the temporary file can be represented by "%s" if necessary 5771 (the file name is appended automatically if no %s appears in the value 5772 of this option). 5773 The default is ">". For Unix, if the 'shell' option contains "csh" 5774 (e.g. "tcsh") during initializations, the default becomes ">&". 5775 Otherwise, if it contains "sh" (e.g. "bash", "zsh"), the default 5776 becomes ">%s 2>&1". This means that stderr is also included. For 5777 Win32, the Unix checks are done and additionally "cmd" is checked 5778 for, which makes the default ">%s 2>&1". 5779 Also, the same names with ".exe" appended are checked for. 5780 The initialization of this option is done after reading the vimrc 5781 and the other initializations, so that when the 'shell' option is set 5782 there, the 'shellredir' option changes automatically unless it was 5783 explicitly set before. 5784 In the future pipes may be used for filtering and this option will 5785 become obsolete (at least for Unix). 5786 *E1577* 5787 Only a single "%s" item is allowed in the option value. 5788 5789 *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'* 5790'shellslash' 'ssl' boolean (default on; Windows: off, except when 'shell' 5791 contains "sh" somewhere) 5792 global 5793 only modifiable in MS-Windows 5794 When set, a forward slash is used when expanding file names. This is 5795 useful when a Unix-like shell is used instead of cmd.exe. Backward 5796 slashes can still be typed, but they are changed to forward slashes by 5797 Vim. 5798 Note that setting or resetting this option has no effect for some 5799 existing file names, thus this option needs to be set before opening 5800 any file for best results. This might change in the future. 5801 'shellslash' only works when a backslash can be used as a path 5802 separator. To test if this is so use: >vim 5803 if exists('+shellslash') 5804< Also see 'completeslash'. 5805 5806 *'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'* 5807'shelltemp' 'stmp' boolean (default off) 5808 global 5809 When on, use temp files for shell commands. When off use a pipe. 5810 When using a pipe is not possible temp files are used anyway. 5811 The advantage of using a pipe is that nobody can read the temp file 5812 and the 'shell' command does not need to support redirection. 5813 The advantage of using a temp file is that the file type and encoding 5814 can be detected. 5815 The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|, 5816 |FilterWritePost| autocommands event are not triggered when 5817 'shelltemp' is off. 5818 |system()| does not respect this option, it always uses pipes. 5819 5820 *'shellxescape'* *'sxe'* 5821'shellxescape' 'sxe' string (default "") 5822 global 5823 Disallowed in |modeline|. |no-modeline-option| 5824 When 'shellxquote' is set to "(" then the characters listed in this 5825 option will be escaped with a '^' character. This makes it possible 5826 to execute most external commands with cmd.exe. 5827 5828 *'shellxquote'* *'sxq'* 5829'shellxquote' 'sxq' string (default ""; Windows, when 'shell' 5830 contains "cmd" somewhere: "\"") 5831 global 5832 Disallowed in |modeline|. |no-modeline-option| 5833 Quoting character(s), put around the command passed to the shell, for 5834 the "!" and ":!" commands. Includes the redirection. See 5835 'shellquote' to exclude the redirection. It's probably not useful 5836 to set both options. 5837 When the value is '(' then ')' is appended. When the value is '"(' 5838 then ')"' is appended. 5839 When the value is '(' then also see 'shellxescape'. 5840 5841 *'shiftround'* *'sr'* *'noshiftround'* *'nosr'* 5842'shiftround' 'sr' boolean (default off) 5843 global 5844 Round indent to multiple of 'shiftwidth'. Applies to > and < 5845 commands. CTRL-T and CTRL-D in Insert mode always round the indent to 5846 a multiple of 'shiftwidth' (this is Vi compatible). 5847 5848 *'shiftwidth'* *'sw'* 5849'shiftwidth' 'sw' number (default 8) 5850 local to buffer 5851 Number of columns that make up one level of (auto)indentation. Used 5852 by 'cindent', |<<|, |>>|, etc. 5853 If set to 0, Vim uses the current 'tabstop' value. Use |shiftwidth()| 5854 to obtain the effective value in scripts. 5855 5856 *'shortmess'* *'shm'* *E1336* 5857'shortmess' 'shm' string (default "ltToOCF") 5858 global 5859 Controls display of file messages (e.g. CTRL-G) and various other 5860 messages. 5861 5862 It is a list of flags: 5863 flag meaning when present ~ 5864 l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l* 5865 m use "[+]" instead of "[Modified]" *shm-m* 5866 r use "[RO]" instead of "[readonly]" *shm-r* 5867 w use "[w]" instead of "written" for file write message *shm-w* 5868 and "[a]" instead of "appended" for ':w >> file' command 5869 a all of the above abbreviations *shm-a* 5870 5871 o overwrite message for writing a file with subsequent *shm-o* 5872 message for reading a file (useful for ":wn" or when 5873 'autowrite' on) 5874 O message for reading a file overwrites any previous *shm-O* 5875 message; also for quickfix message (e.g., ":cn") 5876 s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* 5877 "search hit TOP, continuing at BOTTOM" messages; when using 5878 the search count do not show "W" before the count message 5879 (see |shm-S| below) 5880 t truncate file message at the start if it is too long *shm-t* 5881 to fit on the command-line, "<" will appear in the left most 5882 column; ignored in Ex mode 5883 T truncate other messages in the middle if they are too *shm-T* 5884 long to fit on the command line; "..." will appear in the 5885 middle; ignored in Ex mode 5886 W don't give "written" or "[w]" when writing a file *shm-W* 5887 A don't give the "ATTENTION" message when an existing *shm-A* 5888 swap file is found 5889 I don't give the intro message when starting Vim, *shm-I* 5890 see |:intro| 5891 c don't give |ins-completion-menu| messages; for *shm-c* 5892 example, "-- XXX completion (YYY)", "match 1 of 2", "The only 5893 match", "Pattern not found", "Back at original", etc. 5894 C don't give messages while scanning for ins-completion *shm-C* 5895 items, for instance "scanning tags" 5896 q do not show "recording @a" when recording a macro *shm-q* 5897 F don't give the file info when editing a file, like *shm-F* 5898 `:silent` was used for the command; note that this also 5899 affects messages from 'autoread' reloading 5900 S do not show search count message when searching, e.g. *shm-S* 5901 "[1/5]". When the "S" flag is not present (e.g. search count 5902 is shown), the "search hit BOTTOM, continuing at TOP" and 5903 "search hit TOP, continuing at BOTTOM" messages are only 5904 indicated by a "W" (Mnemonic: Wrapped) letter before the 5905 search count statistics. The maximum limit can be set with 5906 the 'maxsearchcount' option, see also |searchcount()| 5907 function. 5908 u don't give undo and redo messages like *shm-u* 5909 "1 line less; before #1 1 second ago", "Already at oldest 5910 change" or "Already at newest change" 5911 5912 This gives you the opportunity to avoid that a change between buffers 5913 requires you to hit <Enter>, but still gives as useful a message as 5914 possible for the space available. To get the whole message that you 5915 would have got with 'shm' empty, use ":file!" 5916 Useful values: 5917 shm= No abbreviation of message. 5918 shm=a Abbreviation, but no loss of information. 5919 shm=at Abbreviation, and truncate message when necessary. 5920 5921 *'showbreak'* *'sbr'* *E595* 5922'showbreak' 'sbr' string (default "") 5923 global or local to window |global-local| 5924 String to put at the start of lines that have been wrapped. Useful 5925 values are "> " or "+++ ": >vim 5926 let &showbreak = "> " 5927 let &showbreak = '+++ ' 5928< Only printable single-cell characters are allowed, excluding <Tab> and 5929 comma (in a future version the comma might be used to separate the 5930 part that is shown at the end and at the start of a line). 5931 The |hl-NonText| highlight group determines the highlighting. 5932 Note that tabs after the showbreak will be displayed differently. 5933 If you want the 'showbreak' to appear in between line numbers, add the 5934 "n" flag to 'cpoptions'. 5935 A window-local value overrules a global value. If the global value is 5936 set and you want no value in the current window use NONE: >vim 5937 setlocal showbreak=NONE 5938< 5939 5940 *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* 5941'showcmd' 'sc' boolean (default on) 5942 global 5943 Show (partial) command in the last line of the screen. Set this 5944 option off if your terminal is slow. 5945 In Visual mode the size of the selected area is shown: 5946 - When selecting characters within a line, the number of characters. 5947 If the number of bytes is different it is also displayed: "2-6" 5948 means two characters and six bytes. 5949 - When selecting more than one line, the number of lines. 5950 - When selecting a block, the size in screen characters: 5951 {lines}x{columns}. 5952 This information can be displayed in an alternative location using the 5953 'showcmdloc' option, useful when 'cmdheight' is 0. 5954 5955 *'showcmdloc'* *'sloc'* 5956'showcmdloc' 'sloc' string (default "last") 5957 global 5958 This option can be used to display the (partially) entered command in 5959 another location. Possible values are: 5960 last Last line of the screen (default). 5961 statusline Status line of the current window. 5962 tabline First line of the screen if 'showtabline' is enabled. 5963 Setting this option to "statusline" or "tabline" means that these will 5964 be redrawn whenever the command changes, which can be on every key 5965 pressed. 5966 The %S 'statusline' item can be used in 'statusline' or 'tabline' to 5967 place the text. Without a custom 'statusline' or 'tabline' it will be 5968 displayed in a convenient location. 5969 5970 *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'* 5971'showfulltag' 'sft' boolean (default off) 5972 global 5973 When completing a word in insert mode (see |ins-completion|) from the 5974 tags file, show both the tag name and a tidied-up form of the search 5975 pattern (if there is one) as possible matches. Thus, if you have 5976 matched a C function, you can see a template for what arguments are 5977 required (coding style permitting). 5978 Note that this doesn't work well together with having "longest" in 5979 'completeopt', because the completion from the search pattern may not 5980 match the typed text. 5981 5982 *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'* 5983'showmatch' 'sm' boolean (default off) 5984 global 5985 When a bracket is inserted, briefly jump to the matching one. The 5986 jump is only done if the match can be seen on the screen. The time to 5987 show the match can be set with 'matchtime'. 5988 A Beep is given if there is no match (no matter if the match can be 5989 seen or not). 5990 When the 'm' flag is not included in 'cpoptions', typing a character 5991 will immediately move the cursor back to where it belongs. 5992 See the "sm" field in 'guicursor' for setting the cursor shape and 5993 blinking when showing the match. 5994 The 'matchpairs' option can be used to specify the characters to show 5995 matches for. 'rightleft' and 'revins' are used to look for opposite 5996 matches. 5997 Also see the matchparen plugin for highlighting the match when moving 5998 around |pi_paren.txt|. 5999 Note: Use of the short form is rated PG. 6000 6001 *'showmode'* *'smd'* *'noshowmode'* *'nosmd'* 6002'showmode' 'smd' boolean (default on) 6003 global 6004 If in Insert, Replace or Visual mode put a message on the last line. 6005 The |hl-ModeMsg| highlight group determines the highlighting. 6006 The option has no effect when 'cmdheight' is zero. 6007 6008 *'showtabline'* *'stal'* 6009'showtabline' 'stal' number (default 1) 6010 global 6011 Specifies when the |tabpage| labels will be displayed: 6012 0: never 6013 1: only if there are at least two tabpages 6014 2: always 6015 6016 *'sidescroll'* *'ss'* 6017'sidescroll' 'ss' number (default 1) 6018 global 6019 The minimal number of columns to scroll horizontally. Used only when 6020 the 'wrap' option is off and the cursor is moved off of the screen. 6021 When it is zero the cursor will be put in the middle of the screen. 6022 When using a slow terminal set it to a large number or 0. Not used 6023 for "zh" and "zl" commands. 6024 6025 *'sidescrolloff'* *'siso'* 6026'sidescrolloff' 'siso' number (default 0) 6027 global or local to window |global-local| 6028 The minimal number of screen columns to keep to the left and to the 6029 right of the cursor if 'nowrap' is set. Setting this option to a 6030 value greater than 0 while having 'sidescroll' also at a non-zero 6031 value makes some context visible in the line you are scrolling in 6032 horizontally (except at beginning of the line). Setting this option 6033 to a large value (like 999) has the effect of keeping the cursor 6034 horizontally centered in the window, as long as one does not come too 6035 close to the beginning of the line. 6036 After using the local value, go back the global value with one of 6037 these two: >vim 6038 setlocal sidescrolloff< 6039 setlocal sidescrolloff=-1 6040< 6041 Example: Try this together with 'sidescroll' and 'listchars' as in the 6042 following example to never allow the cursor to move onto the 6043 "extends" character: >vim 6044 6045 set nowrap sidescroll=1 listchars=extends:>,precedes:< 6046 set sidescrolloff=1 6047< 6048 6049 *'signcolumn'* *'scl'* 6050'signcolumn' 'scl' string (default "auto") 6051 local to window 6052 When and how to draw the signcolumn. Valid values are: 6053 "auto" only when there is a sign to display 6054 "auto:[1-9]" resize to accommodate multiple signs up to the 6055 given number (maximum 9), e.g. "auto:4" 6056 "auto:[1-8]-[2-9]" 6057 resize to accommodate multiple signs up to the 6058 given maximum number (maximum 9) while keeping 6059 at least the given minimum (maximum 8) fixed 6060 space. The minimum number should always be less 6061 than the maximum number, e.g. "auto:2-5" 6062 "no" never 6063 "yes" always 6064 "yes:[1-9]" always, with fixed space for signs up to the given 6065 number (maximum 9), e.g. "yes:3" 6066 "number" display signs in the 'number' column. If the number 6067 column is not present, then behaves like "auto". 6068 6069 *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'* 6070'smartcase' 'scs' boolean (default off) 6071 global 6072 Override the 'ignorecase' option if the search pattern contains upper 6073 case characters. Only used when the search pattern is typed and 6074 'ignorecase' option is on. Used for the commands "/", "?", "n", "N", 6075 ":g" and ":s" and when filtering matches for the completion menu 6076 |compl-states|. 6077 Not used for "*", "#", "gd", tag search, etc. After "*" and "#" you 6078 can make 'smartcase' used by doing a "/" command, recalling the search 6079 pattern from history and hitting <Enter>. 6080 6081 *'smartindent'* *'si'* *'nosmartindent'* *'nosi'* 6082'smartindent' 'si' boolean (default off) 6083 local to buffer 6084 Do smart autoindenting when starting a new line. Works for C-like 6085 programs, but can also be used for other languages. 'cindent' does 6086 something like this, works better in most cases, but is more strict, 6087 see |C-indenting|. When 'cindent' is on or 'indentexpr' is set, 6088 setting 'si' has no effect. 'indentexpr' is a more advanced 6089 alternative. 6090 Normally 'autoindent' should also be on when using 'smartindent'. 6091 An indent is automatically inserted: 6092 - After a line ending in "{". 6093 - After a line starting with a keyword from 'cinwords'. 6094 - Before a line starting with "}" (only with the "O" command). 6095 When typing '}' as the first character in a new line, that line is 6096 given the same indent as the matching "{". 6097 When typing '#' as the first character in a new line, the indent for 6098 that line is removed, the '#' is put in the first column. The indent 6099 is restored for the next line. If you don't want this, use this 6100 mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. 6101 When using the ">>" command, lines starting with '#' are not shifted 6102 right. 6103 6104 *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* 6105'smarttab' 'sta' boolean (default on) 6106 global 6107 When enabled, the <Tab> key will indent by 'shiftwidth' if the cursor 6108 is in leading whitespace. The <BS> key has the opposite effect. 6109 In leading whitespace, this has the same effect as setting 6110 'softtabstop' to the value of 'shiftwidth'. 6111 NOTE: in most cases, using 'softtabstop' is a better option. Have a 6112 look at section |30.5| of the user guide for detailed 6113 explanations on how Vim works with tabs and spaces. 6114 6115 *'smoothscroll'* *'sms'* *'nosmoothscroll'* *'nosms'* 6116'smoothscroll' 'sms' boolean (default off) 6117 local to window 6118 Scrolling works with screen lines. When 'wrap' is set and the first 6119 line in the window wraps part of it may not be visible, as if it is 6120 above the window. "<<<" is displayed at the start of the first line, 6121 highlighted with |hl-NonText|. 6122 You may also want to add "lastline" to the 'display' option to show as 6123 much of the last line as possible. 6124 NOTE: partly implemented, doesn't work yet for |gj| and |gk|. 6125 6126 *'softtabstop'* *'sts'* 6127'softtabstop' 'sts' number (default 0) 6128 local to buffer 6129 Create soft tab stops, separated by 'softtabstop' number of columns. 6130 In Insert mode, pressing the <Tab> key will move the cursor to the 6131 next soft tab stop, instead of inserting a literal tab. <BS> behaves 6132 similarly in reverse. Vim inserts a minimal mix of tab and space 6133 characters to produce the visual effect. 6134 6135 This setting does not affect the display of existing tab characters. 6136 6137 A value of 0 disables this behaviour. A negative value makes Vim use 6138 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with 6139 different values, you might consider setting 'smarttab'. 6140 6141 The 'L' flag in 'cpoptions' alters tab behavior when 'list' is 6142 enabled. See also |ins-expandtab| and user manual section |30.5| for 6143 in-depth explanations. 6144 6145 The value of 'softtabstop' will be ignored if 'varsofttabstop' is set 6146 to anything other than an empty string. 6147 6148 *'spell'* *'nospell'* 6149'spell' boolean (default off) 6150 local to window 6151 When on spell checking will be done. See |spell|. 6152 The languages are specified with 'spelllang'. 6153 6154 *'spellcapcheck'* *'spc'* 6155'spellcapcheck' 'spc' string (default "[.?!]\_[\])'"\t ]\+") 6156 local to buffer 6157 Pattern to locate the end of a sentence. The following word will be 6158 checked to start with a capital letter. If not then it is highlighted 6159 with SpellCap |hl-SpellCap| (unless the word is also badly spelled). 6160 When this check is not wanted make this option empty. 6161 Only used when 'spell' is set. 6162 Be careful with special characters, see |option-backslash| about 6163 including spaces and backslashes. 6164 To set this option automatically depending on the language, see 6165 |set-spc-auto|. 6166 6167 *'spellfile'* *'spf'* 6168'spellfile' 'spf' string (default "") 6169 local to buffer 6170 Disallowed in |modeline|. |no-modeline-option| 6171 Name of the word list file where words are added for the |zg| and |zw| 6172 commands. It must end in ".{encoding}.add". You need to include the 6173 path, otherwise the file is placed in the current directory. 6174 The path may include characters from 'isfname', ' ', ',', '@' and ':'. 6175 *E765* 6176 It may also be a comma-separated list of names. A count before the 6177 |zg| and |zw| commands can be used to access each. This allows using 6178 a personal word list file and a project word list file. 6179 When a word is added while this option is empty Nvim will use 6180 (and auto-create) `stdpath('data')/site/spell/`. For the file name the 6181 first language name that appears in 'spelllang' is used, ignoring the 6182 region. 6183 The resulting ".spl" file will be used for spell checking, it does not 6184 have to appear in 'spelllang'. 6185 Normally one file is used for all regions, but you can add the region 6186 name if you want to. However, it will then only be used when 6187 'spellfile' is set to it, for entries in 'spelllang' only files 6188 without region name will be found. 6189 Environment variables are expanded |:set_env|. 6190 6191 *'spelllang'* *'spl'* 6192'spelllang' 'spl' string (default "en") 6193 local to buffer 6194 A comma-separated list of word list names. When the 'spell' option is 6195 on spellchecking will be done for these languages. Example: >vim 6196 set spelllang=en_us,nl,medical 6197< This means US English, Dutch and medical words are recognized. Words 6198 that are not recognized will be highlighted. 6199 The word list name must consist of alphanumeric characters, a dash or 6200 an underscore. It should not include a comma or dot. Using a dash is 6201 recommended to separate the two letter language name from a 6202 specification. Thus "en-rare" is used for rare English words. 6203 A region name must come last and have the form "_xx", where "xx" is 6204 the two-letter, lower case region name. You can use more than one 6205 region by listing them: "en_us,en_ca" supports both US and Canadian 6206 English, but not words specific for Australia, New Zealand or Great 6207 Britain. (Note: currently en_au and en_nz dictionaries are older than 6208 en_ca, en_gb and en_us). 6209 If the name "cjk" is included East Asian characters are excluded from 6210 spell checking. This is useful when editing text that also has Asian 6211 words. 6212 Note that the "medical" dictionary does not exist, it is just an 6213 example of a longer name. 6214 *E757* 6215 As a special case the name of a .spl file can be given as-is. The 6216 first "_xx" in the name is removed and used as the region name 6217 (_xx is an underscore, two letters and followed by a non-letter). 6218 This is mainly for testing purposes. You must make sure the correct 6219 encoding is used, Vim doesn't check it. 6220 How the related spell files are found is explained here: |spell-load|. 6221 6222 If the |package-spellfile| plugin is active and you use a language name 6223 for which Vim cannot find the .spl file in 'runtimepath' the plugin 6224 will ask you if you want to download the file. 6225 6226 After this option has been set successfully, Vim will source the files 6227 "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' 6228 up to the first character that is not an ASCII letter or number and 6229 not a dash. Also see |set-spc-auto|. 6230 6231 *'spelloptions'* *'spo'* 6232'spelloptions' 'spo' string (default "") 6233 local to buffer 6234 Disallowed in |modeline|. |no-modeline-option| 6235 A comma-separated list of options for spell checking: 6236 camel When a word is CamelCased, assume "Cased" is a 6237 separate word: every upper-case character in a word 6238 that comes after a lower case character indicates the 6239 start of a new word. 6240 noplainbuffer Only spellcheck a buffer when 'syntax' is enabled, 6241 or when extmarks are set within the buffer. Only 6242 designated regions of the buffer are spellchecked in 6243 this case. 6244 6245 *'spellsuggest'* *'sps'* *E5700* 6246'spellsuggest' 'sps' string (default "best") 6247 global 6248 Disallowed in |modeline|. |no-modeline-option| 6249 Methods used for spelling suggestions. Both for the |z=| command and 6250 the |spellsuggest()| function. This is a comma-separated list of 6251 items: 6252 6253 best Internal method that works best for English. Finds 6254 changes like "fast" and uses a bit of sound-a-like 6255 scoring to improve the ordering. 6256 6257 double Internal method that uses two methods and mixes the 6258 results. The first method is "fast", the other method 6259 computes how much the suggestion sounds like the bad 6260 word. That only works when the language specifies 6261 sound folding. Can be slow and doesn't always give 6262 better results. 6263 6264 fast Internal method that only checks for simple changes: 6265 character inserts/deletes/swaps. Works well for 6266 simple typing mistakes. 6267 6268 {number} The maximum number of suggestions listed for |z=|. 6269 Not used for |spellsuggest()|. The number of 6270 suggestions is never more than the value of 'lines' 6271 minus two. 6272 6273 timeout:{millisec} Limit the time searching for suggestions to 6274 {millisec} milliseconds. Applies to the following 6275 methods. When omitted the limit is 5000. When 6276 negative there is no limit. 6277 6278 file:{filename} Read file {filename}, which must have two columns, 6279 separated by a slash. The first column contains the 6280 bad word, the second column the suggested good word. 6281 Example: 6282 theribal/terrible ~ 6283 Use this for common mistakes that do not appear at the 6284 top of the suggestion list with the internal methods. 6285 Lines without a slash are ignored, use this for 6286 comments. 6287 The word in the second column must be correct, 6288 otherwise it will not be used. Add the word to an 6289 ".add" file if it is currently flagged as a spelling 6290 mistake. 6291 The file is used for all languages. 6292 6293 expr:{expr} Evaluate expression {expr}. Use a function to avoid 6294 trouble with spaces. Best is to call a function 6295 without arguments, see |expr-option-function|. 6296 |v:val| holds the badly spelled word. The expression 6297 must evaluate to a List of Lists, each with a 6298 suggestion and a score. 6299 Example: 6300 [['the', 33], ['that', 44]] ~ 6301 Set 'verbose' and use |z=| to see the scores that the 6302 internal methods use. A lower score is better. 6303 This may invoke |spellsuggest()| if you temporarily 6304 set 'spellsuggest' to exclude the "expr:" part. 6305 Errors are silently ignored, unless you set the 6306 'verbose' option to a non-zero value. 6307 6308 Only one of "best", "double" or "fast" may be used. The others may 6309 appear several times in any order. Example: >vim 6310 set sps=file:~/.config/nvim/sugg,best,expr:MySuggest() 6311< Environment variables are expanded |:set_env|. 6312 6313 *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* 6314'splitbelow' 'sb' boolean (default off) 6315 global 6316 When on, splitting a window will put the new window below the current 6317 one. |:split| 6318 6319 *'splitkeep'* *'spk'* 6320'splitkeep' 'spk' string (default "cursor") 6321 global 6322 The value of this option determines the scroll behavior when opening, 6323 closing or resizing horizontal splits. 6324 6325 Possible values are: 6326 cursor Keep the same relative cursor position. 6327 screen Keep the text on the same screen line. 6328 topline Keep the topline the same. 6329 6330 For the "screen" and "topline" values, the cursor position will be 6331 changed when necessary. In this case, the jumplist will be populated 6332 with the previous cursor position. For "screen", the text cannot 6333 always be kept on the same screen line when 'wrap' is enabled. 6334 6335 *'splitright'* *'spr'* *'nosplitright'* *'nospr'* 6336'splitright' 'spr' boolean (default off) 6337 global 6338 When on, splitting a window will put the new window right of the 6339 current one. |:vsplit| 6340 6341 *'startofline'* *'sol'* *'nostartofline'* *'nosol'* 6342'startofline' 'sol' boolean (default off) 6343 global 6344 When "on" the commands listed below move the cursor to the first 6345 non-blank of the line. When off the cursor is kept in the same column 6346 (if possible). This applies to the commands: 6347 - CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg" 6348 - "d", "<<", "==" and ">>" with a linewise operator 6349 (|operator-resulting-pos|) 6350 - "%" with a count 6351 - buffer changing commands (CTRL-^, :bnext, :bNext, etc.) 6352 - Ex commands that only have a line number, e.g., ":25" or ":+". 6353 In case of buffer changing commands the cursor is placed at the column 6354 where it was the last time the buffer was edited. 6355 6356 *'statuscolumn'* *'stc'* 6357'statuscolumn' 'stc' string (default "") 6358 local to window 6359 Disallowed in |modeline|. |no-modeline-option| 6360 When non-empty, this option determines the content of the area to the 6361 side of a window, normally containing the fold, sign and number columns. 6362 The format of this option is like that of 'statusline'. 6363 6364 Some of the items from the 'statusline' format are different for 6365 'statuscolumn': 6366 6367 %l line number column for currently drawn line 6368 %s sign column for currently drawn line 6369 %C fold column for currently drawn line 6370 6371 The 'statuscolumn' width follows that of the default columns and 6372 adapts to the 'numberwidth', 'signcolumn' and 'foldcolumn' option values 6373 (regardless of whether the sign and fold items are present). 6374 Additionally, the 'statuscolumn' grows with the size of the evaluated 6375 format string, up to a point (following the maximum size of the default 6376 fold, sign and number columns). Shrinking only happens when the number 6377 of lines in a buffer changes, or the 'statuscolumn' option is set. 6378 6379 The |v:lnum| variable holds the line number to be drawn. 6380 The |v:relnum| variable holds the relative line number to be drawn. 6381 The |v:virtnum| variable is negative when drawing virtual lines, zero 6382 when drawing the actual buffer line, and positive when 6383 drawing the wrapped part of a buffer line. 6384 6385 When using |v:relnum|, keep in mind that cursor movement by itself will 6386 not cause the 'statuscolumn' to update unless 'relativenumber' is set. 6387 6388 Examples: >vim 6389 " Line number with bar separator and click handlers: 6390 set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T 6391 6392 " Line numbers in hexadecimal for non wrapped part of lines: 6393 let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} ' 6394 6395 " Human readable line numbers with thousands separator: 6396 let &stc='%{substitute(v:lnum,"\\d\\zs\\ze\\' 6397 . '%(\\d\\d\\d\\)\\+$",",","g")}' 6398 6399 " Both relative and absolute line numbers with different 6400 " highlighting for odd and even relative numbers: 6401 let &stc='%#NonText#%{&nu?v:lnum:""}' . 6402 '%=%{&rnu&&(v:lnum%2)?"\ ".v:relnum:""}' . 6403 '%#LineNr#%{&rnu&&!(v:lnum%2)?"\ ".v:relnum:""}' 6404 6405< WARNING: this expression is evaluated for each screen line so defining 6406 an expensive expression can negatively affect render performance. 6407 6408 *'statusline'* *'stl'* *E540* *E542* 6409'statusline' 'stl' string (default is very long) 6410 global or local to window |global-local| 6411 Sets the |status-line|. 6412 6413 Contains printf-style "%" items interspersed with normal text, where 6414 each item has the form: > 6415 %-0{minwid}.{maxwid}{item} 6416< 6417 All fields except {item} are optional. Use "%%" to show a literal "%" 6418 char. Setting to empty (`:set statusline=`) sets the global value to 6419 the default. 6420 6421 *stl-%!* 6422 When the option starts with "%!" then it is used as an expression, 6423 evaluated and the result is used as the option value. Example: >vim 6424 set statusline=%!MyStatusLine() 6425< The *g:statusline_winid* variable will be set to the |window-ID| of the 6426 window that the status line belongs to. 6427 The result can contain %{} items that will be evaluated too. 6428 Note that the "%!" expression is evaluated in the context of the 6429 current window and buffer, while %{} items are evaluated in the 6430 context of the window that the statusline belongs to. 6431 6432 When there is an error while evaluating the option it will be reset to 6433 its default value to avoid further errors. Otherwise screen updating 6434 would loop. When the result contains unprintable characters the 6435 result is unpredictable. 6436 6437 When 'ruler' is on, the default 'statusline' includes 'rulerformat'. 6438 See note below. 6439 Note that if 'statusline' is configured without including the ruler, 6440 the only effect of 'ruler' when this option is set (and 'laststatus' 6441 is 2 or 3) is controlling the output of |CTRL-G|. 6442 6443 field meaning ~ 6444 - Left justify the item. The default is right justified 6445 when minwid is larger than the length of the item. 6446 0 Leading zeroes in numeric items. Overridden by "-". 6447 minwid Minimum width of the item, padding as set by "-" & "0". 6448 Value must be 50 or less. 6449 maxwid Maximum width of the item. Truncation occurs with a "<" 6450 on the left for text items. Numeric items will be 6451 shifted down to maxwid-2 digits followed by ">"number 6452 where number is the amount of missing digits, much like 6453 an exponential notation. 6454 item A one letter code as described below. 6455 6456 Following is a description of the possible statusline items. The 6457 second character in "item" is the type: 6458 "N" for number 6459 "S" for string 6460 "F" for flags as described below 6461 "-" not applicable 6462 6463 item meaning ~ 6464 f S Path to the file in the buffer, as typed or relative to current 6465 directory. 6466 F S Full path to the file in the buffer. 6467 t S File name (tail) of file in the buffer. 6468 m F Modified flag, text is "[+]"; "[-]" if 'modifiable' is off. 6469 M F Modified flag, text is ",+" or ",-". 6470 r F Readonly flag, text is "[RO]". 6471 R F Readonly flag, text is ",RO". 6472 h F Help buffer flag, text is "[help]". 6473 H F Help buffer flag, text is ",HLP". 6474 w F Preview window flag, text is "[Preview]". 6475 W F Preview window flag, text is ",PRV". 6476 y F Type of file in the buffer, e.g., "[vim]". See 'filetype'. 6477 Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'. 6478 q S "[Quickfix List]", "[Location List]" or empty. 6479 k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are 6480 being used: "<keymap>" 6481 n N Buffer number. 6482 b N Value of character under cursor. 6483 B N As above, in hexadecimal. 6484 o N Byte number in file of byte under cursor, first byte is 1. 6485 Mnemonic: Offset from start of file (with one added) 6486 O N As above, in hexadecimal. 6487 l N Line number. 6488 L N Number of lines in buffer. 6489 c N Column number (byte index). 6490 v N Virtual column number (screen column). 6491 V N Virtual column number as -{num}. Not displayed if equal to 'c'. 6492 p N Percentage through file in lines as in |CTRL-G|. 6493 P S Percentage through file of displayed window. This is like the 6494 percentage described for 'ruler'. Always 3 in length, unless 6495 translated. 6496 S S 'showcmd' content, see 'showcmdloc'. 6497 a S Argument list status as in default title. ({current} of {max}) 6498 Empty if the argument file count is zero or one. 6499 { NF Evaluate expression between "%{" and "}" and substitute result. 6500 Note that there is no "%" before the closing "}". The 6501 expression cannot contain a "}" character, call a function to 6502 work around that. See |stl-%{| below. Use "%0{" to insert the 6503 result verbatim. 6504 `{%` - This is almost same as "{" except the result of the expression is 6505 re-evaluated as a statusline format string. Thus if the 6506 return value of expr contains "%" items they will get expanded. 6507 The expression can contain the "}" character, the end of 6508 expression is denoted by "%}". 6509 For example: >vim 6510 func! Stl_filename() abort 6511 return "%t" 6512 endfunc 6513< `stl=%{Stl_filename()}` results in `"%t"` 6514 `stl=%{%Stl_filename()%}` results in `"Name of current file"` 6515 The default status line uses this to include 'rulerformat', see 6516 note below. 6517 %} - End of "{%" expression 6518 ( - Start of item group. Can be used for setting the width and 6519 alignment of a section. Must be followed by %) somewhere. 6520 ) - End of item group. No width fields allowed. 6521 T N For 'tabline': start of tabpage N label. Use %T or %X to end 6522 the label. Clicking this label with left mouse button switches 6523 to the specified tabpage, while clicking it with middle mouse 6524 button closes the specified tabpage. 6525 X N For 'tabline': start of close tab N label. Use %X or %T to end 6526 the label, e.g.: %3Xclose%X. Use %999X for a "close current 6527 tab" label. Clicking this label with left mouse button closes 6528 the specified tabpage. 6529 @ N Start of execute function label. Use %X or %T to end the label, 6530 e.g.: %10@SwitchBuffer@foo.c%X. Clicking this label runs the 6531 specified function: in the example when clicking once using left 6532 mouse button on "foo.c", a `SwitchBuffer(10, 1, 'l', ' ')` 6533 expression will be run. The specified function receives the 6534 following arguments in order: 6535 1. minwid field value or zero if no N was specified 6536 2. number of mouse clicks to detect multiple clicks 6537 3. mouse button used: "l", "r" or "m" for left, right or middle 6538 button respectively; one should not rely on third argument 6539 being only "l", "r" or "m": any other non-empty string value 6540 that contains only ASCII lower case letters may be expected 6541 for other mouse buttons 6542 4. modifiers pressed: string which contains "s" if shift 6543 modifier was pressed, "c" for control, "a" for alt and "m" 6544 for meta; currently if modifier is not pressed string 6545 contains space instead, but one should not rely on presence 6546 of spaces or specific order of modifiers: use |stridx()| to 6547 test whether some modifier is present; string is guaranteed 6548 to contain only ASCII letters and spaces, one letter per 6549 modifier; "?" modifier may also be present, but its presence 6550 is a bug that denotes that new mouse button recognition was 6551 added without modifying code that reacts on mouse clicks on 6552 this label. 6553 6554 Use |getmousepos()|.winid in the specified function to get the 6555 corresponding |window-ID| of the clicked item. 6556 < - Where to truncate line if too long. Default is at the first 6557 item. Truncation markers within item groups apply to the 6558 truncation of that group until its maxwid is reached. 6559 In case of several competing truncation markers, the first wins. 6560 No width fields allowed. 6561 = - Separation point between alignment sections. Each section will 6562 be separated by an equal number of spaces. With one %= what 6563 comes after it will be right-aligned. With two %= there is a 6564 middle part, with white space left and right of it. 6565 Alignment sections within item groups will be separated until 6566 minwid of the group is reached. 6567 No width fields allowed. 6568 # - Set highlight group. The name must follow and then a # again. 6569 Thus use %#HLname# for highlight group HLname. The same 6570 highlighting is used, also for the statusline of non-current 6571 windows. 6572 $ - Same as `#`, except the `%$HLname$` group will inherit from 6573 preceding highlight attributes. 6574 * - Set highlight group to User{N}, where {N} is taken from the 6575 minwid field, e.g. %1*. Restore normal highlight with %* or 6576 %0*. The difference between User{N} and StatusLine will be 6577 applied to StatusLineNC for the statusline of non-current 6578 windows. 6579 The number N must be between 1 and 9. See |hl-User1..9| 6580 #( - Start of a highlight scope. The exact highlighting before the 6581 scope is reset at the end. No width fields allowed. 6582 #) - End of highlight scope. No width fields allowed. 6583 6584 When displaying a flag, Vim removes the leading comma, if any, when 6585 that flag comes right after plaintext. This will make a nice display 6586 when flags are used like in the examples below. 6587 6588 When all items in a group becomes an empty string (i.e. flags that are 6589 not set) and a minwid is not set for the group, the whole group will 6590 become empty. This will make a group like the following disappear 6591 completely from the statusline when none of the flags are set. >vim 6592 set statusline=...%(\ [%M%R%H]%)... 6593< Beware that an expression is evaluated each and every time the status 6594 line is displayed. 6595 *stl-%{* *g:actual_curbuf* *g:actual_curwin* 6596 While evaluating %{} the current buffer and current window will be set 6597 temporarily to that of the window (and buffer) whose statusline is 6598 currently being drawn. The expression will evaluate in this context. 6599 The variable "g:actual_curbuf" is set to the `bufnr()` number of the 6600 real current buffer and "g:actual_curwin" to the |window-ID| of the 6601 real current window. These values are strings. 6602 6603 The 'statusline' option will be evaluated in the |sandbox| if set from 6604 a modeline, see |sandbox-option|. 6605 This option cannot be set in a modeline when 'modelineexpr' is off. 6606 6607 It is not allowed to change text or jump to another window while 6608 evaluating 'statusline' |textlock|. 6609 6610 If the statusline is not updated when you want it (e.g., after setting 6611 a variable that's used in an expression), you can force an update by 6612 using `:redrawstatus`. 6613 6614 A result of all digits is regarded a number for display purposes. 6615 Otherwise the result is taken as flag text and applied to the rules 6616 described above. 6617 *stl-%0{* 6618 With %0{ neither applies: the result is inserted as a literal string. 6619 6620 Watch out for errors in expressions. They may render Vim unusable! 6621 If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and 6622 edit your vimrc or whatever with "vim --clean" to get it right. 6623 6624 Examples: 6625 A simple version of the standard status line with 'ruler' set >vim 6626 set statusline=%f\ %h%w%m%r%=\ %-14.(%l,%c%V%)\ %P 6627< Similar, but add ASCII value of char under the cursor (like "ga") >vim 6628 set statusline=%f%h%m%r%=\ %b\ 0x%B\ \ %l,%c%V\ %P 6629< Display byte count and byte value, modified flag in red. >vim 6630 set statusline=%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b' 6631 hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red 6632< Display a ,GZ flag if a compressed file is loaded >vim 6633 set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h... 6634< In the |:autocmd|'s: >vim 6635 let b:gzflag = 1 6636< And: >vim 6637 unlet b:gzflag 6638< And define this function: >vim 6639 function VarExists(var, val) 6640 if exists(a:var) | return a:val | else | return '' | endif 6641 endfunction 6642< 6643 Note: By default, the status line is truncated from the left, and the 6644 ruler from the right. But the status line can include the ruler. 6645 To ensure that a top-level (i.e. not inside an item group) `%<` in 6646 'rulerformat' doesn't change the truncation of the status line, 6647 - 'statusline' can be prepended with an explicit `%<`, which otherwise 6648 would not be necessary. Example: >vim 6649 set statusline=%<%f%=\ %{%&rulerformat%} 6650< - Or the ruler can be wrapped in an item group, which also collapses 6651 any top-level `%=` in 'rulerformat' unless minwid is specified: >vim 6652 set statusline=%f%=\ %(%{%&rulerformat%}%) 6653< 6654 6655 *'suffixes'* *'su'* 6656'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj") 6657 global 6658 Files with these suffixes get a lower priority when multiple files 6659 match a wildcard. See |suffixes|. Commas can be used to separate the 6660 suffixes. Spaces after the comma are ignored. A dot is also seen as 6661 the start of a suffix. To avoid a dot or comma being recognized as a 6662 separator, precede it with a backslash (see |option-backslash| about 6663 including spaces and backslashes). 6664 See 'wildignore' for completely ignoring files. 6665 The use of |:set+=| and |:set-=| is preferred when adding or removing 6666 suffixes from the list. This avoids problems when a future version 6667 uses another default. 6668 6669 *'suffixesadd'* *'sua'* 6670'suffixesadd' 'sua' string (default "") 6671 local to buffer 6672 Comma-separated list of suffixes, which are used when searching for a 6673 file for the "gf", "[I", etc. commands. Example: >vim 6674 set suffixesadd=.java 6675< 6676 6677 *'swapfile'* *'swf'* *'noswapfile'* *'noswf'* 6678'swapfile' 'swf' boolean (default on) 6679 local to buffer 6680 Use a |swap-file| for the buffer (if 'updatecount' is non-zero). The 6681 'directory' option decides where swapfiles are stored. 6682 6683 To open a new buffer without creating a swapfile, use |:noswapfile|. 6684 To disable for an existing buffer, reset its 'swapfile' option. 6685 Careful: 6686 - Recovery will be impossible! 6687 - The entire file will be in memory. 6688 6689 When reset, the swapfile for the current buffer is immediately 6690 deleted. When re-enabled (and 'updatecount' is non-zero), a swapfile 6691 is immediately created. 6692 6693 Used with 'bufhidden' and 'buftype' to specify |special-buffers|. 6694 6695 *'switchbuf'* *'swb'* 6696'switchbuf' 'swb' string (default "uselast") 6697 global 6698 This option controls the behavior when switching between buffers. 6699 This option is checked, when 6700 - jumping to errors with the |quickfix| commands (|:cc|, |:cn|, |:cp|, 6701 etc.). 6702 - jumping to a tag using the |:stag| command. 6703 - opening a file using the |CTRL-W_f| or |CTRL-W_F| command. 6704 - jumping to a buffer using a buffer split command (e.g. |:sbuffer|, 6705 |:sbnext|, or |:sbrewind|). 6706 Possible values (comma-separated list): 6707 useopen If included, jump to the first open window in the 6708 current tabpage that contains the specified buffer 6709 (if there is one). Otherwise: Do not examine other 6710 windows. 6711 usetab Like "useopen", but also consider windows in other 6712 tabpages. 6713 split If included, split the current window before loading 6714 a buffer for a |quickfix| command that display errors. 6715 Otherwise: do not split, use current window (when used 6716 in the quickfix window: the previously used window or 6717 split if there is no other window). 6718 vsplit Just like "split" but split vertically. 6719 newtab Like "split", but open a new tabpage. Overrules 6720 "split" when both are present. 6721 uselast If included, jump to the previously used window when 6722 jumping to errors with |quickfix| commands. 6723 If a window has 'winfixbuf' enabled, 'switchbuf' is currently not 6724 applied to the split window. 6725 6726 *'synmaxcol'* *'smc'* 6727'synmaxcol' 'smc' number (default 3000) 6728 local to buffer 6729 Maximum column in which to search for syntax items. In long lines the 6730 text after this column is not highlighted and following lines may not 6731 be highlighted correctly, because the syntax state is cleared. 6732 This helps to avoid very slow redrawing for an XML file that is one 6733 long line. 6734 Set to zero to remove the limit. 6735 6736 *'syntax'* *'syn'* 6737'syntax' 'syn' string (default "") 6738 local to buffer |local-noglobal| 6739 When this option is set, the syntax with this name is loaded, unless 6740 syntax highlighting has been switched off with ":syntax off". 6741 Otherwise this option does not always reflect the current syntax (the 6742 b:current_syntax variable does). 6743 This option is most useful in a modeline, for a file which syntax is 6744 not automatically recognized. Example, in an IDL file: >c 6745 /* vim: set syntax=idl : */ 6746< When a dot appears in the value then this separates two filetype 6747 names. Example: >c 6748 /* vim: set syntax=c.doxygen : */ 6749< This will use the "c" syntax first, then the "doxygen" syntax. 6750 Note that the second one must be prepared to be loaded as an addition, 6751 otherwise it will be skipped. More than one dot may appear. 6752 To switch off syntax highlighting for the current file, use: >vim 6753 set syntax=OFF 6754< To switch syntax highlighting on according to the current value of the 6755 'filetype' option: >vim 6756 set syntax=ON 6757< What actually happens when setting the 'syntax' option is that the 6758 Syntax autocommand event is triggered with the value as argument. 6759 This option is not copied to another buffer, independent of the 's' or 6760 'S' flag in 'cpoptions'. 6761 Only alphanumeric characters, '.', '-' and '_' can be used. 6762 6763 *'tabclose'* *'tcl'* 6764'tabclose' 'tcl' string (default "") 6765 global 6766 This option controls the behavior when closing tabpages (e.g., using 6767 |:tabclose|). When empty Vim goes to the next (right) tabpage. 6768 6769 Possible values (comma-separated list): 6770 left If included, go to the previous tabpage instead of 6771 the next one. 6772 uselast If included, go to the previously used tabpage if 6773 possible. This option takes precedence over the 6774 others. 6775 6776 *'tabline'* *'tal'* 6777'tabline' 'tal' string (default "") 6778 global 6779 When non-empty, this option determines the content of the tabpages 6780 line at the top of the Vim window. When empty Vim will use a default 6781 tabpages line. See |setting-tabline| for more info. 6782 6783 The tabpages line only appears as specified with the 'showtabline' 6784 option and only when there is no GUI tab line. When 'e' is in 6785 'guioptions' and the GUI supports a tab line 'guitablabel' is used 6786 instead. Note that the two tabpages lines are very different. 6787 6788 The value is evaluated like with 'statusline'. You can use 6789 |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out 6790 the text to be displayed. Use "%1T" for the first label, "%2T" for 6791 the second one, etc. Use "%X" items for closing labels. 6792 6793 When changing something that is used in 'tabline' that does not 6794 trigger it to be updated, use |:redrawtabline|. 6795 This option cannot be set in a modeline when 'modelineexpr' is off. 6796 6797 Keep in mind that only one of the tabpages is the current one, others 6798 are invisible and you can't jump to their windows. 6799 6800 *'tabpagemax'* *'tpm'* 6801'tabpagemax' 'tpm' number (default 50) 6802 global 6803 Maximum number of tabpages to be opened by the |-p| command line 6804 argument or the ":tab all" command. |tabpage| 6805 6806 *'tabstop'* *'ts'* 6807'tabstop' 'ts' number (default 8) 6808 local to buffer 6809 Defines the column multiple used to display the Horizontal Tab 6810 character (ASCII 9); a Horizontal Tab always advances to the next tab 6811 stop. 6812 The value must be at least 1 and at most 9999. 6813 If 'vartabstop' is set, this option is ignored. 6814 Leave it at 8 unless you have a strong reason (see usr |30.5|). 6815 6816 *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'* 6817'tagbsearch' 'tbs' boolean (default on) 6818 global 6819 When searching for a tag (e.g., for the |:ta| command), Vim can either 6820 use a binary search or a linear search in a tags file. Binary 6821 searching makes searching for a tag a LOT faster, but a linear search 6822 will find more tags if the tags file wasn't properly sorted. 6823 Vim normally assumes that your tags files are sorted, or indicate that 6824 they are not sorted. Only when this is not the case does the 6825 'tagbsearch' option need to be switched off. 6826 6827 When 'tagbsearch' is on, binary searching is first used in the tags 6828 files. In certain situations, Vim will do a linear search instead for 6829 certain files, or retry all files with a linear search. When 6830 'tagbsearch' is off, only a linear search is done. 6831 6832 Linear searching is done anyway, for one file, when Vim finds a line 6833 at the start of the file indicating that it's not sorted: > 6834 !_TAG_FILE_SORTED 0 /some comment/ 6835< [The whitespace before and after the '0' must be a single <Tab>] 6836 6837 When a binary search was done and no match was found in any of the 6838 files listed in 'tags', and case is ignored or a pattern is used 6839 instead of a normal tag name, a retry is done with a linear search. 6840 Tags in unsorted tags files, and matches with different case will only 6841 be found in the retry. 6842 6843 If a tag file indicates that it is case-fold sorted, the second, 6844 linear search can be avoided when case is ignored. Use a value of '2' 6845 in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold 6846 sorted with the -f switch to "sort" in most unices, as in the command: 6847 "sort -f -o tags tags". For Universal ctags and Exuberant ctags 6848 version 5.x or higher (at least 5.5) the --sort=foldcase switch can be 6849 used for this as well. Note that case must be folded to uppercase for 6850 this to work. 6851 6852 By default, tag searches are case-sensitive. Case is ignored when 6853 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is 6854 "ignore". 6855 Also when 'tagcase' is "followscs" and 'smartcase' is set, or 6856 'tagcase' is "smart", and the pattern contains only lowercase 6857 characters. 6858 6859 When 'tagbsearch' is off, tags searching is slower when a full match 6860 exists, but faster when no full match exists. Tags in unsorted tags 6861 files may only be found with 'tagbsearch' off. 6862 When the tags file is not sorted, or sorted in a wrong way (not on 6863 ASCII byte value), 'tagbsearch' should be off, or the line given above 6864 must be included in the tags file. 6865 This option doesn't affect commands that find all matching tags (e.g., 6866 command-line completion and ":help"). 6867 6868 *'tagcase'* *'tc'* 6869'tagcase' 'tc' string (default "followic") 6870 global or local to buffer |global-local| 6871 This option specifies how case is handled when searching the tags 6872 file: 6873 followic Follow the 'ignorecase' option 6874 followscs Follow the 'smartcase' and 'ignorecase' options 6875 ignore Ignore case 6876 match Match case 6877 smart Ignore case unless an upper case letter is used 6878 6879 *'tagfunc'* *'tfu'* 6880'tagfunc' 'tfu' string (default "") 6881 local to buffer 6882 Disallowed in |modeline|. |no-modeline-option| 6883 This option specifies a function to be used to perform tag searches 6884 (including |taglist()|). 6885 The function gets the tag pattern and should return a List of matching 6886 tags. See |tag-function| for an explanation of how to write the 6887 function and an example. The value can be the name of a function, a 6888 |lambda| or a |Funcref|. See |option-value-function| for more 6889 information. 6890 6891 *'taglength'* *'tl'* 6892'taglength' 'tl' number (default 0) 6893 global 6894 If non-zero, tags are significant up to this number of characters. 6895 6896 *'tagrelative'* *'tr'* *'notagrelative'* *'notr'* 6897'tagrelative' 'tr' boolean (default on) 6898 global 6899 If on and using a tags file in another directory, file names in that 6900 tags file are relative to the directory where the tags file is. 6901 6902 *'tags'* *'tag'* *E433* 6903'tags' 'tag' string (default "./tags;,tags") 6904 global or local to buffer |global-local| 6905 Filenames for the tag command, separated by spaces or commas. To 6906 include a space or comma in a file name, precede it with backslashes 6907 (see |option-backslash| about including spaces/commas and backslashes). 6908 When a file name starts with "./", the '.' is replaced with the path 6909 of the current file. But only when the 'd' flag is not included in 6910 'cpoptions'. Environment variables are expanded |:set_env|. Also see 6911 |tags-option|. 6912 "*", "**" and other wildcards can be used to search for tags files in 6913 a directory tree. See |file-searching|. E.g., "/lib/**/tags" will 6914 find all files named "tags" below "/lib". The filename itself cannot 6915 contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find 6916 files called "tags?". 6917 The |tagfiles()| function can be used to get a list of the file names 6918 actually used. 6919 The use of |:set+=| and |:set-=| is preferred when adding or removing 6920 file names from the list. This avoids problems when a future version 6921 uses another default. 6922 6923 *'tagstack'* *'tgst'* *'notagstack'* *'notgst'* 6924'tagstack' 'tgst' boolean (default on) 6925 global 6926 When on, the |tagstack| is used normally. When off, a ":tag" or 6927 ":tselect" command with an argument will not push the tag onto the 6928 tagstack. A following ":tag" without an argument, a ":pop" command or 6929 any other command that uses the tagstack will use the unmodified 6930 tagstack, but does change the pointer to the active entry. 6931 Resetting this option is useful when using a ":tag" command in a 6932 mapping which should not change the tagstack. 6933 6934 *'termbidi'* *'tbidi'* *'notermbidi'* *'notbidi'* 6935'termbidi' 'tbidi' boolean (default off) 6936 global 6937 The terminal is in charge of Bi-directionality of text (as specified 6938 by Unicode). The terminal is also expected to do the required shaping 6939 that some languages (such as Arabic) require. 6940 Setting this option implies that 'rightleft' will not be set when 6941 'arabic' is set and the value of 'arabicshape' will be ignored. 6942 Note that setting 'termbidi' has the immediate effect that 6943 'arabicshape' is ignored, but 'rightleft' isn't changed automatically. 6944 For further details see |l10n-arabic.txt|. 6945 6946 *'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* 6947'termguicolors' 'tgc' boolean (default off) 6948 global 6949 Enables 24-bit RGB color in the |TUI|. Uses "gui" |:highlight| 6950 attributes instead of "cterm" attributes. |guifg| 6951 Requires an ISO-8613-3 compatible terminal. 6952 6953 Nvim will automatically attempt to determine if the host terminal 6954 supports 24-bit color and will enable this option if it does 6955 (unless explicitly disabled by the user). 6956 6957 *'termpastefilter'* *'tpf'* 6958'termpastefilter' 'tpf' string (default "BS,HT,ESC,DEL") 6959 global 6960 A comma-separated list of options for specifying control characters 6961 to be removed from the text pasted into the terminal window. The 6962 supported values are: 6963 6964 BS Backspace 6965 6966 HT TAB 6967 6968 FF Form feed 6969 6970 ESC Escape 6971 6972 DEL DEL 6973 6974 C0 Other control characters, excluding Line feed and 6975 Carriage return < ' ' 6976 6977 C1 Control characters 0x80...0x9F 6978 6979 *'termsync'* *'notermsync'* 6980'termsync' boolean (default on) 6981 global 6982 If the host terminal supports it, buffer all screen updates 6983 made during a redraw cycle so that each screen is displayed in 6984 the terminal all at once. This can prevent tearing or flickering 6985 when the terminal updates faster than Nvim can redraw. 6986 6987 *'textwidth'* *'tw'* 6988'textwidth' 'tw' number (default 0) 6989 local to buffer 6990 Maximum width of text that is being inserted. A longer line will be 6991 broken after white space to get this width. A zero value disables 6992 this. 6993 When 'textwidth' is zero, 'wrapmargin' may be used. See also 6994 'formatoptions' and |ins-textwidth|. 6995 When 'formatexpr' is set it will be used to break the line. 6996 6997 *'thesaurus'* *'tsr'* 6998'thesaurus' 'tsr' string (default "") 6999 global or local to buffer |global-local| 7000 List of file names, separated by commas, that are used to lookup words 7001 for thesaurus completion commands |i_CTRL-X_CTRL-T|. See 7002 |compl-thesaurus|. 7003 7004 This option is not used if 'thesaurusfunc' is set, either for the 7005 buffer or globally. 7006 7007 To include a comma in a file name precede it with a backslash. Spaces 7008 after a comma are ignored, otherwise spaces are included in the file 7009 name. See |option-backslash| about using backslashes. The use of 7010 |:set+=| and |:set-=| is preferred when adding or removing directories 7011 from the list. This avoids problems when a future version uses 7012 another default. 7013 Environment variables are expanded |:set_env|. 7014 Backticks cannot be used in this option for security reasons. 7015 7016 *'thesaurusfunc'* *'tsrfu'* 7017'thesaurusfunc' 'tsrfu' string (default "") 7018 global or local to buffer |global-local| 7019 Disallowed in |modeline|. |no-modeline-option| 7020 This option specifies a function to be used for thesaurus completion 7021 with CTRL-X CTRL-T. |i_CTRL-X_CTRL-T| See |compl-thesaurusfunc|. 7022 The value can be the name of a function, a |lambda| or a |Funcref|. 7023 See |option-value-function| for more information. 7024 7025 *'tildeop'* *'top'* *'notildeop'* *'notop'* 7026'tildeop' 'top' boolean (default off) 7027 global 7028 When on: The tilde command "~" behaves like an operator. 7029 7030 *'timeout'* *'to'* *'notimeout'* *'noto'* 7031'timeout' 'to' boolean (default on) 7032 global 7033 This option and 'timeoutlen' determine the behavior when part of a 7034 mapped key sequence has been received. For example, if <c-f> is 7035 pressed and 'timeout' is set, Nvim will wait 'timeoutlen' milliseconds 7036 for any key that can follow <c-f> in a mapping. 7037 7038 *'timeoutlen'* *'tm'* 7039'timeoutlen' 'tm' number (default 1000) 7040 global 7041 Time in milliseconds to wait for a mapped sequence to complete. 7042 7043 *'title'* *'notitle'* 7044'title' boolean (default off) 7045 global 7046 If enabled, Nvim will update the (GUI or terminal) window title. The 7047 format is configured by 'titlestring'. By default it looks like: > 7048 filename [+=-] (path) - Nvim 7049< 7050 where: > 7051 filename the name of the file being edited 7052 - indicates the file cannot be modified, 'ma' off 7053 + indicates the file was modified 7054 = indicates the file is read-only 7055 =+ indicates the file is read-only and modified 7056 (path) is the path of the file being edited 7057 - Nvim the server name |v:servername| or "Nvim" 7058< 7059 7060 *'titlelen'* 7061'titlelen' number (default 85) 7062 global 7063 Gives the percentage of 'columns' to use for the length of the window 7064 title. When the title is longer, only the end of the path name is 7065 shown. A '<' character before the path name is used to indicate this. 7066 Using a percentage makes this adapt to the width of the window. But 7067 it won't work perfectly, because the actual number of characters 7068 available also depends on the font used and other things in the title 7069 bar. When 'titlelen' is zero the full path is used. Otherwise, 7070 values from 1 to 30000 percent can be used. 7071 'titlelen' is also used for the 'titlestring' option. 7072 7073 *'titleold'* 7074'titleold' string (default "") 7075 global 7076 Disallowed in |modeline|. |no-modeline-option| 7077 If not empty, this option will be used to set the window title when 7078 exiting. Only if 'title' is enabled. 7079 7080 *'titlestring'* 7081'titlestring' string (default "") 7082 global 7083 Formats the window title, enabled by the 'title' option. 7084 7085 Contains printf-style "%" items, expanded according to the rules of 7086 'statusline'. If a "%" format is invalid, it is used as-is and no 7087 error will be given. 7088 7089 The default (empty) behaviour is equivalent to: >vim 7090 set titlestring=%t%(\ %M%)%(\ \(%{expand('%:p:~:h')}\)%)%a\ -\ Nvim 7091< 7092 Example: >vim 7093 auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p") 7094 set title titlestring=%<%F%=%l/%L-%P titlelen=70 7095< The value of 'titlelen' is used to align items in the middle 7096 or right of the available space. 7097 7098 Example: to have the file name first: >vim 7099 set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%) 7100< Note the use of "%{ }" and an expression to get the path of 7101 the file, without the file name. The "%( %)" constructs add a 7102 separating space only when needed. 7103 7104 NOTE: Use of special characters in 'titlestring' may cause the display 7105 to be garbled (e.g., when it contains a CR or NL character). 7106 7107 This option cannot be set in a modeline when 'modelineexpr' is off. 7108 7109 *'ttimeout'* *'nottimeout'* 7110'ttimeout' boolean (default on) 7111 global 7112 This option and 'ttimeoutlen' determine the behavior when part of a 7113 key code sequence has been received by the |TUI|. 7114 7115 For example if <Esc> (the \x1b byte) is received and 'ttimeout' is 7116 set, Nvim waits 'ttimeoutlen' milliseconds for the terminal to 7117 complete a key code sequence. If no input arrives before the timeout, 7118 a single <Esc> is assumed. Many TUI cursor key codes start with <Esc>. 7119 7120 On very slow systems this may fail, causing cursor keys not to work 7121 sometimes. If you discover this problem you can ":set ttimeoutlen=9999". 7122 Nvim will wait for the next character to arrive after an <Esc>. 7123 7124 *'ttimeoutlen'* *'ttm'* 7125'ttimeoutlen' 'ttm' number (default 50) 7126 global 7127 Time in milliseconds to wait for a key code sequence to complete. Also 7128 used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has 7129 been typed. 7130 7131 *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* *E1568* *$NVIM_NOTTYFAST* 7132'ttyfast' 'tf' boolean (default on) 7133 global 7134 Enables Nvim |TUI| features which assume a fast (usually local) host 7135 terminal. During startup, Nvim queries the terminal (for 'background' 7136 detection, etc.) and must wait for a response (or timeout). 7137 7138 If your terminal environment is slow (e.g. remote SSH), or broken 7139 (doesn't respond to queries), Nvim startup may be slower. Therefore 7140 you can disable this option by setting the `$NVIM_NOTTYFAST` 7141 environment variable before starting Nvim: > 7142 NVIM_NOTTYFAST=1 nvim 7143< 7144 7145 The queries are performed early, before |--cmd| and user |config|, so 7146 `:set nottyfast` in your config happens too late. 7147 7148 *'undodir'* *'udir'* *E5003* 7149'undodir' 'udir' string (default "$XDG_STATE_HOME/nvim/undo//") 7150 global 7151 Disallowed in |modeline|. |no-modeline-option| 7152 List of directory names for undo files, separated with commas. 7153 See 'backupdir' for details of the format. 7154 "." means using the directory of the file. The undo file name for 7155 "file.txt" is ".file.txt.un~". 7156 For other directories the file name is the full path of the edited 7157 file, with path separators replaced with "%". 7158 When writing: The first directory that exists is used. "." always 7159 works, no directories after "." will be used for writing. If none of 7160 the directories exist Nvim will attempt to create the last directory in 7161 the list. 7162 When reading all entries are tried to find an undo file. The first 7163 undo file that exists is used. When it cannot be read an error is 7164 given, no further entry is used. 7165 See |undo-persistence|. 7166 Environment variables are expanded |:set_env|. 7167 7168 Note that unlike 'directory' and 'backupdir', 'undodir' always acts as 7169 though the trailing slashes are present (see 'backupdir' for what this 7170 means). 7171 7172 *'undofile'* *'udf'* *'noundofile'* *'noudf'* 7173'undofile' 'udf' boolean (default off) 7174 local to buffer 7175 When on, Vim automatically saves undo history to an undo file when 7176 writing a buffer to a file, and restores undo history from the same 7177 file on buffer read. 7178 The directory where the undo file is stored is specified by 'undodir'. 7179 For more information about this feature see |undo-persistence|. 7180 The undo file is not read when 'undoreload' causes the buffer from 7181 before a reload to be saved for undo. 7182 When 'undofile' is turned off the undo file is NOT deleted. 7183 7184 *'undolevels'* *'ul'* 7185'undolevels' 'ul' number (default 1000) 7186 global or local to buffer |global-local| 7187 Maximum number of changes that can be undone. Since undo information 7188 is kept in memory, higher numbers will cause more memory to be used. 7189 Nevertheless, a single change can already use a large amount of 7190 memory. Set to 0 for Vi compatibility: One level of undo and "u" 7191 undoes itself: >vim 7192 set ul=0 7193< But you can also get Vi compatibility by including the 'u' flag in 7194 'cpoptions', and still be able to use CTRL-R to repeat undo. 7195 Also see |undo-two-ways|. 7196 Set to -1 for no undo at all. You might want to do this only for the 7197 current buffer: >vim 7198 setlocal ul=-1 7199< This helps when you run out of memory for a single change. 7200 7201 The local value is set to -123456 when the global value is to be used. 7202 7203 Also see |clear-undo|. 7204 7205 *'undoreload'* *'ur'* 7206'undoreload' 'ur' number (default 10000) 7207 global 7208 Save the whole buffer for undo when reloading it. This applies to the 7209 ":e!" command and reloading for when the buffer changed outside of 7210 Vim. |FileChangedShell| 7211 The save only happens when this option is negative or when the number 7212 of lines is smaller than the value of this option. 7213 Set this option to zero to disable undo for a reload. 7214 7215 When saving undo for a reload, any undo file is not read. 7216 7217 Note that this causes the whole buffer to be stored in memory. Set 7218 this option to a lower value if you run out of memory. 7219 7220 *'updatecount'* *'uc'* 7221'updatecount' 'uc' number (default 200) 7222 global 7223 The |swap-file| will be written after typing this many characters. 7224 7225 - Ignored in buffers where 'buftype' is "nofile" or "nowrite". 7226 - Initialized to 10000 when editing in readonly |-R| mode. 7227 - To disable swapfiles per-buffer, unset the 'swapfile' option. 7228 - To disable swapfiles globally, set this option to zero (or start 7229 with |-n|). See |crash-recovery|. Existing swapfiles are not deleted. 7230 - When re-enabled (from zero to non-zero), swapfiles are created for 7231 all buffers that have 'swapfile' set. 7232 7233 *'updatetime'* *'ut'* 7234'updatetime' 'ut' number (default 4000) 7235 global 7236 If this many milliseconds nothing is typed the swap file will be 7237 written to disk (see |crash-recovery|). Also used for the 7238 |CursorHold| autocommand event. 7239 7240 *'varsofttabstop'* *'vsts'* 7241'varsofttabstop' 'vsts' string (default "") 7242 local to buffer 7243 Defines variable-width soft tab stops. The value is a comma-separated 7244 list of widths in columns. Each width defines the number of columns 7245 before the next soft tab stop. The last value repeats indefinitely. 7246 7247 For example, when editing assembly language files where statements 7248 start in the 9th column and comments in the 41st, it may be useful 7249 to use the following: >vim 7250 set varsofttabstop=8,32,8 7251< This sets soft tab stops at column 8, then at column 40 (8 + 32), and 7252 every 8 columns thereafter. 7253 7254 Note: this setting overrides 'softtabstop'. 7255 See section |30.5| of the user manual for detailed explanations on how 7256 Vim works with tabs and spaces. 7257 7258 *'vartabstop'* *'vts'* 7259'vartabstop' 'vts' string (default "") 7260 local to buffer 7261 Defines variable-width tab stops. The value is a comma-separated list 7262 of widths in columns. Each width defines the number of columns before 7263 the next tab stop; the last value repeats indefinitely. 7264 7265 For example: > 7266 :set vartabstop=4,8 7267< This places the first tab stop 4 columns from the start of the line 7268 and each subsequent tab stop 8 columns apart. 7269 7270 Note: this setting overrides 'tabstop'. 7271 On UNIX, it is recommended to keep the default tabstop value of 8. 7272 Consider setting 'varsofttabstop' instead. 7273 See section |30.5| of the user manual for detailed explanations on how 7274 Vim works with tabs and spaces. 7275 7276 *'verbose'* *'vbs'* 7277'verbose' 'vbs' number (default 0) 7278 global 7279 Sets the verbosity level. Also set by |-V| and |:verbose|. 7280 7281 Tracing of assignments to options, mappings, etc. in Lua scripts is 7282 enabled at level 1; Lua scripts are not traced when 'verbose' is 0, 7283 for performance. 7284 7285 If greater than or equal to a given level, Nvim produces the following 7286 messages: 7287 7288 Level Messages ~ 7289 ---------------------------------------------------------------------- 7290 1 Enables Lua tracing (see above). Does not produce messages. 7291 2 When a file is ":source"'ed, or |shada| file is read or written. 7292 3 UI info, terminal capabilities. 7293 4 Shell commands. 7294 5 Every searched tags file and include file. 7295 8 Files for which a group of autocommands is executed. 7296 9 Executed autocommands. 7297 11 Finding items in a path. 7298 12 Vimscript function calls. 7299 13 When an exception is thrown, caught, finished, or discarded. 7300 14 Anything pending in a ":finally" clause. 7301 15 Ex commands from a script (truncated at 200 characters). 7302 16 Ex commands. 7303 7304 If 'verbosefile' is set then the verbose messages are not displayed. 7305 7306 *'verbosefile'* *'vfile'* 7307'verbosefile' 'vfile' string (default "") 7308 global 7309 Disallowed in |modeline|. |no-modeline-option| 7310 When not empty all messages are written in a file with this name. 7311 When the file exists messages are appended. 7312 Writing to the file ends when Vim exits or when 'verbosefile' is made 7313 empty. Writes are buffered, thus may not show up for some time. 7314 Setting 'verbosefile' to a new value is like making it empty first. 7315 The difference with |:redir| is that verbose messages are not 7316 displayed when 'verbosefile' is set. 7317 Environment variables are expanded |:set_env|. 7318 7319 *'viewdir'* *'vdir'* 7320'viewdir' 'vdir' string (default "$XDG_STATE_HOME/nvim/view//") 7321 global 7322 Disallowed in |modeline|. |no-modeline-option| 7323 Name of the directory where to store files for |:mkview|. 7324 Environment variables are expanded |:set_env|. 7325 7326 *'viewoptions'* *'vop'* 7327'viewoptions' 'vop' string (default "folds,cursor,curdir") 7328 global 7329 Changes the effect of the |:mkview| command. It is a comma-separated 7330 list of words. Each word enables saving and restoring something: 7331 word save and restore ~ 7332 cursor cursor position in file and in window 7333 curdir local current directory, if set with |:lcd| 7334 folds manually created folds, opened/closed folds and local 7335 fold options 7336 options options and mappings local to a window or buffer (not 7337 global values for local options), except Lua functions 7338 |option-value-function|. 7339 localoptions same as "options" 7340 slash |deprecated| Always enabled. Uses "/" in filenames. 7341 unix |deprecated| Always enabled. Uses "\n" line endings. 7342 7343 *'virtualedit'* *'ve'* 7344'virtualedit' 've' string (default "") 7345 global or local to window |global-local| 7346 A comma-separated list of these words: 7347 block Allow virtual editing in Visual block mode. 7348 insert Allow virtual editing in Insert mode. 7349 all Allow virtual editing in all modes. 7350 onemore Allow the cursor to move just past the end of the line 7351 none When used as the local value, do not allow virtual 7352 editing even when the global value is set. When used 7353 as the global value, "none" is the same as "". 7354 NONE Alternative spelling of "none". 7355 7356 Virtual editing means that the cursor can be positioned where there is 7357 no actual character. This can be halfway into a tab or beyond the end 7358 of the line. Useful for selecting a rectangle in Visual mode and 7359 editing a table. 7360 "onemore" is not the same, it will only allow moving the cursor just 7361 after the last character of the line. This makes some commands more 7362 consistent. Previously the cursor was always past the end of the line 7363 if the line was empty. But it is far from Vi compatible. It may also 7364 break some plugins or Vim scripts. For example because |l| can move 7365 the cursor after the last character. Use with care! 7366 Using the `$` command will move to the last character in the line, not 7367 past it. This may actually move the cursor to the left! 7368 The `g$` command will move to the end of the screen line. 7369 It doesn't make sense to combine "all" with "onemore", but you will 7370 not get a warning for it. 7371 When combined with other words, "none" is ignored. 7372 7373 *'visualbell'* *'vb'* *'novisualbell'* *'novb'* 7374'visualbell' 'vb' boolean (default off) 7375 global 7376 Use visual bell instead of beeping. Also see 'errorbells'. 7377 7378 *'warn'* *'nowarn'* 7379'warn' boolean (default on) 7380 global 7381 Give a warning message when a shell command is used while the buffer 7382 has been changed. 7383 7384 *'whichwrap'* *'ww'* 7385'whichwrap' 'ww' string (default "b,s") 7386 global 7387 Allow specified keys that move the cursor left/right to move to the 7388 previous/next line when the cursor is on the first/last character in 7389 the line. Concatenate characters to allow this for these keys: 7390 char key mode ~ 7391 b <BS> Normal and Visual 7392 s <Space> Normal and Visual 7393 h "h" Normal and Visual (not recommended) 7394 l "l" Normal and Visual (not recommended) 7395 < <Left> Normal and Visual 7396 > <Right> Normal and Visual 7397 ~ "~" Normal 7398 [ <Left> Insert and Replace 7399 ] <Right> Insert and Replace 7400 For example: >vim 7401 set ww=<,>,[,] 7402< allows wrap only when cursor keys are used. 7403 When the movement keys are used in combination with a delete or change 7404 operator, the <EOL> also counts for a character. This makes "3h" 7405 different from "3dh" when the cursor crosses the end of a line. This 7406 is also true for "x" and "X", because they do the same as "dl" and 7407 "dh". If you use this, you may also want to use the mapping 7408 ":map <BS> X" to make backspace delete the character in front of the 7409 cursor. 7410 When 'l' is included and it is used after an operator at the end of a 7411 line (not an empty line) then it will not move to the next line. This 7412 makes "dl", "cl", "yl" etc. work normally. 7413 7414 *'wildchar'* *'wc'* 7415'wildchar' 'wc' number (default <Tab>) 7416 global 7417 Character you have to type to start wildcard expansion in the 7418 command-line, as specified with 'wildmode'. 7419 More info here: |cmdline-completion|. 7420 The character is not recognized when used inside a macro. See 7421 'wildcharm' for that. 7422 Some keys will not work, such as CTRL-C, <CR> and Enter. 7423 <Esc> can be used, but hitting it twice in a row will still exit 7424 command-line as a failsafe measure. 7425 Although 'wc' is a number option, it can be specified as a number, a 7426 single character, a |key-notation| (e.g. <Up>, <C-F>) or a letter 7427 preceded with a caret (e.g. `^F` is CTRL-F): >vim 7428 :set wc=27 7429 :set wc=X 7430 :set wc=^I 7431 set wc=<Tab> 7432< 'wildchar' also enables completion in search pattern contexts such as 7433 |/|, |?|, |:s|, |:g|, |:v|, and |:vim|. To insert a literal <Tab> 7434 instead of triggering completion, type <C-V><Tab> or "\t". 7435 See also 'wildoptions' and |wildtrigger()|. 7436 7437 *'wildcharm'* *'wcm'* 7438'wildcharm' 'wcm' number (default 0) 7439 global 7440 'wildcharm' works exactly like 'wildchar', except that it is 7441 recognized when used inside a macro. You can find "spare" 7442 command-line keys suitable for this option by looking at 7443 |ex-edit-index|. Normally you'll never actually type 'wildcharm', 7444 just use it in mappings that automatically invoke completion mode, 7445 e.g.: >vim 7446 set wcm=<C-Z> 7447 cnoremap ss so $vim/sessions/*.vim<C-Z> 7448< Then after typing :ss you can use CTRL-P & CTRL-N. 7449 7450 *'wildignore'* *'wig'* 7451'wildignore' 'wig' string (default "") 7452 global 7453 A list of file patterns. A file that matches with one of these 7454 patterns is ignored when expanding |wildcards|, completing file or 7455 directory names, and influences the result of |expand()|, |glob()| and 7456 |globpath()| unless a flag is passed to disable this. 7457 The pattern is used like with |:autocmd|, see |autocmd-pattern|. 7458 Also see 'suffixes'. 7459 Example: >vim 7460 set wildignore=*.o,*.obj 7461< The use of |:set+=| and |:set-=| is preferred when adding or removing 7462 a pattern from the list. This avoids problems when a future version 7463 uses another default. 7464 7465 *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'* 7466'wildignorecase' 'wic' boolean (default off) 7467 global 7468 When set case is ignored when completing file names and directories. 7469 Has no effect when 'fileignorecase' is set. 7470 Does not apply when the shell is used to expand wildcards, which 7471 happens when there are special characters. 7472 7473 *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* 7474'wildmenu' 'wmnu' boolean (default on) 7475 global 7476 When 'wildmenu' is on, command-line completion operates in an enhanced 7477 mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, 7478 the possible matches are shown. 7479 When 'wildoptions' contains "pum", then the completion matches are 7480 shown in a popup menu. Otherwise they are displayed just above the 7481 command line, with the first match highlighted (overwriting the status 7482 line, if there is one). 7483 Keys that show the previous/next match, such as <Tab> or 7484 CTRL-P/CTRL-N, cause the highlight to move to the appropriate match. 7485 'wildmode' must specify "full": "longest" and "list" do not start 7486 'wildmenu' mode. You can check the current mode with |wildmenumode()|. 7487 The menu is cancelled when a key is hit that is not used for selecting 7488 a completion. 7489 7490 While the menu is active these keys have special meanings: 7491 CTRL-P - go to the previous entry 7492 CTRL-N - go to the next entry 7493 <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) 7494 <PageUp> - select a match several entries back 7495 <PageDown> - select a match several entries further 7496 <Up> - in filename/menu name completion: move up into 7497 parent directory or parent menu. 7498 <Down> - in filename/menu name completion: move into a 7499 subdirectory or submenu. 7500 <CR> - in menu completion, when the cursor is just after a 7501 dot: move into a submenu. 7502 CTRL-E - end completion, go back to what was there before 7503 selecting a match. 7504 CTRL-Y - accept the currently selected match and stop 7505 completion. 7506 7507 If you want <Left> and <Right> to move the cursor instead of selecting 7508 a different match, use this: >vim 7509 cnoremap <Left> <Space><BS><Left> 7510 cnoremap <Right> <Space><BS><Right> 7511< 7512 |hl-WildMenu| highlights the current match. 7513 7514 *'wildmode'* *'wim'* 7515'wildmode' 'wim' string (default "full") 7516 global 7517 Completion mode used for the character specified with 'wildchar'. 7518 This option is a comma-separated list of up to four parts, 7519 corresponding to the first, second, third, and fourth presses of 7520 'wildchar'. Each part is a colon-separated list of completion 7521 behaviors, which are applied simultaneously during that phase. 7522 7523 The possible behavior values are: 7524 "" Only complete (insert) the first match. No further 7525 matches are cycled or listed. 7526 "full" Complete the next full match. Cycles through all 7527 matches, returning to the original input after the 7528 last match. If 'wildmenu' is enabled, it will be 7529 shown. 7530 "longest" Complete to the longest common substring. If this 7531 doesn't extend the input, the next 'wildmode' part is 7532 used. 7533 "list" If multiple matches are found, list all of them. 7534 "lastused" When completing buffer names, sort them by most 7535 recently used (excluding the current buffer). Only 7536 applies to buffer name completion. 7537 "noselect" If 'wildmenu' is enabled, show the menu but do not 7538 preselect the first item. 7539 "noinsert" If 'wildmenu' is enabled, show the menu and preselect 7540 the first match, but do not insert it in the command 7541 line. If both "noinsert" and "noselect" are present, 7542 "noselect" takes precedence. 7543 If only one match exists, it is completed fully, unless "noselect" or 7544 "noinsert" is specified. 7545 7546 Some useful combinations of colon-separated values: 7547 "longest:full" Start with the longest common string and show 7548 'wildmenu' (if enabled). Does not cycle 7549 through full matches. 7550 "list:full" List all matches and complete first match. 7551 "list:longest" List all matches and complete till the longest 7552 common prefix. 7553 "list:lastused" List all matches. When completing buffers, 7554 sort them by most recently used (excluding the 7555 current buffer). 7556 "noselect:lastused" Do not preselect the first item in 'wildmenu' 7557 if it is active. When completing buffers, 7558 sort them by most recently used (excluding the 7559 current buffer). 7560 7561 Examples: >vim 7562 set wildmode=full 7563< Complete full match on every press (default behavior) >vim 7564 set wildmode=longest,full 7565< First press: longest common substring 7566 Second press: cycle through full matches >vim 7567 set wildmode=list:full 7568< First press: list all matches and complete the first one >vim 7569 set wildmode=list,full 7570< First press: list matches only 7571 Second press: complete full matches >vim 7572 set wildmode=longest,list 7573< First press: longest common substring 7574 Second press: list all matches >vim 7575 set wildmode=noselect:full 7576< First press: show 'wildmenu' without completing or selecting 7577 Second press: cycle full matches >vim 7578 set wildmode=noselect:lastused,full 7579< Same as above, but buffer matches are sorted by time last used 7580 More info here: |cmdline-completion|. 7581 7582 *'wildoptions'* *'wop'* 7583'wildoptions' 'wop' string (default "pum,tagfile") 7584 global 7585 A list of words that change how |cmdline-completion| is done. 7586 The following values are supported: 7587 exacttext When this flag is present, search pattern completion 7588 (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|) 7589 shows exact buffer text as menu items, without 7590 preserving regex artifacts like position 7591 anchors (e.g., |/\<|). This provides more intuitive 7592 menu items that match the actual buffer text. 7593 However, searches may be less accurate since the 7594 pattern is not preserved exactly. 7595 By default, Vim preserves the typed pattern (with 7596 anchors) and appends the matched word. This preserves 7597 search correctness, especially when using regular 7598 expressions or with 'smartcase' enabled. However, the 7599 case of the appended matched word may not exactly 7600 match the case of the word in the buffer. 7601 fuzzy Use |fuzzy-matching| to find completion matches. When 7602 this value is specified, wildcard expansion will not 7603 be used for completion. The matches will be sorted by 7604 the "best match" rather than alphabetically sorted. 7605 This will find more matches than the wildcard 7606 expansion. Currently fuzzy matching based completion 7607 is not supported for file and directory names and 7608 instead wildcard expansion is used. 7609 pum Display the completion matches using the popup menu in 7610 the same style as the |ins-completion-menu|. When an 7611 info popup is shown next to the menu, it can be 7612 scrolled by moving the mouse pointer on top of it and 7613 using the scroll wheel. 7614 tagfile When using CTRL-D to list matching tags, the kind of 7615 tag and the file of the tag is listed. Only one match 7616 is displayed per line. Often used tag kinds are: 7617 d #define 7618 f function 7619 7620 This option does not apply to |ins-completion|. See 'completeopt' for 7621 that. 7622 7623 *'winaltkeys'* *'wak'* 7624'winaltkeys' 'wak' string (default "menu") 7625 global 7626 only used in Win32 7627 Some GUI versions allow the access to menu entries by using the ALT 7628 key in combination with a character that appears underlined in the 7629 menu. This conflicts with the use of the ALT key for mappings and 7630 entering special characters. This option tells what to do: 7631 no Don't use ALT keys for menus. ALT key combinations can be 7632 mapped, but there is no automatic handling. 7633 yes ALT key handling is done by the windowing system. ALT key 7634 combinations cannot be mapped. 7635 menu Using ALT in combination with a character that is a menu 7636 shortcut key, will be handled by the windowing system. Other 7637 keys can be mapped. 7638 If the menu is disabled by excluding 'm' from 'guioptions', the ALT 7639 key is never used for the menu. 7640 This option is not used for <F10>; on Win32. 7641 7642 *'winbar'* *'wbr'* 7643'winbar' 'wbr' string (default "") 7644 global or local to window |global-local| 7645 When non-empty, this option enables the window bar and determines its 7646 contents. The window bar is a bar that's shown at the top of every 7647 window with it enabled. The value of 'winbar' is evaluated like with 7648 'statusline'. 7649 7650 When changing something that is used in 'winbar' that does not trigger 7651 it to be updated, use |:redrawstatus|. 7652 7653 Floating windows do not use the global value of 'winbar'. The 7654 window-local value of 'winbar' must be set for a floating window to 7655 have a window bar. 7656 7657 This option cannot be set in a modeline when 'modelineexpr' is off. 7658 7659 *'winblend'* *'winbl'* 7660'winblend' 'winbl' number (default 0) 7661 local to window 7662 Enables pseudo-transparency for a floating window. Valid values are in 7663 the range of 0 for fully opaque window (disabled) to 100 for fully 7664 transparent background. Values between 0-30 are typically most useful. 7665 7666 UI-dependent. Works best with RGB colors. 'termguicolors' 7667 7668 *'winborder'* 7669'winborder' string (default "") 7670 global 7671 Defines the default border style of floating windows. The default value 7672 is empty, which is equivalent to "none". Valid values include: 7673 - "bold": Bold line box. 7674 - "double": Double-line box. 7675 - "none": No border. 7676 - "rounded": Like "single", but with rounded corners ("╭" etc.). 7677 - "shadow": Drop shadow effect, by blending with the background. 7678 - "single": Single-line box. 7679 - "solid": Adds padding by a single whitespace cell. 7680 - custom: comma-separated list of exactly 8 entries in clockwise 7681 order starting from topleft. Each entry may be a single char, a 7682 single space (filled with the background), or empty (no border on 7683 that side). Example: >lua 7684 vim.o.winborder = '+,-,+,|,+,-,+,|' 7685 vim.o.winborder = ',,, ,,,, ' -- left/right padding only 7686< 7687 7688 *'window'* *'wi'* 7689'window' 'wi' number (default screen height - 1) 7690 global 7691 Window height used for |CTRL-F| and |CTRL-B| when there is only one 7692 window and the value is smaller than 'lines' minus one. The screen 7693 will scroll 'window' minus two lines, with a minimum of one. 7694 When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll 7695 in a much smarter way, taking care of wrapping lines. 7696 When resizing the Vim window, and the value is smaller than 1 or more 7697 than or equal to 'lines' it will be set to 'lines' minus 1. 7698 Note: Do not confuse this with the height of the Vim window, use 7699 'lines' for that. 7700 7701 *'winfixbuf'* *'wfb'* *'nowinfixbuf'* *'nowfb'* 7702'winfixbuf' 'wfb' boolean (default off) 7703 local to window 7704 If enabled, the window and the buffer it is displaying are paired. 7705 For example, attempting to change the buffer with |:edit| will fail. 7706 Other commands which change a window's buffer such as |:cnext| will 7707 also skip any window with 'winfixbuf' enabled. However if an Ex 7708 command has a "!" modifier, it can force switching buffers. 7709 7710 *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 7711'winfixheight' 'wfh' boolean (default off) 7712 local to window |local-noglobal| 7713 Keep the window height when windows are opened or closed and 7714 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the 7715 |preview-window| and |quickfix-window|. 7716 The height may be changed anyway when running out of room. 7717 7718 *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'* 7719'winfixwidth' 'wfw' boolean (default off) 7720 local to window |local-noglobal| 7721 Keep the window width when windows are opened or closed and 7722 'equalalways' is set. Also for |CTRL-W_=|. 7723 The width may be changed anyway when running out of room. 7724 7725 *'winheight'* *'wh'* *E591* 7726'winheight' 'wh' number (default 1) 7727 global 7728 Minimal number of lines for the current window. This is not a hard 7729 minimum, Vim will use fewer lines if there is not enough room. If the 7730 focus goes to a window that is smaller, its size is increased, at the 7731 cost of the height of other windows. 7732 Set 'winheight' to a small number for normal editing. 7733 Set it to 999 to make the current window fill most of the screen. 7734 Other windows will be only 'winminheight' high. This has the drawback 7735 that ":all" will create only two windows. To avoid "vim -o 1 2 3 4" 7736 to create only two windows, set the option after startup is done, 7737 using the |VimEnter| event: >vim 7738 au VimEnter * set winheight=999 7739< Minimum value is 1. 7740 The height is not adjusted after one of the commands that change the 7741 height of the current window. 7742 'winheight' applies to the current window. Use 'winminheight' to set 7743 the minimal height for other windows. 7744 7745 *'winhighlight'* *'winhl'* 7746'winhighlight' 'winhl' string (default "") 7747 local to window 7748 Window-local highlights. Comma-delimited list of highlight 7749 |group-name| pairs "{hl-from}:{hl-to},..." where each {hl-from} is 7750 a |highlight-groups| item to be overridden by {hl-to} group in 7751 the window. 7752 7753 Note: highlight namespaces take precedence over 'winhighlight'. 7754 See |nvim_win_set_hl_ns()| and |nvim_set_hl()|. 7755 7756 Highlights of vertical separators are determined by the window to the 7757 left of the separator. The 'tabline' highlight of a tabpage is 7758 decided by the last-focused window of the tabpage. Highlights of 7759 the popupmenu are determined by the current window. Highlights in the 7760 message area cannot be overridden. 7761 7762 Example: show a different color for non-current windows: >vim 7763 set winhighlight=Normal:MyNormal,NormalNC:MyNormalNC 7764< 7765 7766 *'winminheight'* *'wmh'* 7767'winminheight' 'wmh' number (default 1) 7768 global 7769 The minimal height of a window, when it's not the current window. 7770 This is a hard minimum, windows will never become smaller. 7771 When set to zero, windows may be "squashed" to zero lines (i.e. just a 7772 status bar) if necessary. They will return to at least one line when 7773 they become active (since the cursor has to have somewhere to go.) 7774 Use 'winheight' to set the minimal height of the current window. 7775 This option is only checked when making a window smaller. Don't use a 7776 large number, it will cause errors when opening more than a few 7777 windows. A value of 0 to 3 is reasonable. 7778 7779 *'winminwidth'* *'wmw'* 7780'winminwidth' 'wmw' number (default 1) 7781 global 7782 The minimal width of a window, when it's not the current window. 7783 This is a hard minimum, windows will never become smaller. 7784 When set to zero, windows may be "squashed" to zero columns (i.e. just 7785 a vertical separator) if necessary. They will return to at least one 7786 line when they become active (since the cursor has to have somewhere 7787 to go.) 7788 Use 'winwidth' to set the minimal width of the current window. 7789 This option is only checked when making a window smaller. Don't use a 7790 large number, it will cause errors when opening more than a few 7791 windows. A value of 0 to 12 is reasonable. 7792 7793 *'winpinned'* *'wp'* *'nowinpinned'* *'nowp'* 7794'winpinned' 'wp' boolean (default off) 7795 local to window |local-noglobal| 7796 If enabled, the window is pinned and will not be closed by |:only| 7797 and |:fclose|. Only commands specifically targeting the window can 7798 close it. 7799 7800 *'winwidth'* *'wiw'* *E592* 7801'winwidth' 'wiw' number (default 20) 7802 global 7803 Minimal number of columns for the current window. This is not a hard 7804 minimum, Vim will use fewer columns if there is not enough room. If 7805 the current window is smaller, its size is increased, at the cost of 7806 the width of other windows. Set it to 999 to make the current window 7807 always fill the screen. Set it to a small number for normal editing. 7808 The width is not adjusted after one of the commands to change the 7809 width of the current window. 7810 'winwidth' applies to the current window. Use 'winminwidth' to set 7811 the minimal width for other windows. 7812 7813 *'wrap'* *'nowrap'* 7814'wrap' boolean (default on) 7815 local to window 7816 This option changes how text is displayed. It doesn't change the text 7817 in the buffer, see 'textwidth' for that. 7818 When on, lines longer than the width of the window will wrap and 7819 displaying continues on the next line. When off lines will not wrap 7820 and only part of long lines will be displayed. When the cursor is 7821 moved to a part that is not shown, the screen will scroll 7822 horizontally. 7823 The line will be broken in the middle of a word if necessary. See 7824 'linebreak' to get the break at a word boundary. 7825 To make scrolling horizontally a bit more useful, try this: >vim 7826 set sidescroll=5 7827 set listchars+=precedes:<,extends:> 7828< See 'sidescroll', 'listchars' and |wrap-off|. 7829 This option can't be set from a |modeline| when the 'diff' option is 7830 on. 7831 If 'nowrap' was set from a |modeline| or in the |sandbox|, '>' is used 7832 as the |lcs-extends| character regardless of the value of the 'list' 7833 and 'listchars' options. This is to prevent malicious code outside 7834 the viewport from going unnoticed. Use `:setlocal nowrap` manually 7835 afterwards to disable this behavior. 7836 7837 *'wrapmargin'* *'wm'* 7838'wrapmargin' 'wm' number (default 0) 7839 local to buffer 7840 Number of characters from the right window border where wrapping 7841 starts. When typing text beyond this limit, an <EOL> will be inserted 7842 and inserting continues on the next line. 7843 Options that add a margin, such as 'number' and 'foldcolumn', cause 7844 the text width to be further reduced. 7845 When 'textwidth' is non-zero, this option is not used. 7846 See also 'formatoptions' and |ins-textwidth|. 7847 7848 *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'* *E384* *E385* 7849'wrapscan' 'ws' boolean (default on) 7850 global 7851 Searches wrap around the end of the file. Also applies to |]s| and 7852 |[s|, searching for spelling mistakes. 7853 7854 *'write'* *'nowrite'* 7855'write' boolean (default on) 7856 global 7857 Allows writing files. When not set, writing a file is not allowed. 7858 Can be used for a view-only mode, where modifications to the text are 7859 still allowed. Can be reset with the |-m| or |-M| command line 7860 argument. Filtering text is still possible, even though this requires 7861 writing a temporary file. 7862 7863 *'writeany'* *'wa'* *'nowriteany'* *'nowa'* 7864'writeany' 'wa' boolean (default off) 7865 global 7866 Allows writing to any file with no need for "!" override. 7867 7868 *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'* 7869'writebackup' 'wb' boolean (default on) 7870 global 7871 Make a backup before overwriting a file. The backup is removed after 7872 the file was successfully written, unless the 'backup' option is 7873 also on. 7874 WARNING: Switching this option off means that when Vim fails to write 7875 your buffer correctly and then, for whatever reason, Vim exits, you 7876 lose both the original file and what you were writing. Only reset 7877 this option if your file system is almost full and it makes the write 7878 fail (and make sure not to exit Vim until the write was successful). 7879 See |backup-table| for another explanation. 7880 When the 'backupskip' pattern matches, a backup is not made anyway. 7881 Depending on 'backupcopy' the backup is a new file or the original 7882 file renamed (and a new file is written). 7883 7884 *'writedelay'* *'wd'* 7885'writedelay' 'wd' number (default 0) 7886 global 7887 Only takes effect together with 'redrawdebug'. 7888 The number of milliseconds to wait after each line or each flush 7889 7890 vim:tw=78:ts=8:noet:ft=help:norl: