options.txt (469642B)
1 *options.txt* For Vim version 9.2. Last change: 2026 Sep 30 2 3 4 VIM REFERENCE MANUAL by Bram Moolenaar 5 6 7 Options *options* 8 9 1. Setting options |set-option| 10 2. Automatically setting options |auto-setting| 11 3. Options summary |option-summary| 12 13 For an overview of options see quickref.txt |option-list|. 14 15 Vim has a number of internal variables and switches which can be set to 16 achieve special effects. These options come in three forms: 17 boolean can only be on or off *boolean* *toggle* 18 number has a numeric value 19 string has a string value 20 21 ============================================================================== 22 1. Setting options *set-option* *E764* 23 24 *:se* *:set* 25 :se[t][!] Show all options that differ from their default value. 26 When [!] is present every option is on a separate 27 line. 28 29 :se[t][!] all Show all but terminal options. 30 When [!] is present every option is on a separate 31 line. 32 33 :se[t] termcap Show all terminal options. Note that in the GUI the 34 key codes are not shown, because they are generated 35 internally and can't be changed. Changing the 36 terminal codes in the GUI is not useful either... 37 The options have the form t_AB, see 38 |terminal-options|. 39 40 :se[t]! termcap Idem, but don't use multiple columns. 41 42 *E518* *E519* 43 :se[t] {option}? Show value of {option}. 44 45 :se[t] {option} Toggle option: set, switch it on. 46 Number option: show value. 47 String option: show value. 48 49 :se[t] no{option} Toggle option: Reset, switch it off. 50 51 *:set-!* *:set-inv* 52 :se[t] {option}! or 53 :se[t] inv{option} Toggle option: Invert value. 54 55 *:set-default* *:set-&* *:set-&vi* *:set-&vim* 56 :se[t] {option}& Reset option to its default value. May depend on the 57 current value of 'compatible'. 58 :se[t] {option}&vi Reset option to its Vi default value. 59 :se[t] {option}&vim Reset option to its Vim default value. 60 61 :se[t] all& Set all options to their default value. The values of 62 these options are not changed: 63 all terminal options, starting with t_ 64 'columns' 65 'cryptmethod' 66 'encoding' 67 'key' 68 'lines' 69 'term' 70 'ttymouse' 71 'ttytype' 72 Warning: This may have a lot of side effects. 73 74 *:set-args* *:set=* *E487* *E521* 75 :se[t] {option}={value} or 76 :se[t] {option}:{value} 77 Set string or number option to {value}. 78 For numeric options the value can be given in decimal, 79 hex (preceded with 0x) or octal (preceded with '0' or 80 '0o'). 81 The old value can be inserted by typing 'wildchar' (by 82 default this is a <Tab> or CTRL-E if 'compatible' is 83 set). Many string options with fixed syntax and names 84 also support completing known values. See 85 |cmdline-completion| and |complete-set-option|. 86 White space between {option} and '=' is allowed and 87 will be ignored. White space between '=' and {value} 88 is not allowed. 89 See |option-backslash| for using white space and 90 backslashes in {value}. 91 92 :se[t] {option}+={value} *:set+=* 93 Add the {value} to a number option, or append the 94 {value} to a string option. When the option is a 95 comma-separated list, a comma is added, unless the 96 value was empty. 97 If the option is a list of flags, superfluous flags 98 are removed. When adding a flag that was already 99 present the option value doesn't change. 100 When the option supports "key:value" items and {value} 101 contains a "key:value" item or multiple 102 comma-separated items, each item is processed 103 individually: 104 - A "key:value" item where the key already exists with 105 a different value: the old item is removed and the 106 new item is appended to the end. 107 - A "key:value" item that is an exact duplicate is 108 left unchanged. 109 - Other items that already exist are left unchanged. 110 - New items are appended to the end. 111 Also see |:set-args| above. 112 113 :se[t] {option}^={value} *:set^=* 114 Multiply the {value} to a number option, or prepend 115 the {value} to a string option. When the option is a 116 comma-separated list, a comma is added, unless the 117 value was empty. 118 When the option supports "key:value" items and {value} 119 contains a "key:value" item or multiple 120 comma-separated items, each item is processed 121 individually. Works like |:set+=| but new items are 122 prepended to the beginning instead of appended. 123 Also see |:set-args| above. 124 125 :se[t] {option}-={value} *:set-=* 126 Subtract the {value} from a number option, or remove 127 the {value} from a string option, if it is there. 128 If the {value} is not found in a string option, there 129 is no error or warning. When the option is a comma 130 separated list, a comma is deleted, unless the option 131 becomes empty. 132 When the option is a list of flags, {value} must be 133 exactly as they appear in the option. Remove flags 134 one by one to avoid problems. 135 When the option supports "key:value" items and {value} 136 contains a "key:value" item or multiple 137 comma-separated items, each item is processed 138 individually. A "key:value" item removes the existing 139 item with that key regardless of its value. A "key:" 140 item also removes by key match. 141 The individual values from a comma separated list or 142 list of flags can be inserted by typing 'wildchar'. 143 See |complete-set-option|. 144 Also see |:set-args| above. 145 146 The {option} arguments to ":set" may be repeated. For example: > 147 :set ai nosi sw=3 ts=3 148 If you make an error in one of the arguments, an error message will be given 149 and the following arguments will be ignored. 150 151 *:set-verbose* 152 When 'verbose' is non-zero, displaying an option value will also tell where it 153 was last set. Example: > 154 :verbose set shiftwidth cindent? 155 < shiftwidth=4 ~ 156 Last set from modeline line 1 ~ 157 cindent ~ 158 Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~ 159 This is only done when specific option values are requested, not for ":verbose 160 set all" or ":verbose set" without an argument. 161 When the option was set by hand there is no "Last set" message. 162 When the option was set while executing a function, user command or 163 autocommand, the script in which it was defined is reported. 164 Note that an option may also have been set as a side effect of setting 165 'compatible'. 166 A few special texts: 167 Last set from modeline line 1 ~ 168 Option was set in a |modeline|. 169 Last set from --cmd argument ~ 170 Option was set with command line argument |--cmd| or +. 171 Last set from -c argument ~ 172 Option was set with command line argument |-c|, +, |-S| or 173 |-q|. 174 Last set from environment variable ~ 175 Option was set from an environment variable, $VIMINIT, 176 $GVIMINIT or $EXINIT. 177 Last set from error handler ~ 178 Option was cleared when evaluating it resulted in an error. 179 180 {not available when compiled without the |+eval| feature} 181 182 *:set-termcap* *E522* 183 For {option} the form "t_xx" may be used to set a terminal option. This will 184 override the value from the termcap. You can then use it in a mapping. If 185 the "xx" part contains special characters, use the <t_xx> form: > 186 :set <t_#4>=^[Ot 187 This can also be used to translate a special code for a normal key. For 188 example, if Alt-b produces <Esc>b, use this: > 189 :set <M-b>=^[b 190 (the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it) 191 The advantage over a mapping is that it works in all situations. 192 193 You can define any key codes, e.g.: > 194 :set t_xy=^[foo; 195 There is no warning for using a name that isn't recognized. You can map these 196 codes as you like: > 197 :map <t_xy> something 198 < *E846* 199 When a key code is not set, it's like it does not exist. Trying to get its 200 value will result in an error: > 201 :set t_kb= 202 :set t_kb 203 < E846: Key code not set: t_kb ~ 204 205 The t_xx options cannot be set from a |modeline| or in the |sandbox|, for 206 security reasons. 207 208 The listing from ":set" looks different from Vi. Long string options are put 209 at the end of the list. The number of options is quite large. The output of 210 "set all" probably does not fit on the screen, causing Vim to give the 211 |more-prompt|. 212 213 *option-backslash* 214 To include white space in a string option value it has to be preceded with a 215 backslash. To include a backslash you have to use two. Effectively this 216 means that the number of backslashes in an option value is halved (rounded 217 down). 218 In options 'path', 'cdpath', and 'tags', spaces have to be preceded with three 219 backslashes instead for compatibility with version 3.0 where the options can 220 be separated by either commas or spaces. 221 Comma-separated options like 'backupdir' and 'tags' will also require commas 222 to be escaped with two backslashes, whereas this is not needed for 223 non-comma-separated ones like 'makeprg'. 224 When setting options using |:let| and |literal-string|, you need to use one 225 fewer layer of backslash. 226 A few examples: > 227 :set makeprg=make\ file results in "make file" 228 :let &makeprg='make file' (same as above) 229 :set makeprg=make\\\ file results in "make\ file" 230 :set tags=tags\ /usr/tags results in "tags" and "/usr/tags" 231 :set tags=tags\\\ file results in "tags file" 232 :let &tags='tags\ file' (same as above) 233 234 :set makeprg=make,file results in "make,file" 235 :set makeprg=make\\,file results in "make\,file" 236 :set tags=tags,file results in "tags" and "file" 237 :set tags=tags\\,file results in "tags\,file" 238 :let &tags='tags\,file' (same as above) 239 240 The "|" character separates a ":set" command from a following command. To 241 include the "|" in the option value, use "\|" instead. This example sets the 242 'titlestring' option to "hi|there": > 243 :set titlestring=hi\|there 244 This sets the 'titlestring' option to "hi" and 'iconstring' to "there": > 245 :set titlestring=hi|set iconstring=there 246 247 Similarly, in legacy script the double quote character starts a comment. To 248 include the '"' in the option value, use '\"' instead. This example sets the 249 'titlestring' option to 'hi "there"': > 250 :set titlestring=hi\ \"there\" 251 252 In |Vim9| script it's simpler, comments start with a '#' character, and only 253 when preceded by white space. A backslash is needed less often: > 254 vim9script 255 set titlestring=hi\ "there" 256 set titlestring=hi#there# 257 set titlestring=hi\ \#there# 258 259 For Win32 backslashes in file names are mostly not removed. More precise: For 260 options that expect a file name (those where environment variables are 261 expanded) a backslash before a normal file name character is not removed. But 262 a backslash before a special character (space, backslash, comma, etc.) is used 263 like explained above. 264 There is one special situation, when the value starts with "\\": > 265 :set dir=\\machine\path results in "\\machine\path" 266 :set dir=\\\\machine\\path results in "\\machine\path" 267 :set dir=\\path\\file results in "\\path\file" (wrong!) 268 For the first one the start is kept, but for the second one the backslashes 269 are halved. This makes sure it works both when you expect backslashes to be 270 halved and when you expect the backslashes to be kept. The third gives a 271 result which is probably not what you want. Avoid it. 272 273 *add-option-flags* *remove-option-flags* 274 *E539* *E550* *E551* *E552* 275 Some options are a list of flags. When you want to add a flag to such an 276 option, without changing the existing ones, you can do it like this: > 277 :set guioptions+=a 278 Remove a flag from an option like this: > 279 :set guioptions-=a 280 This removes the 'a' flag from 'guioptions'. 281 Note that you should add or remove one flag at a time. If 'guioptions' has 282 the value "ab", using "set guioptions-=ba" won't work, because the string "ba" 283 doesn't appear. 284 285 *:set_env* *expand-env* *expand-environment-var* 286 Environment variables in specific string options will be expanded. If the 287 environment variable exists the '$' and the following environment variable 288 name is replaced with its value. If it does not exist the '$' and the name 289 are not modified. Any non-id character (not a letter, digit or '_') may 290 follow the environment variable name. That character and what follows is 291 appended to the value of the environment variable. Examples: > 292 :set term=$TERM.new 293 :set path=/usr/$INCLUDE,$HOME/include,. 294 When adding or removing a string from an option with ":set opt-=val" or ":set 295 opt+=val" the expansion is done before the adding or removing. 296 297 298 Handling of local options *local-options* 299 300 Note: The following also applies to |global-local| options. 301 302 Some of the options only apply to a window or buffer. Each window or buffer 303 has its own copy of this option, thus each can have its own value. This 304 allows you to set 'list' in one window but not in another. And set 305 'shiftwidth' to 3 in one buffer and 4 in another. 306 307 The following explains what happens to these local options in specific 308 situations. You don't really need to know all of this, since Vim mostly uses 309 the option values you would expect. Unfortunately, doing what the user 310 expects is a bit complicated... 311 312 When splitting a window, the local options are copied to the new window. Thus 313 right after the split the contents of the two windows look the same. 314 315 When editing a new buffer, its local option values must be initialized. Since 316 the local options of the current buffer might be specifically for that buffer, 317 these are not used. Instead, for each buffer-local option there also is a 318 global value, which is used for new buffers. With ":set" both the local and 319 global value is changed. With "setlocal" only the local value is changed, 320 thus this value is not used when editing a new buffer. 321 322 When editing a buffer that has been edited before, the options from the window 323 that was last closed are used again. If this buffer has been edited in this 324 window, the values from back then are used. Otherwise the values from the 325 last closed window where the buffer was edited last are used. 326 327 ":setlocal" can be used to set a local window option specifically for a type 328 of buffer. When you edit another buffer in the same window, you don't want to 329 keep using these local window options. Meanwhile ":set" also sets a global 330 value of a local window option, which is used when editing another buffer. 331 Each window has its own copy of these global values, making them local to the 332 window, but global to all buffers in the window. With this you can do: > 333 :e one 334 :set list 335 :e two 336 Now the 'list' option will also be set in "two", since with the ":set list" 337 command you have also set the global value. > 338 :set nolist 339 :e one 340 :setlocal list 341 :e two 342 Now the 'list' option is not set, because ":set nolist" resets the global 343 value, ":setlocal list" only changes the local value and ":e two" gets the 344 global value. Note that if you do this next: > 345 :e one 346 You will get back the 'list' value as it was the last time you edited "one". 347 The options local to a window are remembered for each buffer. This also 348 happens when the buffer is not loaded, but they are lost when the buffer is 349 wiped out |:bwipe|. 350 351 Special local window options *local-noglobal* 352 353 The following local window options won't be copied over when new windows are 354 created, thus they behave slightly differently: 355 356 Option Reason ~ 357 'previewwindow' there can only be a single one 358 'scroll' specific to existing window 359 'winfixbuf' specific to existing window 360 'winfixheight' specific to existing window 361 'winfixwidth' specific to existing window 362 363 Special local buffer options 364 365 The following local buffer options won't be copied over when new buffers are 366 created, thus they behave slightly differently: 367 368 Option Reason ~ 369 'filetype' explicitly set by autocommands 370 'syntax' explicitly set by autocommands 371 'bufhidden' denote |special-buffers| 372 'buftype' denote |special-buffers| 373 'readonly' will be detected automatically 374 'modified' will be detected automatically 375 376 *:setl* *:setlocal* 377 :setl[ocal][!] ... Like ":set" but set only the value local to the 378 current buffer or window. Not all options have a 379 local value. If the option does not have a local 380 value the global value is set. 381 With the "all" argument: display local values for all 382 local options. 383 Without argument: Display local values for all local 384 options which are different from the default. 385 When displaying a specific local option, show the 386 local value. For a global/local boolean option, when 387 the global value is being used, "--" is displayed 388 before the option name. 389 For a global option the global value is 390 shown (but that might change in the future). 391 392 :se[t] {option}< Set the effective value of {option} to its global 393 value. 394 For string |global-local| options, the local value is 395 removed, so that the global value will be used. 396 For all other options, the global value is copied to 397 the local value. 398 399 :setl[ocal] {option}< Set the effective value of {option} to its global 400 value. 401 For number and boolean |global-local| options, the 402 local value is removed, so that the global value will 403 be used. 404 For all other options, including string |global-local| 405 options, the global value is copied to the local 406 value. 407 408 Note that the behaviour for |global-local| options is slightly different 409 between string and number-based options. 410 411 *:setg* *:setglobal* 412 :setg[lobal][!] ... Like ":set" but set only the global value for a local 413 option without changing the local value. 414 When displaying an option, the global value is shown. 415 With the "all" argument: display global values for all 416 local options. 417 Without argument: display global values for all local 418 options which are different from the default. 419 420 For buffer-local and window-local options: 421 Command global value local value condition ~ 422 :set option=value set set 423 :setlocal option=value - set 424 :setglobal option=value set - 425 :set option? - display local value is set 426 :set option? display - local value is not set 427 :setlocal option? - display 428 :setglobal option? display - 429 430 431 Global options with a local value *global-local* 432 433 Options are global when you mostly use one value for all buffers and windows. 434 For some global options it's useful to sometimes have a different local value. 435 You can set the local value with ":setlocal". That buffer or window will then 436 use the local value, while other buffers and windows continue using the global 437 value. 438 439 For example, you have two windows, both on C source code. They use the global 440 'makeprg' option. If you do this in one of the two windows: > 441 :set makeprg=gmake 442 then the other window will switch to the same value. There is no need to set 443 the 'makeprg' option in the other C source window too. 444 However, if you start editing a Perl file in a new window, you want to use 445 another 'makeprg' for it, without changing the value used for the C source 446 files. You use this command: > 447 :setlocal makeprg=perlmake 448 You can switch back to using the global value by making the local value empty: > 449 :setlocal makeprg= 450 This only works for a string option. For a number or boolean option you need 451 to use the "<" flag, like this: > 452 :setlocal autoread< 453 Note that for non-boolean and non-number options using "<" copies the global 454 value to the local value, it doesn't switch back to using the global value 455 (that matters when the global value changes later). You can also use: > 456 :set path< 457 This will make the local value of 'path' empty, so that the global value is 458 used. Thus it does the same as: > 459 :setlocal path= 460 Note: In the future more global options can be made |global-local|. Using 461 ":setlocal" on a global option might work differently then. 462 463 *option-value-function* 464 Some options ('completefunc', 'findfunc', 'imactivatefunc', 'imstatusfunc', 465 'omnifunc', 'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') 466 are set to a function name or a function reference or a lambda function. When 467 using a lambda it will be converted to the name, e.g. "<lambda>123". 468 Examples: 469 > 470 set opfunc=MyOpFunc 471 set opfunc=function('MyOpFunc') 472 set opfunc=funcref('MyOpFunc') 473 set opfunc={a\ ->\ MyOpFunc(a)} 474 475 Set to a script-local function: > 476 set opfunc=s:MyLocalFunc 477 set opfunc=<SID>MyLocalFunc 478 In |Vim9| script the "s:" and "<SID>" can be omitted if the function exists in 479 the script: > 480 set opfunc=MyLocalFunc 481 482 Set using a funcref variable: > 483 let Fn = function('MyTagFunc') 484 let &tagfunc = Fn 485 486 Set using a lambda expression: > 487 let &tagfunc = {t -> MyTagFunc(t)} 488 489 Set using a variable with lambda expression: > 490 let L = {a, b, c -> MyTagFunc(a, b , c)} 491 let &tagfunc = L 492 493 In Vim9 script, in a compiled function, you can use a lambda, but a 494 closure does not work, because the function will be called without the 495 context of where it was defined. 496 497 498 Setting the filetype 499 500 :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* 501 Set the 'filetype' option to {filetype}, but only if 502 not done yet in a sequence of (nested) autocommands. 503 This is short for: > 504 :if !did_filetype() 505 : setlocal filetype={filetype} 506 :endif 507 < This command is used in a filetype.vim file to avoid 508 setting the 'filetype' option twice, causing different 509 settings and syntax files to be loaded. 510 511 When the optional FALLBACK argument is present, a 512 later :setfiletype command will override the 513 'filetype'. This is to be used for filetype 514 detections that are just a guess. |did_filetype()| 515 will return false after this command. 516 517 *option-window* *optwin* 518 :bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options* 519 :opt[ions] Open a window for viewing and setting all options. 520 Options are grouped by function. 521 Offers short help for each option. Hit <CR> on the 522 short help to open a help window with more help for 523 the option. 524 Modify the value of the option and hit <CR> on the 525 "set" line to set the new value. For window and 526 buffer specific options, the last accessed window is 527 used to set the option value in, unless this is a help 528 window, in which case the window below help window is 529 used (skipping the option-window). 530 {not available when compiled without the |+eval| 531 feature} 532 533 *$HOME* 534 Using "~" is like using "$HOME", but it is only recognized at the start of an 535 option and after a space or comma. 536 537 On Unix systems "~user" can be used too. It is replaced by the home directory 538 of user "user". Example: > 539 :set path=~mool/include,/usr/include,. 540 541 On Unix systems the form "${HOME}" can be used too. The name between {} can 542 contain non-id characters then. Note that if you want to use this for the 543 "gf" command, you need to add the '{' and '}' characters to 'isfname'. 544 545 NOTE: expanding environment variables and "~/" is only done with the ":set" 546 command, not when assigning a value to an option with ":let". 547 548 *$HOME-windows* 549 On MS-Windows, if $HOME is not defined as an environment variable, then 550 at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. 551 If $HOMEDRIVE is not set then $USERPROFILE is used. 552 553 This expanded value is not exported to the environment, this matters when 554 running an external command: > 555 :echo system('set | findstr ^HOME=') 556 and > 557 :echo luaeval('os.getenv("HOME")') 558 should echo nothing (an empty string) despite exists('$HOME') being true. 559 When setting $HOME to a non-empty string it will be exported to the 560 subprocesses. 561 562 563 Note the maximum length of an expanded option is limited. How much depends on 564 the system, mostly it is something like 256 or 1024 characters. 565 566 *:fix* *:fixdel* 567 :fix[del] Set the value of 't_kD': 568 't_kb' is 't_kD' becomes ~ 569 CTRL-? CTRL-H 570 not CTRL-? CTRL-? 571 572 (CTRL-? is 0o177 octal, 0x7f hex) 573 574 If your delete key terminal code is wrong, but the 575 code for backspace is alright, you can put this in 576 your .vimrc: > 577 :fixdel 578 < This works no matter what the actual code for 579 backspace is. 580 581 If the backspace key terminal code is wrong you can 582 use this: > 583 :if &term == "termname" 584 : set t_kb=^V<BS> 585 : fixdel 586 :endif 587 < Where "^V" is CTRL-V and "<BS>" is the backspace key 588 (don't type four characters!). Replace "termname" 589 with your terminal name. 590 591 If your <Delete> key sends a strange key sequence (not 592 CTRL-? or CTRL-H) you cannot use ":fixdel". Then use: > 593 :if &term == "termname" 594 : set t_kD=^V<Delete> 595 :endif 596 < Where "^V" is CTRL-V and "<Delete>" is the delete key 597 (don't type eight characters!). Replace "termname" 598 with your terminal name. 599 600 *Linux-backspace* 601 Note about Linux: By default the backspace key 602 produces CTRL-?, which is wrong. You can fix it by 603 putting this line in your rc.local: > 604 echo "keycode 14 = BackSpace" | loadkeys 605 < 606 *NetBSD-backspace* 607 Note about NetBSD: If your backspace doesn't produce 608 the right code, try this: > 609 xmodmap -e "keycode 22 = BackSpace" 610 < If this works, add this in your .Xmodmap file: > 611 keysym 22 = BackSpace 612 < You need to restart for this to take effect. 613 614 ============================================================================== 615 2. Automatically setting options *auto-setting* 616 617 Besides changing options with the ":set" command, there are three alternatives 618 to set options automatically for one or more files: 619 620 1. When starting Vim initializations are read from various places. See 621 |initialization|. Most of them are performed for all editing sessions, 622 and some of them depend on the directory where Vim is started. 623 You can create an initialization file with |:mkvimrc|, |:mkview| and 624 |:mksession|. 625 2. If you start editing a new file, the automatic commands are executed. 626 This can be used to set options for files matching a particular pattern and 627 many other things. See |autocommand|. 628 3. If you start editing a new file, and the 'modeline' option is on, a 629 number of lines at the beginning and end of the file are checked for 630 modelines. This is explained here. 631 632 *modeline* *vim:* *vi:* *ex:* *E520* 633 There are two forms of modelines. The first form: 634 [text{white}]{vi:|vim:|ex:}[white]{options} 635 636 [text{white}] empty or any text followed by at least one blank 637 character (<Space> or <Tab>); "ex:" always requires at 638 least one blank character 639 {vi:|vim:|ex:} the string "vi:", "vim:" or "ex:" 640 [white] optional white space 641 {options} a list of option settings, separated with white space 642 or ':', where each part between ':' is the argument 643 for a ":set" command (can be empty) 644 645 Examples: 646 vi:noai:sw=3 ts=6 ~ 647 vim: tw=77 ~ 648 649 The second form (this is compatible with some versions of Vi): 650 651 [text{white}]{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text] 652 653 [text{white}] empty or any text followed by at least one blank 654 character (<Space> or <Tab>); "ex:" always requires at 655 least one blank character 656 {vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:" 657 [white] optional white space 658 se[t] the string "set " or "se " (note the space); When 659 "Vim" is used it must be "set". 660 {options} a list of options, separated with white space, which 661 is the argument for a ":set" command 662 : a colon 663 [text] any text or empty 664 665 Examples: 666 /* vim: set ai tw=75: */ ~ 667 /* Vim: set ai tw=75: */ ~ 668 669 The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the 670 chance that a normal word like "lex:" is caught. There is one exception: 671 "vi:" and "vim:" can also be at the start of the line (for compatibility with 672 version 3.0). Using "ex:" at the start of the line will be ignored (this 673 could be short for "example:"). 674 675 If the modeline is disabled within a modeline, subsequent modelines will be 676 ignored. This is to allow turning off modeline on a per-file basis, which is 677 useful when a line looks like a modeline but isn't. For example, it would be 678 good to start a YAML file containing strings like "vim:" with 679 # vim: nomodeline ~ 680 so as to avoid modeline misdetection. Following options on the same line 681 after modeline deactivation, if any, are still evaluated (but you would 682 normally not have any). 683 684 *modeline-strict* 685 The 'modelinestrict' option restricts which options can be set via a 686 modeline to a fixed whitelist. This is enabled by default, for security 687 reasons: it avoids unexpected or harmful side effects when opening files 688 from unknown or untrustworthy locations. 689 690 *modeline-local* 691 The options are set like with ":setlocal": The new value only applies to the 692 buffer and window that contain the file. Although it's possible to set global 693 options from a modeline, this is unusual. If you have two windows open and 694 the files in it set the same global option to a different value, the result 695 depends on which one was opened last. 696 697 When editing a file that was already loaded, only the window-local options 698 from the modeline are used. Thus if you manually changed a buffer-local 699 option after opening the file, it won't be changed if you edit the same buffer 700 in another window. But window-local options will be set. 701 702 *modeline-version* 703 If the modeline is only to be used for some versions of Vim, the version 704 number can be specified where "vim:" or "Vim:" is used: 705 vim{vers}: version {vers} or later 706 vim<{vers}: version before {vers} 707 vim={vers}: version {vers} 708 vim>{vers}: version after {vers} 709 {vers} is 700 for Vim 7.0 (hundred times the major version plus minor). 710 For example, to use a modeline only for Vim 7.0: 711 /* vim700: set foldmethod=marker */ ~ 712 To use a modeline for Vim after version 7.2: 713 /* vim>702: set cole=2: */ ~ 714 There can be no blanks between "vim" and the ":". 715 716 717 The number of lines that are checked can be set with the 'modelines' option. 718 If 'modeline' is off or 'modelines' is 0 no lines are checked. 719 720 Note that for the first form all of the rest of the line is used, thus a line 721 like: 722 /* vi:ts=4: */ ~ 723 will give an error message for the trailing "*/". This line is OK: 724 /* vi:set ts=4: */ ~ 725 726 If an error is detected the rest of the line is skipped. 727 728 If you want to include a ':' in a set command precede it with a '\'. The 729 backslash in front of the ':' will be removed. Example: 730 /* vi:set fillchars=stl\:^,vert\:\|: */ ~ 731 This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash 732 before the ':' is removed. Thus to include "\:" you have to specify "\\:". 733 *E992* 734 No other commands than "set" are supported, for security reasons (somebody 735 might create a Trojan horse text file with modelines). And not all options 736 can be set. For some options a flag is set, so that when the value is used 737 the |sandbox| is effective. Some options can only be set from the modeline 738 when 'modelineexpr' is set (the default is off). 739 740 Still, there is always a small risk that a modeline causes trouble. E.g., 741 when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly. 742 So disable modelines before editing untrusted text. The mail ftplugin does 743 this, for example. 744 745 Hint: If you would like to do something else than setting an option, you could 746 define an autocommand that checks the file for a specific string. For 747 example: > 748 au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif 749 And define a function SetVar() that does something with the line containing 750 "VAR". 751 752 ============================================================================== 753 3. Options summary *option-summary* 754 755 In the list below all the options are mentioned with their full name and with 756 an abbreviation if there is one. Both forms may be used. 757 758 In this document when a boolean option is "set" that means that ":set option" 759 is entered. When an option is "reset", ":set nooption" is used. 760 761 For some options there are two default values: The "Vim default", which is 762 used when 'compatible' is not set, and the "Vi default", which is used when 763 'compatible' is set. 764 765 Most options are the same in all windows and buffers. There are a few that 766 are specific to how the text is presented in a window. These can be set to a 767 different value in each window. For example the 'list' option can be set in 768 one window and reset in another for the same text, giving both types of view 769 at the same time. There are a few options that are specific to a certain 770 file. These can have a different value for each file or buffer. For example 771 the 'textwidth' option can be 78 for a normal text file and 0 for a C 772 program. 773 774 global one option for all buffers and windows 775 local to window each window has its own copy of this option 776 local to buffer each buffer has its own copy of this option 777 778 When creating a new window the option values from the currently active window 779 are used as a default value for the window-specific options. For the 780 buffer-specific options this depends on the 's' and 'S' flags in the 781 'cpoptions' option. If 's' is included (which is the default) the values for 782 buffer options are copied from the currently active buffer when a buffer is 783 first entered. If 'S' is present the options are copied each time the buffer 784 is entered, this is almost like having global options. If 's' and 'S' are not 785 present, the options are copied from the currently active buffer when the 786 buffer is created. 787 788 Hidden options *hidden-options* 789 790 Not all options are supported in all versions. This depends on the supported 791 features and sometimes on the system. A remark about this is in curly braces 792 below. When an option is not supported it may still be set without getting an 793 error, this is called a hidden option. You can't get the value of a hidden 794 option though, it is not stored. 795 796 To test if option "foo" can be used with ":set" use something like this: > 797 if exists('&foo') 798 This also returns true for a hidden option. To test if option "foo" is really 799 supported use something like this: > 800 if exists('+foo') 801 < 802 *E355* 803 A jump table for the options with a short description can be found at |Q_op|. 804 805 *'aleph'* *'al'* *aleph* *Aleph* 806 'aleph' 'al' number (default 128 for MS-Windows, 224 otherwise) 807 global 808 {only available when compiled with the |+rightleft| 809 feature} 810 The ASCII code for the first letter of the Hebrew alphabet. The 811 routine that maps the keyboard in Hebrew mode, both in Insert mode 812 (when hkmap is set) and on the command-line (when hitting CTRL-_) 813 outputs the Hebrew characters in the range [aleph..aleph+26]. 814 aleph=128 applies to PC code, and aleph=224 applies to ISO 8859-8. 815 See |rileft.txt|. 816 817 *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'* 818 'allowrevins' 'ari' boolean (default off) 819 global 820 {only available when compiled with the |+rightleft| 821 feature} 822 Allow CTRL-_ in Insert and Command-line mode. This is default off, to 823 avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get 824 into reverse Insert mode, and don't know how to get out. See 825 'revins'. 826 NOTE: This option is reset when 'compatible' is set. 827 828 *'altkeymap'* *'akm'* *'noaltkeymap'* *'noakm'* 829 'altkeymap' 'akm' boolean (default off) 830 global 831 {only available when compiled with the |+farsi| 832 feature} 833 This option was for using Farsi, which has been removed. See 834 |farsi.txt|. 835 836 *'ambiwidth'* *'ambw'* 837 'ambiwidth' 'ambw' string (default: "single") 838 global 839 Only effective when 'encoding' is "utf-8" or another Unicode encoding. 840 Tells Vim what to do with characters with East Asian Width Class 841 Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek 842 letters, Cyrillic letters). 843 844 There are currently two possible values: 845 "single": Use the same width as characters in US-ASCII. This is 846 expected by most users. 847 "double": Use twice the width of ASCII characters. 848 *E834* *E835* 849 The value "double" cannot be used if 'listchars' or 'fillchars' 850 contains a character that would be double width. These errors may 851 also be given when calling setcellwidths(). 852 853 The values are overruled for characters specified with 854 |setcellwidths()|. 855 856 There are a number of CJK fonts for which the width of glyphs for 857 those characters are solely based on how many octets they take in 858 legacy/traditional CJK encodings. In those encodings, Euro, 859 Registered sign, Greek/Cyrillic letters are represented by two octets, 860 therefore those fonts have "wide" glyphs for them. This is also 861 true of some line drawing characters used to make tables in text 862 file. Therefore, when a CJK font is used for GUI Vim or 863 Vim is running inside a terminal (emulators) that uses a CJK font 864 (or Vim is run inside an xterm invoked with "-cjkwidth" option.), 865 this option should be set to "double" to match the width perceived 866 by Vim with the width of glyphs in the font. Perhaps it also has 867 to be set to "double" under CJK MS-Windows when the system locale is 868 set to one of CJK locales. See Unicode Standard Annex #11 869 (http://www.unicode.org/reports/tr11). 870 871 Vim may set this option automatically at startup time when Vim is 872 compiled with the |+termresponse| feature and if |t_u7| is set to the 873 escape sequence to request cursor position report. The response can 874 be found in |v:termu7resp|. 875 876 *'antialias'* *'anti'* *'noantialias'* *'noanti'* 877 'antialias' 'anti' boolean (default: off) 878 global 879 {only available when compiled with GUI enabled 880 on macOS} 881 This option only has an effect in the GUI version of Vim on macOS 882 v10.2 or later. When on, Vim will use smooth ("antialiased") fonts, 883 which can be easier to read at certain sizes on certain displays. 884 Setting this option can sometimes cause problems if 'guifont' is set 885 to its default (empty string). 886 NOTE: This option is reset when 'compatible' is set. 887 888 *'arabic'* *'arab'* *'noarabic'* *'noarab'* 889 'arabic' 'arab' boolean (default off) 890 local to window 891 {only available when compiled with the |+arabic| 892 feature} 893 This option can be set to start editing Arabic text. 894 Setting this option will: 895 - Set the 'rightleft' option, unless 'termbidi' is set. 896 - Set the 'arabicshape' option, unless 'termbidi' is set. 897 - Set the 'keymap' option to "arabic"; in Insert mode CTRL-^ toggles 898 between typing English and Arabic key mapping. 899 - Set the 'delcombine' option 900 Note that 'encoding' must be "utf-8" for working with Arabic text. 901 902 Resetting this option will: 903 - Reset the 'rightleft' option. 904 - Disable the use of 'keymap' (without changing its value). 905 Note that 'arabicshape' and 'delcombine' are not reset (it is a global 906 option). 907 NOTE: This option is reset when 'compatible' is set. 908 Also see |arabic.txt|. 909 910 *'arabicshape'* *'arshape'* 911 *'noarabicshape'* *'noarshape'* 912 'arabicshape' 'arshape' boolean (default on) 913 global 914 {only available when compiled with the |+arabic| 915 feature} 916 When on and 'termbidi' is off, the required visual character 917 corrections that need to take place for displaying the Arabic language 918 take effect. Shaping, in essence, gets enabled; the term is a broad 919 one which encompasses: 920 a) the changing/morphing of characters based on their location 921 within a word (initial, medial, final and stand-alone). 922 b) the enabling of the ability to compose characters 923 c) the enabling of the required combining of some characters 924 When disabled the display shows each character's true stand-alone 925 form. 926 Arabic is a complex language which requires other settings, for 927 further details see |arabic.txt|. 928 NOTE: This option is set when 'compatible' is set. 929 930 *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* 931 'autochdir' 'acd' boolean (default off) 932 global 933 {only available when compiled with it, use 934 exists("+autochdir") to check} 935 When on, Vim will change the current working directory whenever you 936 open a file, switch buffers, delete a buffer or open/close a window. 937 It will change to the directory containing the file which was opened 938 or selected. When a buffer has no name it also has no directory, thus 939 the current directory won't change when navigating to it. 940 Note: When this option is on some plugins may not work. 941 942 *'autocomplete'* *'ac'* *'noautocomplete'* *'noac'* 943 'autocomplete' 'ac' boolean (default off) 944 global or local to buffer |global-local| 945 {only available on platforms with timing support} 946 When on, Vim shows a completion menu as you type, similar to using 947 |i_CTRL-N|, but triggered automatically. See |ins-autocompletion|. 948 949 *'autocompletedelay'* *'acl'* 950 'autocompletedelay' 'acl' number (default 0) 951 global 952 Delay in milliseconds before the autocomplete menu appears after 953 typing. If you prefer it not to open too quickly, set this value 954 slightly above your typing speed. See |ins-autocompletion|. 955 956 *'autocompletetimeout'* *'act'* 957 'autocompletetimeout' 'act' number (default 80) 958 global 959 Initial timeout (in milliseconds) for the decaying time-sliced 960 completion algorithm. Starts at this value, halves for each slower 961 source until a minimum is reached. All sources run, but slower ones 962 are quickly de-prioritized. The default is tuned so the popup menu 963 opens within ~200ms even with multiple slow sources on a slow system. 964 Changing this value is rarely needed. Only 80 or higher is valid. 965 Special case: when 'complete' contains "F" or "o" (function sources), 966 a longer timeout is used, allowing up to ~1s for sources such as LSP 967 servers that may sometimes take longer (e.g., while loading modules). 968 See |ins-autocompletion|. 969 970 *'autoindent'* *'ai'* *'noautoindent'* *'noai'* 971 'autoindent' 'ai' boolean (default off) 972 local to buffer 973 Copy indent from current line when starting a new line (typing <CR> 974 in Insert mode or when using the "o" or "O" command). If you do not 975 type anything on the new line except <BS> or CTRL-D and then type 976 <Esc>, CTRL-O or <CR>, the indent is deleted again. Moving the cursor 977 to another line has the same effect, unless the 'I' flag is included 978 in 'cpoptions'. 979 When autoindent is on, formatting (with the "gq" command or when you 980 reach 'textwidth' in Insert mode) uses the indentation of the first 981 line. 982 When 'smartindent' or 'cindent' is on the indent is changed in 983 a different way. 984 The 'autoindent' option is reset when the 'paste' option is set and 985 restored when 'paste' is reset. 986 987 *'autoread'* *'ar'* *'noautoread'* *'noar'* 988 'autoread' 'ar' boolean (default off) 989 global or local to buffer |global-local| 990 When a file has been detected to have been changed outside of Vim and 991 it has not been changed inside of Vim, automatically read it again. 992 When the file has been deleted this is not done, so you have the text 993 from before it was deleted. When it appears again then it is read. 994 |timestamp| 995 If this option has a local value, use this command to switch back to 996 using the global value: > 997 :set autoread< 998 < 999 1000 *'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'* 1001 'autoshelldir' 'asd' boolean (default off) 1002 global 1003 When on, Vim will change the current working directory whenever you 1004 change the directory of the shell running in a terminal window. You 1005 need proper setting-up, so whenever the shell's pwd changes an OSC 7 1006 escape sequence will be emitted. For example, on Linux, you can 1007 source /etc/profile.d/vte.sh in your shell profile if you use bash or 1008 zsh. For bash this should work (put it in a bash init file): > 1009 if [[ -n "$VIM_TERMINAL" ]]; then 1010 PROMPT_COMMAND='_vim_sync_PWD' 1011 function _vim_sync_PWD() { 1012 printf '\033]7;file://%s\033\\' "$PWD" 1013 } 1014 fi 1015 < 1016 Or, in a zsh init file: > 1017 if [[ -n "$VIM_TERMINAL" ]]; then 1018 autoload -Uz add-zsh-hook 1019 add-zsh-hook -Uz chpwd _vim_sync_PWD 1020 function _vim_sync_PWD() { 1021 printf '\033]7;file://%s\033\\' "$PWD" 1022 } 1023 fi 1024 < 1025 In a fish init file: > 1026 if test -n "$VIM_TERMINAL" 1027 function _vim_sync_PWD --on-variable=PWD 1028 printf '\033]7;file://%s\033\\' "$PWD" 1029 end 1030 end 1031 < 1032 You can find an alternative method at |terminal-autoshelldir|. 1033 When the parsing of the OSC sequence fails you get *E1179* . 1034 1035 *'autowrite'* *'aw'* *'noautowrite'* *'noaw'* 1036 'autowrite' 'aw' boolean (default off) 1037 global 1038 Write the contents of the file, if it has been modified, on each 1039 `:next`, `:rewind`, `:last`, `:first`, `:previous`, `:tag`, `:stop`, 1040 `:suspend`, `:!`, `:make`, `:terminal`, CTRL-] or CTRL-^ command; and 1041 when a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command 1042 switches to another file. 1043 A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is 1044 set to "hide" and `:next` is used. 1045 Note that for some commands the 'autowrite' option is not used, see 1046 'autowriteall' for that. 1047 Some buffers will not be written, specifically when 'buftype' is 1048 "nowrite", "nofile", "terminal" or "prompt". 1049 USE WITH CARE: If you make temporary changes to a buffer that you 1050 don't want to be saved this option may cause it to be saved anyway. 1051 Renaming the buffer with ":file {name}" may help avoid this. 1052 1053 *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* 1054 'autowriteall' 'awa' boolean (default off) 1055 global 1056 Like 'autowrite', but also used for commands `:edit`, `:enew`, 1057 `:quit`, `:qall`, `:exit`, `:xit`, `:recover` and closing the Vim 1058 window. 1059 Setting this option also implies that Vim behaves like 'autowrite' has 1060 been set. 1061 1062 *'background'* *'bg'* 1063 'background' 'bg' string (default "dark" or "light", see below) 1064 global 1065 When set to "dark", Vim will try to use colors that look good on a 1066 dark background. When set to "light", Vim will try to use colors that 1067 look good on a light background. Any other value is illegal. 1068 Vim tries to set the default value according to the terminal used. 1069 This will not always be correct. 1070 Setting this option does not change the background color, it tells Vim 1071 what the background color looks like. For changing the background 1072 color, see |:hi-normal|. 1073 1074 When 'background' is changed Vim will adjust the default color groups 1075 for the new value. But the colors used for syntax highlighting will 1076 not change. *g:colors_name* 1077 When a color scheme is loaded (the "g:colors_name" variable is set) 1078 changing 'background' will cause the color scheme to be reloaded. If 1079 the color scheme adjusts to the value of 'background' this will work. 1080 However, if the color scheme sets 'background' itself the effect may 1081 be undone. First delete the "g:colors_name" variable when needed. 1082 1083 When setting 'background' to the default value with: > 1084 :set background& 1085 < Vim will guess the value. In the GUI this should work correctly, 1086 in other cases Vim might not be able to guess the right value. 1087 If the GUI supports a dark theme, you can use the "d" flag in 1088 'guioptions', see |'go-d'|. 1089 1090 When the |t_RB| option is set, Vim will use it to request the background 1091 color from the terminal. If the returned RGB value is dark/light and 1092 'background' is not dark/light, 'background' will be set and the 1093 screen is redrawn. This may have side effects, make |t_RB| empty in 1094 your .vimrc if you suspect this problem. The response to |t_RB| can 1095 be found in |v:termrbgresp|. 1096 1097 When starting the GUI, the default value for 'background' will be 1098 "light". When the value is not set in the .gvimrc, and Vim detects 1099 that the background is actually quite dark, 'background' is set to 1100 "dark". But this happens only AFTER the .gvimrc file has been read 1101 (because the window needs to be opened to find the actual background 1102 color). To get around this, force the GUI window to be opened by 1103 putting a ":gui" command in the .gvimrc file, before where the value 1104 of 'background' is used (e.g., before ":syntax on"). 1105 1106 For MS-Windows the default is "dark". 1107 For other systems "dark" is used when 'term' is "linux", 1108 "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark 1109 background. Otherwise the default is "light". 1110 1111 The |:terminal| command and the |term_start()| function use the 1112 'background' value to decide whether the terminal window will start 1113 with a white or black background. 1114 1115 Normally this option would be set in the .vimrc file. Possibly 1116 depending on the terminal name. Example: > 1117 :if &term == "pcterm" 1118 : set background=dark 1119 :endif 1120 < When this option is set, the default settings for the highlight groups 1121 will change. To use other settings, place ":highlight" commands AFTER 1122 the setting of the 'background' option. 1123 This option is also used in the "$VIMRUNTIME/syntax/syntax.vim" file 1124 to select the colors for syntax highlighting. After changing this 1125 option, you must load syntax.vim again to see the result. This can be 1126 done with ":syntax on". 1127 1128 *'backspace'* *'bs'* 1129 'backspace' 'bs' string (Vim default: "indent,eol,start", 1130 Vi default: "") 1131 global 1132 Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert 1133 mode. This is a list of items, separated by commas. Each item allows 1134 a way to backspace over something: 1135 value effect ~ 1136 indent allow backspacing over autoindent 1137 eol allow backspacing over line breaks (join lines) 1138 start allow backspacing over the start of insert; CTRL-W and CTRL-U 1139 stop once at the start of insert. 1140 nostop like start, except CTRL-W and CTRL-U do not stop at the start 1141 of insert. 1142 1143 When the value is empty, Vi compatible backspacing is used, none of 1144 the ways mentioned for the items above are possible. 1145 1146 For backwards compatibility with version 5.4 and earlier: 1147 value effect ~ 1148 0 same as ":set backspace=" (Vi compatible) 1149 1 same as ":set backspace=indent,eol" 1150 2 same as ":set backspace=indent,eol,start" 1151 3 same as ":set backspace=indent,eol,nostop" 1152 1153 See |:fixdel| if your <BS> or <Del> key does not do what you want. 1154 NOTE: This option is set to "" when 'compatible' is set. 1155 1156 *'backup'* *'bk'* *'nobackup'* *'nobk'* 1157 'backup' 'bk' boolean (default off) 1158 global 1159 Make a backup before overwriting a file. Leave it around after the 1160 file has been successfully written. If you do not want to keep the 1161 backup file, but you do want a backup while the file is being 1162 written, reset this option and set the 'writebackup' option (this is 1163 the default). If you do not want a backup file at all reset both 1164 options (use this if your file system is almost full). See the 1165 |backup-table| for more explanations. 1166 When the 'backupskip' pattern matches, a backup is not made anyway. 1167 When 'patchmode' is set, the backup may be renamed to become the 1168 oldest version of a file. 1169 NOTE: This option is reset when 'compatible' is set. 1170 1171 *'backupcopy'* *'bkc'* 1172 'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto") 1173 global or local to buffer |global-local| 1174 When writing a file and a backup is made, this option tells how it's 1175 done. This is a comma-separated list of words. 1176 1177 The main values are: 1178 "yes" make a copy of the file and overwrite the original one 1179 "no" rename the file and write a new one 1180 "auto" one of the previous, what works best 1181 1182 Extra values that can be combined with the ones above are: 1183 "breaksymlink" always break symlinks when writing 1184 "breakhardlink" always break hardlinks when writing 1185 1186 Making a copy and overwriting the original file: 1187 - Takes extra time to copy the file. 1188 + When the file has special attributes, is a (hard/symbolic) link or 1189 has a resource fork, all this is preserved. 1190 - When the file is a link the backup will have the name of the link, 1191 not of the real file. 1192 1193 Renaming the file and writing a new one: 1194 + It's fast. 1195 - Sometimes not all attributes of the file can be copied to the new 1196 file. 1197 - When the file is a link the new file will not be a link. 1198 1199 The "auto" value is the middle way: When Vim sees that renaming the 1200 file is possible without side effects (the attributes can be passed on 1201 and the file is not a link) that is used. When problems are expected, 1202 a copy will be made. 1203 1204 The "breaksymlink" and "breakhardlink" values can be used in 1205 combination with any of "yes", "no" and "auto". When included, they 1206 force Vim to always break either symbolic or hard links by doing 1207 exactly what the "no" option does, renaming the original file to 1208 become the backup and writing a new file in its place. This can be 1209 useful for example in source trees where all the files are symbolic or 1210 hard links and any changes should stay in the local source tree, not 1211 be propagated back to the original source. 1212 *crontab* 1213 One situation where "no" and "auto" will cause problems: A program 1214 that opens a file, invokes Vim to edit that file, and then tests if 1215 the open file was changed (through the file descriptor) will check the 1216 backup file instead of the newly created file. "crontab -e" is an 1217 example, as are several |file-watcher| daemons like inotify. In that 1218 case you probably want to switch this option. 1219 1220 When a copy is made, the original file is truncated and then filled 1221 with the new text. This means that protection bits, owner and 1222 symbolic links of the original file are unmodified. The backup file, 1223 however, is a new file, owned by the user who edited the file. The 1224 group of the backup is set to the group of the original file. If this 1225 fails, the protection bits for the group are made the same as for 1226 others. 1227 1228 When the file is renamed, this is the other way around: The backup has 1229 the same attributes of the original file, and the newly written file 1230 is owned by the current user. When the file was a (hard/symbolic) 1231 link, the new file will not! That's why the "auto" value doesn't 1232 rename when the file is a link. The owner and group of the newly 1233 written file will be set to the same ones as the original file, but 1234 the system may refuse to do this. In that case the "auto" value will 1235 again not rename the file. 1236 1237 NOTE: This option is set to the Vi default value when 'compatible' is 1238 set and to the Vim default value when 'compatible' is reset. 1239 1240 *'backupdir'* *'bdir'* 1241 'backupdir' 'bdir' string (default for Amiga: ".,t:", 1242 for Win32: ".,$TEMP,c:/tmp,c:/temp" 1243 for Unix: ".,~/tmp,~/") 1244 global 1245 List of directories for the backup file, separated with commas. 1246 - The backup file will be created in the first directory in the list 1247 where this is possible. The directory must exist, Vim will not 1248 create it for you. 1249 - Empty means that no backup file will be created ('patchmode' is 1250 impossible!). Writing may fail because of this. 1251 - A directory "." means to put the backup file in the same directory 1252 as the edited file. 1253 - A directory starting with "./" (or ".\" for MS-Windows) means to put 1254 the backup file relative to where the edited file is. The leading 1255 "." is replaced with the path name of the edited file. 1256 ("." inside a directory name has no special meaning). 1257 - Spaces after the comma are ignored, other spaces are considered part 1258 of the directory name. To have a space at the start of a directory 1259 name, precede it with a backslash. 1260 - To include a comma in a directory name precede it with a backslash. 1261 - A directory name may end in an '/'. 1262 - For Unix and Win32, if a directory ends in two path separators "//", 1263 the backup file name will be built from the complete path to the 1264 file with all path separators changed to percent '%' signs. This 1265 will ensure file name uniqueness in the backup directory. 1266 On Win32, it is also possible to end with "\\". However, When a 1267 separating comma is following, you must use "//", since "\\" will 1268 include the comma in the file name. Therefore it is recommended to 1269 use '//', instead of '\\'. 1270 - Environment variables are expanded |:set_env|. 1271 - Careful with '\' characters, type one before a space, type two to 1272 get one in the option (see |option-backslash|), for example: > 1273 :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces 1274 < - For backwards compatibility with Vim version 3.0 a '>' at the start 1275 of the option is removed. 1276 See also 'backup' and 'writebackup' options. 1277 If you want to hide your backup files on Unix, consider this value: > 1278 :set backupdir=./.backup,~/.backup,.,/tmp 1279 < You must create a ".backup" directory in each directory and in your 1280 home directory for this to work properly. 1281 The use of |:set+=| and |:set-=| is preferred when adding or removing 1282 directories from the list. This avoids problems when a future version 1283 uses another default. 1284 This option cannot be set from a |modeline| or in the |sandbox|, for 1285 security reasons. 1286 1287 *'backupext'* *'bex'* *E589* 1288 'backupext' 'bex' string (default "~", for VMS: "_") 1289 global 1290 String which is appended to a file name to make the name of the 1291 backup file. The default is quite unusual, because this avoids 1292 accidentally overwriting existing files with a backup file. You might 1293 prefer using ".bak", but make sure that you don't have files with 1294 ".bak" that you want to keep. 1295 Only normal file name characters can be used; "/\*?[|<>" are illegal. 1296 1297 If you like to keep a lot of backups, you could use a BufWritePre 1298 autocommand to change 'backupext' just before writing the file to 1299 include a timestamp. > 1300 :au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~' 1301 < Use 'backupdir' to put the backup in a different directory. 1302 1303 *'backupskip'* *'bsk'* 1304 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" 1305 Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" 1306 Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") 1307 global 1308 A list of file patterns. When one of the patterns matches with the 1309 name of the file which is written, no backup file is created. Both 1310 the specified file name and the full path name of the file are used. 1311 The pattern is used like with |:autocmd|, see |autocmd-patterns|. 1312 Watch out for special characters, see |option-backslash|. 1313 When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the 1314 default value. "/tmp/*" is only used for Unix. 1315 1316 WARNING: Not having a backup file means that when Vim fails to write 1317 your buffer correctly and then, for whatever reason, Vim exits, you 1318 lose both the original file and what you were writing. Only disable 1319 backups if you don't care about losing the file. 1320 1321 Note that environment variables are not expanded. If you want to use 1322 $HOME you must expand it explicitly, e.g.: > 1323 :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' 1324 1325 < Note that the default also makes sure that "crontab -e" works (when a 1326 backup would be made by renaming the original file crontab won't see 1327 the newly created file). Also see 'backupcopy' and |crontab|. 1328 1329 *'balloondelay'* *'bdlay'* 1330 'balloondelay' 'bdlay' number (default: 600) 1331 global 1332 {only available when compiled with the |+balloon_eval| 1333 feature} 1334 Delay in milliseconds before a balloon may pop up. See |balloon-eval|. 1335 1336 *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'* 1337 'ballooneval' 'beval' boolean (default off) 1338 global 1339 {only available when compiled with the |+balloon_eval| 1340 feature} 1341 Switch on the |balloon-eval| functionality for the GUI. 1342 1343 *'balloonevalterm'* *'bevalterm'* *'noballoonevalterm'* 1344 *'nobevalterm'* 1345 'balloonevalterm' 'bevalterm' boolean (default off) 1346 global 1347 {only available when compiled with the 1348 |+balloon_eval_term| feature} 1349 Switch on the |balloon-eval| functionality for the terminal. 1350 1351 *'balloonexpr'* *'bexpr'* 1352 'balloonexpr' 'bexpr' string (default "") 1353 global or local to buffer |global-local| 1354 {only available when compiled with the |+balloon_eval| 1355 feature} 1356 Expression for text to show in evaluation balloon. It is only used 1357 when 'ballooneval' or 'balloonevalterm' is on. These variables can be 1358 used: 1359 1360 v:beval_bufnr number of the buffer in which balloon is going to show 1361 v:beval_winnr number of the window 1362 v:beval_winid ID of the window 1363 v:beval_lnum line number 1364 v:beval_col column number (byte index) 1365 v:beval_text word under or after the mouse pointer 1366 1367 Instead of showing a balloon, which is limited to plain text, consider 1368 using a popup window, see |popup_beval_example|. A popup window can 1369 use highlighting and show a border. 1370 1371 The evaluation of the expression must not have side effects! 1372 Example: > 1373 function MyBalloonExpr() 1374 return 'Cursor is at line ' .. v:beval_lnum .. 1375 \ ', column ' .. v:beval_col .. 1376 \ ' of file ' .. bufname(v:beval_bufnr) .. 1377 \ ' on word "' .. v:beval_text .. '"' 1378 endfunction 1379 set bexpr=MyBalloonExpr() 1380 set ballooneval balloonevalterm 1381 < 1382 Also see |balloon_show()|, it can be used if the content of the balloon 1383 is to be fetched asynchronously. In that case evaluating 1384 'balloonexpr' should result in an empty string. If you get a balloon 1385 with only "0" you probably didn't return anything from your function. 1386 1387 NOTE: The balloon is displayed only if the cursor is on a text 1388 character. If the result of evaluating 'balloonexpr' is not empty, 1389 Vim does not try to send a message to an external debugger (Netbeans 1390 or Sun Workshop). 1391 1392 If the expression starts with s: or |<SID>|, then it is replaced with 1393 the script ID (|local-function|). Example: > 1394 set bexpr=s:MyBalloonExpr() 1395 set bexpr=<SID>SomeBalloonExpr() 1396 < Otherwise, the expression is evaluated in the context of the script 1397 where the option was set, thus script-local items are available. 1398 1399 The expression will be evaluated in the |sandbox| when set from a 1400 modeline, see |sandbox-option|. 1401 This option cannot be set in a modeline when 'modelineexpr' is off. 1402 1403 It is not allowed to change text or jump to another window while 1404 evaluating 'balloonexpr', see |textlock|. 1405 1406 To check whether line breaks in the balloon text work use this check: > 1407 if has("balloon_multiline") 1408 < When they are supported "\n" characters will start a new line. If the 1409 expression evaluates to a |List| this is equal to using each List item 1410 as a string and putting "\n" in between them. 1411 NOTE: This option is set to "" when 'compatible' is set. 1412 1413 *'belloff'* *'bo'* 1414 'belloff' 'bo' string (default "") 1415 global 1416 Specifies for which events the bell will not be rung. It is a comma 1417 separated list of items. For each item that is present, the bell will 1418 be silenced. This is most useful to specify specific events in insert 1419 mode to be silenced. 1420 You can also make it flash by using 'visualbell'. 1421 1422 item meaning when present ~ 1423 all All events. 1424 backspace When hitting <BS> or <Del> and deleting results in an 1425 error. 1426 cursor Fail to move around using the cursor keys or 1427 <PageUp>/<PageDown> in |Insert-mode|. 1428 complete Error occurred when using |i_CTRL-X_CTRL-K| or 1429 |i_CTRL-X_CTRL-T|. 1430 copy Cannot copy char from insert mode using |i_CTRL-Y| or 1431 |i_CTRL-E|. 1432 ctrlg Unknown Char after <C-G> in Insert mode. 1433 error Other Error occurred (e.g. try to join last line) 1434 (mostly used in |Normal-mode| or |Cmdline-mode|). 1435 esc hitting <Esc> in |Normal-mode|. 1436 ex In |Visual-mode|, hitting |Q| results in an error. 1437 hangul Ignored. 1438 insertmode Pressing <Esc> in 'insertmode'. 1439 lang Calling the beep module for Lua/Mzscheme/TCL. 1440 mess No output available for |g<|. 1441 showmatch Error occurred for 'showmatch' function. 1442 operator Empty region error |cpo-E|. 1443 register Unknown register after <C-R> in |Insert-mode|. 1444 shell Bell from shell output |:!|. 1445 spell Error happened on spell suggest. 1446 term Bell from |:terminal| output. 1447 wildmode More matches in |cmdline-completion| available 1448 (depends on the 'wildmode' setting). 1449 1450 This is most useful to fine tune when in Insert mode the bell should 1451 be rung. For Normal mode and Ex commands, the bell is often rung to 1452 indicate that an error occurred. It can be silenced by adding the 1453 "error" keyword. 1454 1455 *'binary'* *'bin'* *'nobinary'* *'nobin'* 1456 'binary' 'bin' boolean (default off) 1457 local to buffer 1458 This option should be set before editing a binary file. You can also 1459 use the |-b| Vim argument. When this option is switched on a few 1460 options will be changed (also when it already was on): 1461 'textwidth' will be set to 0 1462 'wrapmargin' will be set to 0 1463 'modeline' will be off 1464 'expandtab' will be off 1465 Also, 'fileformat' and 'fileformats' options will not be used, the 1466 file is read and written like 'fileformat' was "unix" (a single <NL> 1467 separates lines). 1468 The 'fileencoding' and 'fileencodings' options will not be used, the 1469 file is read without conversion. 1470 NOTE: When you start editing a(nother) file while the 'bin' option is 1471 on, settings from autocommands may change the settings again (e.g., 1472 'textwidth'), causing trouble when editing. You might want to set 1473 'bin' again when the file has been loaded. 1474 The previous values of these options are remembered and restored when 1475 'bin' is switched from on to off. Each buffer has its own set of 1476 saved option values. 1477 To edit a file with 'binary' set you can use the |++bin| argument. 1478 This avoids you have to do ":set bin", which would have effect for all 1479 files you edit. 1480 When writing a file the <EOL> for the last line is only written if 1481 there was one in the original file (normally Vim appends an <EOL> to 1482 the last line if there is none; this would make the file longer). See 1483 the 'endofline' option. 1484 1485 *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'* 1486 'bioskey' 'biosk' boolean (default on) 1487 global 1488 {only for MS-DOS} 1489 This was for MS-DOS and is no longer supported. 1490 1491 *'bomb'* *'nobomb'* 1492 'bomb' boolean (default off) 1493 local to buffer 1494 When writing a file and the following conditions are met, a BOM (Byte 1495 Order Mark) is prepended to the file: 1496 - this option is on 1497 - the 'binary' option is off 1498 - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big 1499 endian variants. 1500 Some applications use the BOM to recognize the encoding of the file. 1501 Often used for UCS-2 files on MS-Windows. For other applications it 1502 causes trouble, for example: "cat file1 file2" makes the BOM of file2 1503 appear halfway through the resulting file. Gcc doesn't accept a BOM. 1504 When Vim reads a file and 'fileencodings' starts with "ucs-bom", a 1505 check for the presence of the BOM is done and 'bomb' set accordingly. 1506 Unless 'binary' is set, it is removed from the first line, so that you 1507 don't see it when editing. When you don't change the options, the BOM 1508 will be restored when writing the file. 1509 1510 *'breakat'* *'brk'* 1511 'breakat' 'brk' string (default " ^I!@*-+;:,./?") 1512 global 1513 {not available when compiled without the |+linebreak| 1514 feature} 1515 This option lets you choose which characters might cause a line 1516 break if 'linebreak' is on. Only works for ASCII and also for 8-bit 1517 characters when 'encoding' is an 8-bit encoding. 1518 1519 *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'* 1520 'breakindent' 'bri' boolean (default off) 1521 local to window 1522 {not available when compiled without the |+linebreak| 1523 feature} 1524 Every wrapped line will continue visually indented (same amount of 1525 space as the beginning of that line), thus preserving horizontal 1526 blocks of text. 1527 NOTE: This option is reset when 'compatible' is set. 1528 1529 *'breakindentopt'* *'briopt'* 1530 'breakindentopt' 'briopt' string (default empty) 1531 local to window 1532 {not available when compiled without the |+linebreak| 1533 feature} 1534 Settings for 'breakindent'. It can consist of the following optional 1535 items and must be separated by a comma: 1536 min:{n} Minimum text width that will be kept after 1537 applying 'breakindent', even if the resulting 1538 text should normally be narrower. This prevents 1539 text indented almost to the right window border 1540 occupying lots of vertical space when broken. 1541 (default: 20) 1542 shift:{n} After applying 'breakindent', the wrapped line's 1543 beginning will be shifted by the given number of 1544 characters. It permits dynamic French paragraph 1545 indentation (negative) or emphasizing the line 1546 continuation (positive). 1547 (default: 0) 1548 sbr Display the 'showbreak' value before applying the 1549 additional indent. 1550 (default: off) 1551 list:{n} Adds an additional indent for lines that match a 1552 numbered or bulleted list (using the 1553 'formatlistpat' setting). 1554 (default: 0) 1555 list:-1 Uses the width of a match with 'formatlistpat' for 1556 indentation. 1557 column:{n} Indent at column {n}. Will overrule the other 1558 sub-options. Note: an additional indent may be 1559 added for the 'showbreak' setting. 1560 (default: off) 1561 1562 *'browsedir'* *'bsdir'* 1563 'browsedir' 'bsdir' string (default: "last") 1564 global 1565 {only for Motif, GTK, Mac and Win32 GUI} 1566 Which directory to use for the file browser: 1567 last Use same directory as with last file browser, where a 1568 file was opened or saved. 1569 buffer Use the directory of the related buffer. 1570 current Use the current directory. 1571 {path} Use the specified directory 1572 1573 *'bufhidden'* *'bh'* 1574 'bufhidden' 'bh' string (default: "") 1575 local to buffer |local-noglobal| 1576 This option specifies what happens when a buffer is no longer 1577 displayed in a window: 1578 <empty> follow the global 'hidden' option 1579 hide hide the buffer (don't unload it), even if 'hidden' is 1580 not set 1581 unload unload the buffer, even if 'hidden' is set; the 1582 |:hide| command will also unload the buffer 1583 delete delete the buffer from the buffer list, even if 1584 'hidden' is set; the |:hide| command will also delete 1585 the buffer, making it behave like |:bdelete| 1586 wipe wipe the buffer from the buffer list, even if 1587 'hidden' is set; the |:hide| command will also wipe 1588 out the buffer, making it behave like |:bwipeout| 1589 1590 CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer 1591 are lost without a warning. Also, these values may break autocommands 1592 that switch between buffers temporarily. 1593 This option is used together with 'buftype' and 'swapfile' to specify 1594 special kinds of buffers. See |special-buffers|. 1595 1596 *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85* 1597 'buflisted' 'bl' boolean (default: on) 1598 local to buffer 1599 When this option is set, the buffer shows up in the buffer list. If 1600 it is reset it is not used for ":bnext", "ls", the Buffers menu, etc. 1601 This option is reset by Vim for buffers that are only used to remember 1602 a file name or marks. Vim sets it when starting to edit a buffer. 1603 But not when moving to a buffer with ":buffer". 1604 1605 *'buftype'* *'bt'* *E382* 1606 'buftype' 'bt' string (default: "") 1607 local to buffer |local-noglobal| 1608 The value of this option specifies the type of a buffer: 1609 <empty> normal buffer 1610 nofile buffer which is not related to a file and will not be 1611 written 1612 nowrite buffer which will not be written 1613 acwrite buffer which will always be written with BufWriteCmd 1614 autocommands. 1615 quickfix quickfix buffer, contains list of errors |:cwindow| 1616 or list of locations |:lwindow| 1617 help help buffer (you are not supposed to set this 1618 manually) 1619 terminal buffer for a |terminal| (you are not supposed to set 1620 this manually) 1621 prompt buffer where only the last line can be edited, meant 1622 to be used by a plugin, see |prompt-buffer| 1623 {only when compiled with the |+channel| feature} 1624 popup buffer used in a popup window, see |popup|. 1625 {only when compiled with the |+textprop| feature} 1626 1627 This option is used together with 'bufhidden' and 'swapfile' to 1628 specify special kinds of buffers. See |special-buffers|. 1629 Also see |win_gettype()|, which returns the type of the window. 1630 1631 Be careful with changing this option, it can have many side effects! 1632 One such effect is that Vim will not check the timestamp of the file, 1633 if the file is changed by another program this will not be noticed. 1634 1635 A "quickfix" buffer is only used for the error list and the location 1636 list. This value is set by the |:cwindow| and |:lwindow| commands and 1637 you are not supposed to change it. 1638 1639 "nofile" and "nowrite" buffers are similar: 1640 both: The buffer is not to be written to disk, ":w" doesn't 1641 work (":w filename" does work though). 1642 both: The buffer is never considered to be 'modified'. 1643 There is no warning when the changes will be lost, for 1644 example when you quit Vim. 1645 both: A swap file is only created when using too much memory 1646 (when 'swapfile' has been reset there is never a swap 1647 file). 1648 nofile only: The buffer name is fixed, it is not handled like a 1649 file name. It is not modified in response to a |:cd| 1650 command. 1651 both: When using ":e bufname" and already editing "bufname" 1652 the buffer is made empty and autocommands are 1653 triggered as usual for |:edit|. 1654 *E676* 1655 "acwrite" implies that the buffer name is not related to a file, like 1656 "nofile", but it will be written. Thus, in contrast to "nofile" and 1657 "nowrite", ":w" does work and a modified buffer can't be abandoned 1658 without saving. For writing there must be matching |BufWriteCmd|, 1659 |FileWriteCmd| or |FileAppendCmd| autocommands. 1660 1661 *'casemap'* *'cmp'* 1662 'casemap' 'cmp' string (default: "internal,keepascii") 1663 global 1664 Specifies details about changing the case of letters. It may contain 1665 these words, separated by a comma: 1666 internal Use internal case mapping functions, the current 1667 locale does not change the case mapping. This only 1668 matters when 'encoding' is a Unicode encoding, 1669 "latin1" or "iso-8859-15". When "internal" is 1670 omitted, the towupper() and towlower() system library 1671 functions are used when available. 1672 keepascii For the ASCII characters (0x00 to 0x7f) use the US 1673 case mapping, the current locale is not effective. 1674 This probably only matters for Turkish. 1675 1676 *'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'* 1677 'cdhome' 'cdh' boolean (default: off) 1678 global 1679 When on, |:cd|, |:tcd| and |:lcd| without an argument changes the 1680 current working directory to the |$HOME| directory like in Unix. 1681 When off, those commands just print the current directory name. 1682 On Unix this option has no effect. 1683 This option cannot be set from a |modeline| or in the |sandbox|, for 1684 security reasons. 1685 NOTE: This option is reset when 'compatible' is set. 1686 1687 *'cdpath'* *'cd'* *E344* *E346* 1688 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") 1689 global 1690 This is a list of directories which will be searched when using the 1691 |:cd|, |:tcd| and |:lcd| commands, provided that the directory being 1692 searched for has a relative path, not an absolute part starting with 1693 "/", "./" or "../", the 'cdpath' option is not used then. 1694 The 'cdpath' option's value has the same form and semantics as 1695 'path'. Also see |file-searching|. 1696 The default value is taken from $CDPATH, with a "," prepended to look 1697 in the current directory first. 1698 If the default value taken from $CDPATH is not what you want, include 1699 a modified version of the following command in your vimrc file to 1700 override it: > 1701 :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') 1702 < Environment variables are expanded |:set_env|. 1703 This option cannot be set from a |modeline| or in the |sandbox|, for 1704 security reasons. 1705 (parts of 'cdpath' can be passed to the shell to expand file names). 1706 1707 *'cedit'* 1708 'cedit' string (Vi default: "", Vim default: CTRL-F) 1709 global 1710 The key used in Command-line Mode to open the command-line window. 1711 The default is CTRL-F when 'compatible' is off. 1712 Only non-printable keys are allowed. 1713 The key can be specified as a single character, but it is difficult to 1714 type. The preferred way is to use |key-notation| (e.g. <Up>, <C-F>) or 1715 a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: > 1716 :set cedit=^Y 1717 :set cedit=<Esc> 1718 < |Nvi| also has this option, but it only uses the first character. 1719 See |cmdwin|. 1720 NOTE: This option is set to the Vim default value when 'compatible' 1721 is reset. 1722 1723 *'charconvert'* *'ccv'* *E202* *E214* *E513* 1724 'charconvert' 'ccv' string (default "") 1725 global 1726 {only available when compiled with the |+eval| feature} 1727 An expression that is used for character encoding conversion. It is 1728 evaluated when a file that is to be read or has been written has a 1729 different encoding from what is desired. 1730 'charconvert' is not used when the internal iconv() function is 1731 supported and is able to do the conversion. Using iconv() is 1732 preferred, because it is much faster. 1733 'charconvert' is not used when reading stdin |--|, because there is no 1734 file to convert from. You will have to save the text in a file first. 1735 The expression must return zero, false or an empty string for success, 1736 non-zero or true for failure. 1737 The possible encoding names encountered are in 'encoding'. 1738 Additionally, names given in 'fileencodings' and 'fileencoding' are 1739 used. 1740 Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8" 1741 is done internally by Vim, 'charconvert' is not used for this. 1742 'charconvert' is also used to convert the viminfo file, if the 'c' 1743 flag is present in 'viminfo'. Also used for Unicode conversion. 1744 Example: > 1745 set charconvert=CharConvert() 1746 fun CharConvert() 1747 system("recode " 1748 \ .. v:charconvert_from .. ".." .. v:charconvert_to 1749 \ .. " <" .. v:fname_in .. " >" .. v:fname_out) 1750 return v:shell_error 1751 endfun 1752 < The related Vim variables are: 1753 v:charconvert_from name of the current encoding 1754 v:charconvert_to name of the desired encoding 1755 v:fname_in name of the input file 1756 v:fname_out name of the output file 1757 Note that v:fname_in and v:fname_out will never be the same. 1758 Note that v:charconvert_from and v:charconvert_to may be different 1759 from 'encoding'. Vim internally uses UTF-8 instead of UCS-2 or UCS-4. 1760 1761 The advantage of using a function call without arguments is that it is 1762 faster, see |expr-option-function|. 1763 1764 Encryption is not done by Vim when using 'charconvert'. If you want 1765 to encrypt the file after conversion, 'charconvert' should take care 1766 of this. 1767 1768 If the 'charconvert' expression starts with s: or |<SID>|, then it is 1769 replaced with the script ID (|local-function|). Example: > 1770 set charconvert=s:MyConvert() 1771 set charconvert=<SID>SomeConvert() 1772 < Otherwise the expression is evaluated in the context of the script 1773 where the option was set, thus script-local items are available. 1774 1775 This option cannot be set from a |modeline| or in the |sandbox|, for 1776 security reasons. 1777 1778 *'chistory'* *'chi'* 1779 *E1542* *E1543* *E1544* 1780 'chistory' 'chi' number (default: 10) 1781 global 1782 {only available when compiled with the |+quickfix| 1783 feature} 1784 Number of quickfix lists that should be remembered for the quickfix 1785 stack. Must be between 1 and 100. If the option is set to a value 1786 that is lower than the amount of entries in the quickfix list stack, 1787 entries will be removed starting from the oldest one. If the current 1788 quickfix list was removed, then the quickfix list at top of the stack 1789 (the most recently created) will be used in its place. For additional 1790 info, see |quickfix-stack|. 1791 1792 *'cindent'* *'cin'* *'nocindent'* *'nocin'* 1793 'cindent' 'cin' boolean (default off) 1794 local to buffer 1795 Enables automatic C program indenting. See 'cinkeys' to set the keys 1796 that trigger reindenting in insert mode and 'cinoptions' to set your 1797 preferred indent style. 1798 If 'indentexpr' is not empty, it overrules 'cindent'. 1799 If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty, 1800 the "=" operator indents using this algorithm rather than calling an 1801 external program. 1802 See |C-indenting|. 1803 When you don't like the way 'cindent' works, try the 'smartindent' 1804 option or 'indentexpr'. 1805 This option is not used when 'paste' is set. 1806 NOTE: This option is reset when 'compatible' is set. 1807 1808 *'cinkeys'* *'cink'* 1809 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e") 1810 local to buffer 1811 A list of keys that, when typed in Insert mode, cause reindenting of 1812 the current line. Only used if 'cindent' is on and 'indentexpr' is 1813 empty. 1814 For the format of this option see |cinkeys-format|. 1815 See |C-indenting|. 1816 1817 *'cinoptions'* *'cino'* 1818 'cinoptions' 'cino' string (default "") 1819 local to buffer 1820 The 'cinoptions' affect the way 'cindent' reindents lines in a C 1821 program. See |cinoptions-values| for the values of this option, and 1822 |C-indenting| for info on C indenting in general. 1823 1824 *'cinscopedecls'* *'cinsd'* 1825 'cinscopedecls' 'cinsd' string (default "public,protected,private") 1826 local to buffer 1827 Keywords that are interpreted as a C++ scope declaration by |cino-g|. 1828 Useful e.g. for working with the Qt framework that defines additional 1829 scope declarations "signals", "public slots" and "private slots": > 1830 set cinscopedecls+=signals,public\ slots,private\ slots 1831 < 1832 *'cinwords'* *'cinw'* 1833 'cinwords' 'cinw' string (default "if,else,while,do,for,switch") 1834 local to buffer 1835 These keywords start an extra indent in the next line when 1836 'smartindent' or 'cindent' is set. For 'cindent' this is only done at 1837 an appropriate place (inside {}). 1838 Note that 'ignorecase' isn't used for 'cinwords'. If case doesn't 1839 matter, include the keyword both the uppercase and lowercase: 1840 "if,If,IF". 1841 1842 *'clipboard'* *'cb'* 1843 'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux" 1844 for X-windows, "" otherwise) 1845 global 1846 {only in GUI versions or when the |+xterm_clipboard| 1847 or |+wayland_clipboard| features or 1848 |+clipboard_provider| features are included} 1849 This option is a list of comma-separated names. 1850 Note: if one of the items is "exclude:", then you can't add an item 1851 after that. Therefore do not append an item with += but use ^= to 1852 prepend, e.g.: > 1853 set clipboard^=unnamed 1854 < When using the GUI see |'go-A'|. 1855 When using the |clipboard-providers| feature, only the "unnamed" and 1856 "unnamedplus" features will be recognized If compiled without the 1857 |+clipboard| feature but compiled with the |+clipboard_provider| 1858 feature, then they will be the only values allowed and the other 1859 values will be invalid. 1860 These names are recognized: 1861 1862 *clipboard-unnamed* 1863 unnamed When included, Vim will use the clipboard register '*' 1864 for all yank, delete, change and put operations which 1865 would normally go to the unnamed register. When a 1866 register is explicitly specified, it will always be 1867 used regardless of whether "unnamed" is in 'clipboard' 1868 or not. The clipboard register can always be 1869 explicitly accessed using the "* notation. Also see 1870 |gui-clipboard|. 1871 1872 *clipboard-unnamedplus* 1873 unnamedplus A variant of the "unnamed" flag which uses the 1874 clipboard register '+' (|quoteplus|) instead of 1875 register '*' for all yank, delete, change and put 1876 operations which would normally go to the unnamed 1877 register. When "unnamed" is also included to the 1878 option, yank operations (but not delete, change or 1879 put) will additionally copy the text into register 1880 '*'. If Wayland is being used and the compositor does 1881 not support the primary selection then the regular 1882 selection is used in its place. Only available with 1883 the |+X11| or |+wayland_clipboard| feature. 1884 Availability can be checked with: > 1885 if has('unnamedplus') 1886 < 1887 *clipboard-autoselect* 1888 autoselect Works like the 'a' flag in 'guioptions': If present, 1889 then whenever Visual mode is started, or the Visual 1890 area extended, Vim tries to become the owner of the 1891 windowing system's global selection or put the 1892 selected text on the clipboard used by the selection 1893 register "*. See |'go-a'| and |quotestar| for details. 1894 When the GUI is active, the 'a' flag in 'guioptions' 1895 is used, when the GUI is not active, this "autoselect" 1896 flag is used. 1897 Also applies to the modeless selection. 1898 1899 *clipboard-autoselectplus* 1900 autoselectplus Like "autoselect" but using the + register instead of 1901 the * register. Compare to the 'P' flag in 1902 'guioptions'. 1903 1904 *clipboard-autoselectml* 1905 autoselectml Like "autoselect", but for the modeless selection 1906 only. Compare to the 'A' flag in 'guioptions'. 1907 1908 *clipboard-html* 1909 html When the clipboard contains HTML, use this when 1910 pasting. When putting text on the clipboard, mark it 1911 as HTML. This works to copy rendered HTML from 1912 Firefox, paste it as raw HTML in Vim, select the HTML 1913 in Vim and paste it in a rich edit box in Firefox. 1914 You probably want to add this only temporarily, 1915 possibly use BufEnter autocommands. 1916 Only supported for GTK version 2 and later. 1917 1918 *clipboard-exclude* 1919 exclude:{pattern} 1920 Defines a pattern that is matched against the name of 1921 the terminal 'term'. If there is a match, no 1922 connection will be made to the X server or Wayland 1923 compositor. This is useful in this situation: 1924 - Running Vim in a console. 1925 - $DISPLAY/$WAYLAND_DISPLAY is set to start 1926 applications on another display. 1927 - You do not want to connect to the X server/Wayland 1928 compositor in the console, but do want this in a 1929 terminal emulator. 1930 To never connect to the X server/Wayland compositor 1931 use: > 1932 exclude:.* 1933 < This has the same effect as using the |-X| or |-Y| 1934 argument. 1935 Note that when there is no connection to the X server 1936 the window title won't be restored and the clipboard 1937 cannot be accessed. This is the same for Wayland, 1938 except there is no title restoring. 1939 The value of 'magic' is ignored, {pattern} is 1940 interpreted as if 'magic' was on. 1941 The rest of the option value will be used for 1942 {pattern}, this must be the last entry. 1943 1944 *'clipmethod'* *'cpm'* 1945 'clipmethod' 'cpm' string (default for Unix: "wayland,x11", 1946 for VMS: "x11", 1947 otherwise: "") 1948 global 1949 {only when the |+xterm_clipboard|, |+wayland_clipboard|, 1950 or |+eval| features are included} 1951 Specifies which method of accessing the system clipboard (or clipboard 1952 provider) is used. Methods are tried in the order given; the first 1953 working method is used. Supported methods are: 1954 wayland Wayland selections 1955 x11 X11 selections 1956 <name> Use a clipboard provider with the given name 1957 1958 Note: This option is ignored when either the GUI is running or if Vim 1959 is run on a system without Wayland or X11 support, such as Windows or 1960 macOS. The GUI or system way of accessing the clipboard is used 1961 instead, meaning |v:clipmethod| will be set to "none". The 1962 exception to this is the |clipboard-providers| feature, in which if 1963 a clipboard provider is being used, then it will override the existing 1964 clipboard functionality. 1965 1966 The option value is a list of comma separated items. The list is 1967 parsed left to right in order, and the first method that Vim 1968 determines is available or is working is used as the actual method for 1969 accessing the clipboard. 1970 1971 The current method that is being used can be found in the |v:clipmethod| 1972 variable. 1973 1974 *'cmdheight'* *'ch'* 1975 'cmdheight' 'ch' number (default 1) 1976 global or local to tab page 1977 Number of screen lines to use for the command-line. A larger value 1978 helps avoiding |hit-enter| prompts. 1979 The value of this option is stored with the tab page, so that each tab 1980 page can have a different value. 1981 1982 *'cmdwinheight'* *'cwh'* 1983 'cmdwinheight' 'cwh' number (default 7) 1984 global 1985 Number of screen lines to use for the command-line window. |cmdwin| 1986 1987 *'colorcolumn'* *'cc'* 1988 'colorcolumn' 'cc' string (default "") 1989 local to window 1990 {not available when compiled without the |+syntax| 1991 feature} 1992 'colorcolumn' is a comma-separated list of screen columns that are 1993 highlighted with ColorColumn |hl-ColorColumn|. Useful to align 1994 text. Will make screen redrawing slower. 1995 The screen column can be an absolute number, or a number preceded with 1996 '+' or '-', which is added to or subtracted from 'textwidth'. > 1997 1998 :set cc=+1 " highlight column after 'textwidth' 1999 :set cc=+1,+2,+3 " highlight three columns after 'textwidth' 2000 :hi ColorColumn ctermbg=lightgrey guibg=lightgrey 2001 < 2002 When 'textwidth' is zero then the items with '-' and '+' are not used. 2003 A maximum of 256 columns are highlighted. 2004 2005 *'columns'* *'co'* *E594* 2006 'columns' 'co' number (default 80 or terminal width) 2007 global 2008 Number of columns of the screen. Normally this is set by the terminal 2009 initialization and does not have to be set by hand. Also see 2010 |posix-screen-size|. 2011 When Vim is running in the GUI or in a resizable window, setting this 2012 option will cause the window size to be changed. When you only want 2013 to use the size for the GUI, put the command in your |gvimrc| file. 2014 When you set this option and Vim is unable to change the physical 2015 number of columns of the display, the display may be messed up. For 2016 the GUI it is always possible and Vim limits the number of columns to 2017 what fits on the screen. You can use this command to get the widest 2018 window possible: > 2019 :set columns=9999 2020 < Minimum value is 12, maximum value is 10000. 2021 2022 *'comments'* *'com'* *E524* *E525* 2023 'comments' 'com' string (default 2024 "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-") 2025 local to buffer 2026 A comma-separated list of strings that can start a comment line. See 2027 |format-comments|. See |option-backslash| about using backslashes to 2028 insert a space. 2029 2030 *'commentstring'* *'cms'* *E537* 2031 'commentstring' 'cms' string (default "/* %s */") 2032 local to buffer 2033 A template for a comment. The "%s" in the value is replaced with the 2034 comment text, and should be padded with a space when possible. 2035 Currently used to add markers for folding, see |fold-marker|. Also 2036 commonly used by commenting plugins (e.g. |comment-install|). 2037 2038 *'compatible'* *'cp'* *'nocompatible'* *'nocp'* 2039 'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc| 2040 file is found, reset in |defaults.vim|) 2041 global 2042 This option has the effect of making Vim either more Vi-compatible, or 2043 make Vim behave in a more useful way. 2044 2045 This is a special kind of option, because when it's set or reset, 2046 other options are also changed as a side effect. 2047 NOTE: Setting or resetting this option can have a lot of unexpected 2048 effects: Mappings are interpreted in another way, undo behaves 2049 differently, etc. If you set this option in your vimrc file, you 2050 should probably put it at the very start. 2051 2052 By default this option is on and the Vi defaults are used for the 2053 options. This default was chosen for those people who want to use Vim 2054 just like Vi, and don't even (want to) know about the 'compatible' 2055 option. 2056 When a |vimrc| or |gvimrc| file is found while Vim is starting up, 2057 this option is switched off, and all options that have not been 2058 modified will be set to the Vim defaults. Effectively, this means 2059 that when a |vimrc| or |gvimrc| file exists, Vim will use the Vim 2060 defaults, otherwise it will use the Vi defaults. (Note: This doesn't 2061 happen for the system-wide vimrc or gvimrc file, nor for a file given 2062 with the |-u| argument). Also see |compatible-default| and 2063 |posix-compliance|. 2064 You can also set this option with the "-C" argument, and reset it with 2065 "-N". See |-C| and |-N|. 2066 See 'cpoptions' for more fine tuning of Vi compatibility. 2067 2068 When this option is set, numerous other options are set to make Vim as 2069 Vi-compatible as possible. When this option is unset, various options 2070 are set to make Vim more useful. The table below lists all the 2071 options affected. 2072 The {?} column indicates when the options are affected: 2073 + Means that the option is set to the value given in {set value} when 2074 'compatible' is set. 2075 & Means that the option is set to the value given in {set value} when 2076 'compatible' is set AND is set to its Vim default value when 2077 'compatible' is unset. 2078 - Means the option is NOT changed when setting 'compatible' but IS 2079 set to its Vim default when 'compatible' is unset. 2080 The {effect} column summarises the change when 'compatible' is set. 2081 2082 option ? set value effect ~ 2083 2084 'allowrevins' + off no CTRL-_ command 2085 'antialias' + off don't use antialiased fonts 2086 'arabic' + off reset arabic-related options 2087 'arabicshape' + on correct character shapes 2088 'backspace' + "" normal backspace 2089 'backup' + off no backup file 2090 'backupcopy' & Unix: "yes" backup file is a copy 2091 else: "auto" copy or rename backup file 2092 'balloonexpr' + "" text to show in evaluation balloon 2093 'breakindent' + off don't indent when wrapping lines 2094 'cedit' - {unchanged} {set vim default only on resetting 'cp'} 2095 'cdhome' + off ":cd" don't chdir to home on non-Unix 2096 'cindent' + off no C code indentation 2097 'compatible' - {unchanged} {set vim default only on resetting 'cp'} 2098 'copyindent' + off don't copy indent structure 2099 'cpoptions' & (all flags) Vi-compatible flags 2100 'cscopepathcomp'+ 0 don't show directories in tags list 2101 'cscoperelative'+ off don't use basename of path as prefix 2102 'cscopetag' + off don't use cscope for ":tag" 2103 'cscopetagorder'+ 0 see |cscopetagorder| 2104 'cscopeverbose' + off see |cscopeverbose| 2105 'delcombine' + off unicode: delete whole char combination 2106 'digraph' + off no digraphs 2107 'esckeys' & off no <Esc>-keys in Insert mode 2108 this also disables |modifyOtherKeys| 2109 and |xterm-bracketed-paste| 2110 'expandtab' + off tabs not expanded to spaces 2111 'fileformats' & "" no automatic file format detection, 2112 "dos,unix" except for MS-Windows 2113 'formatexpr' + "" use 'formatprg' for auto-formatting 2114 'formatoptions' & "vt" Vi compatible formatting 2115 'gdefault' + off no default 'g' flag for ":s" 2116 'history' & 0 no commandline history 2117 'hkmap' + off no Hebrew keyboard mapping 2118 'hkmapp' + off no phonetic Hebrew keyboard mapping 2119 'hlsearch' + off no highlighting of search matches 2120 'incsearch' + off no incremental searching 2121 'indentexpr' + "" no indenting by expression 2122 'insertmode' + off do not start in Insert mode 2123 'iskeyword' & "@,48-57,_" keywords contain alphanumeric 2124 characters and '_' 2125 'joinspaces' + on insert 2 spaces after period 2126 'modeline' & off no modelines 2127 'more' & off no pauses in listings 2128 'mzquantum' - {unchanged} {set vim default only on resetting 'cp'} 2129 'numberwidth' & 8 min number of columns for line number 2130 'preserveindent'+ off don't preserve current indent structure 2131 when changing it 2132 'revins' + off no reverse insert 2133 'ruler' & off no ruler 2134 'scrolljump' + 1 no jump scroll 2135 'scrolloff' + 0 no scroll offset 2136 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} 2137 'shiftround' + off indent not rounded to shiftwidth 2138 'shortmess' & "S" no shortening of messages 2139 'showcmd' & off command characters not shown 2140 'showmode' & off current mode not shown 2141 'sidescrolloff' + 0 cursor moves to edge of screen in scroll 2142 'smartcase' + off no automatic ignore case switch 2143 'smartindent' + off no smart indentation 2144 'smarttab' + off no smart tab size 2145 'softtabstop' + 0 no soft tab stops 2146 'startofline' + on goto startofline with some commands 2147 'tagcase' & "followic" 'ignorecase' when searching tags file 2148 'tagrelative' & off tag file names are not relative 2149 'termguicolors' + off don't use highlight-(guifg|guibg) 2150 'textauto' & off no automatic textmode detection 2151 'textwidth' + 0 no automatic line wrap 2152 'tildeop' + off tilde is not an operator 2153 'ttimeout' + off no terminal timeout 2154 'undofile' + off don't use an undo file 2155 'viminfo' - {unchanged} {set Vim default only on resetting 'cp'} 2156 'virtualedit' + "" cursor can only be placed on characters 2157 'whichwrap' & "" left-right movements don't wrap 2158 'wildchar' & CTRL-E only when the current value is <Tab> 2159 use CTRL-E for cmdline completion 2160 'writebackup' + on or off depends on the |+writebackup| feature 2161 2162 *'complete'* *'cpt'* *E535* 2163 'complete' 'cpt' string (default: ".,w,b,u,t,i") 2164 local to buffer 2165 This option controls how completion |ins-completion| behaves when 2166 using CTRL-P, CTRL-N, or |ins-autocompletion|. It is also used for 2167 whole-line completion |i_CTRL-X_CTRL-L|. It indicates the type of 2168 completion and the places to scan. It is a comma-separated list of 2169 flags: 2170 . scan the current buffer ('wrapscan' is ignored) 2171 w scan buffers from other windows 2172 b scan other loaded buffers that are in the buffer list 2173 u scan the unloaded buffers that are in the buffer list 2174 U scan the buffers that are not in the buffer list 2175 k scan the files given with the 'dictionary' option 2176 kspell use the currently active spell checking |spell| 2177 k{dict} scan the file {dict}. Several "k" flags can be given, 2178 patterns are valid too. For example: > 2179 :set cpt=k/usr/dict/*,k~/spanish 2180 < s scan the files given with the 'thesaurus' option 2181 s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns 2182 are valid too. 2183 i scan current and included files 2184 d scan current and included files for defined name or macro 2185 |i_CTRL-X_CTRL-D| 2186 ] tag completion 2187 t same as "]" 2188 F{func} call the function {func}. Multiple "F" flags may be 2189 specified. Refer to |complete-functions| for details on how 2190 the function is invoked and what it should return. The value 2191 can be the name of a function or a |Funcref|. For |Funcref| 2192 values, spaces must be escaped with a backslash ('\'), and 2193 commas with double backslashes ('\\') (see |option-backslash|). 2194 Unlike other sources, functions can provide completions 2195 starting from a non-keyword character before the cursor, and 2196 their start position for replacing text may differ from other 2197 sources. If the Dict returned by the {func} includes 2198 {"refresh": "always"}, the function will be invoked again 2199 whenever the leading text changes. 2200 If generating matches is potentially slow, call 2201 |complete_check()| periodically to keep Vim responsive. This 2202 is especially important for |ins-autocompletion|. 2203 F equivalent to using "F{func}", where the function is taken 2204 from the 'completefunc' option. 2205 o equivalent to "F{func}", where {func} is taken from the 2206 'omnifunc' option. If a plugin (such as an LSP client) 2207 defines 'omnifunc', it can be used through this flag. 2208 2209 Unloaded buffers are not loaded, thus their autocmds |:autocmd| are 2210 not executed, this may lead to unexpected completions from some files 2211 (gzipped files for example). Unloaded buffers are not scanned for 2212 whole-line completion. 2213 2214 The default is ".,w,b,u,t,i", which means to scan: 2215 1. the current buffer 2216 2. buffers in other windows 2217 3. other loaded buffers 2218 4. unloaded buffers 2219 5. tags 2220 6. included files 2221 2222 CTRL-N, CTRL-P, and |ins-autocompletion| can be used for any 2223 'iskeyword'-based completion (dictionary |i_CTRL-X_CTRL-K|, included 2224 patterns |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]|, and normal 2225 expansions). With the "F" and "o" flags in 'complete', non-keywords 2226 can also be completed. 2227 2228 An optional match limit can be specified for a completion source by 2229 appending a caret ("^") followed by a {count} to the source flag. 2230 For example: ".^9,w,u,t^5" limits matches from the current buffer to 9 2231 and from tags to 5. Other sources remain unlimited. 2232 Note: The match limit takes effect only during forward completion 2233 (CTRL-N) and is ignored during backward completion (CTRL-P). 2234 2235 This option cannot be set in a modeline when 'modelineexpr' is off. 2236 2237 *'completefunc'* *'cfu'* 2238 'completefunc' 'cfu' string (default: empty) 2239 local to buffer 2240 {not available when compiled without the |+eval| 2241 feature} 2242 This option specifies a function to be used for Insert mode completion 2243 with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U| 2244 See |complete-functions| for an explanation of how the function is 2245 invoked and what it should return. The value can be the name of a 2246 function, a |lambda| or a |Funcref|. See |option-value-function| for 2247 more information. 2248 This option cannot be set from a |modeline| or in the |sandbox|, for 2249 security reasons. 2250 2251 *'completefuzzycollect'* *'cfc'* 2252 'completefuzzycollect' 'cfc' string (default: empty) 2253 global 2254 DEPRECATED: This option is no longer used; changing it has no effect. 2255 When 'completeopt' contains "fuzzy", Vim will internally use the 2256 equivalent of: 2257 "keyword,files,whole_line" 2258 2259 The values below are kept for compatibility and for scripts that 2260 may read this option: 2261 2262 keyword keywords in the current file |i_CTRL-X_CTRL-N| 2263 keywords with flags ".", "w", |i_CTRL-N| |i_CTRL-P| 2264 "b", "u", "U" and "k{dict}" in 'complete' 2265 keywords in 'dictionary' |i_CTRL-X_CTRL-K| 2266 2267 files file names |i_CTRL-X_CTRL-F| 2268 2269 whole_line whole lines |i_CTRL-X_CTRL-L| 2270 2271 *'completeitemalign'* *'cia'* 2272 'completeitemalign' 'cia' string (default: "abbr,kind,menu") 2273 global 2274 A comma-separated list of strings that controls the alignment and 2275 display order of items in the popup menu during Insert mode 2276 completion. The supported values are "abbr", "kind", and "menu". 2277 These values allow customizing how |complete-items| are shown in the 2278 popup menu. Note: must always contain those three values in any 2279 order. 2280 2281 *'completeopt'* *'cot'* 2282 'completeopt' 'cot' string (default: "menu,preview") 2283 global or local to buffer |global-local| 2284 A comma-separated list of options for Insert mode completion 2285 |ins-completion|. The supported values are: 2286 2287 fuzzy Enable |fuzzy-matching| for completion candidates. This 2288 allows for more flexible and intuitive matching, where 2289 characters can be skipped and matches can be found even 2290 if the exact sequence is not typed (disabled for thesaurus 2291 completion |compl-thesaurus|). 2292 2293 longest 2294 When 'autocomplete' is not active, only the longest common 2295 prefix of the matches is inserted (disabled for thesaurus 2296 completion |compl-thesaurus|). If the popup menu is 2297 displayed, you can use CTRL-L to add more characters. 2298 Whether case is ignored depends on the type of completion. 2299 For buffer text the 'ignorecase' option applies. 2300 2301 When 'autocomplete' is active and no completion item is 2302 selected, the longest common prefix of the matches is 2303 inserted after the cursor. The prefix is taken either 2304 from all displayed items or only from items in the current 2305 buffer. The inserted text is highlighted with 2306 |hl-PreInsert|, and the cursor position does not change 2307 (similar to `"preinsert"`). Press CTRL-Y to accept. 2308 See also |preinserted()|. 2309 2310 menu Use a popup menu to show the possible completions. The 2311 menu is only shown when there is more than one match. 2312 |ins-completion-menu| 2313 2314 menuone Use the popup menu also when there is only one match. 2315 Useful when there is additional information about the 2316 match, e.g., what file it comes from. 2317 2318 nearest Matches are listed based on their proximity to the cursor 2319 position, unlike the default behavior, which only 2320 considers proximity for matches appearing below the 2321 cursor. This applies only to matches from the current 2322 buffer. No effect if "fuzzy" is present. 2323 2324 noinsert Do not insert any text for a match until the user selects 2325 a match from the menu. Only works in combination with 2326 "menu" or "menuone". No effect if "longest" is present. 2327 2328 noselect Same as "noinsert", except that no menu item is 2329 pre-selected. If both "noinsert" and "noselect" are 2330 present, "noselect" takes precedence. This is enabled 2331 automatically when 'autocomplete' is on, unless 2332 "preinsert" is also enabled. 2333 2334 nosort Disable sorting of completion candidates based on fuzzy 2335 scores when "fuzzy" is enabled. Candidates will appear 2336 in their original order. 2337 2338 popup Show extra information about the currently selected 2339 completion in a popup window. Only works in combination 2340 with "menu" or "menuone". Overrides "preview". 2341 See 'completepopup' for specifying properties. 2342 {only works when compiled with the |+textprop| feature} 2343 2344 popuphidden 2345 Just like "popup" but initially hide the popup. Use a 2346 |CompleteChanged| autocommand to fetch the info and call 2347 |popup_show()| once the popup has been filled. 2348 See the example at |complete-popuphidden|. 2349 {only works when compiled with the |+textprop| feature} 2350 2351 preinsert 2352 Inserts the text of the first completion candidate beyond 2353 the current leader, highlighted with |hl-PreInsert|. 2354 The cursor does not move. 2355 Requires "fuzzy" to be unset, and either "menuone" in 2356 'completeopt' or 'autocomplete' enabled. When 2357 'autocomplete' is enabled, this does not work if 2358 'ignorecase' is set without 'infercase'. 2359 See also |preinserted()|. 2360 2361 preview Show extra information about the currently selected 2362 completion in the preview window. Only works in 2363 combination with "menu" or "menuone". 2364 2365 Only "fuzzy", "longest", "popup", "popuphidden", "preinsert" and 2366 "preview" have an effect when 'autocomplete' is enabled. 2367 2368 This option does not apply to |cmdline-completion|. See 'wildoptions' 2369 for that. 2370 2371 *'completepopup'* *'cpp'* 2372 'completepopup' 'cpp' string (default empty) 2373 global 2374 {not available when compiled without the |+textprop| 2375 or |+quickfix| feature} 2376 When 'completeopt' contains "popup", this option specifies the 2377 properties of the info popup when it is created. If an info popup 2378 window already exists it is closed, so that the option value is 2379 applied when it is created again. 2380 2381 The option is a comma-separated list of values: 2382 align "item" (default) or "menu" 2383 border border style: 2384 "single" thin box-drawing characters 2385 "double" double-line 2386 "round" rounded corners 2387 "ascii" ASCII characters (-, |, +) 2388 "custom:X;X;X;X;X;X;X;X" 2389 eight characters separated by 2390 semicolons, in the order: top, 2391 right, bottom, left, topleft, 2392 topright, botright, botleft 2393 "on" same as "double" when 2394 'encoding' is "utf-8" and 2395 'ambiwidth' is "single", else 2396 "ascii" (default) 2397 "off" no border 2398 borderhighlight highlight group for the popup border characters 2399 close show close button: "on" (default) or "off" 2400 height maximum height of the popup 2401 highlight popup highlight group (default: PmenuSel) 2402 opacity opacity percentage 0-100 (default 100, fully 2403 opaque). When less than 100, content beneath 2404 the popup shows through. 2405 resize show resize handle: "on" (default) or "off" 2406 shadow "off" (default) or "on" using |hl-PmenuShadow| 2407 width maximum width of the popup 2408 2409 Example: > 2410 :set completepopup=height:10,border:single,highlight:InfoPopup 2411 :set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└ 2412 :set completepopup=border:round,opacity:80 2413 < 2414 When "align" is set to "item", the popup is positioned near the 2415 selected item and moves as the selection changes. 2416 When set to "menu", the popup aligns with the top of the menu (if the 2417 menu appears below the text) or with the bottom (if it appears above). 2418 2419 The close button and resize handle are shown on the popup border only 2420 when 'mouse' is enabled. 2421 2422 After creation, the info popup can be located with |popup_findinfo()| 2423 and modified using |popup_setoptions()|. See also: |complete-popup|. 2424 2425 *'completeslash'* *'csl'* 2426 'completeslash' 'csl' string (default: "") 2427 local to buffer 2428 {only for MS-Windows} 2429 When this option is set it overrules 'shellslash' for completion: 2430 - When this option is set to "slash", a forward slash is used for path 2431 completion in insert mode. This is useful when editing HTML tag, or 2432 Makefile with 'noshellslash' on MS-Windows. 2433 - When this option is set to "backslash", backslash is used. This is 2434 useful when editing a batch file with 'shellslash' set on 2435 MS-Windows. 2436 - When this option is empty, same character is used as for 2437 'shellslash'. 2438 For Insert mode completion the buffer-local value is used. For 2439 command line completion the global value is used. 2440 2441 *'completetimeout'* *'cto'* 2442 'completetimeout' 'cto' number (default 0) 2443 global 2444 Like 'autocompletetimeout', but applies to |i_CTRL-N| and |i_CTRL-P| 2445 completion. Value of 0 disables the timeout; positive values allowed. 2446 2447 *'concealcursor'* *'cocu'* 2448 'concealcursor' 'cocu' string (default: "") 2449 local to window 2450 {not available when compiled without the |+conceal| 2451 feature} 2452 Sets the modes in which text in the cursor line can also be concealed. 2453 When the current mode is listed then concealing happens just like in 2454 other lines. 2455 n Normal mode 2456 v Visual mode 2457 i Insert mode 2458 c Command line editing, for 'incsearch' 2459 2460 'v' applies to all lines in the Visual area, not only the cursor. 2461 A useful value is "nc". This is used in help files. So long as you 2462 are moving around text is concealed, but when starting to insert text 2463 or selecting a Visual area the concealed text is displayed, so that 2464 you can see what you are doing. 2465 Keep in mind that the cursor position is not always where it's 2466 displayed. E.g., when moving vertically it may change column. 2467 2468 *'conceallevel'* *'cole'* 2469 'conceallevel' 'cole' number (default 0) 2470 local to window 2471 {not available when compiled without the |+conceal| 2472 feature} 2473 Determine how text with the "conceal" syntax attribute |:syn-conceal| 2474 is shown: 2475 2476 Value Effect ~ 2477 0 Text is shown normally 2478 1 Each block of concealed text is replaced with one 2479 character. If the syntax item does not have a custom 2480 replacement character defined (see |:syn-cchar|) the 2481 character defined in 'listchars' is used (default is a 2482 space). 2483 It is highlighted with the "Conceal" highlight group. 2484 2 Concealed text is completely hidden unless it has a 2485 custom replacement character defined (see 2486 |:syn-cchar|). 2487 3 Concealed text is completely hidden. 2488 2489 Note: in the cursor line concealed text is not hidden, so that you can 2490 edit and copy the text. This can be changed with the 'concealcursor' 2491 option. 2492 2493 *'confirm'* *'cf'* *'noconfirm'* *'nocf'* 2494 'confirm' 'cf' boolean (default off) 2495 global 2496 When 'confirm' is on, certain operations that would normally 2497 fail because of unsaved changes to a buffer, e.g. ":q" and ":e", 2498 instead raise a |dialog| asking if you wish to save the current 2499 file(s). You can still use a ! to unconditionally |abandon| a buffer. 2500 If 'confirm' is off you can still activate confirmation for one 2501 command only (this is most useful in mappings) with the |:confirm| 2502 command. 2503 Also see the |confirm()| function and the 'v' flag in 'guioptions'. 2504 2505 *'conskey'* *'consk'* *'noconskey'* *'noconsk'* 2506 'conskey' 'consk' boolean (default off) 2507 global 2508 This was for MS-DOS and is no longer supported. 2509 2510 *'copyindent'* *'ci'* *'nocopyindent'* *'noci'* 2511 'copyindent' 'ci' boolean (default off) 2512 local to buffer 2513 Copy the structure of the existing lines indent when autoindenting a 2514 new line. Normally the new indent is reconstructed by a series of 2515 tabs followed by spaces as required (unless 'expandtab' is enabled, 2516 in which case only spaces are used). Enabling this option makes the 2517 new line copy whatever characters were used for indenting on the 2518 existing line. 'expandtab' has no effect on these characters, a Tab 2519 remains a Tab. If the new indent is greater than on the existing 2520 line, the remaining space is filled in the normal manner. 2521 NOTE: This option is reset when 'compatible' is set. 2522 Also see 'preserveindent'. 2523 2524 *'cpoptions'* *'cpo'* *cpo* 2525 'cpoptions' 'cpo' string (Vim default: "aABceFsz", 2526 Vi default: all flags, except "#{|&/\.~" 2527 |$VIM_POSIX|: all flags) 2528 global 2529 A sequence of single character flags. When a character is present 2530 this indicates Vi-compatible behavior. This is used for things where 2531 not being Vi-compatible is mostly or sometimes preferred. 2532 'cpoptions' stands for "compatible-options". 2533 Commas can be added for readability. 2534 To avoid problems with flags that are added in the future, use the 2535 "+=" and "-=" feature of ":set" |add-option-flags|. 2536 2537 NOTE: This option is set to the Vi default value when 'compatible' is 2538 set and to the Vim default value when 'compatible' is reset. 2539 2540 NOTE: In a |Vim9| script, when `vim9script` is encountered, the value 2541 is saved, 'cpoptions' is set to the Vim default, and the saved value 2542 is restored at the end of the script. Changes to the value of 2543 'cpoptions' will be applied to the saved value, but keep in mind that 2544 removing a flag that is not present when 'cpoptions' is changed has no 2545 effect. In the |.vimrc| file the value is not restored, thus using 2546 `vim9script` in the |.vimrc| file results in using the Vim default. 2547 2548 NOTE: This option is set to the POSIX default value at startup when 2549 the Vi default value would be used and the $VIM_POSIX environment 2550 variable exists |posix|. This means Vim tries to behave like the 2551 POSIX specification. 2552 2553 contains behavior ~ 2554 *cpo-a* 2555 a When included, a ":read" command with a file name 2556 argument will set the alternate file name for the 2557 current window. 2558 *cpo-A* 2559 A When included, a ":write" command with a file name 2560 argument will set the alternate file name for the 2561 current window. 2562 *cpo-b* 2563 b "\|" in a ":map" command is recognized as the end of 2564 the map command. The '\' is included in the mapping, 2565 the text after the '|' is interpreted as the next 2566 command. Use a CTRL-V instead of a backslash to 2567 include the '|' in the mapping. Applies to all 2568 mapping, abbreviation, menu and autocmd commands. 2569 See also |map_bar|. 2570 *cpo-B* 2571 B A backslash has no special meaning in mappings, 2572 abbreviations, user commands and the "to" part of the 2573 menu commands. Remove this flag to be able to use a 2574 backslash like a CTRL-V. For example, the command 2575 ":map X \<Esc>" results in X being mapped to: 2576 'B' included: "\^[" (^[ is a real <Esc>) 2577 'B' excluded: "<Esc>" (5 characters) 2578 ('<' excluded in both cases) 2579 *cpo-c* 2580 c Searching continues at the end of any match at the 2581 cursor position, but not further than the start of the 2582 next line. When not present searching continues 2583 one character from the cursor position. With 'c' 2584 "abababababab" only gets three matches when repeating 2585 "/abab", without 'c' there are five matches. 2586 *cpo-C* 2587 C Do not concatenate sourced lines that start with a 2588 backslash. See |line-continuation|. 2589 *cpo-d* 2590 d Using "./" in the 'tags' option doesn't mean to use 2591 the tags file relative to the current file, but the 2592 tags file in the current directory. 2593 *cpo-D* 2594 D Can't use CTRL-K to enter a digraph after Normal mode 2595 commands with a character argument, like |r|, |f| and 2596 |t|. 2597 *cpo-e* 2598 e When executing a register with ":@r", always add a 2599 <CR> to the last line, also when the register is not 2600 linewise. If this flag is not present, the register 2601 is not linewise and the last line does not end in a 2602 <CR>, then the last line is put on the command-line 2603 and can be edited before hitting <CR>. 2604 *cpo-E* 2605 E It is an error when using "y", "d", "c", "g~", "gu" or 2606 "gU" on an Empty region. The operators only work when 2607 at least one character is to be operated on. Example: 2608 This makes "y0" fail in the first column. 2609 *cpo-f* 2610 f When included, a ":read" command with a file name 2611 argument will set the file name for the current 2612 buffer, if the current buffer doesn't have a file name 2613 yet. 2614 *cpo-F* 2615 F When included, a ":write" command with a file name 2616 argument will set the file name for the current 2617 buffer, if the current buffer doesn't have a file name 2618 yet. Also see |cpo-P|. 2619 *cpo-g* 2620 g Goto line 1 when using ":edit" without argument. 2621 *cpo-H* 2622 H When using "I" on a line with only blanks, insert 2623 before the last blank. Without this flag insert after 2624 the last blank. 2625 *cpo-i* 2626 i When included, interrupting the reading of a file will 2627 leave it modified. 2628 *cpo-I* 2629 I When moving the cursor up or down just after inserting 2630 indent for 'autoindent', do not delete the indent. 2631 *cpo-j* 2632 j When joining lines, only add two spaces after a '.', 2633 not after '!' or '?'. Also see 'joinspaces'. 2634 *cpo-J* 2635 J A |sentence| has to be followed by two spaces after 2636 the '.', '!' or '?'. A <Tab> is not recognized as 2637 white space. 2638 *cpo-k* 2639 k Disable the recognition of raw key codes in 2640 mappings, abbreviations, and the "to" part of menu 2641 commands. For example, if <Key> sends ^[OA (where ^[ 2642 is <Esc>), the command ":map X ^[OA" results in X 2643 being mapped to: 2644 'k' included: "^[OA" (3 characters) 2645 'k' excluded: "<Key>" (one key code) 2646 Also see the '<' flag below. 2647 *cpo-K* 2648 K Don't wait for a key code to complete when it is 2649 halfway a mapping. This breaks mapping <F1><F1> when 2650 only part of the second <F1> has been read. It 2651 enables cancelling the mapping by typing <F1><Esc>. 2652 *cpo-l* 2653 l Backslash in a [] range in a search pattern is taken 2654 literally, only "\]", "\^", "\-" and "\\" are special. 2655 See |/[]| 2656 'l' included: "/[ \t]" finds <Space>, '\' and 't' 2657 'l' excluded: "/[ \t]" finds <Space> and <Tab> 2658 Also see |cpo-\|. 2659 *cpo-L* 2660 L When the 'list' option is set, 'wrapmargin', 2661 'textwidth', 'softtabstop' and Virtual Replace mode 2662 (see |gR|) count a <Tab> as two characters, instead of 2663 the normal behavior of a <Tab>. 2664 *cpo-m* 2665 m When included, a showmatch will always wait half a 2666 second. When not included, a showmatch will wait half 2667 a second or until a character is typed. 'showmatch' 2668 *cpo-M* 2669 M When excluded, "%" matching will take backslashes into 2670 account. Thus in "( \( )" and "\( ( \)" the outer 2671 parenthesis match. When included "%" ignores 2672 backslashes, which is Vi compatible. 2673 *cpo-n* 2674 n When included, the column used for 'number' and 2675 'relativenumber' will also be used for text of wrapped 2676 lines. 2677 *cpo-o* 2678 o Line offset to search command is not remembered for 2679 next search. 2680 *cpo-O* 2681 O Don't complain if a file is being overwritten, even 2682 when it didn't exist when editing it. This is a 2683 protection against a file unexpectedly created by 2684 someone else. Vi didn't complain about this. 2685 *cpo-p* 2686 p Vi compatible Lisp indenting. When not present, a 2687 slightly better algorithm is used. 2688 *cpo-P* 2689 P When included, a ":write" command that appends to a 2690 file will set the file name for the current buffer, if 2691 the current buffer doesn't have a file name yet and 2692 the 'F' flag is also included |cpo-F|. 2693 *cpo-q* 2694 q When joining multiple lines leave the cursor at the 2695 position where it would be when joining two lines. 2696 *cpo-r* 2697 r Redo ("." command) uses "/" to repeat a search 2698 command, instead of the actually used search string. 2699 *cpo-R* 2700 R Remove marks from filtered lines. Without this flag 2701 marks are kept like |:keepmarks| was used. 2702 *cpo-s* 2703 s Set buffer options when entering the buffer for the 2704 first time. This is like it is in Vim version 3.0. 2705 And it is the default. If not present the options are 2706 set when the buffer is created. 2707 *cpo-S* 2708 S Set buffer options always when entering a buffer 2709 (except 'readonly', 'fileformat', 'filetype' and 2710 'syntax'). This is the (most) Vi compatible setting. 2711 The options are set to the values in the current 2712 buffer. When you change an option and go to another 2713 buffer, the value is copied. Effectively makes the 2714 buffer options global to all buffers. 2715 2716 's' 'S' copy buffer options 2717 no no when buffer created 2718 yes no when buffer first entered (default) 2719 X yes each time when buffer entered (vi comp.) 2720 *cpo-t* 2721 t Search pattern for the tag command is remembered for 2722 "n" command. Otherwise Vim only puts the pattern in 2723 the history for search pattern, but doesn't change the 2724 last used search pattern. 2725 *cpo-u* 2726 u Undo is Vi compatible. See |undo-two-ways|. 2727 *cpo-v* 2728 v Backspaced characters remain visible on the screen in 2729 Insert mode. Without this flag the characters are 2730 erased from the screen right away. With this flag the 2731 screen newly typed text overwrites backspaced 2732 characters. 2733 *cpo-w* 2734 w When using "cw" on a blank character, only change one 2735 character and not all blanks until the start of the 2736 next word. 2737 *cpo-W* 2738 W Don't overwrite a readonly file. When omitted, ":w!" 2739 overwrites a readonly file, if possible. 2740 *cpo-x* 2741 x <Esc> on the command-line executes the command-line. 2742 The default in Vim is to abandon the command-line, 2743 because <Esc> normally aborts a command. |c_<Esc>| 2744 *cpo-X* 2745 X When using a count with "R" the replaced text is 2746 deleted only once. Also when repeating "R" with "." 2747 and a count. 2748 *cpo-y* 2749 y A yank command can be redone with ".". Think twice if 2750 you really want to use this, it may break some 2751 plugins, since most people expect "." to only repeat a 2752 change. 2753 *cpo-Z* 2754 Z When using "w!" while the 'readonly' option is set, 2755 don't reset 'readonly'. 2756 *cpo-z* 2757 z Special casing the "cw" and "d" command (see |cw| and 2758 |d-special|). 2759 *cpo-!* 2760 ! When redoing a filter command, use the last used 2761 external command, whatever it was. Otherwise the last 2762 used -filter- command is used. 2763 *cpo-$* 2764 $ When making a change to one line, don't redisplay the 2765 line, but put a '$' at the end of the changed text. 2766 The changed text will be overwritten when you type the 2767 new text. The line is redisplayed if you type any 2768 command that moves the cursor from the insertion 2769 point. 2770 *cpo-%* 2771 % Vi-compatible matching is done for the "%" command. 2772 Does not recognize "#if", "#endif", etc. 2773 Does not recognize "/*" and "*/". 2774 Parens inside single and double quotes are also 2775 counted, causing a string that contains a paren to 2776 disturb the matching. For example, in a line like 2777 "if (strcmp("foo(", s))" the first paren does not 2778 match the last one. When this flag is not included, 2779 parens inside single and double quotes are treated 2780 specially. When matching a paren outside of quotes, 2781 everything inside quotes is ignored. When matching a 2782 paren inside quotes, it will find the matching one (if 2783 there is one). This works very well for C programs. 2784 This flag is also used for other features, such as 2785 C-indenting. 2786 *cpo--* 2787 - When included, a vertical movement command fails when 2788 it would go above the first line or below the last 2789 line. Without it the cursor moves to the first or 2790 last line, unless it already was in that line. 2791 Applies to the commands "-", "k", CTRL-P, "+", "j", 2792 CTRL-N, CTRL-J and ":1234". 2793 *cpo-+* 2794 + When included, a ":write file" command will reset the 2795 'modified' flag of the buffer, even though the buffer 2796 itself may still be different from its file. 2797 *cpo-star* 2798 * Use ":*" in the same way as ":@". When not included, 2799 ":*" is an alias for ":'<,'>", select the Visual area. 2800 *cpo-<* 2801 < Disable the recognition of special key codes in |<>| 2802 form in mappings, abbreviations, and the "to" part of 2803 menu commands. For example, the command 2804 ":map X <Tab>" results in X being mapped to: 2805 '<' included: "<Tab>" (5 characters) 2806 '<' excluded: "^I" (^I is a real <Tab>) 2807 Also see the 'k' flag above. 2808 *cpo->* 2809 > When appending to a register, put a line break before 2810 the appended text. 2811 *cpo-;* 2812 ; When using |,| or |;| to repeat the last |t| search 2813 and the cursor is right in front of the searched 2814 character, the cursor won't move. When not included, 2815 the cursor would skip over it and jump to the 2816 following occurrence. 2817 *cpo-~* 2818 ~ When included, don't resolve symbolic links when 2819 changing directory with |:cd|, |:lcd|, or |:tcd|. 2820 This preserves the symbolic link path in buffer names 2821 and when displaying the current directory. When 2822 excluded (default), symbolic links are resolved to 2823 their target paths. 2824 2825 POSIX flags. These are not included in the Vi default value, except 2826 when $VIM_POSIX was set on startup. |posix| 2827 2828 contains behavior ~ 2829 *cpo-#* 2830 # A count before "D", "o" and "O" has no effect. 2831 *cpo-&* 2832 & When ":preserve" was used keep the swap file when 2833 exiting normally while this buffer is still loaded. 2834 This flag is tested when exiting. 2835 *cpo-\* 2836 \ Backslash in a [] range in a search pattern is taken 2837 literally, only "\]" is special See |/[]| 2838 '\' included: "/[ \-]" finds <Space>, '\' and '-' 2839 '\' excluded: "/[ \-]" finds <Space> and '-' 2840 Also see |cpo-l|. 2841 *cpo-/* 2842 / When "%" is used as the replacement string in a |:s| 2843 command, use the previous replacement string. |:s%| 2844 *cpo-{* 2845 { The |{| and |}| commands also stop at a "{" character 2846 at the start of a line. 2847 *cpo-.* 2848 . The ":chdir" and ":cd" commands fail if the current 2849 buffer is modified, unless ! is used. Vim doesn't 2850 need this, since it remembers the full path of an 2851 opened file. 2852 *cpo-bar* 2853 | The value of the $LINES and $COLUMNS environment 2854 variables overrule the terminal size values obtained 2855 with system specific functions. 2856 2857 *'cryptmethod'* *'cm'* 2858 'cryptmethod' 'cm' string (default "blowfish2") 2859 global or local to buffer |global-local| 2860 Method used for encryption when the buffer is written to a file: 2861 *pkzip* 2862 zip PkZip compatible method. A weak kind of encryption. 2863 Backwards compatible with Vim 7.2 and older. 2864 Only use if you need to be backwards compatible. 2865 *blowfish* 2866 blowfish Blowfish method. Medium strong encryption but it has 2867 an implementation flaw. Requires Vim 7.3 or later, 2868 files can NOT be read by Vim 7.2 and older. This adds 2869 a "seed" to the file, every time you write the file 2870 the encrypted bytes will be different. 2871 Obsolete, please do no longer use. 2872 *blowfish2* 2873 blowfish2 Blowfish method. Medium strong encryption. Requires 2874 Vim 7.4.401 or later, files can NOT be read by Vim 7.3 2875 and older. This adds a "seed" to the file, every time 2876 you write the file the encrypted bytes will be 2877 different. The whole undo file is encrypted, not just 2878 the pieces of text. 2879 *E1193* *E1194* *E1195* *E1196* *E1230* 2880 *E1197* *E1198* *E1199* *E1200* *E1201* 2881 xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication 2882 Code. Medium strong to strong encryption. 2883 Encryption is provided by the libsodium library, it 2884 requires Vim to be built with |+sodium|. 2885 It adds a seed and a message authentication code (MAC) 2886 to the file. This needs at least a Vim 8.2.3022 to 2887 read the encrypted file. 2888 Encryption of swap files is not supported, therefore 2889 no swap file will be used when xchacha20 encryption is 2890 enabled. 2891 Encryption of undo files is not yet supported, 2892 therefore no undo file will currently be written. 2893 CAREFUL: Files written with this method might have to 2894 be read back with the same version of Vim if the 2895 binary format changes later. 2896 Obsolete, please do no longer use. 2897 xchacha20v2 Same algorithm as with "xchacha20" that correctly 2898 stores the key derivation parameters together with the 2899 encrypted file. Should work better in case the 2900 parameters in the libsodium library ever change. 2901 STILL EXPERIMENTAL: Files written with this method 2902 might have to be read back with the same version of 2903 Vim if the binary format changes later. 2904 2905 You should use "blowfish2", also to re-encrypt older files. The 2906 "xchacha20" method provides better encryption, but it does not work 2907 with all versions of Vim. 2908 2909 When reading an encrypted file 'cryptmethod' will be set automatically 2910 to the detected method of the file being read. Thus if you write it 2911 without changing 'cryptmethod' the same method will be used. 2912 Changing 'cryptmethod' does not mark the file as modified, you have to 2913 explicitly write it, you don't get a warning unless there are other 2914 modifications. Also see |:X|. 2915 2916 When setting the global value to an empty string, it will end up with 2917 the value "blowfish2". When setting the local value to an empty 2918 string the buffer will use the global value. 2919 2920 When a new encryption method is added in a later version of Vim, and 2921 the current version does not recognize it, you will get *E821* . 2922 You need to edit this file with the later version of Vim. 2923 2924 *'cscopepathcomp'* *'cspc'* 2925 'cscopepathcomp' 'cspc' number (default 0) 2926 global 2927 {not available when compiled without the |+cscope| 2928 feature} 2929 Determines how many components of the path to show in a list of tags. 2930 See |cscopepathcomp|. 2931 NOTE: This option is set to 0 when 'compatible' is set. 2932 2933 *'cscopeprg'* *'csprg'* 2934 'cscopeprg' 'csprg' string (default "cscope") 2935 global 2936 {not available when compiled without the |+cscope| 2937 feature} 2938 Specifies the command to execute cscope. See |cscopeprg|. 2939 This option cannot be set from a |modeline| or in the |sandbox|, for 2940 security reasons. 2941 2942 *'cscopequickfix'* *'csqf'* 2943 'cscopequickfix' 'csqf' string (default "") 2944 global 2945 {not available when compiled without the |+cscope| 2946 or |+quickfix| features} 2947 Specifies whether to use quickfix window to show cscope results. 2948 See |cscopequickfix|. 2949 2950 *'cscoperelative'* *'csre'* *'nocscoperelative'* *'nocsre'* 2951 'cscoperelative' 'csre' boolean (default off) 2952 global 2953 {not available when compiled without the |+cscope| 2954 feature} 2955 In the absence of a prefix (-P) for cscope, setting this option 2956 enables to use the basename of cscope.out path as the prefix. 2957 See |cscoperelative|. 2958 NOTE: This option is reset when 'compatible' is set. 2959 2960 *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'* 2961 'cscopetag' 'cst' boolean (default off) 2962 global 2963 {not available when compiled without the |+cscope| 2964 feature} 2965 Use cscope for tag commands. See |cscope-options|. 2966 NOTE: This option is reset when 'compatible' is set. 2967 2968 *'cscopetagorder'* *'csto'* 2969 'cscopetagorder' 'csto' number (default 0) 2970 global 2971 {not available when compiled without the |+cscope| 2972 feature} 2973 Determines the order in which ":cstag" performs a search. See 2974 |cscopetagorder|. 2975 NOTE: This option is set to 0 when 'compatible' is set. 2976 2977 *'cscopeverbose'* *'csverb'* 2978 *'nocscopeverbose'* *'nocsverb'* 2979 'cscopeverbose' 'csverb' boolean (default off) 2980 global 2981 {not available when compiled without the |+cscope| 2982 feature} 2983 Give messages when adding a cscope database. See |cscopeverbose|. 2984 NOTE: This option is reset when 'compatible' is set. 2985 2986 *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'* 2987 'cursorbind' 'crb' boolean (default off) 2988 local to window 2989 When this option is set, as the cursor in the current 2990 window moves other cursorbound windows (windows that also have 2991 this option set) move their cursors to the corresponding line and 2992 column. This option is useful for viewing the 2993 differences between two versions of a file (see 'diff'); in diff mode, 2994 inserted and deleted lines (though not characters within a line) are 2995 taken into account. 2996 2997 *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'* 2998 'cursorcolumn' 'cuc' boolean (default off) 2999 local to window 3000 {not available when compiled without the |+syntax| 3001 feature} 3002 Highlight the screen column of the cursor with CursorColumn 3003 |hl-CursorColumn|. Useful to align text. Will make screen redrawing 3004 slower. 3005 If you only want the highlighting in the current window you can use 3006 these autocommands: > 3007 au WinLeave * set nocursorline nocursorcolumn 3008 au WinEnter * set cursorline cursorcolumn 3009 < 3010 3011 *'cursorline'* *'cul'* *'nocursorline'* *'nocul'* 3012 'cursorline' 'cul' boolean (default off) 3013 local to window 3014 {not available when compiled without the |+syntax| 3015 feature} 3016 Highlighting used for the line the cursor is on: 3017 3018 CursorLine the text line |hl-CursorLine| 3019 CursorLineFold the fold column |hl-CursorLineFold| 3020 CursorLineSign the sign column |hl-CursorLineSign| 3021 CursorLineNr the line number, when 'cursorlineopt' contains 3022 "number" |hl-CursorLineNr| 3023 3024 Useful to easily spot the cursor. Will make screen redrawing slower. 3025 When Visual mode is active the highlighting isn't used to make it 3026 easier to see the selected text. 3027 3028 *'cursorlineopt'* *'culopt'* 3029 'cursorlineopt' 'culopt' string (default: "number,line") 3030 local to window 3031 {not available when compiled without the |+syntax| 3032 feature} 3033 Comma-separated list of settings for how 'cursorline' is displayed. 3034 Valid values: 3035 "line" Highlight the text line of the cursor with 3036 CursorLine |hl-CursorLine|. 3037 "screenline" Highlight only the screen line of the cursor with 3038 CursorLine |hl-CursorLine|. 3039 "number" Highlight the line number of the cursor with 3040 CursorLineNr |hl-CursorLineNr|. 3041 3042 Special value: 3043 "both" Alias for the values "line,number". 3044 3045 "line" and "screenline" cannot be used together. 3046 3047 *'debug'* 3048 'debug' string (default "") 3049 global 3050 These values can be used: 3051 msg Error messages that would otherwise be omitted will be given 3052 anyway. 3053 throw Error messages that would otherwise be omitted will be given 3054 anyway and also throw an exception and set |v:errmsg|. 3055 beep A message will be given when otherwise only a beep would be 3056 produced. 3057 The values can be combined, separated by a comma. 3058 "msg" and "throw" are useful for debugging 'foldexpr', 'formatexpr' or 3059 'indentexpr'. 3060 3061 *'define'* *'def'* 3062 'define' 'def' string (default "^\s*#\s*define") 3063 global or local to buffer |global-local| 3064 Pattern to be used to find a macro definition. It is a search 3065 pattern, just like for the "/" command. This option is used for the 3066 commands like "[i" and "[d" |include-search|. The 'isident' option is 3067 used to recognize the defined name after the match: 3068 {match with 'define'}{non-ID chars}{defined name}{non-ID char} 3069 See |option-backslash| about inserting backslashes to include a space 3070 or backslash. 3071 The default value is for C programs. For C++ this value would be 3072 useful, to include const type declarations: > 3073 ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\) 3074 < You can also use "\ze" just before the name and continue the pattern 3075 to check what is following. E.g. for Javascript, if a function is 3076 defined with "func_name = function(args)": > 3077 ^\s*\ze\i\+\s*=\s*function( 3078 < If the function is defined with "func_name : function() {...": > 3079 ^\s*\ze\i\+\s*[:]\s*(*function\s*( 3080 < When using the ":set" command, you need to double the backslashes! 3081 To avoid that use `:let` with a single quote string: > 3082 let &l:define = '^\s*\ze\k\+\s*=\s*function(' 3083 < 3084 3085 *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'* 3086 'delcombine' 'deco' boolean (default off) 3087 global 3088 If editing Unicode and this option is set, backspace and Normal mode 3089 "x" delete each combining character on its own. When it is off (the 3090 default) the character along with its combining characters are 3091 deleted. 3092 Note: When 'delcombine' is set "xx" may work differently from "2x"! 3093 3094 This is useful for Arabic, Hebrew and many other languages where one 3095 may have combining characters overtop of base characters, and want 3096 to remove only the combining ones. 3097 NOTE: This option is reset when 'compatible' is set. 3098 3099 *'dictionary'* *'dict'* 3100 'dictionary' 'dict' string (default "") 3101 global or local to buffer |global-local| 3102 List of file names, separated by commas, that are used to lookup words 3103 for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should 3104 contain a list of words. This can be one word per line, or several 3105 words per line, separated by non-keyword characters (white space is 3106 preferred). Maximum line length is 510 bytes. 3107 3108 When this option is empty or an entry "spell" is present, and spell 3109 checking is enabled, words in the word lists for the currently active 3110 'spelllang' are used. See |spell|. 3111 3112 To include a comma in a file name precede it with a backslash. Spaces 3113 after a comma are ignored, otherwise spaces are included in the file 3114 name. See |option-backslash| about using backslashes. 3115 Environment variables are expanded |:set_env|. 3116 This has nothing to do with the |Dictionary| variable type. 3117 Where to find a list of words? 3118 - On FreeBSD, there is the file "/usr/share/dict/words". 3119 - In the Simtel archive, look in the "msdos/linguist" directory. 3120 - In "miscfiles" of the GNU collection. 3121 The use of |:set+=| and |:set-=| is preferred when adding or removing 3122 directories from the list. This avoids problems when a future version 3123 uses another default. 3124 Backticks cannot be used in this option for security reasons. 3125 3126 *'diff'* *'nodiff'* 3127 'diff' boolean (default off) 3128 local to window 3129 {not available when compiled without the |+diff| 3130 feature} 3131 Join the current window in the group of windows that shows differences 3132 between files. See |vimdiff|. 3133 3134 *'dia'* *'diffanchors'* *E1549* 3135 'diffanchors' 'dia' string (default "") 3136 global or local to buffer |global-local| 3137 List of {address} in each buffer, separated by commas, that are 3138 considered anchors when used for diffing. It's valid to specify "$+1" 3139 for 1 past the last line. "%" cannot be used for this option. There 3140 can be at most 20 anchors set for each buffer. 3141 3142 Each anchor line splits the buffer (the split happens above the 3143 anchor), with each part being diff'ed separately before the final 3144 result is joined. When more than one {address} are provided, the 3145 anchors will be sorted internally by line number. If using buffer 3146 local options, each buffer should have the same number of anchors 3147 (extra anchors will be ignored). This option is only used when 3148 'diffopt' has "anchor" set. See |diff-anchors| for more details and 3149 examples. 3150 *E1550* 3151 If some of the {address} do not resolve to a line in each buffer (e.g. 3152 a pattern search that does not match anything), none of the anchors 3153 will be used. 3154 *E1562* 3155 Diff anchors can only be used when there are no hidden diff buffers. 3156 3157 *'dex'* *'diffexpr'* 3158 'diffexpr' 'dex' string (default "") 3159 global 3160 {not available when compiled without the |+diff| 3161 feature} 3162 Expression which is evaluated to obtain a diff file (either ed-style 3163 or unified-style) from two versions of a file. See |diff-diffexpr|. 3164 This option cannot be set from a |modeline| or in the |sandbox|, for 3165 security reasons. 3166 3167 *'dip'* *'diffopt'* 3168 'diffopt' 'dip' string (default "internal,filler,closeoff, 3169 indent-heuristic,inline:char") 3170 global 3171 {not available when compiled without the |+diff| 3172 feature} 3173 Option settings for diff mode. It can consist of the following items. 3174 All are optional. Items must be separated by a comma. 3175 3176 algorithm:{text} Use the specified diff algorithm with the 3177 internal diff engine. Currently supported 3178 algorithms are: 3179 myers the default algorithm 3180 minimal spend extra time to generate the 3181 smallest possible diff 3182 patience patience diff algorithm 3183 histogram histogram diff algorithm 3184 3185 anchor Anchor specific lines in each buffer to be 3186 aligned with each other if 'diffanchors' is 3187 set. See |diff-anchors|. 3188 3189 closeoff When a window is closed where 'diff' is set 3190 and there is only one window remaining in the 3191 same tab page with 'diff' set, execute 3192 `:diffoff` in that window. This undoes a 3193 `:diffsplit` command. 3194 3195 context:{n} Use a context of {n} lines between a change 3196 and a fold that contains unchanged lines. 3197 When omitted a context of six lines is used. 3198 When using zero the context is actually one, 3199 since folds require a line in between, also 3200 for a deleted line. Set it to a very large 3201 value (999999) to disable folding completely. 3202 See |fold-diff|. 3203 3204 filler Show filler lines, to keep the text 3205 synchronized with a window that has inserted 3206 lines at the same position. Mostly useful 3207 when windows are side-by-side and 'scrollbind' 3208 is set. 3209 3210 foldcolumn:{n} Set the 'foldcolumn' option to {n} when 3211 starting diff mode. Without this 2 is used. 3212 3213 followwrap Follow the 'wrap' option and leave as it is. 3214 3215 horizontal Start diff mode with horizontal splits (unless 3216 explicitly specified otherwise). 3217 3218 hiddenoff Do not use diff mode for a buffer when it 3219 becomes hidden. 3220 3221 iblank Ignore changes where lines are all blank. 3222 Adds the "-B" flag to the "diff" command if 3223 'diffexpr' is empty. Check the documentation 3224 of the "diff" command for what this does 3225 exactly. 3226 NOTE: the diff windows will get out of sync, 3227 because no differences between blank lines are 3228 taken into account. 3229 3230 icase Ignore changes in case of text. "a" and "A" 3231 are considered the same. Adds the "-i" flag 3232 to the "diff" command if 'diffexpr' is empty. 3233 3234 indent-heuristic 3235 Use the indent heuristic for the internal 3236 diff library. 3237 3238 inline:{text} Highlight inline differences within a change. 3239 See |view-diffs|. Supported values are: 3240 3241 none Do not perform inline highlighting. 3242 simple Highlight from first different 3243 character to the last one in each 3244 line. This is the default if no 3245 `inline:` value is set. 3246 char Use internal diff to perform a 3247 character-wise diff and highlight the 3248 difference. 3249 word Use internal diff to perform a 3250 |word|-wise diff and highlight the 3251 difference. Non-alphanumeric 3252 multi-byte characters such as emoji 3253 and CJK characters are considered 3254 individual words. Small gaps of 3255 non-word characters (5 bytes or less) 3256 between changes are merged into a 3257 single highlight block. 3258 3259 internal Use the internal diff library. This is 3260 ignored when 'diffexpr' is set. *E960* 3261 When running out of memory when writing a 3262 buffer or the diff is larger than 1 GB this 3263 item will be ignored for diffs involving that 3264 buffer. Set the 'verbose' option to see when 3265 this happens. 3266 3267 iwhite Ignore changes in amount of white space. Adds 3268 the "-b" flag to the "diff" command if 3269 'diffexpr' is empty. Check the documentation 3270 of the "diff" command for what this does 3271 exactly. It should ignore adding trailing 3272 white space, but not leading white space. 3273 3274 iwhiteall Ignore all white space changes. Adds 3275 the "-w" flag to the "diff" command if 3276 'diffexpr' is empty. Check the documentation 3277 of the "diff" command for what this does 3278 exactly. 3279 3280 iwhiteeol Ignore white space changes at end of line. 3281 Adds the "-Z" flag to the "diff" command if 3282 'diffexpr' is empty. Check the documentation 3283 of the "diff" command for what this does 3284 exactly. 3285 3286 linematch:{n} Align and mark changes between the most 3287 similar lines between the buffers. When the 3288 total number of lines in the diff hunk exceeds 3289 {n}, the lines will not be aligned because for 3290 very large diff hunks there will be a 3291 noticeable lag. A reasonable setting is 3292 "linematch:60", as this will enable alignment 3293 for a 2 buffer diff hunk of 30 lines each, or 3294 a 3 buffer diff hunk of 20 lines each. 3295 Implicitly sets "filler" when this is set. 3296 3297 vertical Start diff mode with vertical splits (unless 3298 explicitly specified otherwise). 3299 3300 Examples: > 3301 :set diffopt=internal,filler,context:4 3302 :set diffopt= 3303 :set diffopt=internal,filler,foldcolumn:3 3304 :set diffopt-=internal " do NOT use the internal diff parser 3305 < 3306 *'digraph'* *'dg'* *'nodigraph'* *'nodg'* 3307 'digraph' 'dg' boolean (default off) 3308 global 3309 {not available when compiled without the |+digraphs| 3310 feature} 3311 Enable the entering of digraphs in Insert mode with {char1} <BS> 3312 {char2}. See |digraphs|. 3313 NOTE: This option is reset when 'compatible' is set. 3314 3315 *'directory'* *'dir'* 3316 'directory' 'dir' string (default for Amiga: ".,t:", 3317 for Win32: ".,$TEMP,c:\tmp,c:\temp" 3318 for Unix: ".,~/tmp,/var/tmp,/tmp") 3319 global 3320 List of directory names for the swap file, separated with commas. 3321 Recommended value: ".,~/vimswap//" - this will put the swap file next 3322 to the edited file if possible, and in your personal swap directory 3323 otherwise. Make sure "~/vimswap//" is only readable for you. 3324 3325 Possible items: 3326 - The swap file will be created in the first directory where this is 3327 possible. 3328 - Empty means that no swap file will be used (recovery is 3329 impossible!) and no |E303| error will be given. 3330 - A directory "." means to put the swap file in the same directory as 3331 the edited file. On Unix, a dot is prepended to the file name, so 3332 it doesn't show in a directory listing. On MS-Windows the "hidden" 3333 attribute is set and a dot prepended if possible. 3334 - A directory starting with "./" (or ".\" for MS-Windows) means to put 3335 the swap file relative to where the edited file is. The leading "." 3336 is replaced with the path name of the edited file. 3337 - For Unix and Win32, if a directory ends in two path separators "//", 3338 the swap file name will be built from the complete path to the file 3339 with all path separators replaced by percent '%' signs (including 3340 the colon following the drive letter on Win32). This will ensure 3341 file name uniqueness in the preserve directory. 3342 On Win32, it is also possible to end with "\\". However, When a 3343 separating comma is following, you must use "//", since "\\" will 3344 include the comma in the file name. Therefore it is recommended to 3345 use '//', instead of '\\'. 3346 - Spaces after the comma are ignored, other spaces are considered part 3347 of the directory name. To have a space at the start of a directory 3348 name, precede it with a backslash. 3349 - To include a comma in a directory name precede it with a backslash. 3350 - A directory name may end in an ':' or '/'. 3351 - Environment variables are expanded |:set_env|. 3352 - Careful with '\' characters, type one before a space, type two to 3353 get one in the option (see |option-backslash|), for example: > 3354 :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces 3355 < - For backwards compatibility with Vim version 3.0 a '>' at the start 3356 of the option is removed. 3357 Using "." first in the list is recommended. This means that editing 3358 the same file twice will result in a warning. Using "/tmp" on Unix is 3359 discouraged: When the system crashes you lose the swap file. 3360 "/var/tmp" is often not cleared when rebooting, thus is a better 3361 choice than "/tmp". But others on the computer may be able to see the 3362 files, and it can contain a lot of files, your swap files get lost in 3363 the crowd. That is why a "tmp" directory in your home directory is 3364 tried first. 3365 The use of |:set+=| and |:set-=| is preferred when adding or removing 3366 directories from the list. This avoids problems when a future version 3367 uses another default. 3368 This option cannot be set from a |modeline| or in the |sandbox|, for 3369 security reasons. 3370 3371 *'display'* *'dy'* 3372 'display' 'dy' string (default "", set to "truncate" in 3373 |defaults.vim|) 3374 global 3375 Change the way text is displayed. This is a comma-separated list of 3376 flags: 3377 lastline When included, as much as possible of the last line 3378 in a window will be displayed. "@@@" is put in the 3379 last columns of the last screen line to indicate the 3380 rest of the line is not displayed. 3381 truncate Like "lastline", but "@@@" is displayed in the first 3382 column of the last screen line. Overrules "lastline". 3383 uhex Show unprintable characters hexadecimal as <xx> 3384 instead of using ^C and ~C. 3385 3386 When neither "lastline" nor "truncate" is included, a last line that 3387 doesn't fit is replaced with "@" lines. 3388 3389 The "@" character can be changed by setting the "lastline" item in 3390 'fillchars'. The character is highlighted with |hl-NonText|. 3391 3392 *'eadirection'* *'ead'* 3393 'eadirection' 'ead' string (default "both") 3394 global 3395 Tells when the 'equalalways' option applies: 3396 ver vertically, width of windows is not affected 3397 hor horizontally, height of windows is not affected 3398 both width and height of windows is affected 3399 3400 *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* 3401 'edcompatible' 'ed' boolean (default off) 3402 global 3403 Makes the 'g' and 'c' flags of the ":substitute" command to be 3404 toggled each time the flag is given. See |complex-change|. See 3405 also 'gdefault' option. 3406 Switching this option on may break plugins! 3407 This option is not used in |Vim9| script. 3408 3409 *'emoji'* *'emo'* *'noemoji'* *'noemo'* 3410 'emoji' 'emo' boolean (default: on) 3411 global 3412 When on all Unicode emoji characters are considered to be full width. 3413 This excludes "text emoji" characters, which are normally displayed as 3414 single width. Unfortunately there is no good specification for this 3415 and it has been determined on trial-and-error basis. Use the 3416 |setcellwidths()| function to change the behavior. 3417 3418 *'encoding'* *'enc'* *E543* 3419 'encoding' 'enc' string (default for MS-Windows: "utf-8", 3420 otherwise: value from $LANG or "latin1") 3421 global 3422 Sets the character encoding used inside Vim. It applies to text in 3423 the buffers, registers, Strings in expressions, text stored in the 3424 viminfo file, etc. It sets the kind of characters which Vim can work 3425 with. See |encoding-names| for the possible values. 3426 3427 NOTE: Changing this option will not change the encoding of the 3428 existing text in Vim. It may cause non-ASCII text to become invalid. 3429 It should normally be kept at its default value, or set when Vim 3430 starts up. See |multibyte|. To reload the menus see |:menutrans|. 3431 3432 This option cannot be set from a |modeline|. It would most likely 3433 corrupt the text. 3434 3435 NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding' 3436 to "utf-8". Although care has been taken to allow different values of 3437 'encoding', "utf-8" is the natural choice for the environment and 3438 avoids unnecessary conversion overhead. "utf-8" has not been made 3439 the default to prevent different behavior of the GUI and terminal 3440 versions, and to avoid changing the encoding of newly created files 3441 without your knowledge (in case 'fileencodings' is empty). 3442 3443 The character encoding of files can be different from 'encoding'. 3444 This is specified with 'fileencoding'. The conversion is done with 3445 iconv() or as specified with 'charconvert'. 3446 3447 If you need to know whether 'encoding' is a multibyte encoding, you 3448 can use: > 3449 if has("multi_byte_encoding") 3450 < 3451 Normally 'encoding' will be equal to your current locale. This will 3452 be the default if Vim recognizes your environment settings. If 3453 'encoding' is not set to the current locale, 'termencoding' must be 3454 set to convert typed and displayed text. See |encoding-table|. 3455 3456 When you set this option, it fires the |EncodingChanged| autocommand 3457 event so that you can set up fonts if necessary. 3458 3459 When the option is set, the value is converted to lowercase. Thus 3460 you can set it with uppercase values too. Underscores are translated 3461 to '-' signs. 3462 When the encoding is recognized, it is changed to the standard name. 3463 For example "Latin-1" becomes "latin1", "ISO_88592" becomes 3464 "iso-8859-2" and "utf8" becomes "utf-8". 3465 3466 Note: "latin1" is also used when the encoding could not be detected. 3467 This only works when editing files in the same encoding! When the 3468 actual character set is not latin1, make sure 'fileencoding' and 3469 'fileencodings' are empty. When conversion is needed, switch to using 3470 utf-8. 3471 3472 When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8. 3473 You don't notice this while editing, but it does matter for the 3474 |viminfo-file|. And Vim expects the terminal to use utf-8 too. Thus 3475 setting 'encoding' to one of these values instead of utf-8 only has 3476 effect for encoding used for files when 'fileencoding' is empty. 3477 3478 When 'encoding' is set to a Unicode encoding, and 'fileencodings' was 3479 not set yet, the default for 'fileencodings' is changed. 3480 3481 *'endoffile'* *'eof'* *'noendoffile'* *'noeof'* 3482 'endoffile' 'eof' boolean (default off) 3483 local to buffer 3484 Indicates that a CTRL-Z character was found at the end of the file 3485 when reading it. Normally only happens when 'fileformat' is "dos". 3486 When writing a file and this option is off and the 'binary' option 3487 is on, or 'fixeol' option is off, no CTRL-Z will be written at the 3488 end of the file. 3489 See |eol-and-eof| for example settings. 3490 3491 *'endofline'* *'eol'* *'noendofline'* *'noeol'* 3492 'endofline' 'eol' boolean (default on) 3493 local to buffer 3494 When writing a file and this option is off and the 'binary' option 3495 is on, or 'fixeol' option is off, no <EOL> will be written for the 3496 last line in the file. This option is automatically set or reset when 3497 starting to edit a new file, depending on whether file has an <EOL> 3498 for the last line in the file. Normally you don't have to set or 3499 reset this option. 3500 When 'binary' is off and 'fixeol' is on the value is not used when 3501 writing the file. When 'binary' is on or 'fixeol' is off it is used 3502 to remember the presence of a <EOL> for the last line in the file, so 3503 that when you write the file the situation from the original file can 3504 be kept. But you can change it if you want to. 3505 See |eol-and-eof| for example settings. 3506 3507 *'equalalways'* *'ea'* *'noequalalways'* *'noea'* 3508 'equalalways' 'ea' boolean (default on) 3509 global 3510 When on, all the windows are automatically made the same size after 3511 splitting or closing a window. This also happens the moment the 3512 option is switched on. When off, splitting a window will reduce the 3513 size of the current window and leave the other windows the same. When 3514 closing a window the extra lines are given to the window next to it 3515 (depending on 'splitbelow' and 'splitright'). 3516 When mixing vertically and horizontally split windows, a minimal size 3517 is computed and some windows may be larger if there is room. The 3518 'eadirection' option tells in which direction the size is affected. 3519 Changing the height and width of a window can be avoided by setting 3520 'winfixheight' and 'winfixwidth', respectively. 3521 If a window size is specified when creating a new window sizes are 3522 currently not equalized (it's complicated, but may be implemented in 3523 the future). 3524 3525 *'equalprg'* *'ep'* 3526 'equalprg' 'ep' string (default "") 3527 global or local to buffer |global-local| 3528 External program to use for "=" command. When this option is empty 3529 the internal formatting functions are used; either 'lisp', 'cindent' 3530 or 'indentexpr'. When Vim was compiled without internal formatting, 3531 the "indent" program is used. 3532 Environment variables are expanded |:set_env|. See |option-backslash| 3533 about including spaces and backslashes. 3534 This option cannot be set from a |modeline| or in the |sandbox|, for 3535 security reasons. 3536 3537 *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'* 3538 'errorbells' 'eb' boolean (default off) 3539 global 3540 Ring the bell (beep or screen flash) for error messages. This only 3541 makes a difference for error messages, the bell will be used always 3542 for a lot of errors without a message (e.g., hitting <Esc> in Normal 3543 mode). See 'visualbell' on how to make the bell behave like a beep, 3544 screen flash or do nothing. See 'belloff' to finetune when to ring 3545 the bell. 3546 3547 *'errorfile'* *'ef'* 3548 'errorfile' 'ef' string (Amiga default: "AztecC.Err", 3549 others: "errors.err") 3550 global 3551 {not available when compiled without the |+quickfix| 3552 feature} 3553 Name of the errorfile for the QuickFix mode (see |:cf|). 3554 When the "-q" command-line argument is used, 'errorfile' is set to the 3555 following argument. See |-q|. 3556 NOT used for the ":make" command. See 'makeef' for that. 3557 Environment variables are expanded |:set_env|. 3558 See |option-backslash| about including spaces and backslashes. 3559 This option cannot be set from a |modeline| or in the |sandbox|, for 3560 security reasons. 3561 3562 *'errorformat'* *'efm'* 3563 'errorformat' 'efm' string (default is very long) 3564 global or local to buffer |global-local| 3565 {not available when compiled without the |+quickfix| 3566 feature} 3567 Scanf-like description of the format for the lines in the error file 3568 (see |errorformat|). 3569 3570 *'esckeys'* *'ek'* *'noesckeys'* *'noek'* 3571 'esckeys' 'ek' boolean (Vim default: on, Vi default: off) 3572 global 3573 Function keys that start with an <Esc> are recognized in Insert 3574 mode. When this option is off, the cursor and function keys cannot be 3575 used in Insert mode if they start with an <Esc>. The advantage of 3576 this is that the single <Esc> is recognized immediately, instead of 3577 after one second. Instead of resetting this option, you might want to 3578 try changing the values for 'timeoutlen' and 'ttimeoutlen'. Note that 3579 when 'esckeys' is off, you can still map anything, but the cursor keys 3580 won't work by default. 3581 NOTE: This option is set to the Vi default value when 'compatible' is 3582 set and to the Vim default value when 'compatible' is reset. 3583 NOTE: when this option is off then the |modifyOtherKeys| and 3584 |xterm-bracketed-paste| functionality is disabled while in Insert mode 3585 to avoid ending Insert mode with any key that has a modifier. 3586 3587 *'eventignore'* *'ei'* 3588 'eventignore' 'ei' string (default "") 3589 global 3590 A list of autocommand event names, which are to be ignored. 3591 When set to "all" or when "all" is one of the items, all autocommand 3592 events are ignored, autocommands will not be executed. 3593 Otherwise this is a comma-separated list of event names. Example: > 3594 :set ei=WinEnter,WinLeave 3595 < 3596 To ignore all but some events, a "-" prefix can be used: > 3597 :set ei=all,-WinLeave 3598 < 3599 Events that are triggered by comparing the current state against a 3600 stored one, such as |CursorMoved| and |TextChanged|, are not triggered 3601 afterwards for what happened while they were ignored. 3602 3603 *'eventignorewin'* *'eiw'* 3604 'eventignorewin' 'eiw' string (default "") 3605 window-local 3606 Similar to 'eventignore' but applies to a particular window and its 3607 buffers, for which window and buffer related autocommands can be 3608 ignored indefinitely without affecting the global 'eventignore'. 3609 3610 Note: The following events are considered to happen outside of a 3611 window context and thus cannot be ignored by 'eventignorewin': 3612 3613 |CmdlineChanged|, 3614 |CmdlineEnter|, 3615 |CmdlineLeave|, 3616 |CmdlineLeavePre|, 3617 |CmdUndefined|, 3618 |CmdwinEnter|, 3619 |CmdwinLeave|, 3620 |ColorScheme|, 3621 |ColorSchemePre|, 3622 |CompleteChanged|, 3623 |CompleteDone|, 3624 |CompleteDonePre|, 3625 |DiffUpdated|, 3626 |DirChanged|, 3627 |DirChangedPre|, 3628 |EncodingChanged|, 3629 |ExitPre|, 3630 |FocusGained|, 3631 |FocusLost|, 3632 |FuncUndefined|, 3633 |GUIEnter|, 3634 |GUIFailed|, 3635 |KeyInputPre|, 3636 |MenuPopup|, 3637 |ModeChanged|, 3638 |OptionSet|, 3639 |QuickFixCmdPost|, 3640 |QuickFixCmdPre|, 3641 |QuitPre|, 3642 |RemoteReply|, 3643 |SafeState|, 3644 |SafeStateAgain|, 3645 |SessionLoadPost|, 3646 |SessionLoadPre|, 3647 |SessionWritePost|, 3648 |ShellCmdPost|, 3649 |SigUSR1|, 3650 |SourceCmd|, 3651 |SourcePost|, 3652 |SourcePre|, 3653 |SpellFileMissing|, 3654 |StdinReadPost|, 3655 |StdinReadPre|, 3656 |SwapExists|, 3657 |Syntax|, 3658 |TabClosed|, 3659 |TabClosedPre|, 3660 |TabEnter|, 3661 |TabLeave|, 3662 |TabNew|, 3663 |TermChanged|, 3664 |TerminalOpen|, 3665 |TerminalWinOpen|, 3666 |TermResponse|, 3667 |TermResponseAll|, 3668 |User|, 3669 |VimEnter|, 3670 |VimLeave|, 3671 |VimLeavePre|, 3672 |VimResized|, 3673 |VimResume|, 3674 |VimSuspend|, 3675 |WinNew|, 3676 |WinNewPre| 3677 3678 *'expandtab'* *'et'* *'noexpandtab'* *'noet'* 3679 'expandtab' 'et' boolean (default off) 3680 local to buffer 3681 In Insert mode: Use the appropriate number of spaces to insert a 3682 <Tab>. Spaces are used in indents with the '>' and '<' commands and 3683 when 'autoindent' is on. To insert a real tab when 'expandtab' is 3684 on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|. 3685 This option is reset when the 'paste' option is set and restored when 3686 the 'paste' option is reset. 3687 NOTE: This option is reset when 'compatible' is set. 3688 3689 *'exrc'* *'ex'* *'noexrc'* *'noex'* 3690 'exrc' 'ex' boolean (default off) 3691 global 3692 Enables the reading of .vimrc, .exrc and .gvimrc in the current 3693 directory. 3694 3695 Setting this option is a potential security leak. E.g., consider 3696 unpacking a package or fetching files from github, a .vimrc in there 3697 might be a trojan horse. BETTER NOT SET THIS OPTION! 3698 Instead, define an autocommand in your .vimrc to set options for a 3699 matching directory. 3700 3701 If you do switch this option on you should also consider setting the 3702 'secure' option (see |initialization|). 3703 Also see |.vimrc| and |gui-init|. 3704 This option cannot be set from a |modeline| or in the |sandbox|, for 3705 security reasons. 3706 3707 *'fileencoding'* *'fenc'* *E213* 3708 'fileencoding' 'fenc' string (default: "") 3709 local to buffer 3710 Sets the character encoding for the file of this buffer. 3711 3712 When 'fileencoding' is different from 'encoding', conversion will be 3713 done when writing the file. For reading see below. 3714 When 'fileencoding' is empty, the same value as 'encoding' will be 3715 used (no conversion when reading or writing a file). 3716 No error will be given when the value is set, only when it is used, 3717 only when writing a file. 3718 Conversion will also be done when 'encoding' and 'fileencoding' are 3719 both a Unicode encoding and 'fileencoding' is not utf-8. That's 3720 because internally Unicode is always stored as utf-8. 3721 WARNING: Conversion can cause loss of information! When 3722 'encoding' is "utf-8" or another Unicode encoding, conversion 3723 is most likely done in a way that the reverse conversion 3724 results in the same text. When 'encoding' is not "utf-8" some 3725 characters may be lost! 3726 3727 See 'encoding' for the possible values. Additionally, values may be 3728 specified that can be handled by the converter, see 3729 |mbyte-conversion|. 3730 3731 When reading a file 'fileencoding' will be set from 'fileencodings'. 3732 To read a file in a certain encoding it won't work by setting 3733 'fileencoding', use the |++enc| argument. One exception: when 3734 'fileencodings' is empty the value of 'fileencoding' is used. 3735 For a new file the global value of 'fileencoding' is used. 3736 3737 Prepending "8bit-" and "2byte-" has no meaning here, they are ignored. 3738 When the option is set, the value is converted to lowercase. Thus 3739 you can set it with uppercase values too. '_' characters are 3740 replaced with '-'. If a name is recognized from the list for 3741 'encoding', it is replaced by the standard name. For example 3742 "ISO8859-2" becomes "iso-8859-2". 3743 3744 When this option is set, after starting to edit a file, the 'modified' 3745 option is set, because the file would be different when written. 3746 3747 Keep in mind that changing 'fenc' from a modeline happens 3748 AFTER the text has been read, thus it applies to when the file will be 3749 written. If you do set 'fenc' in a modeline, you might want to set 3750 'nomodified' to avoid not being able to ":q". 3751 3752 This option can not be changed when 'modifiable' is off. 3753 3754 *'fe'* 3755 NOTE: Before version 6.0 this option specified the encoding for the 3756 whole of Vim, this was a mistake. Now use 'encoding' instead. The 3757 old short name was 'fe', which is no longer used. 3758 3759 *'fileencodings'* *'fencs'* 3760 'fileencodings' 'fencs' string (default: "ucs-bom", 3761 "ucs-bom,utf-8,default,latin1" when 3762 'encoding' is set to a Unicode value) 3763 global 3764 This is a list of character encodings considered when starting to edit 3765 an existing file. When a file is read, Vim tries to use the first 3766 mentioned character encoding. If an error is detected, the next one 3767 in the list is tried. When an encoding is found that works, 3768 'fileencoding' is set to it. If all fail, 'fileencoding' is set to 3769 an empty string, which means the value of 'encoding' is used. 3770 WARNING: Conversion can cause loss of information! When 3771 'encoding' is "utf-8" (or one of the other Unicode variants) 3772 conversion is most likely done in a way that the reverse 3773 conversion results in the same text. When 'encoding' is not 3774 "utf-8" some non-ASCII characters may be lost! You can use 3775 the |++bad| argument to specify what is done with characters 3776 that can't be converted. 3777 For an empty file or a file with only ASCII characters most encodings 3778 will work and the first entry of 'fileencodings' will be used (except 3779 "ucs-bom", which requires the BOM to be present). If you prefer 3780 another encoding use an BufReadPost autocommand event to test if your 3781 preferred encoding is to be used. Example: > 3782 au BufReadPost * if search('\S', 'w') == 0 | 3783 \ set fenc=iso-2022-jp | endif 3784 < This sets 'fileencoding' to "iso-2022-jp" if the file does not contain 3785 non-blank characters. 3786 When the |++enc| argument is used then the value of 'fileencodings' is 3787 not used. 3788 Note that 'fileencodings' is not used for a new file, the global value 3789 of 'fileencoding' is used instead. You can set it with: > 3790 :setglobal fenc=iso-8859-2 3791 < This means that a non-existing file may get a different encoding than 3792 an empty file. 3793 The special value "ucs-bom" can be used to check for a Unicode BOM 3794 (Byte Order Mark) at the start of the file. It must not be preceded 3795 by "utf-8" or another Unicode encoding for this to work properly. 3796 An entry for an 8-bit encoding (e.g., "latin1") should be the last, 3797 because Vim cannot detect an error, thus the encoding is always 3798 accepted. 3799 The special value "default" can be used for the encoding from the 3800 environment. On MS-Windows this is the system encoding. Otherwise 3801 this is the default value for 'encoding'. It is useful when 3802 'encoding' is set to "utf-8" and your environment uses a non-latin1 3803 encoding, such as Russian. 3804 When 'encoding' is "utf-8" and a file contains an illegal byte 3805 sequence it won't be recognized as UTF-8. You can use the |8g8| 3806 command to find the illegal byte sequence. 3807 WRONG VALUES: WHAT'S WRONG: 3808 latin1,utf-8 "latin1" will always be used 3809 utf-8,ucs-bom,latin1 BOM won't be recognized in a utf-8 3810 file 3811 cp1250,latin1 "cp1250" will always be used 3812 If 'fileencodings' is empty, 'fileencoding' is not modified. 3813 See 'fileencoding' for the possible values. 3814 Setting this option does not have an effect until the next time a file 3815 is read. 3816 3817 *'fileformat'* *'ff'* 3818 'fileformat' 'ff' string (MS-Windows default: "dos", 3819 Unix default: "unix") 3820 local to buffer 3821 This gives the <EOL> of the current buffer, which is used for 3822 reading/writing the buffer from/to a file: 3823 dos <CR><NL> 3824 unix <NL> 3825 mac <CR> 3826 When "dos" is used, CTRL-Z at the end of a file is ignored. 3827 See |file-formats| and |file-read|. 3828 For the character encoding of the file see 'fileencoding'. 3829 When 'binary' is set, the value of 'fileformat' is ignored, file I/O 3830 works like it was set to "unix". 3831 This option is set automatically when starting to edit a file and 3832 'fileformats' is not empty and 'binary' is off. 3833 When this option is set, after starting to edit a file, the 'modified' 3834 option is set, because the file would be different when written. 3835 This option can not be changed when 'modifiable' is off. 3836 For backwards compatibility: When this option is set to "dos", 3837 'textmode' is set, otherwise 'textmode' is reset. 3838 3839 *'fileformats'* *'ffs'* 3840 'fileformats' 'ffs' string (default: 3841 Vim+Vi MS-Windows: "dos,unix", 3842 Vim Unix: "unix,dos", 3843 Vi Cygwin: "unix,dos", 3844 Vi others: "") 3845 global 3846 This gives the end-of-line (<EOL>) formats that will be tried when 3847 starting to edit a new buffer and when reading a file into an existing 3848 buffer: 3849 - When empty, the format defined with 'fileformat' will be used 3850 always. It is not set automatically. 3851 - When set to one name, that format will be used whenever a new buffer 3852 is opened. 'fileformat' is set accordingly for that buffer. The 3853 'fileformats' name will be used when a file is read into an existing 3854 buffer, no matter what 'fileformat' for that buffer is set to. 3855 - When more than one name is present, separated by commas, automatic 3856 <EOL> detection will be done when reading a file. When starting to 3857 edit a file, a check is done for the <EOL>: 3858 1. If all lines end in <CR><NL>, and 'fileformats' includes "dos", 3859 'fileformat' is set to "dos". 3860 2. If a <NL> is found and 'fileformats' includes "unix", 3861 'fileformat' is set to "unix". Note that when a <NL> is found 3862 without a preceding <CR>, "unix" is preferred over "dos". 3863 3. If 'fileformat' has not yet been set, and if a <CR> is found, and 3864 if 'fileformats' includes "mac", 'fileformat' is set to "mac". 3865 This means that "mac" is only chosen when: 3866 "unix" is not present or no <NL> is found in the file, and 3867 "dos" is not present or no <CR><NL> is found in the file. 3868 Except: if "unix" was chosen, but there is a <CR> before 3869 the first <NL>, and there appear to be more <CR>s than <NL>s in 3870 the first few lines, "mac" is used. 3871 4. If 'fileformat' is still not set, the first name from 3872 'fileformats' is used. 3873 When reading a file into an existing buffer, the same is done, but 3874 this happens like 'fileformat' has been set appropriately for that 3875 file only, the option is not changed. 3876 When 'binary' is set, the value of 'fileformats' is not used. 3877 3878 When Vim starts up with an empty buffer the first item is used. You 3879 can overrule this by setting 'fileformat' in your .vimrc. 3880 3881 For systems with a Dos-like <EOL> (<CR><NL>), when reading files that 3882 are ":source"ed and for vimrc files, automatic <EOL> detection may be 3883 done: 3884 - When 'fileformats' is empty, there is no automatic detection. Dos 3885 format will be used. 3886 - When 'fileformats' is set to one or more names, automatic detection 3887 is done. This is based on the first <NL> in the file: If there is a 3888 <CR> in front of it, Dos format is used, otherwise Unix format is 3889 used. 3890 Also see |file-formats|. 3891 For backwards compatibility: When this option is set to an empty 3892 string or one format (no comma is included), 'textauto' is reset, 3893 otherwise 'textauto' is set. 3894 NOTE: This option is set to the Vi default value when 'compatible' is 3895 set and to the Vim default value when 'compatible' is reset. 3896 3897 *'fileignorecase'* *'fic'* *'nofileignorecase'* *'nofic'* 3898 'fileignorecase' 'fic' boolean (default on for systems where case in file 3899 names is normally ignored) 3900 global 3901 When set, case is ignored when using file and directory names. 3902 3903 This option is on by default on systems where the filesystem is 3904 traditionally case-insensitive (for example MS-Windows and macOS). 3905 However, Vim cannot determine at runtime whether a particular 3906 filesystem is case-sensitive or case-insensitive. 3907 3908 See 'wildignorecase' for only ignoring case when doing completion. 3909 3910 *'filetype'* *'ft'* 3911 'filetype' 'ft' string (default: "") 3912 local to buffer |local-noglobal| 3913 When this option is set, the FileType autocommand event is triggered. 3914 All autocommands that match with the value of this option will be 3915 executed. Thus the value of 'filetype' is used in place of the file 3916 name. 3917 Otherwise this option does not always reflect the current file type. 3918 This option is normally set when the file type is detected. To enable 3919 this use the ":filetype on" command. |:filetype| 3920 Setting this option to a different value is most useful in a modeline, 3921 for a file for which the file type is not automatically recognized. 3922 Example, for in an IDL file: 3923 /* vim: set filetype=idl : */ ~ 3924 |FileType| |filetypes| 3925 When a dot appears in the value then this separates two filetype 3926 names, it should therefore not be used for a filetype. Example: 3927 /* vim: set filetype=c.doxygen : */ ~ 3928 This will use the "c" filetype first, then the "doxygen" filetype. 3929 This works both for filetype plugins and for syntax files. More than 3930 one dot may appear. 3931 This option is not copied to another buffer, independent of the 's' or 3932 'S' flag in 'cpoptions'. 3933 Only alphanumeric characters, '-' and '_' can be used (and a '.' is 3934 allowed as delimiter when combining different filetypes). 3935 3936 *'fillchars'* *'fcs'* 3937 'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~,lastline:@") 3938 global or local to window |global-local| 3939 Characters to fill the statuslines, vertical separators, special 3940 lines in the window and truncated text in the |ins-completion-menu|. 3941 It is a comma-separated list of items. Each item has a name, a colon 3942 and the value of that item: |E1511| 3943 3944 item name default Used for ~ 3945 stl ' ' statusline of the current window 3946 stlnc ' ' statusline of the non-current windows 3947 vert '|' vertical separators |:vsplit| 3948 fold '-' filling 'foldtext' 3949 foldopen '-' mark the beginning of a fold 3950 foldclose '+' show a closed fold 3951 foldsep '|' open fold middle character 3952 foldinner none character to show instead of the 3953 numeric foldlevel when it would be 3954 repeated in a narrow 'foldcolumn' 3955 diff '-' deleted lines of the 'diff' option 3956 eob '~' empty lines below the end of a buffer 3957 lastline '@' 'display' contains lastline/truncate 3958 trunc '>' truncated text in the 3959 |ins-completion-menu|. 3960 truncrl '<' same as "trunc" in 'rightleft' mode 3961 tpl_vert '|' vertical separators of 'tabpanel' 3962 3963 Any one that is omitted will fall back to the default. 3964 3965 Example: > 3966 :set fillchars=stl:\ ,stlnc:\ ,vert:\|,fold:-,diff:-,tpl_vert:\| 3967 < 3968 All items support single-byte and multibyte characters. But 3969 double-width characters are not supported. |E1512| 3970 3971 The highlighting used for these items: 3972 item name highlight group ~ 3973 stl StatusLine |hl-StatusLine| 3974 stlnc StatusLineNC |hl-StatusLineNC| 3975 vert VertSplit |hl-VertSplit| 3976 fold Folded |hl-Folded| 3977 foldopen FoldColumn |hl-FoldColumn| 3978 foldclose FoldColumn |hl-FoldColumn| 3979 foldsep FoldColumn |hl-FoldColumn| 3980 diff DiffDelete |hl-DiffDelete| 3981 eob EndOfBuffer |hl-EndOfBuffer| 3982 lastline NonText |hl-NonText| 3983 trunc one of the many Popup menu highlighting groups like 3984 |hl-PmenuSel| 3985 truncrl same as "trunc" 3986 3987 *'findfunc'* *'ffu'* *E1514* 3988 'findfunc' 'ffu' string (default empty) 3989 global or local to buffer |global-local| 3990 {not available when compiled without the |+eval| 3991 feature} 3992 Function that is called to obtain the filename(s) for the |:find| 3993 command. When this option is empty, the internal |file-searching| 3994 mechanism is used. 3995 3996 The value can be the name of a function, a |lambda| or a |Funcref|. 3997 See |option-value-function| for more information. 3998 3999 The function is called with two arguments. The first argument is a 4000 |String| and is the |:find| command argument. The second argument is 4001 a |Boolean| and is set to |v:true| when the function is called to get 4002 a List of command-line completion matches for the |:find| command. 4003 The function should return a List, which is handled similarly to the 4004 return value of a |:command-completion-customlist| function. 4005 4006 The function can process all the directories specified in 'path'. 4007 4008 If a match is found, the function should return a |List| containing 4009 one or more file names. If a match is not found, the function 4010 should return an empty List. 4011 4012 If any errors are encountered during the function invocation, an 4013 empty List is used as the return value. 4014 4015 It is not allowed to change text or jump to another window while 4016 executing the 'findfunc' |textlock|. 4017 4018 This option cannot be set from a |modeline| or in the |sandbox|, for 4019 security reasons. 4020 4021 Examples: 4022 > 4023 " Use glob() 4024 func FindFuncGlob(cmdarg, cmdcomplete) 4025 let pat = a:cmdcomplete ? $'{a:cmdarg}*' : a:cmdarg 4026 return glob(pat, v:false, v:true) 4027 endfunc 4028 set findfunc=FindFuncGlob 4029 4030 " Use the 'git ls-files' output 4031 func FindGitFiles(cmdarg, cmdcomplete) 4032 let fnames = systemlist('git ls-files') 4033 return fnames->filter('v:val =~? a:cmdarg') 4034 endfunc 4035 set findfunc=FindGitFiles 4036 < 4037 *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* 4038 'fixendofline' 'fixeol' boolean (default on) 4039 local to buffer 4040 When writing a file and this option is on, <EOL> at the end of file 4041 will be restored if missing. Turn this option off if you want to 4042 preserve the situation from the original file. 4043 When the 'binary' option is set the value of this option doesn't 4044 matter. 4045 See the 'endofline' option. 4046 See |eol-and-eof| for example settings. 4047 4048 *'fkmap'* *'fk'* *'nofkmap'* *'nofk'* 4049 'fkmap' 'fk' boolean (default off) 4050 global 4051 {only available when compiled with the |+rightleft| 4052 feature} 4053 This option was for using Farsi, which has been removed. See 4054 |farsi.txt|. 4055 4056 *'foldclose'* *'fcl'* 4057 'foldclose' 'fcl' string (default "") 4058 global 4059 {not available when compiled without the |+folding| 4060 feature} 4061 When set to "all", a fold is closed when the cursor isn't in it and 4062 its level is higher than 'foldlevel'. Useful if you want folds to 4063 automatically close when moving out of them. 4064 4065 *'foldcolumn'* *'fdc'* 4066 'foldcolumn' 'fdc' number (default 0) 4067 local to window 4068 {not available when compiled without the |+folding| 4069 feature} 4070 When non-zero, a column with the specified width is shown at the side 4071 of the window which indicates open and closed folds. The maximum 4072 value is 12. 4073 See |folding|. 4074 4075 *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'* 4076 'foldenable' 'fen' boolean (default on) 4077 local to window 4078 {not available when compiled without the |+folding| 4079 feature} 4080 When off, all folds are open. This option can be used to quickly 4081 switch between showing all text unfolded and viewing the text with 4082 folds (including manually opened or closed folds). It can be toggled 4083 with the |zi| command. The 'foldcolumn' will remain blank when 4084 'foldenable' is off. 4085 This option is set by commands that create a new fold or close a fold. 4086 See |folding|. 4087 4088 *'foldexpr'* *'fde'* 4089 'foldexpr' 'fde' string (default: "0") 4090 local to window 4091 {not available when compiled without the |+folding| 4092 or |+eval| features} 4093 The expression used for when 'foldmethod' is "expr". It is evaluated 4094 for each line to obtain its fold level. The context is set to the 4095 script where 'foldexpr' was set, script-local items can be accessed. 4096 See |fold-expr| for the usage. 4097 4098 The expression will be evaluated in the |sandbox| if set from a 4099 modeline, see |sandbox-option|. 4100 This option can't be set from a |modeline| when the 'diff' option is 4101 on or the 'modelineexpr' option is off. 4102 4103 It is not allowed to change text or jump to another window while 4104 evaluating 'foldexpr' |textlock|. 4105 4106 *'foldignore'* *'fdi'* 4107 'foldignore' 'fdi' string (default: "#") 4108 local to window 4109 {not available when compiled without the |+folding| 4110 feature} 4111 Used only when 'foldmethod' is "indent". Lines starting with 4112 characters in 'foldignore' will get their fold level from surrounding 4113 lines. White space is skipped before checking for this character. 4114 The default "#" works well for C programs. See |fold-indent|. 4115 4116 *'foldlevel'* *'fdl'* 4117 'foldlevel' 'fdl' number (default: 0) 4118 local to window 4119 {not available when compiled without the |+folding| 4120 feature} 4121 Sets the fold level: Folds with a higher level will be closed. 4122 Setting this option to zero will close all folds. Higher numbers will 4123 close fewer folds. 4124 This option is set by commands like |zm|, |zM| and |zR|. 4125 See |fold-foldlevel|. 4126 4127 *'foldlevelstart'* *'fdls'* 4128 'foldlevelstart' 'fdls' number (default: -1) 4129 global 4130 {not available when compiled without the |+folding| 4131 feature} 4132 Sets 'foldlevel' when starting to edit another buffer in a window. 4133 Useful to always start editing with all folds closed (value zero), 4134 some folds closed (one) or no folds closed (99). 4135 This is done before reading any modeline, thus a setting in a modeline 4136 overrules this option. Starting to edit a file for |diff-mode| also 4137 ignores this option and closes all folds. 4138 It is also done before BufReadPre autocommands, to allow an autocmd to 4139 overrule the 'foldlevel' value for specific files. 4140 When the value is negative, it is not used. 4141 4142 *'foldmarker'* *'fmr'* *E536* 4143 'foldmarker' 'fmr' string (default: "{{{,}}}") 4144 local to window 4145 {not available when compiled without the |+folding| 4146 feature} 4147 The start and end marker used when 'foldmethod' is "marker". There 4148 must be one comma, which separates the start and end marker. The 4149 marker is a literal string (a regular expression would be too slow). 4150 See |fold-marker|. 4151 4152 *'foldmethod'* *'fdm'* 4153 'foldmethod' 'fdm' string (default: "manual") 4154 local to window 4155 {not available when compiled without the |+folding| 4156 feature} 4157 The kind of folding used for the current window. Possible values: 4158 |fold-manual| manual Folds are created manually. 4159 |fold-indent| indent Lines with equal indent form a fold. 4160 |fold-expr| expr 'foldexpr' gives the fold level of a line. 4161 |fold-marker| marker Markers are used to specify folds. 4162 |fold-syntax| syntax Syntax highlighting items specify folds. 4163 |fold-diff| diff Fold text that is not changed. 4164 4165 *'foldminlines'* *'fml'* 4166 'foldminlines' 'fml' number (default: 1) 4167 local to window 4168 {not available when compiled without the |+folding| 4169 feature} 4170 Sets the number of screen lines above which a fold can be displayed 4171 closed. Also for manually closed folds. With the default value of 4172 one a fold can only be closed if it takes up two or more screen lines. 4173 Set to zero to be able to close folds of just one screen line. 4174 Note that this only has an effect on what is displayed. After using 4175 "zc" to close a fold, which is displayed open because it's smaller 4176 than 'foldminlines', a following "zc" may close a containing fold. 4177 4178 *'foldnestmax'* *'fdn'* 4179 'foldnestmax' 'fdn' number (default: 20) 4180 local to window 4181 {not available when compiled without the |+folding| 4182 feature} 4183 Sets the maximum nesting of folds for the "indent" and "syntax" 4184 methods. This avoids that too many folds will be created. Using more 4185 than 20 doesn't work, because the internal limit is 20. 4186 4187 *'foldopen'* *'fdo'* 4188 'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix, 4189 search,tag,undo") 4190 global 4191 {not available when compiled without the |+folding| 4192 feature} 4193 Specifies for which type of commands folds will be opened, if the 4194 command moves the cursor into a closed fold. It is a comma-separated 4195 list of items. 4196 NOTE: When the command is part of a mapping this option is not used. 4197 Add the |zv| command to the mapping to get the same effect. 4198 (rationale: the mapping may want to control opening folds itself) 4199 4200 item commands ~ 4201 all any 4202 block "(", "{", "[[", "[{", etc. 4203 hor horizontal movements: "l", "w", "fx", etc. 4204 insert any command in Insert mode 4205 jump far jumps: "G", "gg", etc. 4206 mark jumping to a mark: "'m", CTRL-O, etc. 4207 percent "%" 4208 quickfix ":cn", ":crew", ":make", etc. 4209 search search for a pattern: "/", "n", "*", "gd", etc. 4210 (not for a search pattern in a ":" command) 4211 Also for |[s| and |]s|. 4212 tag jumping to a tag: ":ta", CTRL-T, etc. 4213 undo undo or redo: "u" and CTRL-R 4214 When a movement command is used for an operator (e.g., "dl" or "y%") 4215 this option is not used. This means the operator will include the 4216 whole closed fold. 4217 Note that vertical movements are not here, because it would make it 4218 very difficult to move onto a closed fold. 4219 In insert mode the folds containing the cursor will always be open 4220 when text is inserted. 4221 To close folds you can re-apply 'foldlevel' with the |zx| command or 4222 set the 'foldclose' option to "all". 4223 4224 *'foldtext'* *'fdt'* 4225 'foldtext' 'fdt' string (default: "foldtext()") 4226 local to window 4227 {not available when compiled without the |+folding| 4228 feature} 4229 An expression which is used to specify the text displayed for a closed 4230 fold. The context is set to the script where 'foldexpr' was set, 4231 script-local items can be accessed. See |fold-foldtext| for the 4232 usage. 4233 4234 The expression will be evaluated in the |sandbox| if set from a 4235 modeline, see |sandbox-option|. 4236 This option cannot be set in a modeline when 'modelineexpr' is off. 4237 4238 It is not allowed to change text or jump to another window while 4239 evaluating 'foldtext' |textlock|. 4240 4241 *'formatexpr'* *'fex'* 4242 'formatexpr' 'fex' string (default "") 4243 local to buffer 4244 {not available when compiled without the |+eval| 4245 feature} 4246 Expression which is evaluated to format a range of lines for the |gq| 4247 operator or automatic formatting (see 'formatoptions'). When this 4248 option is empty 'formatprg' is used. 4249 4250 The |v:lnum| variable holds the first line to be formatted. 4251 The |v:count| variable holds the number of lines to be formatted. 4252 The |v:char| variable holds the character that is going to be 4253 inserted if the expression is being evaluated due to 4254 automatic formatting. This can be empty. Don't insert 4255 it yet! 4256 4257 Example: > 4258 :set formatexpr=mylang#Format() 4259 < This will invoke the mylang#Format() function in the 4260 autoload/mylang.vim file in 'runtimepath'. |autoload| 4261 4262 The advantage of using a function call without arguments is that it is 4263 faster, see |expr-option-function|. 4264 4265 The expression is also evaluated when 'textwidth' is set and adding 4266 text beyond that limit. This happens under the same conditions as 4267 when internal formatting is used. Make sure the cursor is kept in the 4268 same spot relative to the text then! The |mode()| function will 4269 return "i" or "R" in this situation. 4270 4271 When the expression evaluates to non-zero Vim will fall back to using 4272 the internal format mechanism. 4273 4274 If the expression starts with s: or |<SID>|, then it is replaced with 4275 the script ID (|local-function|). Example: > 4276 set formatexpr=s:MyFormatExpr() 4277 set formatexpr=<SID>SomeFormatExpr() 4278 < Otherwise, the expression is evaluated in the context of the script 4279 where the option was set, thus script-local items are available. 4280 4281 The expression will be evaluated in the |sandbox| when set from a 4282 modeline, see |sandbox-option|. That stops the option from working, 4283 since changing the buffer text is not allowed. 4284 This option cannot be set in a modeline when 'modelineexpr' is off. 4285 NOTE: This option is set to "" when 'compatible' is set. 4286 4287 *'formatlistpat'* *'flp'* 4288 'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*") 4289 local to buffer 4290 A pattern that is used to recognize a list header. This is used for 4291 the "n" flag in 'formatoptions'. 4292 The pattern must match exactly the text that will be the indent for 4293 the line below it. You can use |/\ze| to mark the end of the match 4294 while still checking more characters. There must be a character 4295 following the pattern, when it matches the whole line it is handled 4296 like there is no match. 4297 The default recognizes a number, followed by an optional punctuation 4298 character and white space. 4299 4300 *'formatoptions'* *'fo'* 4301 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt") 4302 local to buffer 4303 This is a sequence of letters which describes how automatic 4304 formatting is to be done. 4305 See |fo-table| for possible values and |gq| for how to format text. 4306 When the 'paste' option is on, no formatting is done (like 4307 'formatoptions' is empty). Commas can be inserted for readability. 4308 To avoid problems with flags that are added in the future, use the 4309 "+=" and "-=" feature of ":set" |add-option-flags|. 4310 NOTE: This option is set to the Vi default value when 'compatible' is 4311 set and to the Vim default value when 'compatible' is reset. 4312 4313 *'formatprg'* *'fp'* 4314 'formatprg' 'fp' string (default "") 4315 global or local to buffer |global-local| 4316 The name of an external program that will be used to format the lines 4317 selected with the |gq| operator. The program must take the input on 4318 stdin and produce the output on stdout. The Unix program "fmt" is 4319 such a program. 4320 If the 'formatexpr' option is not empty it will be used instead. 4321 Otherwise, if 'formatprg' option is an empty string, the internal 4322 format function will be used |C-indenting|. 4323 Environment variables are expanded |:set_env|. See |option-backslash| 4324 about including spaces and backslashes. 4325 This option cannot be set from a |modeline| or in the |sandbox|, for 4326 security reasons. 4327 4328 *'fsync'* *'fs'* *'nofsync'* *'nofs'* 4329 'fsync' 'fs' boolean (default on) 4330 global or local to buffer |global-local| 4331 When on, the library function fsync() will be called after writing a 4332 file. This will flush a file to disk, ensuring that it is safely 4333 written even on filesystems which do metadata-only journaling. This 4334 will force the hard drive to spin up on Linux systems running in 4335 laptop mode, so it may be undesirable in some situations. Be warned 4336 that turning this off increases the chances of data loss after a 4337 crash. On systems without an fsync() implementation, this variable is 4338 always off. 4339 This is a |global-local| option, so it can be set per buffer, for 4340 example when writing to a slow filesystem. 4341 Also see 'swapsync' for controlling fsync() on swap files. 4342 'fsync' also applies to |writefile()| (unless a flag is used to 4343 overrule it) and when writing undo files (see |undo-persistence|). 4344 This option cannot be set from a |modeline| or in the |sandbox|, for 4345 security reasons. 4346 4347 *'gdefault'* *'gd'* *'nogdefault'* *'nogd'* 4348 'gdefault' 'gd' boolean (default off) 4349 global 4350 When on, the ":substitute" flag 'g' is default on. This means that 4351 all matches in a line are substituted instead of one. When a 'g' flag 4352 is given to a ":substitute" command, this will toggle the substitution 4353 of all or one match. See |complex-change|. 4354 4355 command 'gdefault' on 'gdefault' off ~ 4356 :s/// subst. all subst. one 4357 :s///g subst. one subst. all 4358 :s///gg subst. all subst. one 4359 4360 NOTE: This option is reset when 'compatible' is set. 4361 Setting this option may break plugins that rely on the default 4362 behavior of the 'g' flag. This will also make the 'g' flag have the 4363 opposite effect of that documented in |:s_g|. 4364 This option is not used in |Vim9| script. 4365 4366 *'grepformat'* *'gfm'* 4367 'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m") 4368 global or local to buffer |global-local| 4369 Format to recognize for the ":grep" command output. 4370 This is a scanf-like string that uses the same format as the 4371 'errorformat' option: see |errorformat|. 4372 4373 *'grepprg'* *'gp'* 4374 'grepprg' 'gp' string (default "grep -n ", 4375 Unix: "grep -n $* /dev/null", 4376 Win32: "findstr /n" or "grep -n", 4377 VMS: "SEARCH/NUMBERS ") 4378 global or local to buffer |global-local| 4379 Program to use for the |:grep| command. This option may contain '%' 4380 and '#' characters, which are expanded like when used in a command- 4381 line. The placeholder "$*" is allowed to specify where the arguments 4382 will be included. Environment variables are expanded |:set_env|. See 4383 |option-backslash| about including spaces and backslashes. 4384 When your "grep" accepts the "-H" argument, use this to make ":grep" 4385 also work well with a single file: > 4386 :set grepprg=grep\ -nH 4387 < Special value: When 'grepprg' is set to "internal" the |:grep| command 4388 works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like 4389 |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|. 4390 See also the section |:make_makeprg|, since most of the comments there 4391 apply equally to 'grepprg'. 4392 For Win32, the default is "findstr /n" if "findstr.exe" can be found, 4393 otherwise it's "grep -n". 4394 This option cannot be set from a |modeline| or in the |sandbox|, for 4395 security reasons. 4396 4397 *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549* 4398 'guicursor' 'gcr' string (default "n-v-c:block-Cursor/lCursor, 4399 ve:ver35-Cursor, 4400 o:hor50-Cursor, 4401 i-ci:ver25-Cursor/lCursor, 4402 r-cr:hor20-Cursor/lCursor, 4403 sm:block-Cursor 4404 -blinkwait175-blinkoff150-blinkon175", 4405 for Win32 console: 4406 "n-v-c:block,o:hor50,i-ci:hor15, 4407 r-cr:hor30,sm:block") 4408 global 4409 {only available when compiled with GUI enabled, and 4410 for Win32 console} 4411 This option tells Vim what the cursor should look like in different 4412 modes. It fully works in the GUI. In a Win32 console, only the 4413 height of the cursor can be changed. This can be done by specifying a 4414 block cursor, or a percentage for a vertical or horizontal cursor. 4415 For a console the 't_SI', 't_SR', and 't_EI' escape sequences are 4416 used. 4417 4418 The option is a comma-separated list of parts. Each part consist of a 4419 mode-list and an argument-list: 4420 mode-list:argument-list,mode-list:argument-list,.. 4421 The mode-list is a dash separated list of these modes: 4422 n Normal mode 4423 v Visual mode 4424 ve Visual mode with 'selection' "exclusive" (same as 'v', 4425 if not specified) 4426 o Operator-pending mode 4427 i Insert mode 4428 r Replace mode 4429 c Command-line Normal (append) mode 4430 ci Command-line Insert mode 4431 cr Command-line Replace mode 4432 sm showmatch in Insert mode 4433 a all modes 4434 The argument-list is a dash separated list of these arguments: 4435 hor{N} horizontal bar, {N} percent of the character height 4436 ver{N} vertical bar, {N} percent of the character width 4437 block block cursor, fills the whole character 4438 [only one of the above three should be present] 4439 blinkwait{N} *cursor-blinking* 4440 blinkon{N} 4441 blinkoff{N} 4442 blink times for cursor: blinkwait is the delay before 4443 the cursor starts blinking, blinkon is the time that 4444 the cursor is shown and blinkoff is the time that the 4445 cursor is not shown. The times are in msec. When one 4446 of the numbers is zero, there is no blinking. The 4447 default is: "blinkwait700-blinkon400-blinkoff250". 4448 These numbers are used for a missing entry. This 4449 means that blinking is enabled by default. To switch 4450 blinking off you can use "blinkon0". The cursor only 4451 blinks when Vim is waiting for input, not while 4452 executing a command. 4453 To make the cursor blink in an xterm, see 4454 |xterm-blink|. 4455 {group-name} 4456 a highlight group name, that sets the color and font 4457 for the cursor 4458 {group-name}/{group-name} 4459 Two highlight group names, the first is used when 4460 no language mappings are used, the other when they 4461 are. |language-mapping| 4462 4463 Examples of parts: 4464 n-c-v:block-nCursor in Normal, Command-line and Visual mode, use a 4465 block cursor with colors from the "nCursor" 4466 highlight group 4467 i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150 4468 In Insert and Command-line Insert mode, use a 4469 30% vertical bar cursor with colors from the 4470 "iCursor" highlight group. Blink a bit 4471 faster. 4472 4473 The 'a' mode is different. It will set the given argument-list for 4474 all modes. It does not reset anything to defaults. This can be used 4475 to do a common setting for all modes. For example, to switch off 4476 blinking: "a:blinkon0" 4477 4478 Examples of cursor highlighting: > 4479 :highlight Cursor gui=reverse guifg=NONE guibg=NONE 4480 :highlight Cursor gui=NONE guifg=bg guibg=fg 4481 < 4482 *'guifont'* *'gfn'* 4483 *E235* *E596* 4484 'guifont' 'gfn' string (default "") 4485 global 4486 {only available when compiled with GUI enabled} 4487 This is a list of fonts which will be used for the GUI version of Vim. 4488 In its simplest form the value is just one font name. 4489 See |gui-font| for the details. 4490 4491 *'guifontset'* *'gfs'* 4492 *E250* *E252* *E234* *E597* *E598* 4493 'guifontset' 'gfs' string (default "") 4494 global 4495 {only available when compiled with GUI enabled and 4496 with the |+xfontset| feature} 4497 {not available in the GTK+ GUI} 4498 When not empty, specifies two (or more) fonts to be used. The first 4499 one for normal English, the second one for your special language. See 4500 |xfontset|. 4501 4502 *'guifontwide'* *'gfw'* *E231* *E533* *E534* 4503 'guifontwide' 'gfw' string (default "") 4504 global 4505 {only available when compiled with GUI enabled} 4506 When not empty, specifies a comma-separated list of fonts to be used 4507 for double-width characters. The first font that can be loaded is 4508 used. See |gui-fontwide|. 4509 4510 *'guiheadroom'* *'ghr'* 4511 'guiheadroom' 'ghr' number (default 50) 4512 global 4513 {only for GTK and X11 GUI, except GTK4 GUI} 4514 The number of pixels subtracted from the screen height when fitting 4515 the GUI window on the screen. Set this before the GUI is started, 4516 e.g., in your |gvimrc| file. When zero, the whole screen height will 4517 be used by the window. When positive, the specified number of pixel 4518 lines will be left for window decorations and other items on the 4519 screen. Set it to a negative value to allow windows taller than the 4520 screen. 4521 4522 *'guiligatures'* *'gli'* *E1243* 4523 'guiligatures' 'gli' string (default "") 4524 global 4525 {only for GTK and Win32 GUI} 4526 List of ASCII characters that, when combined together, can create more 4527 complex shapes. Each character must be a printable ASCII character 4528 with a value in the 32-127 range. 4529 Example: > 4530 :set guiligatures=!\"#$%&()*+-./:<=>?@[]^_{\|~ 4531 < Changing this option updates screen output immediately. Set it to an 4532 empty string to disable ligatures. 4533 4534 *'guioptions'* *'go'* 4535 'guioptions' 'go' string (default "egmrLtT" (MS-Windows, 4536 "t" is removed in |defaults.vim|), 4537 "aegimrLtT" (GTK and Motif), 4538 ) 4539 global 4540 {only available when compiled with GUI enabled} 4541 This option only has an effect in the GUI version of Vim. It is a 4542 sequence of letters which describes what components and options of the 4543 GUI should be used. 4544 To avoid problems with flags that are added in the future, use the 4545 "+=" and "-=" feature of ":set" |add-option-flags|. 4546 4547 Valid characters are as follows: 4548 *'go-!'* 4549 '!' External commands are executed in a terminal window. Without 4550 this flag the MS-Windows GUI will open a console window to 4551 execute the command. The Unix GUI will simulate a dumb 4552 terminal to list the command output. 4553 The terminal window will be positioned at the bottom, and grow 4554 upwards as needed. 4555 *'go-a'* 4556 'a' Autoselect: If present, then whenever VISUAL mode is started, 4557 or the Visual area extended, Vim tries to become the owner of 4558 the windowing system's global selection. This means that the 4559 Visually highlighted text is available for pasting into other 4560 applications as well as into Vim itself. When the Visual mode 4561 ends, possibly due to an operation on the text, or when an 4562 application wants to paste the selection, the highlighted text 4563 is automatically yanked into the "* selection register. 4564 Thus the selection is still available for pasting into other 4565 applications after the VISUAL mode has ended. 4566 If not present, then Vim won't become the owner of the 4567 windowing system's global selection unless explicitly told to 4568 by a yank or delete operation for the "* register. 4569 The same applies to the modeless selection. 4570 *'go-P'* 4571 'P' Like autoselect but only copy to the "+ register instead of 4572 the "* register. 4573 *'go-A'* 4574 'A' Autoselect for the modeless selection. Like 'a', but only 4575 applies to the modeless selection. 4576 4577 'guioptions' autoselect Visual autoselect modeless ~ 4578 "" - - 4579 "a" yes yes 4580 "A" - yes 4581 "aA" yes yes 4582 4583 When using a terminal see the 'clipboard' option. 4584 4585 *'go-c'* 4586 'c' Use console dialogs instead of popup dialogs for simple 4587 choices. 4588 *'go-C'* 4589 'C' Use |hl-TitleBar| and |hl-TitleBarNC| if available. 4590 Currently only works for MS-Windows GUI. 4591 See |gui-w32-title-bar| for details. 4592 *'go-d'* 4593 'd' Use dark theme variant if available. Currently only works for 4594 MS-Windows and GTK+ GUI. 4595 *'go-e'* 4596 'e' Add tab pages when indicated with 'showtabline'. 4597 'guitablabel' can be used to change the text in the labels. 4598 When 'e' is missing a non-GUI tab pages line may be used. 4599 The GUI tabs are only supported on some systems, currently 4600 GTK, Motif, Mac OS/X, Haiku, and MS-Windows. 4601 *'go-f'* 4602 'f' Foreground: Don't use fork() to detach the GUI from the shell 4603 where it was started. Use this for programs that wait for the 4604 editor to finish (e.g., an e-mail program). Alternatively you 4605 can use "gvim -f" or ":gui -f" to start the GUI in the 4606 foreground. |gui-fork| 4607 Note: Set this option in the vimrc file. The forking may have 4608 happened already when the |gvimrc| file is read. 4609 *'go-i'* 4610 'i' Use a Vim icon. For GTK with KDE it is used in the left-upper 4611 corner of the window. It's black&white on non-GTK, because of 4612 limitations of X11. For a color icon, see |X11-icon|. 4613 *'go-m'* 4614 'm' Menu bar is present. 4615 *'go-M'* 4616 'M' The system menu "$VIMRUNTIME/menu.vim" is not sourced. Note 4617 that this flag must be added in the .vimrc file, before 4618 switching on syntax or filetype recognition (when the |gvimrc| 4619 file is sourced the system menu has already been loaded; the 4620 `:syntax on` and `:filetype on` commands load the menu too). 4621 *'go-g'* 4622 'g' Grey menu items: Make menu items that are not active grey. If 4623 'g' is not included inactive menu items are not shown at all. 4624 *'go-t'* 4625 't' Include tearoff menu items. Currently only works for Win32, 4626 GTK+, and Motif 1.2 GUI. 4627 *'go-T'* 4628 'T' Include Toolbar. Currently only in Win32, GTK+, Motif and 4629 Photon GUIs. 4630 *'go-s'* 4631 's' Enable fullscreen mode. Currently only supported in the 4632 MS-Windows and GTK GUI version. When set, the window will 4633 occupy the entire screen and remove window decorations. 4634 Define custom mappings to toggle this mode conveniently. 4635 For detailed usage instructions, see |gui-fullscreen|. 4636 *'go-r'* 4637 'r' Right-hand scrollbar is always present. 4638 *'go-R'* 4639 'R' Right-hand scrollbar is present when there is a vertically 4640 split window. 4641 *'go-l'* 4642 'l' Left-hand scrollbar is always present. 4643 *'go-L'* 4644 'L' Left-hand scrollbar is present when there is a vertically 4645 split window. 4646 *'go-b'* 4647 'b' Bottom (horizontal) scrollbar is present. Its size depends on 4648 the longest visible line, or on the cursor line if the 'h' 4649 flag is included. |gui-horiz-scroll| 4650 *'go-h'* 4651 'h' Limit horizontal scrollbar size to the length of the cursor 4652 line. Reduces computations. |gui-horiz-scroll| 4653 4654 And yes, you may even have scrollbars on the left AND the right if 4655 you really want to :-). See |gui-scrollbars| for more information. 4656 4657 *'go-v'* 4658 'v' Use a vertical button layout for dialogs. When not included, 4659 a horizontal layout is preferred, but when it doesn't fit a 4660 vertical layout is used anyway. Not supported in GTK 3. 4661 *'go-p'* 4662 'p' Use Pointer callbacks for X11 GUI. This is required for some 4663 window managers. If the cursor is not blinking or hollow at 4664 the right moment, try adding this flag. This must be done 4665 before starting the GUI. Set it in your |gvimrc|. Adding or 4666 removing it after the GUI has started has no effect. 4667 *'go-F'* 4668 'F' Add a footer. Only for Motif. See |gui-footer|. 4669 *'go-k'* 4670 'k' Keep the GUI window size when adding/removing a scrollbar, or 4671 toolbar, tabline, etc. Instead, the behavior is similar to 4672 when the window is maximized and will adjust 'lines' and 4673 'columns' to fit to the window. Without the 'k' flag Vim will 4674 try to keep 'lines' and 'columns' the same when adding and 4675 removing GUI components. 4676 4677 *'guipty'* *'noguipty'* 4678 'guipty' boolean (default on) 4679 global 4680 {only available when compiled with GUI enabled} 4681 Only in the GUI: If on, an attempt is made to open a pseudo-tty for 4682 I/O to/from shell commands. See |gui-pty|. 4683 4684 *'guitablabel'* *'gtl'* 4685 'guitablabel' 'gtl' string (default empty) 4686 global 4687 {only available when compiled with GUI enabled} 4688 When non-empty describes the text to use in a label of the GUI tab 4689 pages line. When empty and when the result is empty Vim will use a 4690 default label. See |setting-guitablabel| for more info. 4691 4692 The format of this option is like that of 'statusline'. 4693 'guitabtooltip' is used for the tooltip, see below. 4694 The expression will be evaluated in the |sandbox| when set from a 4695 modeline, see |sandbox-option|. 4696 This option cannot be set in a modeline when 'modelineexpr' is off. 4697 4698 Only used when the GUI tab pages line is displayed. 'e' must be 4699 present in 'guioptions'. For the non-GUI tab pages line 'tabline' is 4700 used. 4701 4702 *'guitabtooltip'* *'gtt'* 4703 'guitabtooltip' 'gtt' string (default empty) 4704 global 4705 {only available when compiled with GUI enabled} 4706 When non-empty describes the text to use in a tooltip for the GUI tab 4707 pages line. When empty Vim will use a default tooltip. 4708 This option is otherwise just like 'guitablabel' above. 4709 You can include a line break. Simplest method is to use |:let|: > 4710 :let &guitabtooltip = "line one\nline two" 4711 < 4712 This option cannot be set in a modeline when 'modelineexpr' is off. 4713 4714 *'helpfile'* *'hf'* 4715 'helpfile' 'hf' string (default (MS-Windows) "$VIMRUNTIME\doc\help.txt" 4716 (others) "$VIMRUNTIME/doc/help.txt") 4717 global 4718 Name of the main help file. All distributed help files should be 4719 placed together in one directory. Additionally, all "doc" directories 4720 in 'runtimepath' will be used. 4721 Environment variables are expanded |:set_env|. For example: 4722 "$VIMRUNTIME/doc/help.txt". If $VIMRUNTIME is not set, $VIM is also 4723 tried. Also see |$VIMRUNTIME| and |option-backslash| about including 4724 spaces and backslashes. 4725 This option cannot be set from a |modeline| or in the |sandbox|, for 4726 security reasons. 4727 4728 *'helpheight'* *'hh'* 4729 'helpheight' 'hh' number (default 20) 4730 global 4731 Minimal initial height of the help window when it is opened with the 4732 ":help" command. The initial height of the help window is half of the 4733 current window, or (when the 'ea' option is on) the same as other 4734 windows. When the height is less than 'helpheight', the height is 4735 set to 'helpheight'. Set to zero to disable. 4736 4737 *'helplang'* *'hlg'* 4738 'helplang' 'hlg' string (default: messages language or empty) 4739 global 4740 {only available when compiled with the |+multi_lang| 4741 feature} 4742 Comma-separated list of languages. Vim will use the first language 4743 for which the desired help can be found. The English help will always 4744 be used as a last resort. You can add "en" to prefer English over 4745 another language, but that will only find tags that exist in that 4746 language and not in the English help. 4747 Example: > 4748 :set helplang=de,it 4749 < This will first search German, then Italian and finally English help 4750 files. 4751 When using |CTRL-]| and ":help!" in a non-English help file Vim will 4752 try to find the tag in the current language before using this option. 4753 See |help-translated|. 4754 4755 *'hidden'* *'hid'* *'nohidden'* *'nohid'* 4756 'hidden' 'hid' boolean (default off) 4757 global 4758 When off a buffer is unloaded when it is |abandon|ed. When on a 4759 buffer becomes hidden when it is |abandon|ed. If the buffer is still 4760 displayed in another window, it does not become hidden, of course. 4761 4762 The commands that move through the buffer list sometimes make a buffer 4763 hidden even if the 'hidden' option is off when these three are true: 4764 - the buffer is modified 4765 - 'autowrite' is off or writing is not possible 4766 - the '!' flag was used 4767 Also see |windows.txt|. 4768 4769 To only make one buffer hidden use the 'bufhidden' option. 4770 This option is set for one command with ":hide {command}" |:hide|. 4771 WARNING: It's easy to forget that you have changes in hidden buffers. 4772 Think twice when using ":q!" or ":qa!". 4773 4774 *'highlight'* *'hl'* 4775 'highlight' 'hl' string (default (as a single string): 4776 "8:SpecialKey,~:EndOfBuffer,@:NonText, 4777 d:Directory,e:ErrorMsg,i:IncSearch, 4778 l:Search,m:MoreMsg,M:ModeMsg,n:LineNr, 4779 a:LineNrAbove,b:LineNrBelow, 4780 N:CursorLineNr,r:Question,s:StatusLine, 4781 S:StatusLineNC,c:VertSplit, 4782 |:VertSplitNC,t:Title, 4783 v:Visual,V:VisualNOS,w:WarningMsg, 4784 W:WildMenu,f:Folded,F:FoldColumn, 4785 A:DiffAdd,C:DiffChange,D:DiffDelete, 4786 T:DiffText,E:DiffTextAdd,>:SignColumn, 4787 -:Conceal,B:SpellBad,P:SpellCap, 4788 R:SpellRare, L:SpellLocal,+:Pmenu, 4789 =:PmenuSel, k:PmenuMatch,<:PmenuMatchSel, 4790 [:PmenuKind,]:PmenuKindSel, 4791 {:PmenuExtra,}:PmenuExtraSel, 4792 x:PmenuSbar,X:PmenuThumb,j:PmenuBorder, 4793 H:PmenuShadow,p:Popup,J:PopupBorder, 4794 Q:PopupTitle,*:TabLine, 4795 #:TabLineSel,_:TabLineFill,!:CursorColumn, 4796 .:CursorLine,o:ColorColumn,q:QuickFixLine, 4797 z:StatusLineTerm,Z:StatusLineTermNC, 4798 g:MsgArea,h:ComplMatchIns,I:PreInsert") 4799 global 4800 This option can be used to set highlighting mode for various 4801 occasions. It is a comma-separated list of character pairs. The 4802 first character in a pair gives the occasion, the second the mode to 4803 use for that occasion. The occasions are: 4804 |hl-SpecialKey| 8 Meta and special keys listed with ":map" 4805 |hl-EndOfBuffer| ~ lines after the last line in the buffer 4806 |hl-NonText| @ '@' at the end of the window and 4807 characters from 'showbreak' 4808 |hl-Directory| d directories in CTRL-D listing and other special 4809 things in listings 4810 |hl-ErrorMsg| e error messages 4811 |hl-IncSearch| i 'incsearch' highlighting 4812 |hl-CurSearch| y current instance of last search pattern 4813 |hl-Search| l last search pattern highlighting (see 'hlsearch') 4814 |hl-MoreMsg| m |more-prompt| 4815 |hl-ModeMsg| M Mode (e.g., "-- INSERT --") 4816 |hl-MsgArea| g |Command-line| and message area 4817 |hl-ComplMatchIns| h matched text of currently inserted completion 4818 |hl-LineNr| n line number for ":number" and ":#" commands, and 4819 when 'number' or 'relativenumber' option is set. 4820 |hl-LineNrAbove| a line number above the cursor for when the 4821 'relativenumber' option is set. 4822 |hl-LineNrBelow| b line number below the cursor for when the 4823 'relativenumber' option is set. 4824 |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is 4825 set. 4826 |hl-Question| r |hit-enter| prompt and yes/no questions 4827 |hl-StatusLine| s status line of current window |status-line| 4828 |hl-StatusLineNC| S status lines of not-current windows 4829 |hl-Title| t Titles for output from ":set all", ":autocmd" etc. 4830 |hl-VertSplit| c column used to separate vertically split windows 4831 |hl-VertSplitNC| | column separating non-current vertically split 4832 windows 4833 |hl-Visual| v Visual mode 4834 |hl-VisualNOS| V Visual mode when Vim is "Not Owning the 4835 Selection" Only X11 Gui's |gui-x11|, 4836 |xterm-clipboard| and |wayland-selections| 4837 |hl-WarningMsg| w warning messages 4838 |hl-WildMenu| W wildcard matches displayed for 'wildmenu' 4839 |hl-Folded| f line used for closed folds 4840 |hl-FoldColumn| F 'foldcolumn' 4841 |hl-DiffAdd| A added line in diff mode 4842 |hl-DiffChange| C changed line in diff mode 4843 |hl-DiffDelete| D deleted line in diff mode 4844 |hl-DiffText| T changed text in diff mode 4845 |hl-DiffTextAdd| E inserted text in diff mode 4846 |hl-SignColumn| > column used for |signs| 4847 |hl-Conceal| - the placeholders used for concealed characters 4848 (see 'conceallevel') 4849 |hl-SpellBad| B misspelled word |spell| 4850 |hl-SpellCap| P word that should start with capital |spell| 4851 |hl-SpellRare| R rare word |spell| 4852 |hl-SpellLocal| L word from other region |spell| 4853 |hl-Pmenu| + popup menu normal line 4854 |hl-PmenuSel| = popup menu selected line 4855 |hl-PmenuKind| [ popup menu "kind" normal line 4856 |hl-PmenuKindSel| ] popup menu "kind" selected line 4857 |hl-PmenuExtra| { popup menu "extra" normal line 4858 |hl-PmenuExtraSel| } popup menu "extra" selected line 4859 |hl-PmenuSbar| x popup menu scrollbar 4860 |hl-PmenuThumb| X popup menu scrollbar thumb 4861 |hl-PmenuMatch| k popup menu matched text 4862 |hl-PmenuMatchSel| < popup menu matched text in selected line 4863 |hl-PmenuBorder| j popup menu border characters 4864 |hl-PmenuShadow| H popup menu shadow 4865 |hl-Popup| p popup window body 4866 |hl-PopupBorder| J popup window border characters 4867 |hl-PopupTitle| Q popup window title 4868 |hl-PreInsert| I text inserted when "preinsert" is in 'completeopt' 4869 |hl-Normal| ( Window color (supersedes 'wincolor' option) 4870 4871 Note that the "(" occasion is not set by default. 4872 4873 The display modes are: 4874 r reverse (termcap entry "mr" and "me") 4875 i italic (termcap entry "ZH" and "ZR") 4876 b bold (termcap entry "md" and "me") 4877 s standout (termcap entry "so" and "se") 4878 u underline (termcap entry "us" and "ue") 4879 c undercurl (termcap entry "Us" and "Ce") 4880 2 double underline (termcap entry "Ds" and "Ce") 4881 d dotted underline (termcap entry "ds" and "Ce") 4882 = dashed underline (termcap entry "Ds" and "Ce") 4883 t strikethrough (termcap entry "Ts" and "Te") 4884 n no highlighting 4885 - no highlighting 4886 : use a highlight group 4887 The default is used for occasions that are not included. 4888 If you want to change what the display modes do, see |dos-colors| 4889 for an example. 4890 When using the ':' display mode, this must be followed by the name of 4891 a highlight group. A highlight group can be used to define any type 4892 of highlighting, including using color. See |:highlight| on how to 4893 define one. The default uses a different group for each occasion. 4894 See |highlight-default| for the default highlight groups. 4895 4896 *'history'* *'hi'* 4897 'history' 'hi' number (Vim default: 200, Vi default: 0) 4898 global 4899 A history of ":" commands, and a history of previous search patterns 4900 is remembered. This option decides how many entries may be stored in 4901 each of these histories (see |cmdline-editing| and 'messagesopt' for 4902 the number of messages to remember). 4903 The maximum value is 10000. 4904 NOTE: This option is set to the Vi default value when 'compatible' is 4905 set and to the Vim default value when 'compatible' is reset. 4906 4907 *'hkmap'* *'hk'* *'nohkmap'* *'nohk'* 4908 'hkmap' 'hk' boolean (default off) 4909 global 4910 {only available when compiled with the |+rightleft| 4911 feature} 4912 When on, the keyboard is mapped for the Hebrew character set. 4913 Normally you would set 'allowrevins' and use CTRL-_ in insert mode to 4914 toggle this option. See |rileft.txt|. 4915 NOTE: This option is reset when 'compatible' is set. 4916 4917 *'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'* 4918 'hkmapp' 'hkp' boolean (default off) 4919 global 4920 {only available when compiled with the |+rightleft| 4921 feature} 4922 When on, phonetic keyboard mapping is used. 'hkmap' must also be on. 4923 This is useful if you have a non-Hebrew keyboard. 4924 See |rileft.txt|. 4925 NOTE: This option is reset when 'compatible' is set. 4926 4927 *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* 4928 'hlsearch' 'hls' boolean (default off) 4929 global 4930 {not available when compiled without the 4931 |+extra_search| feature} 4932 When there is a previous search pattern, highlight all its matches. 4933 The type of highlighting used can be set with the 'l' occasion in the 4934 'highlight' option. This uses the "Search" highlight group by 4935 default. Note that only the matching text is highlighted, any offsets 4936 are not applied. If the "CurSearch" highlight group is set then the 4937 current match is highlighted with that. 4938 See also: 'incsearch' and |:match|. 4939 When you get bored looking at the highlighted matches, you can turn it 4940 off with |:nohlsearch|. This does not change the option value, as 4941 soon as you use a search command, the highlighting comes back. 4942 'redrawtime' specifies the maximum time spent on finding matches. 4943 When the search pattern can match an end-of-line, Vim will try to 4944 highlight all of the matched text. However, this depends on where the 4945 search starts. This will be the first line in the window or the first 4946 line below a closed fold. A match in a previous line which is not 4947 drawn may not continue in a newly drawn line. 4948 You can specify whether the highlight status is restored on startup 4949 with the 'h' flag in 'viminfo' |viminfo-h|. 4950 NOTE: This option is reset when 'compatible' is set. 4951 4952 *'icon'* *'noicon'* 4953 'icon' boolean (default off, on when title can be restored) 4954 global 4955 When on, the icon text of the window will be set to the value of 4956 'iconstring' (if it is not empty), or to the name of the file 4957 currently being edited. Only the last part of the name is used. 4958 Overridden by the 'iconstring' option. 4959 Only works if the terminal supports setting window icons (currently 4960 only X11 GUI and terminals with a non-empty 't_IS' option - these are 4961 Unix xterm and iris-ansi by default, where 't_IS' is taken from the 4962 builtin termcap). 4963 When Vim was compiled with HAVE_X11 defined, the original icon will be 4964 restored if possible |X11|. See |X11-icon| for changing the icon on 4965 X11. 4966 For MS-Windows the icon can be changed, see |windows-icon|. 4967 NOTE: GNU screen is not consistent in handling icon-title and title 4968 escape sequences between versions. See 'title'. 4969 4970 *'iconstring'* 4971 'iconstring' string (default "") 4972 global 4973 When this option is not empty, it will be used for the icon text of 4974 the window. This happens only when the 'icon' option is on. 4975 Only works if the terminal supports setting window icon text 4976 (currently only X11 GUI and terminals with a non-empty 't_IS' option). 4977 Does not work for MS-Windows. 4978 When Vim was compiled with HAVE_X11 defined, the original icon will be 4979 restored if possible |X11|. 4980 When this option contains printf-style '%' items, they will be 4981 expanded according to the rules used for 'statusline'. See 4982 'titlestring' for example settings. 4983 This option cannot be set in a modeline when 'modelineexpr' is off. 4984 {not available when compiled without the |+statusline| feature} 4985 4986 *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 4987 'ignorecase' 'ic' boolean (default off) 4988 global 4989 Ignore case in search patterns, |cmdline-completion|, when 4990 searching in the tags file, non-|Vim9| |expr-==| and for Insert-mode 4991 completion |ins-completion|. 4992 Also see 'smartcase' and 'tagcase'. 4993 Can be overruled by using "\c" or "\C" in the pattern, see 4994 |/ignorecase|. 4995 4996 *'imactivatefunc'* *'imaf'* 4997 'imactivatefunc' 'imaf' string (default "") 4998 global 4999 This option specifies a function that will be called to 5000 activate or deactivate the Input Method. The value can be the name of 5001 a function, a |lambda| or a |Funcref|. See |option-value-function| 5002 for more information. 5003 It is not used in the MS-Windows GUI version. 5004 The expression will be evaluated in the |sandbox| when set from a 5005 modeline, see |sandbox-option|. 5006 5007 Example: > 5008 function ImActivateFunc(active) 5009 if a:active 5010 ... do something 5011 else 5012 ... do something 5013 endif 5014 " return value is not used 5015 endfunction 5016 set imactivatefunc=ImActivateFunc 5017 < 5018 *'imactivatekey'* *'imak'* 5019 'imactivatekey' 'imak' string (default "") 5020 global 5021 {only available when compiled with |+xim| and 5022 |+GUI_GTK|} *E599* 5023 Specifies the key that your Input Method in X-Windows uses for 5024 activation. When this is specified correctly, vim can fully control 5025 IM with 'imcmdline', 'iminsert' and 'imsearch'. 5026 You can't use this option to change the activation key, the option 5027 tells Vim what the key is. 5028 Format: 5029 [MODIFIER_FLAG-]KEY_STRING 5030 5031 These characters can be used for MODIFIER_FLAG (case is ignored): 5032 S Shift key 5033 L Lock key 5034 C Control key 5035 1 Mod1 key 5036 2 Mod2 key 5037 3 Mod3 key 5038 4 Mod4 key 5039 5 Mod5 key 5040 Combinations are allowed, for example "S-C-space" or "SC-space" are 5041 both shift+ctrl+space. 5042 See <X11/keysymdef.h> and XStringToKeysym for KEY_STRING. 5043 5044 Example: > 5045 :set imactivatekey=S-space 5046 < "S-space" means shift+space. This is the activation key for kinput2 + 5047 canna (Japanese), and ami (Korean). 5048 5049 Note that when using the GTK4 GUI, this option is not supported. The 5050 only valid value for this option will be an empty string. 5051 5052 *'imageprotocol'* *'ipc'* 5053 'imageprotocol' 'ipc' string (default: see below) 5054 global *E1585* *E1586* 5055 {only available when compiled with the |+image| feature} 5056 Same as the 'keyprotocol' option, but chooses which |image| backend to 5057 use, see |image-backends|. The supported image protocol names are: 5058 none No protocol is supported (images will not render) 5059 sixel The sixel protocol 5060 kitty Kitty graphics protocol 5061 5062 This option is first queried on startup, and then after when the 5063 'term' option changes. If the option is updated, and the image 5064 backend changes, then any loaded images will automatically switch 5065 backends. This includes when switching to the GUI using ":gui". 5066 5067 The default value is: > 5068 kitty:kitty,foot:sixel,ghostty:kitty,wezterm:kitty,xterm:sixel 5069 < 5070 *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'* 5071 'imcmdline' 'imc' boolean (default off) 5072 global 5073 When set the Input Method is always on when starting to edit a command 5074 line, unless entering a search pattern (see 'imsearch' for that). 5075 Setting this option is useful when your input method allows entering 5076 English characters directly, e.g., when it's used to type accented 5077 characters with dead keys. 5078 5079 *'imdisable'* *'imd'* *'noimdisable'* *'noimd'* 5080 'imdisable' 'imd' boolean (default off, on for some systems (SGI)) 5081 global 5082 When set the Input Method is never used. This is useful to disable 5083 the IM when it doesn't work properly. 5084 Currently this option is on by default for SGI/IRIX machines. This 5085 may change in later releases. 5086 5087 *'iminsert'* *'imi'* 5088 'iminsert' 'imi' number (default 0) 5089 local to buffer 5090 Specifies whether :lmap or an Input Method (IM) is to be used in 5091 Insert mode. Valid values: 5092 0 :lmap is off and IM is off 5093 1 :lmap is ON and IM is off 5094 2 :lmap is off and IM is ON 5095 To always reset the option to zero when leaving Insert mode with <Esc> 5096 this can be used: > 5097 :inoremap <ESC> <ESC>:set iminsert=0<CR> 5098 < This makes :lmap and IM turn off automatically when leaving Insert 5099 mode. 5100 Note that this option changes when using CTRL-^ in Insert mode 5101 |i_CTRL-^|. 5102 The value is set to 1 when setting 'keymap' to a valid keymap name. 5103 It is also used for the argument of commands like "r" and "f". 5104 The value 0 may not work correctly with Motif with some XIM 5105 methods. Use 'imdisable' to disable XIM then. 5106 5107 You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM 5108 via external command if Vim is not compiled with the |+xim|, 5109 |+multi_byte_ime| or |global-ime|. 5110 5111 *'imsearch'* *'ims'* 5112 'imsearch' 'ims' number (default -1) 5113 local to buffer 5114 Specifies whether :lmap or an Input Method (IM) is to be used when 5115 entering a search pattern. Valid values: 5116 -1 the value of 'iminsert' is used, makes it look like 5117 'iminsert' is also used when typing a search pattern 5118 0 :lmap is off and IM is off 5119 1 :lmap is ON and IM is off 5120 2 :lmap is off and IM is ON 5121 Note that this option changes when using CTRL-^ in Command-line mode 5122 |c_CTRL-^|. 5123 The value is set to 1 when it is not -1 and setting the 'keymap' 5124 option to a valid keymap name. 5125 The value 0 may not work correctly with Motif with some XIM 5126 methods. Use 'imdisable' to disable XIM then. 5127 5128 *'imstatusfunc'* *'imsf'* 5129 'imstatusfunc' 'imsf' string (default "") 5130 global 5131 This option specifies a function that is called to obtain the status 5132 of Input Method. It must return a positive number when IME is active. 5133 The value can be the name of a function, a |lambda| or a |Funcref|. 5134 See |option-value-function| for more information. 5135 It is not used in the MS-Windows GUI version. 5136 5137 Example: > 5138 function ImStatusFunc() 5139 let is_active = ...do something 5140 return is_active ? 1 : 0 5141 endfunction 5142 set imstatusfunc=ImStatusFunc 5143 < 5144 NOTE: This function is invoked very often. Keep it fast. 5145 The expression will be evaluated in the |sandbox| when set from a 5146 modeline, see |sandbox-option|. 5147 5148 *'imstyle'* *'imst'* 5149 'imstyle' 'imst' number (default 1) 5150 global 5151 {only available when compiled with |+xim| and 5152 |+GUI_GTK|} 5153 This option specifies the input style of Input Method: 5154 0 use on-the-spot style 5155 1 over-the-spot style 5156 See: |xim-input-style| 5157 5158 For a long time on-the-spot style had been used in the GTK version of 5159 vim, however, it is known that it causes troubles when using mappings, 5160 |single-repeat|, etc. Therefore over-the-spot style becomes the 5161 default now. This should work fine for most people, however if you 5162 have any problem with it, try using on-the-spot style. 5163 The expression will be evaluated in the |sandbox| when set from a 5164 modeline, see |sandbox-option|. 5165 5166 *'include'* *'inc'* 5167 'include' 'inc' string (default "^\s*#\s*include") 5168 global or local to buffer |global-local| 5169 {not available when compiled without the 5170 |+find_in_path| feature} 5171 Pattern to be used to find an include command. It is a search 5172 pattern, just like for the "/" command (See |pattern|). The default 5173 value is for C programs. This option is used for the commands "[i", 5174 "]I", "[d", etc. 5175 Normally the 'isfname' option is used to recognize the file name that 5176 comes after the matched pattern. But if "\zs" appears in the pattern 5177 then the text matched from "\zs" to the end, or until "\ze" if it 5178 appears, is used as the file name. Use this to include characters 5179 that are not in 'isfname', such as a space. You can then use 5180 'includeexpr' to process the matched text. 5181 See |option-backslash| about including spaces and backslashes. 5182 5183 *'includeexpr'* *'inex'* 5184 'includeexpr' 'inex' string (default "") 5185 local to buffer 5186 {not available when compiled without the 5187 |+find_in_path| or |+eval| features} 5188 Expression to be used to transform the string found with the 'include' 5189 option to a file name. Mostly useful to change "." to "/" for Java: > 5190 :setlocal includeexpr=substitute(v:fname,'\\.','/','g') 5191 < The "v:fname" variable will be set to the file name that was detected. 5192 Note the double backslash: the `:set` command first halves them, then 5193 one remains it the value, where "\." matches a dot literally. For 5194 simple character replacements `tr()` avoids the need for escaping: > 5195 :setlocal includeexpr=tr(v:fname,'.','/') 5196 < 5197 Also used for the |gf| command if an unmodified file name can't be 5198 found. Allows doing "gf" on the name after an 'include' statement. 5199 Note: Not used for |<cfile>|. 5200 5201 If the expression starts with s: or |<SID>|, then it is replaced with 5202 the script ID (|local-function|). Example: > 5203 setlocal includeexpr=s:MyIncludeExpr() 5204 setlocal includeexpr=<SID>SomeIncludeExpr() 5205 < Otherwise, the expression is evaluated in the context of the script 5206 where the option was set, thus script-local items are available. 5207 5208 It is more efficient if the value is just a function call without 5209 arguments, see |expr-option-function|. 5210 5211 The expression will be evaluated in the |sandbox| when set from a 5212 modeline, see |sandbox-option|. 5213 This option cannot be set in a modeline when 'modelineexpr' is off. 5214 5215 It is not allowed to change text or jump to another window while 5216 evaluating 'includeexpr' |textlock|. 5217 5218 *'incsearch'* *'is'* *'noincsearch'* *'nois'* 5219 'incsearch' 'is' boolean (default off, set in |defaults.vim| if the 5220 |+reltime| feature is supported) 5221 global 5222 {not available when compiled without the 5223 |+extra_search| features} 5224 While typing a search command, show where the pattern, as it was typed 5225 so far, matches. The matched string is highlighted. If the pattern 5226 is invalid or not found, nothing is shown. The screen will be updated 5227 often, this is only useful on fast terminals. 5228 Also applies to the pattern in commands: > 5229 :global 5230 :lvimgrep 5231 :lvimgrepadd 5232 :smagic 5233 :snomagic 5234 :sort 5235 :substitute 5236 :vglobal 5237 :vimgrep 5238 :vimgrepadd 5239 < Note that the match will be shown, but the cursor will return to its 5240 original position when no match is found and when pressing <Esc>. You 5241 still need to finish the search command with <Enter> to move the 5242 cursor to the match. 5243 You can use the CTRL-G and CTRL-T keys to move to the next and 5244 previous match. |c_CTRL-G| |c_CTRL-T| 5245 When compiled with the |+reltime| feature Vim only searches for about 5246 half a second. With a complicated pattern and/or a lot of text the 5247 match may not be found. This is to avoid that Vim hangs while you 5248 are typing the pattern. 5249 The highlighting can be set with the 'i' flag in 'highlight'. 5250 When 'hlsearch' is on, all matched strings are highlighted too while 5251 typing a search command. See also: 'hlsearch'. 5252 If you don't want to turn 'hlsearch' on, but want to highlight all 5253 matches while searching, you can turn on and off 'hlsearch' with 5254 autocmd. Example: > 5255 augroup vimrc-incsearch-highlight 5256 autocmd! 5257 autocmd CmdlineEnter [\/\?] :set hlsearch 5258 autocmd CmdlineLeave [\/\?] :set nohlsearch 5259 augroup END 5260 < 5261 CTRL-L can be used to add one character from after the current match 5262 to the command line. If 'ignorecase' and 'smartcase' are set and the 5263 command line has no uppercase characters, the added character is 5264 converted to lowercase. 5265 CTRL-R CTRL-W can be used to add the word at the end of the current 5266 match, excluding the characters that were already typed (starting from 5267 the beginning of the word). 5268 NOTE: This option is reset when 'compatible' is set. 5269 5270 *'indentexpr'* *'inde'* 5271 'indentexpr' 'inde' string (default "") 5272 local to buffer 5273 {not available when compiled without the |+eval| 5274 feature} 5275 Expression which is evaluated to obtain the proper indent for a line. 5276 It is used when a new line is created, for the |=| operator and 5277 in Insert mode as specified with the 'indentkeys' option. 5278 When this option is not empty, it overrules the 'cindent' and 5279 'smartindent' indenting. When 'lisp' is set, this option is 5280 only used when 'lispoptions' contains "expr:1". 5281 When 'paste' is set this option is not used for indenting. 5282 The expression is evaluated with |v:lnum| set to the line number for 5283 which the indent is to be computed. The cursor is also in this line 5284 when the expression is evaluated (but it may be moved around). 5285 5286 If the expression starts with s: or |<SID>|, then it is replaced with 5287 the script ID (|local-function|). Example: > 5288 set indentexpr=s:MyIndentExpr() 5289 set indentexpr=<SID>SomeIndentExpr() 5290 < Otherwise, the expression is evaluated in the context of the script 5291 where the option was set, thus script-local items are available. 5292 5293 The advantage of using a function call without arguments is that it is 5294 faster, see |expr-option-function|. 5295 5296 The expression must return the number of spaces worth of indent. It 5297 can return "-1" to keep the current indent (this means 'autoindent' is 5298 used for the indent). 5299 Functions useful for computing the indent are |indent()|, |cindent()| 5300 and |lispindent()|. 5301 The evaluation of the expression must not have side effects! It must 5302 not change the text, jump to another window, etc. Afterwards the 5303 cursor position is always restored, thus the cursor may be moved. 5304 Normally this option would be set to call a function: > 5305 :set indentexpr=GetMyIndent() 5306 < Error messages will be suppressed, unless the 'debug' option contains 5307 "msg". 5308 See |indent-expression|. 5309 NOTE: This option is set to "" when 'compatible' is set. 5310 5311 The expression will be evaluated in the |sandbox| when set from a 5312 modeline, see |sandbox-option|. 5313 This option cannot be set in a modeline when 'modelineexpr' is off. 5314 5315 It is not allowed to change text or jump to another window while 5316 evaluating 'indentexpr' |textlock|. 5317 5318 *'indentkeys'* *'indk'* 5319 'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e") 5320 local to buffer 5321 A list of keys that, when typed in Insert mode, cause reindenting of 5322 the current line. Only happens if 'indentexpr' isn't empty. 5323 The format is identical to 'cinkeys', see |indentkeys-format|. 5324 See |C-indenting| and |indent-expression|. 5325 5326 *'infercase'* *'inf'* *'noinfercase'* *'noinf'* 5327 'infercase' 'inf' boolean (default off) 5328 local to buffer 5329 When doing keyword completion in insert mode |ins-completion|, and 5330 'ignorecase' is also on, the case of the match is adjusted depending 5331 on the typed text. If the typed text contains a lowercase letter 5332 where the match has an upper case letter, the completed part is made 5333 lowercase. If the typed text has no lowercase letters and the match 5334 has a lowercase letter where the typed text has an uppercase letter, 5335 and there is a letter before it, the completed part is made uppercase. 5336 With 'noinfercase' the match is used as-is. 5337 5338 *'insertmode'* *'im'* *'noinsertmode'* *'noim'* 5339 'insertmode' 'im' boolean (default off) 5340 global 5341 Makes Vim work in a way that Insert mode is the default mode. Useful 5342 if you want to use Vim as a modeless editor. Used for |evim|. 5343 These Insert mode commands will be useful: 5344 - Use the cursor keys to move around. 5345 - Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When 5346 this is a mapping, it is executed as if 'insertmode' was off. 5347 Normal mode remains active until the mapping is finished. 5348 - Use CTRL-L to execute a number of Normal mode commands, then use 5349 <Esc> to get back to Insert mode. Note that CTRL-L moves the cursor 5350 left, like <Esc> does when 'insertmode' isn't set. |i_CTRL-L| 5351 5352 These items change when 'insertmode' is set: 5353 - when starting to edit of a file, Vim goes to Insert mode. 5354 - <Esc> in Insert mode is a no-op and beeps. 5355 - <Esc> in Normal mode makes Vim go to Insert mode. 5356 - CTRL-L in Insert mode is a command, it is not inserted. 5357 - CTRL-Z in Insert mode suspends Vim, see |CTRL-Z|. *i_CTRL-Z* 5358 However, when <Esc> is used inside a mapping, it behaves like 5359 'insertmode' was not set. This was done to be able to use the same 5360 mappings with 'insertmode' set or not set. 5361 When executing commands with |:normal| 'insertmode' is not used. 5362 5363 NOTE: This option is reset when 'compatible' is set. 5364 5365 *'isfname'* *'isf'* 5366 'isfname' 'isf' string (default for Win32: 5367 "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=" 5368 for AMIGA: "@,48-57,/,.,-,_,+,,,$,:" 5369 for VMS: "@,48-57,/,.,-,_,+,,,#,$,%,<,>,[,],:,;,~" 5370 for OS/390: "@,240-249,/,.,-,_,+,,,#,$,%,~,=" 5371 otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=") 5372 global 5373 The characters specified by this option are included in file names and 5374 path names. Filenames are used for commands like "gf", "[i" and in 5375 the tags file. It is also used for "\f" in a |pattern|. 5376 Multi-byte characters 256 and above are always included, only the 5377 characters up to 255 are specified with this option. 5378 For UTF-8 the characters 0xa0 to 0xff are included as well. 5379 Think twice before adding white space to this option. Although a 5380 space may appear inside a file name, the effect will be that Vim 5381 doesn't know where a file name starts or ends when doing completion. 5382 It most likely works better without a space in 'isfname'. 5383 5384 Note that on systems using a backslash as path separator, Vim tries to 5385 do its best to make it work as you would expect. That is a bit 5386 tricky, since Vi originally used the backslash to escape special 5387 characters. Vim will not remove a backslash in front of a normal file 5388 name character on these systems, but it will on Unix and alikes. The 5389 '&' and '^' are not included by default, because these are special for 5390 cmd.exe. 5391 5392 The format of this option is a list of parts, separated with commas. 5393 Each part can be a single character number or a range. A range is two 5394 character numbers with '-' in between. A character number can be a 5395 decimal number between 0 and 255 or the ASCII character itself (does 5396 not work for digits). Example: 5397 "_,-,128-140,#-43" (include '_' and '-' and the range 5398 128 to 140 and '#' to 43) 5399 If a part starts with '^', the following character number or range 5400 will be excluded from the option. The option is interpreted from left 5401 to right. Put the excluded character after the range where it is 5402 included. To include '^' itself use it as the last character of the 5403 option or the end of a range. Example: 5404 "^a-z,#,^" (exclude 'a' to 'z', include '#' and '^') 5405 If the character is '@', all characters where isalpha() returns TRUE 5406 are included. Normally these are the characters a to z and A to Z, 5407 plus accented characters. To include '@' itself use "@-@". Examples: 5408 "@,^a-z" All alphabetic characters, excluding lower 5409 case ASCII letters. 5410 "a-z,A-Z,@-@" All letters plus the '@' character. 5411 A comma can be included by using it where a character number is 5412 expected. Example: 5413 "48-57,,,_" Digits, comma and underscore. 5414 A comma can be excluded by prepending a '^'. Example: 5415 " -~,^,,9" All characters from space to '~', excluding 5416 comma, plus <Tab>. 5417 See |option-backslash| about including spaces and backslashes. 5418 5419 *'isident'* *'isi'* 5420 'isident' 'isi' string (default for Win32: 5421 "@,48-57,_,128-167,224-235" 5422 otherwise: "@,48-57,_,192-255") 5423 global 5424 The characters given by this option are included in identifiers. 5425 Identifiers are used in recognizing environment variables and after a 5426 match of the 'define' option. It is also used for "\i" in a 5427 |pattern|. See 'isfname' for a description of the format of this 5428 option. For '@' only characters up to 255 are used. 5429 Careful: If you change this option, it might break expanding 5430 environment variables. E.g., when '/' is included and Vim tries to 5431 expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead. 5432 5433 *'iskeyword'* *'isk'* 5434 'iskeyword' 'isk' string (Vim default: "@,48-57,_,192-255" 5435 Vi default: "@,48-57,_") 5436 local to buffer 5437 Keywords are used in searching and recognizing with many commands: 5438 "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See 5439 'isfname' for a description of the format of this option. For '@' 5440 characters above 255 check the "word" character class (any character 5441 that is categorized as a letter, number or emoji according to the 5442 Unicode general category). 5443 5444 Note that there is a difference between the "\k" character class and 5445 the |word| motion. The former matches any word character, while the 5446 latter stops at a change of the character class. 5447 5448 For C programs you could use "a-z,A-Z,48-57,_,.,-,>". 5449 For a help file it is set to all non-blank printable characters except 5450 '*', '"' and '|' (so that CTRL-] on a command finds the help for that 5451 command). 5452 When the 'lisp' option is on the '-' character is always included. 5453 This option also influences syntax highlighting, unless the syntax 5454 uses |:syn-iskeyword|. 5455 NOTE: This option is set to the Vi default value when 'compatible' is 5456 set and to the Vim default value when 'compatible' is reset. 5457 5458 *'isprint'* *'isp'* 5459 'isprint' 'isp' string (default for Win32 and VMS: 5460 "@,~-255"; otherwise: "@,161-255") 5461 global 5462 The characters given by this option are displayed directly on the 5463 screen. It is also used for "\p" in a |pattern|. The characters from 5464 space (ASCII 32) to '~' (ASCII 126) are always displayed directly, 5465 even when they are not included in 'isprint' or excluded. See 5466 'isfname' for a description of the format of this option. 5467 5468 Non-printable characters are displayed with two characters: 5469 0 - 31 "^@" - "^_" 5470 32 - 126 always single characters 5471 127 "^?" 5472 128 - 159 "~@" - "~_" 5473 160 - 254 "| " - "|~" 5474 255 "~?" 5475 When 'encoding' is a Unicode one, illegal bytes from 128 to 255 are 5476 displayed as <xx>, with the hexadecimal value of the byte. 5477 When 'display' contains "uhex" all unprintable characters are 5478 displayed as <xx>. 5479 The SpecialKey highlighting will be used for unprintable characters. 5480 |hl-SpecialKey| 5481 5482 Multi-byte characters 256 and above are always included, only the 5483 characters up to 255 are specified with this option. When a character 5484 is printable but it is not available in the current font, a 5485 replacement character will be shown. 5486 Unprintable and zero-width Unicode characters are displayed as <xxxx>. 5487 There is no option to specify these characters. 5488 5489 *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'* 5490 'joinspaces' 'js' boolean (default on) 5491 global 5492 Insert two spaces after a '.', '?' and '!' with a join command. 5493 When 'cpoptions' includes the 'j' flag, only do this after a '.'. 5494 Otherwise only one space is inserted. 5495 NOTE: This option is set when 'compatible' is set. 5496 5497 *'jumpoptions'* *'jop'* 5498 'jumpoptions' 'jop' string (default "") 5499 global 5500 List of words that change the behavior of the |jumplist|. 5501 stack Make the jumplist behave like the tagstack. 5502 Relative location of entries in the jumplist is 5503 preserved at the cost of discarding subsequent entries 5504 when navigating backwards in the jumplist and then 5505 jumping to a location. |jumplist-stack| 5506 5507 *'key'* 5508 'key' string (default "") 5509 local to buffer 5510 {only available when compiled with the |+cryptv| 5511 feature} 5512 The key that is used for encrypting and decrypting the current buffer. 5513 See |encryption| and 'cryptmethod'. 5514 Careful: Do not set the key value by hand, someone might see the typed 5515 key. Use the |:X| command. But you can make 'key' empty: > 5516 :set key= 5517 < It is not possible to get the value of this option with ":set key" or 5518 "echo &key". This is to avoid showing it to someone who shouldn't 5519 know. It also means you cannot see it yourself once you have set it, 5520 be careful not to make a typing error! 5521 You also cannot use |:set-=|, |:set+=|, |:set^=| on this option to 5522 prevent an attacker from guessing substrings in your key. 5523 You can use "&key" in an expression to detect whether encryption is 5524 enabled. When 'key' is set it returns "*****" (five stars). 5525 5526 *'keymap'* *'kmp'* *E544* 5527 'keymap' 'kmp' string (default "") 5528 local to buffer 5529 {only available when compiled with the |+keymap| 5530 feature} 5531 Name of a keyboard mapping. See |mbyte-keymap|. 5532 Setting this option to a valid keymap name has the side effect of 5533 setting 'iminsert' to one, so that the keymap becomes effective. 5534 'imsearch' is also set to one, unless it was -1 5535 Only alphanumeric characters, '.', '-' and '_' can be used. 5536 5537 *'keymodel'* *'km'* 5538 'keymodel' 'km' string (default "") 5539 global 5540 List of comma-separated words, which enable special things that keys 5541 can do. These values can be used: 5542 startsel Using a shifted special key starts selection (either 5543 Select mode or Visual mode, depending on "key" being 5544 present in 'selectmode'). 5545 stopsel Using a not-shifted special key stops selection. 5546 Special keys in this context are the cursor keys, <End>, <Home>, 5547 <PageUp> and <PageDown>. 5548 The 'keymodel' option is set by the |:behave| command. 5549 5550 *'keyprotocol'* *'kpc'* 5551 'keyprotocol' 'kpc' string (default: see below) 5552 global 5553 Specifies what keyboard protocol to use depending on the value of 5554 'term'. The supported keyboard protocols names are: 5555 none whatever the terminal uses 5556 mok2 modifyOtherKeys level 2, as supported by xterm 5557 kitty Kitty keyboard protocol, as supported by Kitty 5558 5559 The option value is a list of comma separated items. Each item has 5560 a pattern that is matched against the 'term' option, a colon and the 5561 protocol name to be used. To illustrate this, the default value would 5562 be set with: > 5563 set keyprotocol=kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty 5564 set keyprotocol+=xterm:mok2 5565 5566 < This means that when 'term' contains "kitty, "foot", "ghostty" or 5567 "wezterm" somewhere, then the "kitty" protocol is used. When 'term' 5568 contains "xterm" somewhere, then the "mok2" protocol is used. 5569 5570 The first match is used, thus if you want to have "kitty" use the 5571 kitty protocol, but "badkitty" not, then you should match "badkitty" 5572 first and use the "none" value: > 5573 set keyprotocol=badkitty:none,kitty:kitty 5574 < 5575 The option is used after 'term' has been changed. First the termcap 5576 entries are set, possibly using the builtin list, see |builtin-terms|. 5577 Then this option is inspected and if there is a match and a protocol 5578 is specified the following happens: 5579 none Nothing, the regular t_TE and t_TI values remain 5580 5581 mok2 The t_TE value is changed to: 5582 CSI >4;m disables modifyOtherKeys 5583 The t_TI value is changed to: 5584 CSI >4;2m enables modifyOtherKeys 5585 CSI ?4m request the modifyOtherKeys state 5586 5587 kitty The t_TE value is changed to: 5588 CSI >4;m disables modifyOtherKeys 5589 CSI =0;1u disables the kitty keyboard protocol 5590 The t_TI value is changed to: 5591 CSI =1;1u enables the kitty keyboard protocol 5592 CSI ?u request kitty keyboard protocol state 5593 CSI >c request the termresponse 5594 5595 If you notice problems, such as characters being displayed that 5596 disappear after `CTRL-L`, you might want to try making this option 5597 empty. Then set the 'term' option to have it take effect: > 5598 set keyprotocol= 5599 let &term = &term 5600 < 5601 5602 *'keywordprg'* *'kp'* 5603 'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help", 5604 VMS: "help") 5605 global or local to buffer |global-local| 5606 Program to use for the |K| command. Environment variables are 5607 expanded |:set_env|. ":help" may be used to access the Vim internal 5608 help. (Note that previously setting the global option to the empty 5609 value did this, which is now deprecated.) 5610 When the first character is ":", the command is invoked as a Vim 5611 Ex command with [count] added as an argument if it is not zero. 5612 When "man", "man -s" or an Ex command is used, Vim will automatically 5613 translate a count for the "K" command and pass it as the first 5614 argument. For "man -s" the "-s" is removed when there is no count. 5615 See |option-backslash| about including spaces and backslashes. 5616 Example: > 5617 :set keywordprg=man\ -s 5618 < This option cannot be set from a |modeline| or in the |sandbox|, for 5619 security reasons. 5620 5621 *'langmap'* *'lmap'* *E357* *E358* 5622 'langmap' 'lmap' string (default "") 5623 global 5624 {only available when compiled with the |+langmap| 5625 feature} 5626 This option allows switching your keyboard into a special language 5627 mode. When you are typing text in Insert mode the characters are 5628 inserted directly. When in Normal mode the 'langmap' option takes 5629 care of translating these special characters to the original meaning 5630 of the key. This means you don't have to change the keyboard mode to 5631 be able to execute Normal mode commands. 5632 This is the opposite of the 'keymap' option, where characters are 5633 mapped in Insert mode. 5634 Also consider setting 'langremap' to off, to prevent 'langmap' from 5635 applying to characters resulting from a mapping. 5636 This option cannot be set from a |modeline| or in the |sandbox|, for 5637 security reasons. 5638 5639 Example (for Greek, in UTF-8): *greek* > 5640 :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 5641 < Example (exchanges meaning of z and y for commands): > 5642 :set langmap=zy,yz,ZY,YZ 5643 < 5644 The 'langmap' option is a list of parts, separated with commas. Each 5645 part can be in one of two forms: 5646 1. A list of pairs. Each pair is a "from" character immediately 5647 followed by the "to" character. Examples: "aA", "aAbBcC". 5648 2. A list of "from" characters, a semicolon and a list of "to" 5649 characters. Example: "abc;ABC" 5650 Example: "aA,fgh;FGH,cCdDeE" 5651 Special characters need to be preceded with a backslash. These are 5652 ";", ',', '"', '|' and backslash itself. 5653 5654 This will allow you to activate vim actions without having to switch 5655 back and forth between the languages. Your language characters will 5656 be understood as normal vim English characters (according to the 5657 langmap mappings) in the following cases: 5658 o Normal/Visual mode (commands, buffer/register names, user mappings) 5659 o Insert/Replace Mode: Register names after CTRL-R 5660 o Insert/Replace Mode: Mappings 5661 Characters entered in Command-line mode will NOT be affected by 5662 this option. Note that this option can be changed at any time 5663 allowing to switch between mappings for different languages/encodings. 5664 Use a mapping to avoid having to type it each time! 5665 5666 *'langmenu'* *'lm'* 5667 'langmenu' 'lm' string (default "") 5668 global 5669 {only available when compiled with the |+menu| and 5670 |+multi_lang| features} 5671 Language to use for menu translation. Tells which file is loaded 5672 from the "lang" directory in 'runtimepath': > 5673 "lang/menu_" .. &langmenu .. ".vim" 5674 < (without the spaces). For example, to always use the Dutch menus, no 5675 matter what $LANG is set to: > 5676 :set langmenu=nl_NL.ISO_8859-1 5677 < When 'langmenu' is empty, |v:lang| is used. 5678 Only normal file name characters can be used, "/\*?[|<>" are illegal. 5679 If your $LANG is set to a non-English language but you do want to use 5680 the English menus: > 5681 :set langmenu=none 5682 < This option must be set before loading menus, switching on filetype 5683 detection or syntax highlighting. Once the menus are defined setting 5684 this option has no effect. But you could do this: > 5685 :source $VIMRUNTIME/delmenu.vim 5686 :set langmenu=de_DE.ISO_8859-1 5687 :source $VIMRUNTIME/menu.vim 5688 < Warning: This deletes all menus that you defined yourself! 5689 5690 *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'* 5691 'langnoremap' 'lnr' boolean (default off, set in |defaults.vim|) 5692 global 5693 {only available when compiled with the |+langmap| 5694 feature} 5695 This is just like 'langremap' but with the value inverted. It only 5696 exists for backwards compatibility. When setting 'langremap' then 5697 'langnoremap' is set to the inverted value, and the other way around. 5698 5699 *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'* 5700 'langremap' 'lrm' boolean (default on, set to off in |defaults.vim|) 5701 global 5702 {only available when compiled with the |+langmap| 5703 feature} 5704 When off, setting 'langmap' does not apply to characters resulting 5705 from a mapping. This basically means, if you noticed that setting 5706 'langmap' disables some of your mappings, try resetting this option. 5707 This option defaults to on for backwards compatibility. Set it off if 5708 that works for you to avoid mappings to break. 5709 5710 *'laststatus'* *'ls'* 5711 'laststatus' 'ls' number (default 1) 5712 global 5713 The value of this option influences when the last window will have a 5714 status line: 5715 0: never 5716 1: only if there are at least two windows 5717 2: always 5718 5719 Here "last window" means the last window in a column, i.e. the bottom- 5720 most one, just above the command line. A window with another window 5721 below it always has a status line, since it also visually separates 5722 those. 5723 5724 The screen looks nicer with a status line if you have several 5725 windows, but it takes another screen line. |status-line| 5726 5727 *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'* 5728 'lazyredraw' 'lz' boolean (default off) 5729 global 5730 When this option is set, the screen will not be redrawn while 5731 executing macros, registers and other commands that have not been 5732 typed. Also, updating the window title is postponed. To force an 5733 update use |:redraw|. 5734 This may occasionally cause display errors. It is only meant to be 5735 set temporarily when performing an operation where redrawing may cause 5736 flickering or cause a slowdown. 5737 5738 *'lhistory'* *'lhi'* 5739 'lhistory' 'lhi' number (default: 10) 5740 local to window 5741 {only available when compiled with the |+quickfix| 5742 feature} 5743 Like 'chistory', but for the location list stack associated with a 5744 window. If the option is changed in either the location list window 5745 itself or the window that is associated with the location list stack, 5746 the new value will also be applied to the other one. This means this 5747 value will always be the same for a given location list window and its 5748 corresponding window. See |quickfix-stack| for additional info. 5749 5750 *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 5751 'linebreak' 'lbr' boolean (default off) 5752 local to window 5753 {not available when compiled without the |+linebreak| 5754 feature} 5755 If on, Vim will wrap long lines at a character in 'breakat' rather 5756 than at the last character that fits on the screen. Unlike 5757 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, 5758 it only affects the way the file is displayed, not its contents. 5759 If 'breakindent' is set, line is visually indented. Then, the value 5760 of 'showbreak' is used to put in front of wrapped lines. This option 5761 is not used when the 'wrap' option is off. 5762 Note that <Tab> characters after an <EOL> are mostly not displayed 5763 with the right amount of white space. 5764 5765 *'lines'* *E593* 5766 'lines' number (default 24 or terminal height) 5767 global 5768 Number of lines of the Vim window. 5769 Normally you don't need to set this. It is done automatically by the 5770 terminal initialization code. Also see |posix-screen-size|. 5771 When Vim is running in the GUI or in a resizable window, setting this 5772 option will cause the window size to be changed. When you only want 5773 to use the size for the GUI, put the command in your |gvimrc| file. 5774 Vim limits the number of lines to what fits on the screen. You can 5775 use this command to get the tallest window possible: > 5776 :set lines=999 5777 < Minimum value is 2, maximum value is 1000. 5778 If you get fewer lines than expected, check the 'guiheadroom' option. 5779 When you set this option and Vim is unable to change the physical 5780 number of lines of the display, the display may be messed up. 5781 5782 *'linespace'* *'lsp'* 5783 'linespace' 'lsp' number (default 0, 1 for Win32 GUI) 5784 global 5785 {only in the GUI} 5786 Number of pixel lines inserted between characters. Useful if the font 5787 uses the full character cell height, making lines touch each other. 5788 When non-zero there is room for underlining. 5789 With some fonts there can be too much room between lines (to have 5790 space for ascents and descents). Then it makes sense to set 5791 'linespace' to a negative value. This may cause display problems 5792 though! 5793 5794 *'lisp'* *'nolisp'* 5795 'lisp' boolean (default off) 5796 local to buffer 5797 Lisp mode: When <Enter> is typed in insert mode set the indent for 5798 the next line to Lisp standards (well, sort of). Also happens with 5799 "cc" or "S". 'autoindent' must also be on for this to work. The 'p' 5800 flag in 'cpoptions' changes the method of indenting: Vi compatible or 5801 better. Also see 'lispwords'. 5802 The '-' character is included in keyword characters. Redefines the 5803 "=" operator to use this same indentation algorithm rather than 5804 calling an external program if 'equalprg' is empty. 5805 This option is not used when 'paste' is set. 5806 5807 *'lispoptions'* *'lop'* 5808 'lispoptions' 'lop' string (default "") 5809 local to buffer 5810 Comma-separated list of items that influence the Lisp indenting when 5811 enabled with the 'lisp' option. Currently only one item is supported: 5812 expr:1 use 'indentexpr' for Lisp indenting when it is set 5813 expr:0 do not use 'indentexpr' for Lisp indenting (default) 5814 Note that when using 'indentexpr' the `=` operator indents all the 5815 lines, otherwise the first line is not indented (Vi-compatible). 5816 5817 *'lispwords'* *'lw'* 5818 'lispwords' 'lw' string (default is very long) 5819 global or local to buffer |global-local| 5820 Comma-separated list of words that influence the Lisp indenting when 5821 enabled with the 'lisp' option. 5822 5823 *'list'* *'nolist'* 5824 'list' boolean (default off) 5825 local to window 5826 List mode: By default show tabs as CTRL-I is displayed, display $ 5827 after end of line. Useful to see the difference between tabs and 5828 spaces and for trailing blanks. Further changed by the 'listchars' 5829 option. 5830 5831 The cursor is displayed at the start of the space a Tab character 5832 occupies, not at the end as usual in Normal mode. To get this cursor 5833 position while displaying Tabs with spaces, use: > 5834 :set list lcs=tab:\ \ 5835 < 5836 Note that list mode will also affect formatting (set with 'textwidth' 5837 or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for 5838 changing the way tabs are displayed. 5839 5840 *'listchars'* *'lcs'* 5841 'listchars' 'lcs' string (default "eol:$") 5842 global or local to window |global-local| 5843 Strings to use in 'list' mode and for the |:list| command. It is a 5844 comma-separated list of string settings. *E1511* 5845 *lcs-eol* 5846 eol:c Character to show at the end of each line. When 5847 omitted, there is no extra character at the end of the 5848 line. 5849 *lcs-tab* 5850 tab:xy[z] Two or three characters to be used to show a tab. 5851 The third character is optional. 5852 5853 tab:xy The 'x' is always used, then 'y' as many times as will 5854 fit. Thus "tab:>-" displays: 5855 > 5856 >- 5857 >-- 5858 etc. 5859 5860 tab:xyz The 'z' is always used, then 'x' is prepended, and 5861 then 'y' is used as many times as will fit. Thus 5862 "tab:<->" displays: 5863 > 5864 <> 5865 <-> 5866 <--> 5867 etc. 5868 5869 When "tab:" is omitted, a tab is shown as ^I. 5870 *lcs-space* 5871 space:c Character to show for a space. When omitted, spaces 5872 are left blank. 5873 *lcs-multispace* 5874 multispace:c... 5875 One or more characters to use cyclically to show for 5876 multiple consecutive spaces. Overrides the "space" 5877 setting, except for single spaces. When omitted, the 5878 "space" setting is used. For example, 5879 `:set listchars=multispace:---+` shows ten consecutive 5880 spaces as: 5881 ---+---+-- ~ 5882 *lcs-lead* 5883 lead:c Character to show for leading spaces. When omitted, 5884 leading spaces are blank. Overrides the "space" and 5885 "multispace" settings for leading spaces. You can 5886 combine it with "tab:", for example: > 5887 :set listchars+=tab:>-,lead:. 5888 < *lcs-leadmultispace* 5889 leadmultispace:c... 5890 Like the |lcs-multispace| value, but for leading 5891 spaces only. Also overrides |lcs-lead| for leading 5892 multiple spaces. 5893 `:set listchars=leadmultispace:---+` shows ten 5894 consecutive leading spaces as: 5895 ---+---+--XXX ~ 5896 Where "XXX" denotes the first non-blank characters in 5897 the line. 5898 *lcs-leadtab* 5899 leadtab:xy[z] 5900 Like |lcs-tab|, but only for leading tabs. When 5901 omitted, the "tab" setting is used for leading tabs. 5902 |lcs-tab| must also be set for this to work. *E1572* 5903 You can combine it with "tab:", for example: > 5904 :set listchars=tab:>-,leadtab:.\ 5905 < This shows leading tabs as periods(.) and other tabs 5906 as ">--". 5907 *lcs-trail* 5908 trail:c Character to show for trailing spaces. When omitted, 5909 trailing spaces are blank. Overrides the "space" and 5910 "multispace" settings for trailing spaces. 5911 *lcs-extends* 5912 extends:c Character to show in the last column, when 'wrap' is 5913 off and the line continues beyond the right of the 5914 screen. 5915 *lcs-precedes* 5916 precedes:c Character to show in the first visible column of the 5917 physical line, when there is text preceding the 5918 character visible in the first column. 5919 *lcs-conceal* 5920 conceal:c Character to show in place of concealed text, when 5921 'conceallevel' is set to 1. 5922 *lcs-nbsp* 5923 nbsp:c Character to show for a non-breakable space character 5924 (0xA0 (160 decimal) and U+202F). Left blank when 5925 omitted. 5926 5927 The characters ':' and ',' should not be used. UTF-8 characters can 5928 be used when 'encoding' is "utf-8", otherwise only printable 5929 characters are allowed. All characters must be single width. *E1512* 5930 5931 Each character can be specified as hex: > 5932 set listchars=eol:\\x24 5933 set listchars=eol:\\u21b5 5934 set listchars=eol:\\U000021b5 5935 < Note that a double backslash is used. The number of hex characters 5936 must be exactly 2 for \\x, 4 for \\u and 8 for \\U. 5937 5938 Examples: > 5939 :set lcs=tab:>-,trail:- 5940 :set lcs=tab:>-,eol:<,nbsp:% 5941 :set lcs=extends:>,precedes:< 5942 < The "NonText" highlighting will be used for "eol", "extends" and 5943 "precedes". "SpecialKey" will be used for "tab", "nbsp", "space", 5944 "multispace", "lead" and "trail". 5945 |hl-NonText| |hl-SpecialKey| 5946 5947 *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'* 5948 'loadplugins' 'lpl' boolean (default on) 5949 global 5950 When on the plugin scripts are loaded when starting up |load-plugins|. 5951 This option can be reset in your |vimrc| file to disable the loading 5952 of plugins. 5953 Note that using the "-u NONE", "-u DEFAULTS" and "--noplugin" command 5954 line arguments reset this option. See |-u| and |--noplugin|. 5955 5956 *'luadll'* 5957 'luadll' string (default depends on the build) 5958 global 5959 {only available when compiled with the |+lua/dyn| 5960 feature} 5961 Specifies the name of the Lua shared library. The default is 5962 DYNAMIC_LUA_DLL, which was specified at compile time. 5963 Environment variables are expanded |:set_env|. 5964 This option cannot be set from a |modeline| or in the |sandbox|, for 5965 security reasons. 5966 5967 *'macatsui'* *'nomacatsui'* 5968 'macatsui' boolean (default on) 5969 global 5970 {not supported} 5971 No longer supported, as the Mac OS X GUI code was removed. 5972 5973 *'magic'* *'nomagic'* 5974 'magic' boolean (default on) 5975 global 5976 Changes the special characters that can be used in search patterns. 5977 See |pattern|. 5978 WARNING: Switching this option off most likely breaks plugins! That 5979 is because many patterns assume it's on and will fail when it's off. 5980 Only switch it off when working with old Vi scripts. In any other 5981 situation write patterns that work when 'magic' is on. Include "\M" 5982 when you want to |/\M|. 5983 In |Vim9| script the value of 'magic' is ignored, patterns behave like 5984 it is always set. 5985 5986 *'makeef'* *'mef'* 5987 'makeef' 'mef' string (default: "") 5988 global 5989 {not available when compiled without the |+quickfix| 5990 feature} 5991 Name of the errorfile for the |:make| command (see |:make_makeprg|) 5992 and the |:grep| command. 5993 When it is empty, an internally generated temp file will be used. 5994 When "##" is included, it is replaced by a number to make the name 5995 unique. This makes sure that the ":make" command doesn't overwrite an 5996 existing file. 5997 NOT used for the ":cf" command. See 'errorfile' for that. 5998 Environment variables are expanded |:set_env|. 5999 See |option-backslash| about including spaces and backslashes. 6000 This option cannot be set from a |modeline| or in the |sandbox|, for 6001 security reasons. 6002 6003 *'makeencoding'* *'menc'* 6004 'makeencoding' 'menc' string (default "") 6005 global or local to buffer |global-local| 6006 Encoding used for reading the output of external commands. When 6007 empty, encoding is not converted. 6008 This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, 6009 `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, 6010 and `:laddfile`. 6011 6012 This would be mostly useful when you use MS-Windows and set 'encoding' 6013 to "utf-8". If |+iconv| is enabled and GNU libiconv is used, setting 6014 'makeencoding' to "char" has the same effect as setting to the system 6015 locale encoding. Example: > 6016 :set encoding=utf-8 6017 :set makeencoding=char " system locale is used 6018 < 6019 *'makeprg'* *'mp'* 6020 'makeprg' 'mp' string (default "make", VMS: "MMS") 6021 global or local to buffer |global-local| 6022 Program to use for the ":make" command. See |:make_makeprg|. 6023 This option may contain '%' and '#' characters (see |:_%| and |:_#|), 6024 which are expanded to the current and alternate file name. Use |::S| 6025 to escape file names in case they contain special characters. 6026 Environment variables are expanded |:set_env|. See |option-backslash| 6027 about including spaces and backslashes. 6028 Note that a '|' must be escaped twice: once for ":set" and once for 6029 the interpretation of a command. When you use a filter called 6030 "myfilter" do it like this: > 6031 :set makeprg=gmake\ \\\|\ myfilter 6032 < The placeholder "$*" can be given (even multiple times) to specify 6033 where the arguments will be included, for example: > 6034 :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*} 6035 < This option cannot be set from a |modeline| or in the |sandbox|, for 6036 security reasons. 6037 6038 *'matchpairs'* *'mps'* 6039 'matchpairs' 'mps' string (default "(:),{:},[:]") 6040 local to buffer 6041 Characters that form pairs. The |%| command jumps from one to the 6042 other. 6043 Only character pairs are allowed that are different, thus you cannot 6044 jump between two double quotes. 6045 The characters must be separated by a colon. 6046 The pairs must be separated by a comma. Example for including '<' and 6047 '>' (for HTML): > 6048 :set mps+=<:> 6049 6050 < A more exotic example, to jump between the '=' and ';' in an 6051 assignment, useful for languages like C and Java: > 6052 :au FileType c,cpp,java set mps+==:; 6053 6054 < For a more advanced way of using "%", see the matchit.vim plugin in 6055 the $VIMRUNTIME/pack/dist/opt/matchit directory. |add-local-help| 6056 6057 *'matchtime'* *'mat'* 6058 'matchtime' 'mat' number (default 5) 6059 global 6060 Tenths of a second to show the matching paren, when 'showmatch' is 6061 set. Note that this is not in milliseconds, like other options that 6062 set a time. This is to be compatible with Nvi. 6063 6064 *'maxcombine'* *'mco'* 6065 'maxcombine' 'mco' number (default 2) 6066 global 6067 The maximum number of combining characters supported for displaying. 6068 Only used when 'encoding' is "utf-8". 6069 The default is OK for most languages. Hebrew may require 4. 6070 Maximum value is 6. 6071 Even when this option is set to 2 you can still edit text with more 6072 combining characters, you just can't see them. Use |g8| or |ga|. 6073 When set to 0, you will not be able to see any combining characters. 6074 See |mbyte-combining|. 6075 6076 *'maxfuncdepth'* *'mfd'* 6077 'maxfuncdepth' 'mfd' number (default 100) 6078 global 6079 {not available when compiled without the |+eval| 6080 feature} 6081 Maximum depth of function calls for user functions. This normally 6082 catches endless recursion. When using a recursive function with 6083 more depth, set 'maxfuncdepth' to a bigger number. But this will use 6084 more memory, there is the danger of failing when memory is exhausted. 6085 Increasing this limit above 200 also changes the maximum for Ex 6086 command recursion, see |E169|. 6087 See also |:function|. 6088 Also used for maximum depth of callback functions and encoding and 6089 decoding of deeply nested json data. 6090 6091 *'maxmapdepth'* *'mmd'* *E223* 6092 'maxmapdepth' 'mmd' number (default 1000) 6093 global 6094 Maximum number of times a mapping is done without resulting in a 6095 character to be used. This normally catches endless mappings, like 6096 ":map x y" with ":map y x". It still does not catch ":map g wg", 6097 because the 'w' is used before the next mapping is done. See also 6098 |key-mapping|. 6099 6100 *'maxmem'* *'mm'* 6101 'maxmem' 'mm' number (default between 256 to 5120 (system 6102 dependent) or half the amount of memory 6103 available) 6104 global 6105 Maximum amount of memory (in Kbyte) to use for one buffer. When this 6106 limit is reached allocating extra memory for a buffer will cause 6107 other memory to be freed. 6108 The maximum usable value is about 2000000. Use this to work without a 6109 limit. 6110 The value is ignored when 'swapfile' is off. 6111 Also see 'maxmemtot'. 6112 6113 *'maxmempattern'* *'mmp'* 6114 'maxmempattern' 'mmp' number (default 1000) 6115 global 6116 Maximum amount of memory (in Kbyte) to use for pattern matching. 6117 The maximum value is about 2000000. Use this to work without a limit. 6118 *E363* 6119 When Vim runs into the limit it gives an error message and mostly 6120 behaves like CTRL-C was typed. 6121 Running into the limit often means that the pattern is very 6122 inefficient or too complex. This may already happen with the pattern 6123 "\(.\)*" on a very long line. ".*" works much better. 6124 Might also happen on redraw, when syntax rules try to match a complex 6125 text structure. 6126 Vim may run out of memory before hitting the 'maxmempattern' limit, in 6127 which case you get an "Out of memory" error instead. 6128 6129 *'maxmemtot'* *'mmt'* 6130 'maxmemtot' 'mmt' number (default between 2048 and 10240 (system 6131 dependent) or half the amount of memory 6132 available) 6133 global 6134 Maximum amount of memory in Kbyte to use for all buffers together. 6135 The maximum usable value is about 2000000 (2 Gbyte). Use this to work 6136 without a limit. 6137 On 64 bit machines higher values might work. But hey, do you really 6138 need more than 2 Gbyte for text editing? Keep in mind that text is 6139 stored in the swap file, one can edit files > 2 Gbyte anyway. We do 6140 need the memory to store undo info. 6141 Buffers with 'swapfile' off still count to the total amount of memory 6142 used. 6143 Also see 'maxmem'. 6144 6145 *'maxsearchcount'* *'msc'* 6146 'maxsearchcount' 'msc' number (default 99) 6147 global 6148 Maximum number of matches shown for the search count status |shm-S| 6149 When the number of matches exceeds this value, Vim shows ">" instead 6150 of the exact count to keep searching fast. 6151 Note: larger values may impact performance. 6152 The value must be between 1 and 9999. See also the |searchcount()| 6153 function. 6154 6155 *'menuitems'* *'mis'* 6156 'menuitems' 'mis' number (default 25) 6157 global 6158 {not available when compiled without the |+menu| 6159 feature} 6160 Maximum number of items to use in a menu. Used for menus that are 6161 generated from a list of items, e.g., the Buffers menu. Changing this 6162 option has no direct effect, the menu must be refreshed first. 6163 6164 *'messagesopt'* *'mopt'* 6165 'messagesopt' 'mopt' string (default "hit-enter,history:500") 6166 global 6167 6168 Option settings for outputting messages. It can consist of the 6169 following items. Items must be separated by a comma. 6170 6171 hit-enter Use a |hit-enter| prompt when the message is longer than 6172 'cmdheight' size. 6173 6174 wait:{n} Instead of using a |hit-enter| prompt, simply wait for 6175 {n} milliseconds so that the user has a chance to read 6176 the message. The maximum value of {n} is 10000. Use 6177 0 to disable the wait (but then the user may miss an 6178 important message). 6179 This item is ignored when "hit-enter" is present, but 6180 required when "hit-enter" is not present. 6181 6182 history:{n} Determines how many entries are remembered in the 6183 |:messages| history. The maximum value is 10000. 6184 Setting it to zero clears the message history. 6185 This item must always be present. 6186 6187 *'mkspellmem'* *'msm'* 6188 'mkspellmem' 'msm' string (default "460000,2000,500") 6189 global 6190 {not available when compiled without the |+syntax| 6191 feature} 6192 Parameters for |:mkspell|. This tunes when to start compressing the 6193 word tree. Compression can be slow when there are many words, but 6194 it's needed to avoid running out of memory. The amount of memory used 6195 per word depends very much on how similar the words are, that's why 6196 this tuning is complicated. 6197 6198 There are three numbers, separated by commas: 6199 {start},{inc},{added} 6200 6201 For most languages the uncompressed word tree fits in memory. {start} 6202 gives the amount of memory in Kbyte that can be used before any 6203 compression is done. It should be a bit smaller than the amount of 6204 memory that is available to Vim. 6205 6206 When going over the {start} limit the {inc} number specifies the 6207 amount of memory in Kbyte that can be allocated before another 6208 compression is done. A low number means compression is done after 6209 less words are added, which is slow. A high number means more memory 6210 will be allocated. 6211 6212 After doing compression, {added} times 1024 words can be added before 6213 the {inc} limit is ignored and compression is done when any extra 6214 amount of memory is needed. A low number means there is a smaller 6215 chance of hitting the {inc} limit, less memory is used but it's 6216 slower. 6217 6218 The languages for which these numbers are important are Italian and 6219 Hungarian. The default works for when you have about 512 Mbyte. If 6220 you have 1 Gbyte you could use: > 6221 :set mkspellmem=900000,3000,800 6222 < If you have less than 512 Mbyte |:mkspell| may fail for some 6223 languages, no matter what you set 'mkspellmem' to. 6224 Environment variables are expanded |:set_env|. 6225 This option cannot be set from a |modeline| or in the |sandbox|, for 6226 security reasons. 6227 6228 *'modeline'* *'ml'* *'nomodeline'* *'noml'* 6229 'modeline' 'ml' boolean (Vim default: on (off for root), 6230 Vi default: off) 6231 local to buffer 6232 If 'modeline' is on 'modelines' gives the number of lines that is 6233 checked for set commands. If 'modeline' is off or 'modelines' is zero 6234 no lines are checked. See |modeline|. 6235 6236 *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'* 6237 'modelineexpr' 'mle' boolean (default: off) 6238 global 6239 When on allow some options that are an expression to be set in the 6240 modeline. Check the option for whether it is affected by 6241 'modelineexpr'. Also see |modeline|. 6242 This option cannot be set from a |modeline| or in the |sandbox|, for 6243 security reasons. 6244 6245 *'modelines'* *'mls'* 6246 'modelines' 'mls' number (default 5) 6247 global 6248 If 'modeline' is on 'modelines' gives the number of lines that is 6249 checked for set commands. If 'modeline' is off or 'modelines' is zero 6250 no lines are checked. See |modeline|. 6251 NOTE: 'modeline' is set to the Vi default value when 'compatible' is 6252 set and to the Vim default value when 'compatible' is reset. 6253 6254 *'modelinestrict'* *'mlst'* *'nomodelinestrict'* *'nomlst'* 6255 'modelinestrict' 'mlst' boolean (default: on) 6256 global 6257 When on, only a safe subset of options can be set from a |modeline|. 6258 The following options are allowed: 6259 'autoindent' 6260 'cindent' 6261 'commentstring' 6262 'expandtab' 6263 'filetype' 6264 'foldcolumn' 6265 'foldenable' 6266 'foldmarker' 6267 'foldmethod' 6268 'modifiable' 6269 'readonly' 6270 'rightleft' 6271 'shiftwidth' 6272 'smartindent' 6273 'softtabstop' 6274 'spell' 6275 'spelllang' 6276 'tabstop' 6277 'textwidth' 6278 'varsofttabstop' 6279 'vartabstop' 6280 6281 Any other option set from a modeline will be silently ignored. 6282 This option cannot be set from a |modeline| or in the |sandbox|, for 6283 security reasons. 6284 6285 As an exception, `set nomodeline` is honored from within a modeline 6286 even when 'modelinestrict' is on. Other forms (`set modeline=0`, 6287 `set modeline!`, `set invmodeline`) are still silently ignored. 6288 This lets a file disable further modeline processing for itself. 6289 6290 The behaviour of 'modeline', 'modelinestrict' and 'modelineexpr' is 6291 as follows: 6292 6293 'modeline'| 'modelinestrict'| 'modelineexpr' | Meaning 6294 ----------+-----------------+-------------------+--------~ 6295 on | off | on | All options can be set 6296 on | on | any | Only whitelisted 6297 | | | options can be set 6298 on | off | off | All options except for 6299 | | | expr options can be set 6300 off | any | any | No options can be set 6301 6302 *'modifiable'* *'ma'* *'nomodifiable'* *'noma'* 6303 *E21* 6304 'modifiable' 'ma' boolean (default on) 6305 local to buffer 6306 When off the buffer contents cannot be changed. The 'fileformat' and 6307 'fileencoding' options also can't be changed. 6308 Can be reset on startup with the |-M| command line argument. 6309 6310 *'modified'* *'mod'* *'nomodified'* *'nomod'* 6311 'modified' 'mod' boolean (default off) 6312 local to buffer |local-noglobal| 6313 When on, the buffer is considered to be modified. This option is set 6314 when: 6315 1. A change was made to the text since it was last written. Using the 6316 |undo| command to go back to the original text will reset the 6317 option. But undoing changes that were made before writing the 6318 buffer will set the option again, since the text is different from 6319 when it was written. 6320 2. 'fileformat' or 'fileencoding' is different from its original 6321 value. The original value is set when the buffer is read or 6322 written. A ":set nomodified" command also resets the original 6323 values to the current values and the 'modified' option will be 6324 reset. 6325 Similarly for 'eol' and 'bomb'. 6326 This option is not set when a change is made to the buffer as the 6327 result of a BufNewFile, BufRead/BufReadPost, BufWritePost, 6328 FileAppendPost or VimLeave autocommand event. See |gzip-example| for 6329 an explanation. 6330 When 'buftype' is "nowrite" or "nofile" this option may be set, but 6331 will be ignored. 6332 Note that the text may actually be the same, e.g. 'modified' is set 6333 when using "rA" on an "A". 6334 6335 *'more'* *'nomore'* 6336 'more' boolean (Vim default: on, Vi default: off) 6337 global 6338 When on, listings pause when the whole screen is filled. You will get 6339 the |more-prompt|. When this option is off there are no pauses, the 6340 listing continues until finished. 6341 NOTE: This option is set to the Vi default value when 'compatible' is 6342 set and to the Vim default value when 'compatible' is reset. 6343 6344 *'mouse'* 6345 'mouse' string (default "", "a" for GUI and Win32, 6346 set to "a" or "nvi" in |defaults.vim|) 6347 global 6348 Enable the use of the mouse. Works for most terminals (xterm, Win32 6349 |win32-mouse|, QNX pterm, *BSD console with sysmouse and Linux console 6350 with gpm). For using the mouse in the GUI, see |gui-mouse|. The 6351 mouse can be enabled for different modes: 6352 n Normal mode and Terminal modes 6353 v Visual mode 6354 i Insert mode 6355 c Command-line mode 6356 h all previous modes when editing a help file 6357 a all previous modes 6358 r for |hit-enter| and |more-prompt| prompt 6359 Normally you would enable the mouse in all five modes with: > 6360 :set mouse=a 6361 < If your terminal can't overrule the mouse events going to the 6362 application, use: > 6363 :set mouse=nvi 6364 < Then you can press ":", select text for the system, and press Esc to 6365 go back to Vim using the mouse events. 6366 In |defaults.vim| "nvi" is used if the 'term' option is not matching 6367 "xterm". 6368 6369 When the mouse is not enabled, the GUI will still use the mouse for 6370 modeless selection. This doesn't move the text cursor. 6371 6372 See |mouse-using|. Also see 'clipboard'. 6373 6374 Note: When enabling the mouse in a terminal, copy/paste will use the 6375 "* register if there is access to an X-server. The xterm handling of 6376 the mouse buttons can still be used by keeping the shift key pressed. 6377 Also see the 'clipboard' option. 6378 6379 *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'* 6380 'mousefocus' 'mousef' boolean (default off) 6381 global 6382 {only works in the GUI} 6383 The window that the mouse pointer is on is automatically activated. 6384 When changing the window layout or window focus in another way, the 6385 mouse pointer is moved to the window with keyboard focus. Off is the 6386 default because it makes using the pull down menus a little goofy, as 6387 a pointer transit may activate a window unintentionally. 6388 MS-Windows: Also see 'scrollfocus' for what window is scrolled when 6389 using the mouse scroll wheel. 6390 6391 *'mousehide'* *'mh'* *'nomousehide'* *'nomh'* 6392 'mousehide' 'mh' boolean (default on) 6393 global 6394 {only works in the GUI} 6395 When on, the mouse pointer is hidden when characters are typed. 6396 The mouse pointer is restored when the mouse is moved. 6397 6398 *'mousemodel'* *'mousem'* 6399 'mousemodel' 'mousem' string (default "extend", "popup" for Win32) 6400 global 6401 Sets the model to use for the mouse. The name mostly specifies what 6402 the right mouse button is used for: 6403 extend Right mouse button extends a selection. This works 6404 like in an xterm. 6405 popup Right mouse button pops up a menu. The shifted left 6406 mouse button extends a selection. This works like 6407 with Microsoft Windows. 6408 popup_setpos Like "popup", but the cursor will be moved to the 6409 position where the mouse was clicked, and thus the 6410 selected operation will act upon the clicked object. 6411 If clicking inside a selection, that selection will 6412 be acted upon, i.e. no cursor move. This implies of 6413 course, that right clicking outside a selection will 6414 end Visual mode. 6415 6416 For a detailed description of 'mousemodel' behaviour see 6417 |mouse-mode-table|. Overview of what button does what for each model: 6418 6419 mouse extend popup(_setpos) ~ 6420 left click place cursor place cursor 6421 left drag start selection start selection 6422 shift-left search word extend selection 6423 right click extend selection popup menu (place cursor) 6424 right drag extend selection - 6425 middle click paste paste 6426 6427 In the "popup" model the right mouse button produces a pop-up menu. 6428 You need to define this first, see |popup-menu|. 6429 6430 Note that you can further refine the meaning of buttons with mappings. 6431 See |gui-mouse-mapping|. But mappings are NOT used for modeless 6432 selection (because that's handled in the GUI code directly). 6433 6434 The 'mousemodel' option is set by the |:behave| command. 6435 6436 *'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'* 6437 'mousemoveevent' 'mousemev' boolean (default off) 6438 global 6439 {only works in the GUI} 6440 When on, mouse move events are delivered to the input queue and are 6441 available for mapping. The default, off, avoids the mouse movement 6442 overhead except when needed. See |gui-mouse-mapping|. 6443 Warning: Setting this option can make pending mappings to be aborted 6444 when the mouse is moved. 6445 Currently only works in the GUI, may be made to work in a terminal 6446 later. 6447 6448 *'mouseshape'* *'mouses'* *E547* 6449 'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing, 6450 vs:leftright,vd:lrsizing,m:no, 6451 ml:up-arrow,v:rightup-arrow") 6452 global 6453 {only available when compiled with the |+mouseshape| 6454 feature} 6455 This option tells Vim what the mouse pointer should look like in 6456 different modes. The option is a comma-separated list of parts, much 6457 like used for 'guicursor'. Each part consists of a mode/location-list 6458 and an argument-list: 6459 mode-list:shape,mode-list:shape,.. 6460 The mode-list is a dash separated list of these modes/locations: 6461 In a normal window: ~ 6462 n Normal mode 6463 v Visual mode 6464 ve Visual mode with 'selection' "exclusive" (same as 'v', 6465 if not specified) 6466 o Operator-pending mode 6467 i Insert mode 6468 r Replace mode 6469 6470 Others: ~ 6471 c appending to the command-line 6472 ci inserting in the command-line 6473 cr replacing in the command-line 6474 m at the 'Hit ENTER' or 'More' prompts 6475 ml idem, but cursor in the last line 6476 e any mode, pointer below last window 6477 s any mode, pointer on a status line 6478 sd any mode, while dragging a status line 6479 vs any mode, pointer on a vertical separator line 6480 vd any mode, while dragging a vertical separator line 6481 a everywhere 6482 6483 The shape is one of the following: 6484 avail name looks like ~ 6485 w x g arrow Normal mouse pointer 6486 w x blank no pointer at all (use with care!) 6487 w x g beam I-beam 6488 w x g updown up-down sizing arrows 6489 w x g leftright left-right sizing arrows 6490 w x g busy The system's usual busy pointer 6491 w x g no The system's usual 'no input' pointer 6492 x g udsizing indicates up-down resizing 6493 x g lrsizing indicates left-right resizing 6494 x g crosshair like a big thin + 6495 x g hand1 black hand 6496 x g hand2 white hand 6497 x pencil what you write with 6498 x g question big ? 6499 x rightup-arrow arrow pointing right-up 6500 w x up-arrow arrow pointing up 6501 x <number> any X11 pointer number (see X11/cursorfont.h) 6502 6503 The "avail" column contains a 'w' if the shape is available for Win32, 6504 x for X11 (including GTK+ 2), g for GTK+ 3 and GTK 4. 6505 Any modes not specified or shapes not available use the normal mouse 6506 pointer. 6507 6508 Example: > 6509 :set mouseshape=s:udsizing,m:no 6510 < will make the mouse turn to a sizing arrow over the status lines and 6511 indicate no input when the hit-enter prompt is displayed (since 6512 clicking the mouse has no effect in this state.) 6513 6514 *'mousetime'* *'mouset'* 6515 'mousetime' 'mouset' number (default 500) 6516 global 6517 Only for GUI, Win32 and Unix with xterm. Defines the maximum 6518 time in msec between two mouse clicks for the second click to be 6519 recognized as a multi click. 6520 6521 6522 *'mzquantum'* *'mzq'* 6523 'mzquantum' 'mzq' number (default 100) 6524 global 6525 {not available when compiled without the |+mzscheme| 6526 feature} 6527 The number of milliseconds between polls for MzScheme threads. 6528 Negative or zero value means no thread scheduling. 6529 NOTE: This option is set to the Vim default value when 'compatible' 6530 is reset. 6531 6532 *'mzschemedll'* 6533 'mzschemedll' string (default depends on the build) 6534 global 6535 {only available when compiled with the |+mzscheme/dyn| 6536 feature} 6537 Specifies the name of the MzScheme shared library. The default is 6538 DYNAMIC_MZSCH_DLL which was specified at compile time. 6539 Environment variables are expanded |:set_env|. 6540 The value must be set in the |vimrc| script or earlier. In the 6541 startup, before the |load-plugins| step. 6542 This option cannot be set from a |modeline| or in the |sandbox|, for 6543 security reasons. 6544 6545 *'mzschemegcdll'* 6546 'mzschemegcdll' string (default depends on the build) 6547 global 6548 {only available when compiled with the |+mzscheme/dyn| 6549 feature} 6550 Specifies the name of the MzScheme GC shared library. The default is 6551 DYNAMIC_MZGC_DLL which was specified at compile time. 6552 The value can be equal to 'mzschemedll' if it includes the GC code. 6553 Environment variables are expanded |:set_env|. 6554 This option cannot be set from a |modeline| or in the |sandbox|, for 6555 security reasons. 6556 6557 *'nrformats'* *'nf'* 6558 'nrformats' 'nf' string (default "bin,octal,hex", 6559 set to "bin,hex" in |defaults.vim|) 6560 local to buffer 6561 This defines what bases Vim will consider for numbers when using the 6562 CTRL-A and CTRL-X commands for adding to and subtracting from a number 6563 respectively; see |CTRL-A| for more info on these commands. 6564 alpha If included, single alphabetical characters will be 6565 incremented or decremented. This is useful for a list with a 6566 letter index a), b), etc. *octal-nrformats* 6567 octal If included, numbers that start with a zero will be considered 6568 to be octal. Example: Using CTRL-A on "007" results in "010". 6569 hex If included, numbers starting with "0x" or "0X" will be 6570 considered to be hexadecimal. Example: Using CTRL-X on 6571 "0x100" results in "0x0ff". 6572 bin If included, numbers starting with "0b" or "0B" will be 6573 considered to be binary. Example: Using CTRL-X on 6574 "0b1000" subtracts one, resulting in "0b0111". 6575 unsigned If included, numbers are recognized as unsigned. Thus a 6576 leading dash or negative sign won't be considered as part of 6577 the number. Examples: 6578 Using CTRL-X on "2020" in "9-2020" results in "9-2019" 6579 (without "unsigned" it would become "9-2021"). 6580 Using CTRL-A on "2020" in "9-2020" results in "9-2021" 6581 (without "unsigned" it would become "9-2019"). 6582 Using CTRL-X on "0" or CTRL-A on "18446744073709551615" 6583 (2^64 - 1) has no effect, overflow is prevented. 6584 blank If included, treat numbers as signed or unsigned based on 6585 preceding whitespace. If a number with a leading dash has its 6586 dash immediately preceded by a non-whitespace character (i.e., 6587 not a tab or a " "), the negative sign won't be considered as 6588 part of the number. For example: 6589 Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" 6590 (without "blank" it would become "Carbon-13"). 6591 Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" 6592 (because -8 is preceded by whitespace. If "unsigned" was 6593 set, it would result in "Carbon -7"). 6594 If this format is included, overflow is prevented as if 6595 "unsigned" were set. If both this format and "unsigned" are 6596 included, "unsigned" will take precedence. 6597 6598 Numbers which simply begin with a digit in the range 1-9 are always 6599 considered decimal. This also happens for numbers that are not 6600 recognized as octal or hex. 6601 6602 *'number'* *'nu'* *'nonumber'* *'nonu'* 6603 'number' 'nu' boolean (default off) 6604 local to window 6605 Print the line number in front of each line. When the 'n' option is 6606 excluded from 'cpoptions' a wrapped line will not use the column of 6607 line numbers (this is the default when 'compatible' isn't set). 6608 The 'numberwidth' option can be used to set the room used for the line 6609 number. 6610 When a long, wrapped line doesn't start with the first character, '-' 6611 characters are put before the number. 6612 For highlighting see |hl-LineNr|, and |hl-CursorLineNr|, and the 6613 |:sign-define| "numhl" argument. 6614 *number_relativenumber* 6615 The 'relativenumber' option changes the displayed number to be 6616 relative to the cursor. Together with 'number' there are these 6617 four combinations (cursor in line 3): 6618 6619 'nonu' 'nu' 'nonu' 'nu' 6620 'nornu' 'nornu' 'rnu' 'rnu' 6621 6622 |apple | 1 apple | 2 apple | 2 apple 6623 |pear | 2 pear | 1 pear | 1 pear 6624 |nobody | 3 nobody | 0 nobody |3 nobody 6625 |there | 4 there | 1 there | 1 there 6626 6627 *'numberwidth'* *'nuw'* 6628 'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8) 6629 local to window 6630 {only available when compiled with the |+linebreak| 6631 feature} 6632 Minimal number of columns to use for the line number. Only relevant 6633 when the 'number' or 'relativenumber' option is set or printing lines 6634 with a line number. Since one space is always between the number and 6635 the text, there is one less character for the number itself. 6636 The value is the minimum width. A bigger width is used when needed to 6637 fit the highest line number in the buffer respectively the number of 6638 rows in the window, depending on whether 'number' or 'relativenumber' 6639 is set. Thus with the Vim default of 4 there is room for a line 6640 number up to 999. When the buffer has 1000 lines five columns will be 6641 used. The minimum value is 1, the maximum value is 20. 6642 NOTE: This option is set to the Vi default value when 'compatible' is 6643 set and to the Vim default value when 'compatible' is reset. 6644 6645 *'omnifunc'* *'ofu'* 6646 'omnifunc' 'ofu' string (default: empty) 6647 local to buffer 6648 {not available when compiled without the |+eval| 6649 feature} 6650 This option specifies a function to be used for Insert mode omni 6651 completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| 6652 See |complete-functions| for an explanation of how the function is 6653 invoked and what it should return. The value can be the name of a 6654 function, a |lambda| or a |Funcref|. See |option-value-function| for 6655 more information. 6656 This option is usually set by a filetype plugin: 6657 |:filetype-plugin-on| 6658 This option cannot be set from a |modeline| or in the |sandbox|, for 6659 security reasons. 6660 6661 *'opendevice'* *'odev'* *'noopendevice'* *'noodev'* 6662 'opendevice' 'odev' boolean (default off) 6663 global 6664 {only for MS-Windows} *E796* 6665 Enable reading and writing from devices. This may get Vim stuck on a 6666 device that can be opened but doesn't actually do the I/O. Therefore 6667 it is off by default. 6668 Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also 6669 result in editing a device. 6670 6671 *'operatorfunc'* *'opfunc'* 6672 'operatorfunc' 'opfunc' string (default: empty) 6673 global 6674 This option specifies a function to be called by the |g@| operator. 6675 See |:map-operator| for more info and an example. The value can be 6676 the name of a function, a |lambda| or a |Funcref|. See 6677 |option-value-function| for more information. 6678 6679 This option cannot be set from a |modeline| or in the |sandbox|, for 6680 security reasons. 6681 6682 *'osctimeoutlen'* *'ost'* *E1568* 6683 'osctimeoutlen' 'ost' number (default 1000) 6684 global 6685 This option specifies the timeout in milliseconds Vim should wait 6686 until it receives an OSC terminator after receiving the beginning of 6687 an OSC command response. See the |TermResponseAll| autocommand event 6688 and |v:termosc| for more information. 6689 6690 *'osfiletype'* *'oft'* 6691 'osfiletype' 'oft' string (default: "") 6692 local to buffer 6693 This option was supported on RISC OS, which has been removed. 6694 6695 *'packpath'* *'pp'* 6696 'packpath' 'pp' string (default: see 'runtimepath') 6697 Directories used to find packages. See |packages|. 6698 Environment variables are expanded |:set_env|. 6699 This option cannot be set from a |modeline| or in the |sandbox|, for 6700 security reasons. 6701 6702 *'paragraphs'* *'para'* 6703 'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp") 6704 global 6705 Specifies the nroff macros that separate paragraphs. These are pairs 6706 of two letters (see |object-motions|). 6707 6708 *'paste'* *'nopaste'* 6709 'paste' boolean (default off) 6710 global 6711 Put Vim in Paste mode. This is useful if you want to cut or copy 6712 some text from one window and paste it in Vim. This will avoid 6713 unexpected effects. 6714 Setting this option is useful when using Vim in a terminal, where Vim 6715 cannot distinguish between typed text and pasted text. In the GUI, 6716 Vim knows about pasting and will mostly do the right thing without 6717 'paste' being set. The same is true for a terminal where Vim handles 6718 the mouse clicks itself. 6719 This option is reset when starting the GUI. Thus if you set it in 6720 your .vimrc it will work in a terminal, but not in the GUI. Setting 6721 'paste' in the GUI has side effects: e.g., the Paste toolbar button 6722 will no longer work in Insert mode, because it uses a mapping. 6723 When the 'paste' option is switched on (also when it was already on): 6724 - mapping in Insert mode and Command-line mode is disabled 6725 - abbreviations are disabled 6726 - 'autoindent' is reset 6727 - 'expandtab' is reset 6728 - 'hkmap' is reset 6729 - 'revins' is reset 6730 - 'ruler' is reset 6731 - 'showmatch' is reset 6732 - 'smarttab' is reset 6733 - 'softtabstop' is set to 0 6734 - 'textwidth' is set to 0 6735 - 'wrapmargin' is set to 0 6736 - 'varsofttabstop' is made empty 6737 These options keep their value, but their effect is disabled: 6738 - 'cindent' 6739 - 'formatoptions' is used like it is empty 6740 - 'indentexpr' 6741 - 'lisp' 6742 - 'smartindent' 6743 NOTE: When you start editing another file while the 'paste' option is 6744 on, settings from the modelines or autocommands may change the 6745 settings again, causing trouble when pasting text. You might want to 6746 set the 'paste' option again. 6747 When the 'paste' option is reset the mentioned options are restored to 6748 the value before the moment 'paste' was switched from off to on. 6749 Resetting 'paste' before ever setting it does not have any effect. 6750 Since mapping doesn't work while 'paste' is active, you need to use 6751 the 'pastetoggle' option to toggle the 'paste' option with some key. 6752 6753 *'pastetoggle'* *'pt'* 6754 'pastetoggle' 'pt' string (default "") 6755 global 6756 When non-empty, specifies the key sequence that toggles the 'paste' 6757 option. This is like specifying a mapping: > 6758 :map {keys} :set invpaste<CR> 6759 < Where {keys} is the value of 'pastetoggle'. 6760 The difference is that it will work even when 'paste' is set. 6761 'pastetoggle' works in Insert mode and Normal mode, but not in 6762 Command-line mode. 6763 Mappings are checked first, thus overrule 'pastetoggle'. However, 6764 when 'paste' is on mappings are ignored in Insert mode, thus you can 6765 do this: > 6766 :map <F10> :set paste<CR> 6767 :map <F11> :set nopaste<CR> 6768 :imap <F10> <C-O>:set paste<CR> 6769 :imap <F11> <nop> 6770 :set pastetoggle=<F11> 6771 < This will make <F10> start paste mode and <F11> stop paste mode. 6772 Note that typing <F10> in paste mode inserts "<F10>", since in paste 6773 mode everything is inserted literally, except the 'pastetoggle' key 6774 sequence. 6775 When the value has several bytes 'ttimeoutlen' applies. 6776 6777 *'pex'* *'patchexpr'* 6778 'patchexpr' 'pex' string (default "") 6779 global 6780 {not available when compiled without the |+diff| 6781 feature} 6782 Expression which is evaluated to apply a patch to a file and generate 6783 the resulting new version of the file. See |diff-patchexpr|. 6784 This option cannot be set from a |modeline| or in the |sandbox|, for 6785 security reasons. 6786 6787 *'patchmode'* *'pm'* *E205* *E206* 6788 'patchmode' 'pm' string (default "") 6789 global 6790 When non-empty the oldest version of a file is kept. This can be used 6791 to keep the original version of a file if you are changing files in a 6792 source distribution. Only the first time that a file is written a 6793 copy of the original file will be kept. The name of the copy is the 6794 name of the original file with the string in the 'patchmode' option 6795 appended. This option should start with a dot. Use a string like 6796 ".orig" or ".org". 'backupdir' must not be empty for this to work 6797 (Detail: The backup file is renamed to the patchmode file after the 6798 new file has been successfully written, that's why it must be possible 6799 to write a backup file). If there was no file to be backed up, an 6800 empty file is created. 6801 When the 'backupskip' pattern matches, a patchmode file is not made. 6802 Using 'patchmode' for compressed files appends the extension at the 6803 end (e.g., "file.gz.orig"), thus the resulting name isn't always 6804 recognized as a compressed file. 6805 Only normal file name characters can be used, "/\*?[|<>" are illegal. 6806 6807 *'path'* *'pa'* *E343* *E345* *E347* *E854* 6808 'path' 'pa' string (default on Unix: ".,/usr/include,," 6809 other systems: ".,,") 6810 global or local to buffer |global-local| 6811 This is a list of directories which will be searched when using the 6812 |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands, 6813 provided that the file being searched for has a relative path (not 6814 starting with "/", "./" or "../"). The directories in the 'path' 6815 option may be relative or absolute. 6816 - Use commas to separate directory names: > 6817 :set path=.,/usr/local/include,/usr/include 6818 < - Spaces can also be used to separate directory names (for backwards 6819 compatibility with version 3.0). To have a space in a directory 6820 name, precede it with an extra backslash, and escape the space: > 6821 :set path=.,/dir/with\\\ space 6822 < - To include a comma in a directory name precede it with an extra 6823 backslash: > 6824 :set path=.,/dir/with\\,comma 6825 < - To search relative to the directory of the current file, use: > 6826 :set path=. 6827 < - To search in the current directory use an empty string between two 6828 commas: > 6829 :set path=,, 6830 < - A directory name may end in a ':' or '/'. 6831 - Environment variables are expanded |:set_env|. 6832 - When using |netrw.vim| URLs can be used. For example, adding 6833 "http://www.vim.org" will make ":find index.html" work. 6834 - Search upwards and downwards in a directory tree using "*", "**" and 6835 ";". See |file-searching| for info and syntax. 6836 - Careful with '\' characters, type two to get one in the option: > 6837 :set path=.,c:\\include 6838 < Or just use '/' instead: > 6839 :set path=.,c:/include 6840 < Don't forget "." or files won't even be found in the same directory as 6841 the file! 6842 The maximum length is limited. How much depends on the system, mostly 6843 it is something like 256 or 1024 characters. 6844 You can check if all the include files are found, using the value of 6845 'path', see |:checkpath|. 6846 The use of |:set+=| and |:set-=| is preferred when adding or removing 6847 directories from the list. This avoids problems when a future version 6848 uses another default. To remove the current directory use: > 6849 :set path-= 6850 < To add the current directory use: > 6851 :set path+= 6852 < To use an environment variable, you probably need to replace the 6853 separator. Here is an example to append $INCL, in which directory 6854 names are separated with a semicolon: > 6855 :let &path = &path .. "," .. substitute($INCL, ';', ',', 'g') 6856 < Replace the ';' with a ':' or whatever separator is used. Note that 6857 this doesn't work when $INCL contains a comma or white space. 6858 6859 *'perldll'* 6860 'perldll' string (default depends on the build) 6861 global 6862 {only available when compiled with the |+perl/dyn| 6863 feature} 6864 Specifies the name of the Perl shared library. The default is 6865 DYNAMIC_PERL_DLL, which was specified at compile time. 6866 Environment variables are expanded |:set_env|. 6867 This option cannot be set from a |modeline| or in the |sandbox|, for 6868 security reasons. 6869 6870 *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'* 6871 'preserveindent' 'pi' boolean (default off) 6872 local to buffer 6873 When changing the indent of the current line, preserve as much of the 6874 indent structure as possible. Normally the indent is replaced by a 6875 series of tabs followed by spaces as required (unless 'expandtab' is 6876 enabled, in which case only spaces are used). Enabling this option 6877 means the indent will preserve as many existing characters as possible 6878 for indenting, and only add additional tabs or spaces as required. 6879 'expandtab' does not apply to the preserved white space, a Tab remains 6880 a Tab. 6881 NOTE: When using ">>" multiple times the resulting indent is a mix of 6882 tabs and spaces. You might not like this. 6883 NOTE: This option is reset when 'compatible' is set. 6884 Also see 'copyindent'. 6885 Use |:retab| to clean up white space. 6886 6887 *'previewheight'* *'pvh'* 6888 'previewheight' 'pvh' number (default 12) 6889 global 6890 {not available when compiled without the |+quickfix| 6891 feature} 6892 Default height for a preview window. Used for |:ptag| and associated 6893 commands. Used for |CTRL-W_}| when no count is given. Not used when 6894 'previewpopup' is set. 6895 6896 *'previewpopup'* *'pvp'* 6897 'previewpopup' 'pvp' string (default empty) 6898 global 6899 {not available when compiled without the |+textprop| 6900 or |+quickfix| feature} 6901 When not empty a popup window is used for commands that would open a 6902 preview window. See |preview-popup|. 6903 Not used for the insert completion info, add "popup" to 6904 'completeopt' for that. 6905 6906 *'previewwindow'* *'nopreviewwindow'* 6907 *'pvw'* *'nopvw'* *E590* 6908 'previewwindow' 'pvw' boolean (default off) 6909 local to window |local-noglobal| 6910 {not available when compiled without the |+quickfix| 6911 feature} 6912 Identifies the preview window. Only one window can have this option 6913 set. It's normally not set directly, but by using one of the commands 6914 |:ptag|, |:pedit|, etc. 6915 6916 *'printdevice'* *'pdev'* 6917 'printdevice' 'pdev' string (default empty) 6918 global 6919 {only available when compiled with the |+printer| 6920 feature} 6921 The name of the printer to be used for |:hardcopy|. 6922 See |pdev-option|. 6923 This option cannot be set from a |modeline| or in the |sandbox|, for 6924 security reasons. 6925 6926 *'printencoding'* *'penc'* 6927 'printencoding' 'penc' string (default empty, except for some systems) 6928 global 6929 {only available when compiled with the |+printer| 6930 and |+postscript| features} 6931 Sets the character encoding used when printing. 6932 See |penc-option|. 6933 6934 *'printexpr'* *'pexpr'* 6935 'printexpr' 'pexpr' string (default: see below) 6936 global 6937 {only available when compiled with the |+printer| 6938 and |+postscript| or |+pango| features} 6939 Expression used to print the PostScript produced with |:hardcopy|. 6940 See |pexpr-option|. 6941 This option cannot be set from a |modeline| or in the |sandbox|, for 6942 security reasons. 6943 6944 *'printfont'* *'pfn'* 6945 'printfont' 'pfn' string (default "courier") 6946 global 6947 {only available when compiled with the |+printer| 6948 feature} 6949 The name of the font that will be used for |:hardcopy|. 6950 See |pfn-option|. 6951 6952 *'printheader'* *'pheader'* 6953 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N") 6954 global 6955 {only available when compiled with the |+printer| 6956 feature} 6957 The format of the header produced in |:hardcopy| output. 6958 See |pheader-option|. 6959 6960 This option cannot be set in a modeline when 'modelineexpr' is off. 6961 6962 *'printmbcharset'* *'pmbcs'* 6963 'printmbcharset' 'pmbcs' string (default "") 6964 global 6965 {only available when compiled with the |+printer| 6966 and |+postscript| features} 6967 The CJK character set to be used for CJK output from |:hardcopy|. 6968 See |pmbcs-option|. 6969 6970 *'printmbfont'* *'pmbfn'* 6971 'printmbfont' 'pmbfn' string (default "") 6972 global 6973 {only available when compiled with the |+printer| 6974 and |+postscript| features} 6975 List of font names to be used for CJK output from |:hardcopy|. 6976 See |pmbfn-option|. 6977 6978 *'printoptions'* *'popt'* 6979 'printoptions' 'popt' string (default "") 6980 global 6981 {only available when compiled with |+printer| feature} 6982 List of items that control the format of the output of |:hardcopy|. 6983 See |popt-option|. 6984 6985 *'prompt'* *'noprompt'* 6986 'prompt' boolean (default on) 6987 global 6988 When on a ":" prompt is used in Ex mode. 6989 6990 *'pumborder'* *'pb'* 6991 'pumborder' 'pb' string (default "") 6992 global 6993 Defines a border and optional decorations for the popup menu in 6994 completion. The value is a comma-separated list of keywords. 6995 See 'pumopt' for a consolidated alternative. 6996 6997 Border styles (at most one): 6998 "single" use thin box-drawing characters 6999 "double" use double-line box-drawing characters 7000 "round" use rounded corners 7001 "ascii" use ASCII characters (-, |, +) 7002 "custom:X;X;X;X;X;X;X;X" 7003 use eight characters separated by semicolons, in the 7004 order: top, right, bottom, left, 7005 topleft, topright, botright, botleft 7006 7007 Additional flags: 7008 "margin" adds one-cell spacing inside the left and right border 7009 "shadow" draws a shadow at the right and bottom edges 7010 7011 Highlight groups: 7012 |hl-PmenuBorder| used for the border characters 7013 |hl-PmenuShadow| used for the shadow 7014 7015 Examples: > 7016 :set pumborder=single 7017 :set pumborder=double,margin,shadow 7018 :set pumborder=custom:─;│;─;│;┌;┐;┘;└,shadow 7019 < 7020 Border styles using box-drawing characters ("single", "double", 7021 "round") are only available when 'encoding' is "utf-8" and 'ambiwidth' 7022 is "single". "margin" requires a border style. 7023 See also: |ins-completion-menu|. 7024 7025 *'pumheight'* *'ph'* 7026 'pumheight' 'ph' number (default 0) 7027 global 7028 Determines the maximum number of items to show in the popup menu for 7029 Insert mode completion. When zero as much space as available is used. 7030 |ins-completion-menu|. 7031 See 'pumopt' for a consolidated alternative. 7032 7033 *'pummaxwidth'* *'pmw'* 7034 'pummaxwidth' 'pmw' number (default 0) 7035 global 7036 Determines the maximum width to use for the popup menu for completion. 7037 When zero, there is no maximum width limit, otherwise the popup menu 7038 will never be wider than this value. Truncated text will be indicated 7039 by "trunc" value of 'fillchars' option. 7040 7041 This option takes precedence over 'pumwidth'. 7042 |ins-completion-menu|. 7043 See 'pumopt' for a consolidated alternative. 7044 7045 *'pumopt'* 7046 'pumopt' string (default "") 7047 global 7048 Configures the popup menu used for Insert mode completion. 7049 The value is a comma-separated list of "key:value" pairs and flags. 7050 7051 Keys with values: 7052 border:{style} set a border style (at most one): 7053 "single" thin box-drawing characters 7054 "double" double-line box-drawing characters 7055 "round" rounded corners 7056 "ascii" ASCII characters (-, |, +) 7057 "custom:X;X;X;X;X;X;X;X" 7058 eight characters separated by 7059 semicolons, in the order: top, right, 7060 bottom, left, topleft, topright, 7061 botright, botleft 7062 height:{n} maximum number of items to show (default 0, 7063 meaning as much space as available) 7064 width:{n} minimum width (default 15) 7065 maxwidth:{n} maximum width (default 0, meaning no limit). 7066 This takes precedence over width. 7067 Truncated text is indicated by "trunc" value 7068 of 'fillchars' option. 7069 opacity:{n} opacity percentage 0-100 (default 100). 7070 When less than 100, background content shows 7071 through the popup menu. Requires the GUI, 7072 'termguicolors', or a 256-color terminal. 7073 7074 Flags (no value): 7075 margin adds one-cell spacing inside the left and 7076 right border. Requires a border style. 7077 shadow draws a shadow at the right and bottom edges. 7078 7079 Border styles using box-drawing characters ("single", "double", 7080 "round") are only available when 'encoding' is "utf-8" and 'ambiwidth' 7081 is "single". 7082 7083 Highlight groups: 7084 |hl-PmenuBorder| used for the border characters 7085 |hl-PmenuShadow| used for the shadow 7086 7087 Note: When 'pumopt' is set, all values are reset to their defaults 7088 first, then the specified keys are applied. Unspecified keys get 7089 their default values. 7090 7091 Examples: > 7092 :set pumopt=border:single 7093 :set pumopt=border:double,margin,shadow 7094 :set pumopt=height:10,width:20,opacity:80 7095 :set pumopt=border:custom:─;│;─;│;┌;┐;┘;└,shadow 7096 < 7097 See also: |ins-completion-menu|. 7098 7099 *'pumwidth'* *'pw'* 7100 'pumwidth' 'pw' number (default 15) 7101 global 7102 Determines the minimum width to use for the popup menu for Insert mode 7103 completion. |ins-completion-menu|. 7104 See 'pumopt' for a consolidated alternative. 7105 7106 *'pythondll'* 7107 'pythondll' string (default depends on the build) 7108 global 7109 {only available when compiled with the |+python/dyn| 7110 feature} 7111 Specifies the name of the Python 2.x shared library. The default is 7112 DYNAMIC_PYTHON_DLL, which was specified at compile time. 7113 Environment variables are expanded |:set_env|. 7114 This option cannot be set from a |modeline| or in the |sandbox|, for 7115 security reasons. 7116 7117 *'pythonhome'* 7118 'pythonhome' string (default "") 7119 global 7120 {only available when compiled with the |+python/dyn| 7121 feature} 7122 Specifies the name of the Python 2.x home directory. When 7123 'pythonhome' and the PYTHONHOME environment variable are not set, 7124 PYTHON_HOME, which was specified at compile time, will be used for the 7125 Python 2.x home directory. 7126 Environment variables are expanded |:set_env|. 7127 This option cannot be set from a |modeline| or in the |sandbox|, for 7128 security reasons. 7129 7130 *'pythonthreedll'* 7131 'pythonthreedll' string (default depends on the build) 7132 global 7133 {only available when compiled with the |+python3/dyn| 7134 feature} 7135 Specifies the name of the Python 3 shared library. The default is 7136 DYNAMIC_PYTHON3_DLL, which was specified at compile time. 7137 Environment variables are expanded |:set_env|. 7138 This option cannot be set from a |modeline| or in the |sandbox|, for 7139 security reasons. 7140 7141 *'pythonthreehome'* 7142 'pythonthreehome' string (default "") 7143 global 7144 {only available when compiled with the |+python3/dyn| 7145 feature} 7146 Specifies the name of the Python 3 home directory. When 7147 'pythonthreehome' and the PYTHONHOME environment variable are not set, 7148 PYTHON3_HOME, which was specified at compile time, will be used for 7149 the Python 3 home directory. 7150 Environment variables are expanded |:set_env|. 7151 This option cannot be set from a |modeline| or in the |sandbox|, for 7152 security reasons. 7153 7154 *'pyxversion'* *'pyx'* 7155 'pyxversion' 'pyx' number (default depends on the build) 7156 global 7157 {only available when compiled with the |+python| or 7158 the |+python3| feature} 7159 Specifies the python version used for pyx* functions and commands 7160 |python_x|. The default value is as follows: 7161 7162 Compiled with Default ~ 7163 |+python| and |+python3| 0 7164 only |+python| 2 7165 only |+python3| 3 7166 7167 Available values are 0, 2 and 3. 7168 If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of 7169 any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3` 7170 sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise 7171 sets to 2 if Python 2 is available. 7172 See also: |has-pythonx| 7173 7174 If Vim is compiled with only |+python| or |+python3| setting 7175 'pyxversion' has no effect. The pyx* functions and commands are 7176 always the same as the compiled version. 7177 7178 This option cannot be set from a |modeline| or in the |sandbox|, for 7179 security reasons. 7180 7181 *'quickfixtextfunc'* *'qftf'* 7182 'quickfixtextfunc' 'qftf' string (default "") 7183 global 7184 {only available when compiled with the |+quickfix| 7185 feature} 7186 This option specifies a function to be used to get the text to display 7187 in the quickfix and location list windows. This can be used to 7188 customize the information displayed in the quickfix or location window 7189 for each entry in the corresponding quickfix or location list. See 7190 |quickfix-window-function| for an explanation of how to write the 7191 function and an example. The value can be the name of a function, a 7192 |lambda| or a |Funcref|. See |option-value-function| for more 7193 information. 7194 7195 It is not allowed to change text or jump to another window while 7196 evaluating 'qftf' |textlock|. 7197 7198 This option cannot be set from a |modeline| or in the |sandbox|, for 7199 security reasons. 7200 7201 *'quoteescape'* *'qe'* 7202 'quoteescape' 'qe' string (default "\") 7203 local to buffer 7204 The characters that are used to escape quotes in a string. Used for 7205 objects like a', a" and a` |a'|. 7206 When one of the characters in this option is found inside a string, 7207 the following character will be skipped. The default value makes the 7208 text "foo\"bar\\" considered to be one string. 7209 7210 *'readonly'* *'ro'* *'noreadonly'* *'noro'* 7211 'readonly' 'ro' boolean (default off) 7212 local to buffer |local-noglobal| 7213 If on, writes fail unless you use a '!'. Protects you from 7214 accidentally overwriting a file. Default on when Vim is started 7215 in read-only mode ("vim -R") or when the executable is called "view". 7216 When using ":w!" the 'readonly' option is reset for the current 7217 buffer, unless the 'Z' flag is in 'cpoptions'. 7218 When using the ":view" command the 'readonly' option is set for the 7219 newly edited buffer. 7220 See 'modifiable' for disallowing changes to the buffer. 7221 7222 *'redrawtime'* *'rdt'* 7223 'redrawtime' 'rdt' number (default 2000) 7224 global 7225 {only available when compiled with the |+reltime| 7226 feature} 7227 The time in milliseconds for redrawing the display. This applies to 7228 searching for patterns for 'hlsearch', |:match| highlighting and syntax 7229 highlighting. 7230 When redrawing takes more than this many milliseconds no further 7231 matches will be highlighted. 7232 For syntax highlighting the time applies per window. When over the 7233 limit syntax highlighting is disabled until |CTRL-L| is used. 7234 This is used to avoid that Vim hangs when using a very complicated 7235 pattern. 7236 7237 *'regexpengine'* *'re'* 7238 'regexpengine' 're' number (default 0) 7239 global 7240 This selects the default regexp engine. |two-engines| 7241 The possible values are: 7242 0 automatic selection 7243 1 old engine 7244 2 NFA engine 7245 Note that when using the NFA engine and the pattern contains something 7246 that is not supported the pattern will not match. This is only useful 7247 for debugging the regexp engine. 7248 Using automatic selection enables Vim to switch the engine, if the 7249 default engine becomes too costly. E.g., when the NFA engine uses too 7250 many states. This should prevent Vim from hanging on a combination of 7251 a complex pattern with long text. 7252 7253 *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'* 7254 'relativenumber' 'rnu' boolean (default off) 7255 local to window 7256 Show the line number relative to the line with the cursor in front of 7257 each line. Relative line numbers help you use the |count| you can 7258 precede some vertical motion commands (e.g. j k + -) with, without 7259 having to calculate it yourself. Especially useful in combination 7260 with other commands (e.g. y d c < > gq gw =). 7261 When the 'n' option is excluded from 'cpoptions' a wrapped line will 7262 not use the column of line numbers (this is the default when 7263 'compatible' isn't set). 7264 The 'numberwidth' option can be used to set the room used for the line 7265 number. 7266 When a long, wrapped line doesn't start with the first character, '-' 7267 characters are put before the number. 7268 See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for 7269 the number. 7270 7271 The number in front of the cursor line also depends on the value of 7272 'number', see |number_relativenumber| for all combinations of the two 7273 options. 7274 7275 *'remap'* *'noremap'* 7276 'remap' boolean (default on) 7277 global 7278 Allows for mappings to work recursively. If you do not want this for 7279 a single entry, use the :noremap[!] command. 7280 NOTE: To avoid portability problems with Vim scripts, always keep 7281 this option at the default "on". Only switch it off when working with 7282 old Vi scripts. 7283 7284 *'renderoptions'* *'rop'* 7285 'renderoptions' 'rop' string (default: empty) 7286 global 7287 {only available when compiled with GUI and DIRECTX on 7288 MS-Windows} 7289 Select a text renderer and set its options. The options depend on the 7290 renderer. 7291 7292 Syntax: > 7293 set rop=type:{renderer}(,{name}:{value})* 7294 < 7295 Currently, only one optional renderer is available. 7296 7297 render behavior ~ 7298 directx Vim will draw text using DirectX (DirectWrite). It makes 7299 drawn glyphs more beautiful than default GDI. 7300 It requires 'encoding' is "utf-8", and only works on 7301 MS-Windows Vista or newer version. 7302 7303 Options: 7304 name meaning type value ~ 7305 gamma gamma float 1.0 - 2.2 (maybe) 7306 contrast enhancedContrast float (unknown) 7307 level clearTypeLevel float (unknown) 7308 geom pixelGeometry int 0 - 2 (see below) 7309 renmode renderingMode int 0 - 6 (see below) 7310 taamode textAntialiasMode int 0 - 3 (see below) 7311 scrlines Scroll Lines int (deprecated) 7312 7313 See this URL for detail (except for scrlines): 7314 https://msdn.microsoft.com/en-us/library/dd368190.aspx 7315 7316 For geom: structure of a device pixel. 7317 0 - DWRITE_PIXEL_GEOMETRY_FLAT 7318 1 - DWRITE_PIXEL_GEOMETRY_RGB 7319 2 - DWRITE_PIXEL_GEOMETRY_BGR 7320 7321 See this URL for detail: 7322 https://msdn.microsoft.com/en-us/library/dd368114.aspx 7323 7324 For renmode: method of rendering glyphs. 7325 0 - DWRITE_RENDERING_MODE_DEFAULT 7326 1 - DWRITE_RENDERING_MODE_ALIASED 7327 2 - DWRITE_RENDERING_MODE_GDI_CLASSIC 7328 3 - DWRITE_RENDERING_MODE_GDI_NATURAL 7329 4 - DWRITE_RENDERING_MODE_NATURAL 7330 5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC 7331 6 - DWRITE_RENDERING_MODE_OUTLINE 7332 7333 See this URL for detail: 7334 https://msdn.microsoft.com/en-us/library/dd368118.aspx 7335 7336 For taamode: antialiasing mode used for drawing text. 7337 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT 7338 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE 7339 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE 7340 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED 7341 7342 See this URL for detail: 7343 https://msdn.microsoft.com/en-us/library/dd368170.aspx 7344 7345 For scrlines: 7346 This was used for optimizing scrolling behavior, however this 7347 is now deprecated. If specified, it is simply ignored. 7348 7349 Example: > 7350 set encoding=utf-8 7351 set gfn=Ricty_Diminished:h12 7352 set rop=type:directx 7353 < 7354 If select a raster font (Courier, Terminal or FixedSys which 7355 have ".fon" extension in file name) to 'guifont', it will be 7356 drawn by GDI as a fallback. 7357 7358 NOTE: It is known that some fonts and options combination 7359 causes trouble on drawing glyphs. 7360 7361 - 'renmode:5' and 'renmode:6' will not work with some 7362 special made fonts (True-Type fonts which includes only 7363 bitmap glyphs). 7364 - 'taamode:3' will not work with some vector fonts. 7365 7366 NOTE: With this option, you can display colored emoji 7367 (emoticon) in Windows 8.1 or later. To display colored emoji, 7368 there are some conditions which you should notice. 7369 7370 - If your font includes non-colored emoji already, it will 7371 be used. 7372 - If your font doesn't have emoji, the system chooses an 7373 alternative symbol font. On Windows 10, "Segoe UI Emoji" 7374 will be used. 7375 - When this alternative font didn't have fixed width glyph, 7376 emoji might be rendered beyond the bounding box of drawing 7377 cell. 7378 7379 Other render types are currently not supported. See also 7380 'guiligatures'. 7381 7382 *'report'* 7383 'report' number (default 2) 7384 global 7385 Threshold for reporting number of lines changed. When the number of 7386 changed lines is more than 'report' a message will be given for most 7387 ":" commands. If you want it always, set 'report' to 0. 7388 For the ":substitute" command the number of substitutions is used 7389 instead of the number of lines. 7390 7391 *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* 7392 'restorescreen' 'rs' boolean (default on) 7393 global 7394 {only in MS-Windows console version} 7395 When set, the screen contents is restored when exiting Vim. This also 7396 happens when executing external commands. 7397 7398 For non-Windows Vim: You can set or reset the 't_ti' and 't_te' 7399 options in your .vimrc. To disable restoring: 7400 set t_ti= t_te= 7401 To enable restoring (for an xterm): 7402 set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8 7403 (Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it) 7404 7405 *'revins'* *'ri'* *'norevins'* *'nori'* 7406 'revins' 'ri' boolean (default off) 7407 global 7408 {only available when compiled with the |+rightleft| 7409 feature} 7410 Inserting characters in Insert mode will work backwards. See "typing 7411 backwards" |ins-reverse|. This option can be toggled with the CTRL-_ 7412 command in Insert mode, when 'allowrevins' is set. 7413 NOTE: This option is reset when 'compatible' is set. 7414 This option is reset when 'paste' is set and restored when 'paste' is 7415 reset. 7416 7417 *'rightleft'* *'rl'* *'norightleft'* *'norl'* 7418 'rightleft' 'rl' boolean (default off) 7419 local to window 7420 {only available when compiled with the |+rightleft| 7421 feature} 7422 When on, display orientation becomes right-to-left, i.e., characters 7423 that are stored in the file appear from the right to the left. 7424 Using this option, it is possible to edit files for languages that 7425 are written from the right to the left such as Hebrew and Arabic. 7426 This option is per window, so it is possible to edit mixed files 7427 simultaneously, or to view the same file in both ways (this is 7428 useful whenever you have a mixed text file with both right-to-left 7429 and left-to-right strings so that both sets are displayed properly 7430 in different windows). Also see |rileft.txt|. 7431 7432 *'rightleftcmd'* *'rlc'* 7433 'rightleftcmd' 'rlc' string (default "search") 7434 local to window 7435 {only available when compiled with the |+rightleft| 7436 feature} 7437 Each word in this option enables the command line editing to work in 7438 right-to-left mode for a group of commands: 7439 7440 search "/" and "?" commands 7441 7442 This is useful for languages such as Hebrew, Arabic and Farsi. 7443 The 'rightleft' option must be set for 'rightleftcmd' to take effect. 7444 7445 *'rubydll'* 7446 'rubydll' string (default: depends on the build) 7447 global 7448 {only available when compiled with the |+ruby/dyn| 7449 feature} 7450 Specifies the name of the Ruby shared library. The default is 7451 DYNAMIC_RUBY_DLL, which was specified at compile time. 7452 Environment variables are expanded |:set_env|. 7453 This option cannot be set from a |modeline| or in the |sandbox|, for 7454 security reasons. 7455 7456 *'ruler'* *'ru'* *'noruler'* *'noru'* 7457 'ruler' 'ru' boolean (Vim default: on, Vi default: off) 7458 global 7459 Show the line and column number of the cursor position, separated by a 7460 comma. When there is room, the relative position of the displayed 7461 text in the file is shown on the far right: 7462 Top first line is visible 7463 Bot last line is visible 7464 All first and last line are visible 7465 45% relative position in the file 7466 If 'rulerformat' is set, it will determine the contents of the ruler. 7467 Each window has its own ruler. If a window has a status line, the 7468 ruler is shown there. Otherwise it is shown in the last line of the 7469 screen. If the statusline is given by 'statusline' (i.e. not empty), 7470 this option takes precedence over 'ruler' and 'rulerformat'. 7471 If the number of characters displayed is different from the number of 7472 bytes in the text (e.g., for a TAB or a multibyte character), both 7473 the text column (byte number) and the screen column are shown, 7474 separated with a dash. 7475 For an empty line "0-1" is shown. 7476 For an empty buffer the line number will also be zero: "0,0-1". 7477 This option is reset when 'paste' is set and restored when 'paste' is 7478 reset. 7479 If you don't want to see the ruler all the time but want to know where 7480 you are, use "g CTRL-G" |g_CTRL-G|. 7481 NOTE: This option is reset when 'compatible' is set. 7482 7483 *'rulerformat'* *'ruf'* 7484 'rulerformat' 'ruf' string (default empty) 7485 global 7486 {not available when compiled without the |+statusline| 7487 feature} 7488 When this option is not empty, it determines the content of the ruler 7489 string, as displayed for the 'ruler' option. 7490 The format of this option is like that of 'statusline'. 7491 This option cannot be set in a modeline when 'modelineexpr' is off. 7492 7493 The default ruler width is 17 characters. To make the ruler 15 7494 characters wide, put "%15(" at the start and "%)" at the end. 7495 Example: > 7496 :set rulerformat=%15(%c%V\ %p%%%) 7497 < 7498 *'runtimepath'* *'rtp'* *vimfiles* 7499 'runtimepath' 'rtp' string (default: 7500 Unix: "$HOME/.vim or 7501 $XDG_CONFIG_HOME/vim, 7502 $VIM/vimfiles, 7503 $VIMRUNTIME, 7504 $VIM/vimfiles/after, 7505 $HOME/.vim/after" 7506 Amiga: "home:vimfiles, 7507 $VIM/vimfiles, 7508 $VIMRUNTIME, 7509 $VIM/vimfiles/after, 7510 home:vimfiles/after" 7511 MS-Windows: "$HOME/vimfiles, 7512 $VIM/vimfiles, 7513 $VIMRUNTIME, 7514 $VIM/vimfiles/after, 7515 $HOME/vimfiles/after" 7516 Haiku: "$BE_USER_SETTINGS/vim, 7517 $VIM/vimfiles, 7518 $VIMRUNTIME, 7519 $VIM/vimfiles/after, 7520 $BE_USER_SETTINGS/vim/after" 7521 VMS: "sys$login:vimfiles, 7522 $VIM/vimfiles, 7523 $VIMRUNTIME, 7524 $VIM/vimfiles/after, 7525 sys$login:vimfiles/after") 7526 global 7527 This is a list of directories which will be searched for runtime 7528 files: 7529 filetype.vim filetypes by file name |new-filetype| 7530 scripts.vim filetypes by file contents |new-filetype-scripts| 7531 autoload/ automatically loaded scripts |autoload-functions| 7532 colors/ color scheme files |:colorscheme| 7533 compiler/ compiler files |:compiler| 7534 doc/ documentation |write-local-help| 7535 ftplugin/ filetype plugins |write-filetype-plugin| 7536 import/ files that are found by `:import` 7537 indent/ indent scripts |indent-expression| 7538 keymap/ key mapping files |mbyte-keymap| 7539 lang/ message translations |:menutrans| and |multi-lang| 7540 menu.vim GUI menus |menu.vim| 7541 pack/ packages |:packadd| 7542 plugin/ plugin scripts |write-plugin| 7543 print/ files for printing |postscript-print-encoding| 7544 spell/ spell checking files |spell| 7545 syntax/ syntax files |mysyntaxfile| 7546 tutor/ files for vimtutor |tutor| 7547 7548 And any other file searched for with the |:runtime| command. 7549 7550 For $XDG_CONFIG_HOME see |xdg-base-dir|. 7551 7552 The defaults for most systems are setup to search five locations: 7553 1. In your $MYVIMDIR directory, for your personal preferences. 7554 2. In a system-wide Vim directory, for preferences from the system 7555 administrator. 7556 3. In $VIMRUNTIME, for files distributed with Vim. 7557 *after-directory* 7558 4. In the "after" directory in the system-wide Vim directory. This is 7559 for the system administrator to overrule or add to the distributed 7560 defaults (rarely needed) 7561 5. In the "after" directory in your $MYVIMDIR directory. This is for 7562 personal preferences to overrule or add to the distributed defaults 7563 or system-wide settings (rarely needed). 7564 7565 More entries are added when using |packages|. If it gets very long 7566 then `:set rtp` will be truncated, use `:echo &rtp` to see the full 7567 string. 7568 7569 Note that, unlike 'path', no wildcards like "**" are allowed. Normal 7570 wildcards are allowed, but can significantly slow down searching for 7571 runtime files. For speed, use as few items as possible and avoid 7572 wildcards. 7573 See |:runtime|. 7574 Example: > 7575 :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME 7576 < This will use the directory "~/vimruntime" first (containing your 7577 personal Vim runtime files), then "/mygroup/vim" (shared between a 7578 group of people) and finally "$VIMRUNTIME" (the distributed runtime 7579 files). 7580 You probably should always include $VIMRUNTIME somewhere, to use the 7581 distributed runtime files. You can put a directory before $VIMRUNTIME 7582 to find files which replace a distributed runtime files. You can put 7583 a directory after $VIMRUNTIME to find files which add to distributed 7584 runtime files. 7585 When Vim is started with |--clean| the home directory entries are not 7586 included. 7587 Environment variables are expanded |:set_env|. 7588 This option cannot be set from a |modeline| or in the |sandbox|, for 7589 security reasons. 7590 7591 *'scroll'* *'scr'* 7592 'scroll' 'scr' number (default: half the window height) 7593 local to window |local-noglobal| 7594 Number of lines to scroll with CTRL-U and CTRL-D commands. Will be 7595 set to half the number of lines in the window when the window size 7596 changes. This may happen when enabling the |status-line| or 7597 'tabline' option after setting the 'scroll' option. 7598 If you give a count to the CTRL-U or CTRL-D command it will 7599 be used as the new value for 'scroll'. Reset to half the window 7600 height with ":set scroll=0". 7601 7602 *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'* 7603 'scrollbind' 'scb' boolean (default off) 7604 local to window 7605 See also |scroll-binding|. When this option is set, scrolling the 7606 current window also scrolls other scrollbind windows (windows that 7607 also have this option set). This option is useful for viewing the 7608 differences between two versions of a file, see 'diff'. 7609 See 'scrollopt' for options that determine how this option should be 7610 interpreted. 7611 This option is mostly reset when splitting a window to edit another 7612 file. This means that ":split | edit file" results in two windows 7613 with scroll-binding, but ":split file" does not. 7614 7615 *'scrollfocus'* *'scf'* *'noscrollfocus'* *'noscf'* 7616 'scrollfocus' 'scf' boolean (default off) 7617 global 7618 {only for MS-Windows GUI} 7619 NOTE: This option is currently not functional. It may be fixed or 7620 removed in a future version. 7621 When using the scroll wheel and this option is set, the window under 7622 the mouse pointer is scrolled. With this option off the current 7623 window is scrolled. 7624 Systems other than MS-Windows always behave like this option is on. 7625 7626 *'scrolljump'* *'sj'* 7627 'scrolljump' 'sj' number (default 1) 7628 global 7629 Minimal number of lines to scroll when the cursor gets off the 7630 screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E, 7631 CTRL-D). Useful if your terminal scrolls very slowly. 7632 When set to a negative number from -1 to -100 this is used as the 7633 percentage of the window height. Thus -50 scrolls half the window 7634 height. 7635 NOTE: This option is set to 1 when 'compatible' is set. 7636 7637 *'scrolloff'* *'so'* 7638 'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|) 7639 global or local to window |global-local| 7640 Minimal number of screen lines to keep above and below the cursor. 7641 This will make some context visible around where you are working. If 7642 you set it to a very large value (999) the cursor line will always be 7643 in the middle of the window (except at the start or end of the file, 7644 see 'scrolloffpad', or when long lines wrap). 7645 After using the local value, go back the global value with one of 7646 these two: > 7647 setlocal scrolloff< 7648 setlocal scrolloff=-1 7649 < For scrolling horizontally see 'sidescrolloff'. 7650 NOTE: This option is set to 0 when 'compatible' is set. 7651 7652 *'scrolloffpad'* *'sop'* 7653 'scrolloffpad' 'sop' number (default 0) 7654 global or local to window |global-local| 7655 When 'scrolloff' and 'scrolloffpad' are greater than zero, allow 7656 the cursor to remain centered when at the end of the file. 7657 Normally, 'scrolloff' will not keep the cursor centered at the 7658 end of the file. 7659 7660 A value of 0 disables this feature. Any value above 0 enables it. 7661 For a window-local value, -1 means to use the global value. 7662 Values below -1 are invalid. 7663 7664 After using the local value, go back the global value with one of 7665 these two: > 7666 setlocal scrolloffpad< 7667 setlocal scrolloffpad=-1 7668 7669 < *'scrollopt'* *'sbo'* 7670 'scrollopt' 'sbo' string (default "ver,jump") 7671 global 7672 This is a comma-separated list of words that specifies how 7673 'scrollbind' windows should behave. 'sbo' stands for ScrollBind 7674 Options. 7675 The following words are available: 7676 ver Bind vertical scrolling for 'scrollbind' windows 7677 hor Bind horizontal scrolling for 'scrollbind' windows 7678 jump Applies to the offset between two windows for vertical 7679 scrolling. This offset is the difference in the first 7680 displayed line of the bound windows. When moving 7681 around in a window, another 'scrollbind' window may 7682 reach a position before the start or after the end of 7683 the buffer. The offset is not changed though, when 7684 moving back the 'scrollbind' window will try to scroll 7685 to the desired position when possible. 7686 When now making that window the current one, two 7687 things can be done with the relative offset: 7688 1. When "jump" is not included, the relative offset is 7689 adjusted for the scroll position in the new current 7690 window. When going back to the other window, the 7691 new relative offset will be used. 7692 2. When "jump" is included, the other windows are 7693 scrolled to keep the same relative offset. When 7694 going back to the other window, it still uses the 7695 same relative offset. 7696 Also see |scroll-binding|. 7697 When 'diff' mode is active there always is vertical scroll binding, 7698 even when "ver" isn't there. 7699 7700 *'sections'* *'sect'* 7701 'sections' 'sect' string (default "SHNHH HUnhsh") 7702 global 7703 Specifies the nroff macros that separate sections. These are pairs of 7704 two letters (See |object-motions|). The default makes a section start 7705 at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh". 7706 7707 *'secure'* *'nosecure'* *E523* 7708 'secure' boolean (default off) 7709 global 7710 When on, ":autocmd", shell and write commands are not allowed in 7711 ".vimrc" and ".exrc" in the current directory and map commands are 7712 displayed. Switch it off only if you know that you will not run into 7713 problems, or when the 'exrc' option is off. On Unix this option is 7714 only used if the ".vimrc" or ".exrc" is not owned by you. This can be 7715 dangerous if the systems allows users to do a "chown". You better set 7716 'secure' at the end of your ~/.vimrc then. 7717 This option cannot be set from a |modeline| or in the |sandbox|, for 7718 security reasons. 7719 7720 *'selection'* *'sel'* 7721 'selection' 'sel' string (default "inclusive") 7722 global 7723 This option defines the behavior of the selection. It is only used 7724 in Visual and Select mode. 7725 Possible values: 7726 value past line inclusive ~ 7727 old no yes 7728 inclusive yes yes 7729 exclusive yes no 7730 "past line" means that the cursor is allowed to be positioned one 7731 character past the line. 7732 "inclusive" means that the last character of the selection is included 7733 in an operation. For example, when "x" is used to delete the 7734 selection. 7735 When "old" is used and 'virtualedit' allows the cursor to move past 7736 the end of line the line break still isn't included. 7737 When "exclusive" is used, cursor position in visual mode will be 7738 adjusted for inclusive motions |inclusive-motion-selection-exclusive|. 7739 7740 Note: 7741 - When "exclusive" is used and selecting from the end backwards, you 7742 cannot include the last character of a line, when starting in Normal 7743 mode and 'virtualedit' empty. 7744 - when "exclusive" is used with a single character visual selection, 7745 Vim will behave as if the 'selection' is inclusive (in other words, 7746 you cannot visually select an empty region). 7747 7748 The 'selection' option is set by the |:behave| command. 7749 7750 *'selectmode'* *'slm'* 7751 'selectmode' 'slm' string (default "") 7752 global 7753 This is a comma-separated list of words, which specifies when to start 7754 Select mode instead of Visual mode, when a selection is started. 7755 Possible values: 7756 mouse when using the mouse 7757 key when using shifted special keys 7758 cmd when using "v", "V" or CTRL-V 7759 See |Select-mode|. 7760 The 'selectmode' option is set by the |:behave| command. 7761 7762 *'sessionoptions'* *'ssop'* 7763 'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds, 7764 help,options,tabpages,winsize,terminal") 7765 global 7766 {not available when compiled without the |+mksession| 7767 feature} 7768 Changes the effect of the |:mksession| command. It is a comma 7769 separated list of words. Each word enables saving and restoring 7770 something: 7771 word save and restore ~ 7772 blank empty windows 7773 buffers hidden and unloaded buffers, not just those in windows 7774 curdir the current directory 7775 folds manually created folds, opened/closed folds and local 7776 fold options 7777 globals global variables that start with an uppercase letter 7778 and contain at least one lowercase letter. Only 7779 String and Number types are stored. 7780 help the help window 7781 localoptions options and mappings local to a window or buffer (not 7782 global values for local options) 7783 options all options and mappings (also global values for local 7784 options) 7785 skiprtp exclude 'runtimepath' and 'packpath' from the options 7786 resize size of the Vim window: 'lines' and 'columns' 7787 sesdir the directory in which the session file is located 7788 will become the current directory (useful with 7789 projects accessed over a network from different 7790 systems) 7791 slash backslashes in file names replaced with forward 7792 slashes 7793 tabpages all tab pages; without this only the current tab page 7794 is restored, so that you can make a session for each 7795 tab page separately 7796 terminal include terminal windows where the command can be 7797 restored 7798 unix with Unix end-of-line format (single <NL>), even when 7799 on Windows or DOS 7800 winpos position of the whole Vim window 7801 winsize window sizes 7802 7803 Don't include both "curdir" and "sesdir". 7804 When neither "curdir" nor "sesdir" is included, file names are stored 7805 with absolute paths. 7806 If you leave out "options" many things won't work well after restoring 7807 the session. 7808 "slash" and "unix" are useful on Windows when sharing session files 7809 with Unix. The Unix version of Vim cannot source dos format scripts, 7810 but the Windows version of Vim can source unix format scripts. 7811 7812 *'shell'* *'sh'* *E91* 7813 'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe") 7814 global 7815 Name of the shell to use for ! and :! commands. When changing the 7816 value also check these options: 'shelltype', 'shellpipe', 'shellslash' 7817 'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'. 7818 It is allowed to give an argument to the command, e.g. "csh -f". 7819 See |option-backslash| about including spaces and backslashes. 7820 Environment variables are expanded |:set_env|. 7821 7822 In |restricted-mode| shell commands will not be possible. This mode 7823 is used if the value of $SHELL ends in "false" or "nologin". 7824 7825 If the name of the shell contains a space, you need to enclose it in 7826 quotes and escape the space. Example with quotes: > 7827 :set shell=\"c:\program\ files\unix\sh.exe\"\ -f 7828 < Note the backslash before each quote (to avoid starting a comment) and 7829 each space (to avoid ending the option value). Also note that the 7830 "-f" is not inside the quotes, because it is not part of the command 7831 name. Vim automagically recognizes the backslashes that are path 7832 separators. 7833 Example with escaped space (Vim will do this when initializing the 7834 option from $SHELL): > 7835 :set shell=/bin/with\\\ space/sh 7836 < The resulting value of 'shell' is "/bin/with\ space/sh", two 7837 backslashes are consumed by `:set`. 7838 7839 Under MS-Windows, when the executable ends in ".com" it must be 7840 included. Thus setting the shell to "command.com" or "4dos.com" 7841 works, but "command" and "4dos" do not work for all commands (e.g., 7842 filtering). 7843 For unknown reasons, when using "4dos.com" the current directory is 7844 changed to "C:\". To avoid this set 'shell' like this: > 7845 :set shell=command.com\ /c\ 4dos 7846 < This option cannot be set from a |modeline| or in the |sandbox|, for 7847 security reasons. 7848 7849 *'shellcmdflag'* *'shcf'* 7850 'shellcmdflag' 'shcf' string (default: "-c"; 7851 Win32, when 'shell' contains "powershell": 7852 "-Command", or when it does not contain "sh" 7853 somewhere: "/c") 7854 global 7855 Flag passed to the shell to execute "!" and ":!" commands; e.g., 7856 "bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir". 7857 For MS-Windows, the default is set according to the value of 'shell', 7858 to reduce the need to set this option by the user. 7859 On Unix it can have more than one flag. Each white space separated 7860 part is passed as an argument to the shell command. 7861 See |option-backslash| about including spaces and backslashes. 7862 Also see |dos-shell| and |dos-powershell| for MS-Windows. 7863 This option cannot be set from a |modeline| or in the |sandbox|, for 7864 security reasons. 7865 7866 *'shellpipe'* *'sp'* 7867 'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" 7868 "2>&1| tee", or 7869 "2>&1 | Out-File -Encoding default") 7870 global 7871 {not available when compiled without the |+quickfix| 7872 feature} 7873 String to be used to put the output of the ":make" command in the 7874 error file. See also |:make_makeprg|. See |option-backslash| about 7875 including spaces and backslashes. 7876 The name of the temporary file can be represented by "%s" if necessary 7877 (the file name is appended automatically if no %s appears in the value 7878 of this option). 7879 For the Amiga the default is ">". For MS-Windows using powershell the 7880 default is "2>&1 | Out-File -Encoding default", otherwise the default 7881 is ">%s 2>&1". The output is directly saved in a file and not echoed 7882 to the screen. 7883 For Unix the default is "| tee". The stdout of the compiler is saved 7884 in a file and echoed to the screen. If the 'shell' option is "csh" or 7885 "tcsh" after initializations, the default becomes "|& tee". If the 7886 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta", 7887 "bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This 7888 means that stderr is also included. Before using the 'shell' option a 7889 path is removed, thus "/bin/sh" uses "sh". 7890 For Unix and MS-Windows, when the 'shell' option is "pwsh" the default 7891 becomes ">%s 2>&1" and the output is not echoed to the screen. 7892 The initialization of this option is done after reading the ".vimrc" 7893 and the other initializations, so that when the 'shell' option is set 7894 there, the 'shellpipe' option changes automatically, unless it was 7895 explicitly set before. 7896 When 'shellpipe' is set to an empty string, no redirection of the 7897 ":make" output will be done. This is useful if you use a 'makeprg' 7898 that writes to 'makeef' by itself. If you want no piping, but do 7899 want to include the 'makeef', set 'shellpipe' to a single space. 7900 Don't forget to precede the space with a backslash: ":set sp=\ ". 7901 In the future pipes may be used for filtering and this option will 7902 become obsolete (at least for Unix). 7903 Note: When using a pipe like "| tee", you'll lose the exit code of the 7904 shell command. This might be configurable by your shell, look for 7905 the pipefail option (for bash and zsh, use ":set -o pipefail"). 7906 Only a single "%s" value is allowed. 7907 This option cannot be set from a |modeline| or in the |sandbox|, for 7908 security reasons. 7909 7910 *'shellquote'* *'shq'* 7911 'shellquote' 'shq' string (default: "") 7912 global 7913 Quoting character(s), put around the command passed to the shell, for 7914 the "!" and ":!" commands. The redirection is kept outside of the 7915 quoting. See 'shellxquote' to include the redirection. It's 7916 probably not useful to set both options. 7917 This is an empty string by default. Only known to be useful for 7918 third-party shells on MS-Windows-like systems, such as the MKS Korn 7919 Shell or bash, where it should be "\"". See |dos-shell|. 7920 This option cannot be set from a |modeline| or in the |sandbox|, for 7921 security reasons. 7922 7923 *'shellredir'* *'srr'* 7924 'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or 7925 "2>&1 | Out-File -Encoding default") 7926 global 7927 String to be used to put the output of a filter command in a temporary 7928 file. See also |:!|. See |option-backslash| about including spaces 7929 and backslashes. 7930 The name of the temporary file can be represented by "%s" if necessary 7931 (the file name is appended automatically if no %s appears in the value 7932 of this option). 7933 The default is ">". For Unix, if the 'shell' option is "csh" or 7934 "tcsh" during initializations, the default becomes ">&". If the 7935 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta", 7936 "bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means 7937 that stderr is also included. For Win32, the Unix checks are done and 7938 additionally "cmd" is checked for, which makes the default ">%s 2>&1", 7939 and "powershell" is checked for which makes the default 7940 "2>&1 | Out-File -Encoding default" (see |dos-powershell|). Also, the 7941 same names with ".exe" appended are checked for. 7942 The initialization of this option is done after reading the ".vimrc" 7943 and the other initializations, so that when the 'shell' option is set 7944 there, the 'shellredir' option changes automatically unless it was 7945 explicitly set before. 7946 In the future pipes may be used for filtering and this option will 7947 become obsolete (at least for Unix). 7948 This option cannot be set from a |modeline| or in the |sandbox|, for 7949 security reasons. 7950 *E1577* 7951 Only a single "%s" item is allowed in the option value. 7952 7953 7954 *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'* 7955 'shellslash' 'ssl' boolean (default off) 7956 global 7957 {only for MS-Windows} 7958 When set, a forward slash is used when expanding file names. This is 7959 useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or 7960 powershell.exe. Backward slashes can still be typed, but they are 7961 changed to forward slashes by Vim. 7962 Note that setting or resetting this option has no effect for some 7963 existing file names, thus this option needs to be set before opening 7964 any file for best results. This might change in the future. 7965 'shellslash' only works when a backslash can be used as a path 7966 separator. To test if this is so use: > 7967 if exists('+shellslash') 7968 < Also see 'completeslash'. 7969 7970 *'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'* 7971 'shelltemp' 'stmp' boolean (Vi default off, Vim default on) 7972 global 7973 When on, use temp files for shell commands. When off use a pipe. 7974 When using a pipe is not possible temp files are used anyway. 7975 Currently a pipe is only supported on Unix and MS-Windows 2K and 7976 later. You can check it with: > 7977 :if has("filterpipe") 7978 < The advantage of using a pipe is that nobody can read the temp file 7979 and the 'shell' command does not need to support redirection. 7980 The advantage of using a temp file is that the file type and encoding 7981 can be detected. 7982 The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|, 7983 |FilterWritePost| autocommands event are not triggered when 7984 'shelltemp' is off. 7985 The `system()` function does not respect this option and always uses 7986 temp files. 7987 NOTE: This option is set to the Vim default value when 'compatible' 7988 is reset. 7989 7990 *'shelltype'* *'st'* 7991 'shelltype' 'st' number (default 0) 7992 global 7993 {only for the Amiga} 7994 On the Amiga this option influences the way how the commands work 7995 which use a shell. 7996 0 and 1: always use the shell 7997 2 and 3: use the shell only to filter lines 7998 4 and 5: use shell only for ':sh' command 7999 When not using the shell, the command is executed directly. 8000 8001 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands 8002 1 and 3: use "shell cmd" to start external commands 8003 8004 *'shellxescape'* *'sxe'* 8005 'shellxescape' 'sxe' string (default: ""; 8006 for MS-Windows: "\"&|<>()@^") 8007 global 8008 When 'shellxquote' is set to "(" then the characters listed in this 8009 option will be escaped with a '^' character. This makes it possible 8010 to execute most external commands with cmd.exe. 8011 This option cannot be set from a |modeline| or in the |sandbox|, for 8012 security reasons. 8013 8014 *'shellxquote'* *'sxq'* 8015 'shellxquote' 'sxq' string (default: ""; 8016 for Win32, when 'shell' is cmd.exe: "(" 8017 for Win32, when 'shell' is 8018 powershell.exe: "\"" 8019 for Win32, when 'shell' contains "sh" 8020 somewhere: "\"" 8021 for Unix, when using system(): "\"") 8022 global 8023 Quoting character(s), put around the command passed to the shell, for 8024 the "!" and ":!" commands. Includes the redirection. See 8025 'shellquote' to exclude the redirection. It's probably not useful 8026 to set both options. 8027 When the value is '(' then ')' is appended. When the value is '"(' 8028 then ')"' is appended. 8029 When the value is '(' then also see 'shellxescape'. 8030 This is an empty string by default on most systems, but is known to be 8031 useful for on Win32 version, either for cmd.exe, powershell.exe, or 8032 pwsh.exe which automatically strips off the first and last quote on a 8033 command, or 3rd-party shells such as the MKS Korn Shell or bash, where 8034 it should be "\"". The default is adjusted according the value of 8035 'shell', to reduce the need to set this option by the user. See 8036 |dos-shell|. 8037 This option cannot be set from a |modeline| or in the |sandbox|, for 8038 security reasons. 8039 8040 *'shiftround'* *'sr'* *'noshiftround'* *'nosr'* 8041 'shiftround' 'sr' boolean (default off) 8042 global 8043 Round indent to multiple of 'shiftwidth'. Applies to > and < 8044 commands. CTRL-T and CTRL-D in Insert mode always round the indent to 8045 a multiple of 'shiftwidth' (this is Vi compatible). 8046 NOTE: This option is reset when 'compatible' is set. 8047 8048 *'shiftwidth'* *'sw'* 8049 'shiftwidth' 'sw' number (default 8) 8050 local to buffer 8051 Number of columns that make up one level of (auto)indentation. Used 8052 by 'cindent', |<<|, |>>|, etc. 8053 If set to 0, Vim uses the current 'tabstop' value. Use |shiftwidth()| 8054 to obtain the effective value in scripts. 8055 8056 *'shortmess'* *'shm'* 8057 'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S", 8058 POSIX default: "AS") 8059 global *E1336* 8060 This option helps to avoid all the |hit-enter| prompts caused by file 8061 messages, for example with CTRL-G, and to avoid some other messages. 8062 It is a list of flags: 8063 flag meaning when present ~ 8064 f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f* 8065 i use "[noeol]" instead of "[Incomplete last line]" *shm-i* 8066 l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l* 8067 m use "[+]" instead of "[Modified]" *shm-m* 8068 n use "[New]" instead of "[New File]" *shm-n* 8069 r use "[RO]" instead of "[readonly]" *shm-r* 8070 w use "[w]" instead of "written" for file write message *shm-w* 8071 and "[a]" instead of "appended" for ':w >> file' command 8072 x use "[dos]" instead of "[dos format]", "[unix]" *shm-x* 8073 instead of "[unix format]" and "[mac]" instead of "[mac 8074 format]" 8075 a all of the above abbreviations *shm-a* 8076 8077 o overwrite message for writing a file with subsequent *shm-o* 8078 message for reading a file (useful for ":wn" or when 8079 'autowrite' on) 8080 O message for reading a file overwrites any previous *shm-O* 8081 message; also for quickfix message (e.g., ":cn") 8082 s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* 8083 "search hit TOP, continuing at BOTTOM" messages; when using 8084 the search count do not show "W" before the count message 8085 (see |shm-S| below) 8086 t truncate file message at the start if it is too long *shm-t* 8087 to fit on the command-line, "<" will appear in the left most 8088 column; ignored in Ex mode 8089 T truncate other messages in the middle if they are too *shm-T* 8090 long to fit on the command line; "..." will appear in the 8091 middle; ignored in Ex mode 8092 W don't give "written" or "[w]" when writing a file *shm-W* 8093 A don't give the "ATTENTION" message when an existing *shm-A* 8094 swap file is found 8095 I don't give the intro message when starting Vim, *shm-I* 8096 see |:intro| 8097 c don't give |ins-completion-menu| messages; for *shm-c* 8098 example, "-- XXX completion (YYY)", "match 1 of 2", "The only 8099 match", "Pattern not found", "Back at original", etc. 8100 C don't give messages while scanning for ins-completion *shm-C* 8101 items, for instance "scanning tags" 8102 q use "recording" instead of "recording @a" *shm-q* 8103 F don't give the file info when editing a file, like *shm-F* 8104 `:silent` was used for the command; note that this also 8105 affects messages from autocommands and 'autoread' reloading 8106 S do not show search count message when searching, e.g. *shm-S* 8107 "[1/5]". When the "S" flag is not present (e.g. search count 8108 is shown), the "search hit BOTTOM, continuing at TOP" and 8109 "search hit TOP, continuing at BOTTOM" messages are only 8110 indicated by a "W" (Mnemonic: Wrapped) letter before the 8111 search count statistics. The maximum limit can be set with 8112 the 'maxsearchcount' option, see also |searchcount()| 8113 function. 8114 u don't give undo and redo messages like *shm-u* 8115 "1 line less; before #1 1 second ago", "Already at oldest 8116 change" or "Already at newest change" 8117 8118 This gives you the opportunity to avoid that a change between buffers 8119 requires you to hit <Enter>, but still gives as useful a message as 8120 possible for the space available. To get the whole message that you 8121 would have got with 'shm' empty, use ":file!" 8122 Useful values: 8123 shm= No abbreviation of message. 8124 shm=a Abbreviation, but no loss of information. 8125 shm=at Abbreviation, and truncate message when necessary. 8126 8127 NOTE: This option is set to the Vi default value when 'compatible' is 8128 set and to the Vim default value when 'compatible' is reset. 8129 8130 *'shortname'* *'sn'* *'noshortname'* *'nosn'* 8131 'shortname' 'sn' boolean (default off) 8132 local to buffer 8133 Filenames are assumed to be 8 characters plus one extension of 3 8134 characters. Multiple dots in file names are not allowed. When this 8135 option is on, dots in file names are replaced with underscores when 8136 adding an extension (".~" or ".swp"). This option is useful 8137 when editing files on an MS-DOS compatible filesystem, e.g., messydos 8138 or crossdos. 8139 8140 *'showbreak'* *'sbr'* *E595* 8141 'showbreak' 'sbr' string (default "") 8142 global or local to window |global-local| 8143 {not available when compiled without the |+linebreak| 8144 feature} 8145 String to put at the start of lines that have been wrapped. Useful 8146 values are "> " or "+++ ": > 8147 :set showbreak=>\ 8148 < Note the backslash to escape the trailing space. It's easier like 8149 this: > 8150 :let &showbreak = '+++ ' 8151 < Only printable single-cell characters are allowed, excluding <Tab> and 8152 comma (in a future version the comma might be used to separate the 8153 part that is shown at the end and at the start of a line). 8154 The characters are highlighted according to the '@' flag in 8155 'highlight'. 8156 Note that tabs after the showbreak will be displayed differently. 8157 If you want the 'showbreak' to appear in between line numbers, add the 8158 "n" flag to 'cpoptions'. 8159 A window-local value overrules a global value. If the global value is 8160 set and you want no value in the current window use NONE: > 8161 :setlocal showbreak=NONE 8162 < 8163 *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* 8164 'showcmd' 'sc' boolean (Vim default: on, Vi default: off) 8165 global 8166 Show (partial) command in the last line of the screen. Set this 8167 option off if your terminal is slow. 8168 In Visual mode the size of the selected area is shown: 8169 - When selecting characters within a line, the number of characters. 8170 If the number of bytes is different it is also displayed: "2-6" 8171 means two characters and six bytes. 8172 - When selecting more than one line, the number of lines. 8173 - When selecting a block, the size in screen characters: 8174 {lines}x{columns}. 8175 This information can be displayed in an alternative location using the 8176 'showcmdloc' option. 8177 NOTE: This option is set to the Vi default value when 'compatible' is 8178 set and to the Vim default value when 'compatible' is reset. 8179 8180 *'showcmdloc'* *'sloc'* 8181 'showcmdloc' 'sloc' string (default "last") 8182 global 8183 This option can be used to display the (partially) entered command in 8184 another location. Possible values are: 8185 last Last line of the screen (default). 8186 statusline Status line of the current window. 8187 tabline First line of the screen if 'showtabline' is enabled. 8188 Setting this option to "statusline" or "tabline" means that these will 8189 be redrawn whenever the command changes, which can be on every key 8190 pressed. 8191 The %S 'statusline' item can be used in 'statusline' or 'tabline' to 8192 place the text. Without a custom 'statusline' or 'tabline' it will be 8193 displayed in a convenient location. 8194 8195 *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'* 8196 'showfulltag' 'sft' boolean (default off) 8197 global 8198 When completing a word in insert mode (see |ins-completion|) from the 8199 tags file, show both the tag name and a tidied-up form of the search 8200 pattern (if there is one) as possible matches. Thus, if you have 8201 matched a C function, you can see a template for what arguments are 8202 required (coding style permitting). 8203 Note that this doesn't work well together with having "longest" in 8204 'completeopt', because the completion from the search pattern may not 8205 match the typed text. 8206 8207 *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'* 8208 'showmatch' 'sm' boolean (default off) 8209 global 8210 When a bracket is inserted, briefly jump to the matching one. The 8211 jump is only done if the match can be seen on the screen. The time to 8212 show the match can be set with 'matchtime'. 8213 A Beep is given if there is no match (no matter if the match can be 8214 seen or not). 8215 This option is reset when 'paste' is set and restored when 'paste' is 8216 reset. 8217 When the 'm' flag is not included in 'cpoptions', typing a character 8218 will immediately move the cursor back to where it belongs. 8219 See the "sm" field in 'guicursor' for setting the cursor shape and 8220 blinking when showing the match. 8221 The 'matchpairs' option can be used to specify the characters to show 8222 matches for. 'rightleft' and 'revins' are used to look for opposite 8223 matches. 8224 Also see the matchparen plugin for highlighting the match when moving 8225 around |pi_paren.txt|. 8226 Note: Use of the short form is rated PG. 8227 8228 *'showmode'* *'smd'* *'noshowmode'* *'nosmd'* 8229 'showmode' 'smd' boolean (Vim default: on, Vi default: off) 8230 global 8231 If in Insert, Replace or Visual mode put a message on the last line. 8232 Use the 'M' flag in 'highlight' to set the type of highlighting for 8233 this message. 8234 When |XIM| may be used the message will include "XIM". But this 8235 doesn't mean XIM is really active, especially when 'imactivatekey' is 8236 not set. 8237 NOTE: This option is set to the Vi default value when 'compatible' is 8238 set and to the Vim default value when 'compatible' is reset. 8239 8240 *'showtabline'* *'stal'* 8241 'showtabline' 'stal' number (default 1) 8242 global 8243 The value of this option specifies when the line with tab page labels 8244 will be displayed: 8245 0: never 8246 1: only if there are at least two tab pages 8247 2: always 8248 This is both for the GUI and non-GUI implementation of the tab pages 8249 line. 8250 See |tab-page| for more information about tab pages. 8251 8252 *'showtabpanel'* *'stpl'* 8253 'showtabpanel' 'stpl' number (default 0) 8254 global 8255 {not available when compiled without the |+tabpanel| 8256 feature} 8257 The value of this option specifies when the |tabpanel| with tab page 8258 labels will be displayed: 8259 0: never 8260 1: only if there are at least two tab pages 8261 2: always 8262 See |tab-page| for more information about tab page labels. 8263 8264 *'sidescroll'* *'ss'* 8265 'sidescroll' 'ss' number (default 0) 8266 global 8267 The minimal number of columns to scroll horizontally. Used only when 8268 the 'wrap' option is off and the cursor is moved off of the screen. 8269 When it is zero the cursor will be put in the middle of the screen. 8270 When using a slow terminal set it to a large number or 0. When using 8271 a fast terminal use a small number or 1. Not used for "zh" and "zl" 8272 commands. 8273 8274 *'sidescrolloff'* *'siso'* 8275 'sidescrolloff' 'siso' number (default 0) 8276 global or local to window |global-local| 8277 The minimal number of screen columns to keep to the left and to the 8278 right of the cursor if 'nowrap' is set. Setting this option to a 8279 value greater than 0 while having 'sidescroll' also at a non-zero 8280 value makes some context visible in the line you are scrolling in 8281 horizontally (except at beginning of the line). Setting this option 8282 to a large value (like 999) has the effect of keeping the cursor 8283 horizontally centered in the window, as long as one does not come too 8284 close to the beginning of the line. 8285 After using the local value, go back the global value with one of 8286 these two: > 8287 setlocal sidescrolloff< 8288 setlocal sidescrolloff=-1 8289 < NOTE: This option is set to 0 when 'compatible' is set. 8290 8291 Example: Try this together with 'sidescroll' and 'listchars' as in the 8292 following example to never allow the cursor to move onto the 8293 "extends" character: > 8294 8295 :set nowrap sidescroll=1 listchars=extends:>,precedes:< 8296 :set sidescrolloff=1 8297 < 8298 *'signcolumn'* *'scl'* 8299 'signcolumn' 'scl' string (default "auto") 8300 local to window 8301 {not available when compiled without the |+signs| 8302 feature} 8303 Whether or not to draw the signcolumn. Valid values are: 8304 "auto" only when there is a sign to display 8305 "no" never 8306 "yes" always 8307 "number" display signs in the 'number' column. If the number 8308 column is not present, then behaves like "auto". 8309 8310 *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'* 8311 'smartcase' 'scs' boolean (default off) 8312 global 8313 Override the 'ignorecase' option if the search pattern contains upper 8314 case characters. Only used when the search pattern is typed and 8315 'ignorecase' option is on. Used for the commands "/", "?", "n", "N", 8316 ":g" and ":s" and when filtering matches for the completion menu 8317 |compl-states|. 8318 Not used for "*", "#", "gd", tag search, etc. After "*" and "#" you 8319 can make 'smartcase' used by doing a "/" command, recalling the search 8320 pattern from history and hitting <Enter>. 8321 NOTE: This option is reset when 'compatible' is set. 8322 8323 *'smartindent'* *'si'* *'nosmartindent'* *'nosi'* 8324 'smartindent' 'si' boolean (default off) 8325 local to buffer 8326 Do smart autoindenting when starting a new line. Works for C-like 8327 programs, but can also be used for other languages. 'cindent' does 8328 something like this, works better in most cases, but is more strict, 8329 see |C-indenting|. When 'cindent' is on or 'indentexpr' is set, 8330 setting 'si' has no effect. 'indentexpr' is a more advanced 8331 alternative. 8332 Normally 'autoindent' should also be on when using 'smartindent'. 8333 An indent is automatically inserted: 8334 - After a line ending in '{'. 8335 - After a line starting with a keyword from 'cinwords'. 8336 - Before a line starting with '}' (only with the "O" command). 8337 When typing '}' as the first character in a new line, that line is 8338 given the same indent as the matching '{'. 8339 When typing '#' as the first character in a new line, the indent for 8340 that line is removed, the '#' is put in the first column. The indent 8341 is restored for the next line. If you don't want this, use this 8342 mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. 8343 When using the ">>" command, lines starting with '#' are not shifted 8344 right. 8345 NOTE: This option is reset when 'compatible' is set. 8346 This option is reset when 'paste' is set and restored when 'paste' is 8347 reset. 8348 8349 *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* 8350 'smarttab' 'sta' boolean (default off) 8351 global 8352 When enabled, the <Tab> key will indent by 'shiftwidth' if the cursor 8353 is in leading whitespace. The <BS> key has the opposite effect. 8354 In leading whitespace, this has the same effect as setting 8355 'softtabstop' to the value of 'shiftwidth'. 8356 This option is reset when 'compatible' is set; it is temporarily 8357 disabled when 'paste' is enabled, and restored when 'paste' is turned 8358 off. 8359 NOTE: in most cases, using 'softtabstop' is a better option. Have a 8360 look at section |30.5| of the user guide for detailed 8361 explanations on how Vim works with tabs and spaces. 8362 8363 *'smoothscroll'* *'sms'* *'nosmoothscroll'* *'nosms'* 8364 'smoothscroll' 'sms' boolean (default off) 8365 local to window 8366 Scrolling works with screen lines. When 'wrap' is set and the first 8367 line in the window wraps part of it may not be visible, as if it is 8368 above the window. "<<<" is displayed at the start of the first line, 8369 highlighted with |hl-NonText|. 8370 You may also want to add "lastline" to the 'display' option to show as 8371 much of the last line as possible. 8372 NOTE: partly implemented, doesn't work yet for |gj| and |gk|. 8373 8374 *'softtabstop'* *'sts'* 8375 'softtabstop' 'sts' number (default 0) 8376 local to buffer 8377 Create soft tab stops, separated by 'softtabstop' number of columns. 8378 In Insert mode, pressing the <Tab> key will move the cursor to the 8379 next soft tab stop, instead of inserting a literal tab. <BS> behaves 8380 similarly in reverse. Vim inserts a minimal mix of tab and space 8381 characters to produce the visual effect. 8382 8383 This setting does not affect the display of existing tab characters. 8384 8385 A value of 0 disables this behaviour. A negative value makes Vim use 8386 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with 8387 different values, you might consider setting 'smarttab'. 8388 8389 'softtabstop' is temporarily set to 0 when 'paste' is on and reset 8390 when it is turned off. It is also reset when 'compatible' is set. 8391 8392 The 'L' flag in 'cpoptions' alters tab behavior when 'list' is 8393 enabled. See also |ins-expandtab| and user manual section |30.5| for 8394 in-depth explanations. 8395 8396 If Vim is compiled with the |+vartabs| feature then the value of 8397 'softtabstop' will be ignored if 'varsofttabstop' is set to anything 8398 other than an empty string. 8399 8400 *'spell'* *'nospell'* 8401 'spell' boolean (default off) 8402 local to window 8403 {not available when compiled without the |+syntax| 8404 feature} 8405 When on spell checking will be done. See |spell|. 8406 The languages are specified with 'spelllang'. 8407 8408 *'spellcapcheck'* *'spc'* 8409 'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+") 8410 local to buffer 8411 {not available when compiled without the |+syntax| 8412 feature} 8413 Pattern to locate the end of a sentence. The following word will be 8414 checked to start with a capital letter. If not then it is highlighted 8415 with SpellCap |hl-SpellCap| (unless the word is also badly spelled). 8416 When this check is not wanted make this option empty. 8417 Only used when 'spell' is set. 8418 Be careful with special characters, see |option-backslash| about 8419 including spaces and backslashes. 8420 To set this option automatically depending on the language, see 8421 |set-spc-auto|. 8422 8423 *'spellfile'* *'spf'* 8424 'spellfile' 'spf' string (default empty) 8425 local to buffer 8426 {not available when compiled without the |+syntax| 8427 feature} 8428 Name of the word list file where words are added for the |zg| and |zw| 8429 commands. It must end in ".{encoding}.add". You need to include the 8430 path, otherwise the file is placed in the current directory. 8431 The path may include characters from 'isfname', space, comma and '@'. 8432 *E765* 8433 It may also be a comma-separated list of names. A count before the 8434 |zg| and |zw| commands can be used to access each. This allows using 8435 a personal word list file and a project word list file. 8436 When a word is added while this option is empty Vim will set it for 8437 you: Using the first directory in 'runtimepath' that is writable. If 8438 there is no "spell" directory yet it will be created. For the file 8439 name the first language name that appears in 'spelllang' is used, 8440 ignoring the region. 8441 The resulting ".spl" file will be used for spell checking, it does not 8442 have to appear in 'spelllang'. 8443 Normally one file is used for all regions, but you can add the region 8444 name if you want to. However, it will then only be used when 8445 'spellfile' is set to it, for entries in 'spelllang' only files 8446 without region name will be found. 8447 Environment variables are expanded |:set_env|. 8448 This option cannot be set from a |modeline| or in the |sandbox|, for 8449 security reasons. 8450 8451 *'spelllang'* *'spl'* 8452 'spelllang' 'spl' string (default "en") 8453 local to buffer 8454 {not available when compiled without the |+syntax| 8455 feature} 8456 A comma-separated list of word list names. When the 'spell' option is 8457 on spellchecking will be done for these languages. Example: > 8458 set spelllang=en_us,nl,medical 8459 < This means US English, Dutch and medical words are recognized. Words 8460 that are not recognized will be highlighted. 8461 The word list name must consist of alphanumeric characters, a dash or 8462 an underscore. It should not include a comma or dot. Using a dash is 8463 recommended to separate the two letter language name from a 8464 specification. Thus "en-rare" is used for rare English words. 8465 A region name must come last and have the form "_xx", where "xx" is 8466 the two-letter, lower case region name. You can use more than one 8467 region by listing them: "en_us,en_ca" supports both US and Canadian 8468 English, but not words specific for Australia, New Zealand or Great 8469 Britain. (Note: currently en_au and en_nz dictionaries are older than 8470 en_ca, en_gb and en_us). 8471 If the name "cjk" is included East Asian characters are excluded from 8472 spell checking. This is useful when editing text that also has Asian 8473 words. 8474 Note that the "medical" dictionary does not exist, it is just an 8475 example of a longer name. 8476 *E757* 8477 As a special case the name of a .spl file can be given as-is. The 8478 first "_xx" in the name is removed and used as the region name 8479 (_xx is an underscore, two letters and followed by a non-letter). 8480 This is mainly for testing purposes. You must make sure the correct 8481 encoding is used, Vim doesn't check it. 8482 When 'encoding' is set the word lists are reloaded. Thus it's a good 8483 idea to set 'spelllang' after setting 'encoding' to avoid loading the 8484 files twice. 8485 How the related spell files are found is explained here: |spell-load|. 8486 8487 If the |spellfile.vim| plugin is active and you use a language name 8488 for which Vim cannot find the .spl file in 'runtimepath' the plugin 8489 will ask you if you want to download the file. 8490 8491 After this option has been set successfully, Vim will source the files 8492 "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' 8493 up to the first character that is not an ASCII letter or number and 8494 not a dash. Also see |set-spc-auto|. 8495 8496 *'spelloptions'* *'spo'* 8497 'spelloptions' 'spo' string (default "") 8498 local to buffer 8499 {not available when compiled without the |+syntax| 8500 feature} 8501 A comma-separated list of options for spell checking: 8502 camel When a word is CamelCased, assume "Cased" is a 8503 separate word: every upper-case character in a word 8504 that comes after a lower case character indicates the 8505 start of a new word. 8506 8507 *'spellsuggest'* *'sps'* 8508 'spellsuggest' 'sps' string (default "best") 8509 global 8510 {not available when compiled without the |+syntax| 8511 feature} 8512 Methods used for spelling suggestions. Both for the |z=| command and 8513 the |spellsuggest()| function. This is a comma-separated list of 8514 items: 8515 8516 best Internal method that works best for English. Finds 8517 changes like "fast" and uses a bit of sound-a-like 8518 scoring to improve the ordering. 8519 8520 double Internal method that uses two methods and mixes the 8521 results. The first method is "fast", the other method 8522 computes how much the suggestion sounds like the bad 8523 word. That only works when the language specifies 8524 sound folding. Can be slow and doesn't always give 8525 better results. 8526 8527 fast Internal method that only checks for simple changes: 8528 character inserts/deletes/swaps. Works well for 8529 simple typing mistakes. 8530 8531 {number} The maximum number of suggestions listed for |z=|. 8532 Not used for |spellsuggest()|. The number of 8533 suggestions is never more than the value of 'lines' 8534 minus two. 8535 8536 timeout:{millisec} Limit the time searching for suggestions to 8537 {millisec} milliseconds. Applies to the following 8538 methods. When omitted the limit is 5000. When 8539 negative there is no limit. {only works when built 8540 with the |+reltime| feature} 8541 8542 file:{filename} Read file {filename}, which must have two columns, 8543 separated by a slash. The first column contains the 8544 bad word, the second column the suggested good word. 8545 Example: 8546 theribal/terrible ~ 8547 Use this for common mistakes that do not appear at the 8548 top of the suggestion list with the internal methods. 8549 Lines without a slash are ignored, use this for 8550 comments. 8551 The word in the second column must be correct, 8552 otherwise it will not be used. Add the word to an 8553 ".add" file if it is currently flagged as a spelling 8554 mistake. 8555 The file is used for all languages. 8556 8557 expr:{expr} Evaluate expression {expr}. Use a function to avoid 8558 trouble with spaces. Best is to call a function 8559 without arguments, see |expr-option-function|. 8560 |v:val| holds the badly spelled word. The expression 8561 must evaluate to a List of Lists, each with a 8562 suggestion and a score. 8563 Example: 8564 [['the', 33], ['that', 44]] ~ 8565 Set 'verbose' and use |z=| to see the scores that the 8566 internal methods use. A lower score is better. 8567 This may invoke |spellsuggest()| if you temporarily 8568 set 'spellsuggest' to exclude the "expr:" part. 8569 Errors are silently ignored, unless you set the 8570 'verbose' option to a non-zero value. 8571 8572 Only one of "best", "double" or "fast" may be used. The others may 8573 appear several times in any order. Example: > 8574 :set sps=file:~/.vim/sugg,best,expr:MySuggest() 8575 < Environment variables are expanded |:set_env|. 8576 This option cannot be set from a |modeline| or in the |sandbox|, for 8577 security reasons. 8578 8579 *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* 8580 'splitbelow' 'sb' boolean (default off) 8581 global 8582 When on, splitting a window will put the new window below the current 8583 one. |:split| 8584 8585 *'splitkeep'* *'spk'* 8586 'splitkeep' 'spk' string (default "cursor") 8587 global 8588 The value of this option determines the scroll behavior when opening, 8589 closing or resizing horizontal splits. 8590 8591 Possible values are: 8592 cursor Keep the same relative cursor position. 8593 screen Keep the text on the same screen line. 8594 topline Keep the topline the same. 8595 8596 For the "screen" and "topline" values, the cursor position will be 8597 changed when necessary. In this case, the jumplist will be populated 8598 with the previous cursor position. For "screen", the text cannot 8599 always be kept on the same screen line when 'wrap' is enabled. 8600 8601 *'splitright'* *'spr'* *'nosplitright'* *'nospr'* 8602 'splitright' 'spr' boolean (default off) 8603 global 8604 When on, splitting a window will put the new window right of the 8605 current one. |:vsplit| 8606 8607 *'startofline'* *'sol'* *'nostartofline'* *'nosol'* 8608 'startofline' 'sol' boolean (default on) 8609 global 8610 When "on" the commands listed below move the cursor to the first 8611 non-blank of the line. When off the cursor is kept in the same column 8612 (if possible). This applies to the commands: 8613 - CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg" 8614 - "d", "<<", "==" and ">>" with a linewise operator 8615 (|operator-resulting-pos|) 8616 - "%" with a count 8617 - buffer changing commands (CTRL-^, :bnext, :bNext, etc.) 8618 - Ex commands that only has a line number, e.g., ":25" or ":+". 8619 In case of buffer changing commands the cursor is placed at the column 8620 where it was the last time the buffer was edited. 8621 NOTE: This option is set when 'compatible' is set. 8622 8623 *'statusline'* *'stl'* *E540* *E542* 8624 'statusline' 'stl' string (default empty) 8625 global or local to window |global-local| 8626 {not available when compiled without the |+statusline| 8627 feature} 8628 When non-empty, this option determines the content of the status line. 8629 Also see |status-line|. 8630 8631 The option consists of printf style '%' items interspersed with 8632 normal text. Each status line item is of the form: 8633 %-0{minwid}.{maxwid}{item} 8634 All fields except the {item} are optional. A single percent sign can 8635 be given as "%%". 8636 8637 *stl-%!* 8638 When the option starts with "%!" then it is used as an expression, 8639 evaluated and the result is used as the option value. Example: > 8640 :set statusline=%!MyStatusLine() 8641 < The *g:statusline_winid* variable will be set to the |window-ID| of the 8642 window that the status line belongs to. 8643 The result can contain %{} items that will be evaluated too. 8644 Note that the "%!" expression is evaluated in the context of the 8645 current window and buffer, while %{} items are evaluated in the 8646 context of the window that the statusline belongs to. 8647 8648 When there is error while evaluating the option then it will be made 8649 empty to avoid further errors. Otherwise screen updating would loop. 8650 When the result contains unprintable characters the result is 8651 unpredictable. 8652 8653 Note that the only effect of 'ruler' when this option is set (and 8654 'laststatus' is 2) is controlling the output of |CTRL-G|. 8655 8656 field meaning ~ 8657 - Left justify the item. The default is right justified 8658 when minwid is larger than the length of the item. 8659 0 Leading zeroes in numeric items. Overridden by '-'. 8660 minwid Minimum width of the item, padding as set by '-' & '0'. 8661 Value must be 50 or less. 8662 maxwid Maximum width of the item. Truncation occurs with a '<' 8663 on the left for text items. Numeric items will be 8664 shifted down to maxwid-2 digits followed by '>'number 8665 where number is the amount of missing digits, much like 8666 an exponential notation. 8667 item A one letter code as described below. 8668 8669 Following is a description of the possible statusline items. The 8670 second character in "item" is the type: 8671 N for number 8672 S for string 8673 F for flags as described below 8674 - not applicable 8675 8676 item meaning ~ 8677 f S Path to the file in the buffer, as typed or relative to current 8678 directory. 8679 F S Full path to the file in the buffer. 8680 t S File name (tail) of file in the buffer. 8681 m F Modified flag, text is "[+]"; "[-]" if 'modifiable' is off. 8682 M F Modified flag, text is ",+" or ",-". 8683 r F Readonly flag, text is "[RO]". 8684 R F Readonly flag, text is ",RO". 8685 h F Help buffer flag, text is "[help]". 8686 H F Help buffer flag, text is ",HLP". 8687 w F Preview window flag, text is "[Preview]". 8688 W F Preview window flag, text is ",PRV". 8689 y F Type of file in the buffer, e.g., "[vim]". See 'filetype'. 8690 Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'. 8691 q S "[Quickfix List]", "[Location List]" or empty. 8692 k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are 8693 being used: "<keymap>" 8694 n N Buffer number. 8695 b N Value of character under cursor. 8696 B N As above, in hexadecimal. 8697 o N Byte number in file of byte under cursor, first byte is 1. 8698 Mnemonic: Offset from start of file (with one added) 8699 {not available when compiled without |+byte_offset| feature} 8700 O N As above, in hexadecimal. 8701 N N Printer page number. (Only works in the 'printheader' option.) 8702 l N Line number. 8703 L N Number of lines in buffer. 8704 c N Column number (byte index). 8705 v N Virtual column number (screen column). 8706 V N Virtual column number as -{num}. Not displayed if equal to 'c'. 8707 p N Percentage through file in lines as in |CTRL-G|. 8708 P S Percentage through file of displayed window. This is like the 8709 percentage described for 'ruler'. Always 3 in length, unless 8710 translated. 8711 S S 'showcmd' content, see 'showcmdloc'. 8712 a S Argument list status as in default title. ({current} of {max}) 8713 Empty if the argument file count is zero or one. 8714 { NF Evaluate expression between '%{' and '}' and substitute result. 8715 Note that there is no '%' before the closing '}'. The 8716 expression cannot contain a '}' character, call a function to 8717 work around that. See |stl-%{| below. Use '%0{' to insert the 8718 result verbatim. 8719 {% - This is almost same as { except the result of the expression is 8720 re-evaluated as a statusline format string. Thus if the 8721 return value of expr contains % items they will get expanded. 8722 The expression can contain the } character, the end of 8723 expression is denoted by %}. 8724 For example: > 8725 func! Stl_filename() abort 8726 return "%t" 8727 endfunc 8728 < `stl=%{Stl_filename()}` results in `"%t"` 8729 `stl=%{%Stl_filename()%}` results in `"Name of current file"` 8730 %} - End of `{%` expression 8731 ( - Start of item group. Can be used for setting the width and 8732 alignment of a section. Must be followed by %) somewhere. 8733 ) - End of item group. No width fields allowed. 8734 T N For 'tabline': start of tab page N label. Use %T after the last 8735 label. This information is used for mouse clicks. 8736 X N For 'tabline': start of close tab N label. Use %X after the 8737 label, e.g.: %3Xclose%X. Use %999X for a "close current tab" 8738 mark. This information is used for mouse clicks. 8739 < - Where to truncate line if too long. Default is at the start. 8740 No width fields allowed. 8741 = - Separation point between alignment sections. Each section will 8742 be separated by an equal number of spaces. With one %= what 8743 comes after it will be right-aligned. With two %= there is a 8744 middle part, with white space left and right of it. 8745 No width fields allowed. 8746 # - Set highlight group. The name must follow and then a # again. 8747 Thus use %#HLname# for highlight group HLname. The same 8748 highlighting is used, also for the statusline of non-current 8749 windows. 8750 * - Set highlight group to User{N}, where {N} is taken from the 8751 minwid field, e.g. %1*. Restore normal highlight with %* or 8752 %0*. The difference between User{N} and StatusLine will be 8753 applied to StatusLineNC for the statusline of non-current 8754 windows. 8755 The number N must be between 1 and 9. See |hl-User1..9| 8756 *stl-%@* 8757 @ - Inserts a newline. This only takes effect when the "maxheight" 8758 value of 'statuslineopt' is greater than 1, or for |tabpanel|. 8759 8760 *stl-%[FuncName]* 8761 %[ defines clickable regions in the statusline. When the user clicks 8762 on a region with the mouse, the specified function is called. The 8763 same syntax can also be used in 'tabline' and 'tabpanel'. 8764 8765 %[FuncName] Start of a clickable region. "FuncName" is the name 8766 of a Vim function to call when the region is clicked. 8767 %[] End of the clickable region. If omitted, the region 8768 extends to the end of the statusline or to the start 8769 of the next clickable region. 8770 8771 A {minwid} value can be used to pass an identifier to the callback: 8772 %3[FuncName] Starts a clickable region with minwid 3. 8773 8774 The function receives a single |Dictionary| argument with these 8775 entries: 8776 "minwid" The minwid value from %N[Func] (0 if not specified). 8777 "nclicks" Number of clicks: 1, 2, or 3. 8778 "button" Mouse button: "l" (left), "m" (middle), "r" (right). 8779 "mods" Modifier keys: combination of "s" (shift), "c" (ctrl), 8780 "a" (alt). Empty string if no modifiers. 8781 "winid" |window-ID| of the window whose statusline was clicked, 8782 or 0 when the click was in 'tabline' or 'tabpanel'. 8783 "area" "statusline", "tabline", or "tabpanel". Indicates 8784 which option the clicked region belongs to. 8785 "tabnr" (tabpanel only) Tab page number of the clicked label. 8786 8787 If the function returns non-zero, the statusline is redrawn. 8788 Dragging the statusline to resize the window still works even when 8789 click handlers are defined. When used in 'tabline' or 'tabpanel', 8790 clicks in %[FuncName] regions are dispatched to the callback 8791 instead of the default tab-selection behavior. 8792 8793 Example: > 8794 func! ClickFile(info) 8795 if a:info.button ==# 'l' && a:info.nclicks == 2 8796 browse edit 8797 endif 8798 return 0 8799 endfunc 8800 set statusline=%[ClickFile]%f%[]\ %l:%c 8801 < This makes the filename in the statusline clickable. Double-clicking 8802 it opens the file browser. 8803 8804 Use `has('statusline_click')` to check if this feature is available. 8805 This is useful for backward compatibility: > 8806 if has('statusline_click') 8807 set statusline=%[ClickFile]%f%[]\ %l:%c 8808 else 8809 set statusline=%f\ %l:%c 8810 endif 8811 < 8812 When displaying a flag, Vim removes the leading comma, if any, when 8813 that flag comes right after plaintext. This will make a nice display 8814 when flags are used like in the examples below. 8815 8816 When all items in a group becomes an empty string (i.e. flags that are 8817 not set) and a minwid is not set for the group, the whole group will 8818 become empty. This will make a group like the following disappear 8819 completely from the statusline when none of the flags are set. > 8820 :set statusline=...%(\ [%M%R%H]%)... 8821 < Beware that an expression is evaluated each and every time the status 8822 line is displayed. 8823 *stl-%{* *g:actual_curbuf* *g:actual_curwin* 8824 While evaluating %{} the current buffer and current window will be set 8825 temporarily to that of the window (and buffer) whose statusline is 8826 currently being drawn. The expression will evaluate in this context. 8827 The variable "g:actual_curbuf" is set to the `bufnr()` number of the 8828 real current buffer and "g:actual_curwin" to the |window-ID| of the 8829 real current window. These values are strings. 8830 8831 The 'statusline' option will be evaluated in the |sandbox| if set from 8832 a modeline, see |sandbox-option|. 8833 This option cannot be set in a modeline when 'modelineexpr' is off. 8834 8835 It is not allowed to change text or jump to another window while 8836 evaluating 'statusline' |textlock|. 8837 8838 If the statusline is not updated when you want it (e.g., after setting 8839 a variable that's used in an expression), you can force an update by 8840 using `:redrawstatus`. 8841 8842 A result of all digits is regarded a number for display purposes. 8843 Otherwise the result is taken as flag text and applied to the rules 8844 described above. 8845 *stl-%0{* 8846 With %0{ neither applies: the result is inserted as a literal string. 8847 8848 Watch out for errors in expressions. They may render Vim unusable! 8849 If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and 8850 edit your .vimrc or whatever with "vim --clean" to get it right. 8851 8852 Examples: 8853 Emulate standard status line with 'ruler' set > 8854 :set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P 8855 < Similar, but add ASCII value of char under the cursor (like "ga") > 8856 :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P 8857 < Display byte count and byte value, modified flag in red. > 8858 :set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b' 8859 :hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red 8860 < Display a ,GZ flag if a compressed file is loaded > 8861 :set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h... 8862 < In the |:autocmd|'s: > 8863 :let b:gzflag = 1 8864 < And: > 8865 :unlet b:gzflag 8866 < And define this function: > 8867 :function VarExists(var, val) 8868 : if exists(a:var) | return a:val | else | return '' | endif 8869 :endfunction 8870 < 8871 *'statuslineopt'* *'stlo'* 8872 'statuslineopt' 'stlo' string (default "") 8873 global or local to window |global-local| 8874 {not available when compiled without the |+statusline| 8875 feature} 8876 Optional settings for |status-line|. It can consist of the following 8877 items. All are optional. Items must be separated by a comma. 8878 8879 fixedheight Fix the status line height to "maxheight". 8880 Without this, the height varies from 1 to 8881 "maxheight" based on the number of newline 8882 |stl-%@| in 'statusline'. 8883 8884 maxheight:{n} Set the maximum status line height to {n}. 8885 {n} must be 1 or greater. If not specified, the 8886 height is 1. 8887 When {n} is 2 or more, you can use newline 8888 |stl-%@| in 'statusline' to display information on 8889 multiple lines. 8890 8891 If {n} cannot be set due to insufficient window 8892 height or other constraints, a best-effort 8893 approach will be taken to set the closest possible 8894 value that does not exceed {n}. No error will be 8895 shown even if the setting cannot be changed. 8896 8897 For the global value, a value applicable to all 8898 windows on all tab pages is used. For a 8899 window-local value, a value applicable to that 8900 window is used. 8901 Note: When the applied value differs from {n}, the 8902 option is updated to reflect it. 8903 Example of updated options: >vim 8904 :set statuslineopt=maxheight:999,fixedheight 8905 " Only 20 lines could be applied, so 8906 " maxheight is updated to 20. 8907 :set statuslineopt? 8908 statuslineopt=maxheight:20,fixedheight 8909 < 8910 Examples: > 8911 :set statuslineopt=fixedheight 8912 :set stlo= 8913 :set stlo=maxheight:2,fixedheight 8914 :set stlo-=fixedheight 8915 < 8916 *'suffixes'* *'su'* 8917 'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj") 8918 global 8919 Files with these suffixes get a lower priority when multiple files 8920 match a wildcard. See |suffixes|. Commas can be used to separate the 8921 suffixes. Spaces after the comma are ignored. A dot is also seen as 8922 the start of a suffix. To avoid a dot or comma being recognized as a 8923 separator, precede it with a backslash (see |option-backslash| about 8924 including spaces and backslashes). 8925 See 'wildignore' for completely ignoring files. 8926 The use of |:set+=| and |:set-=| is preferred when adding or removing 8927 suffixes from the list. This avoids problems when a future version 8928 uses another default. 8929 8930 *'suffixesadd'* *'sua'* 8931 'suffixesadd' 'sua' string (default "") 8932 local to buffer 8933 Comma-separated list of suffixes, which are used when searching for a 8934 file for the "gf", "[I", etc. commands. Example: > 8935 :set suffixesadd=.java 8936 < 8937 *'swapfile'* *'swf'* *'noswapfile'* *'noswf'* 8938 'swapfile' 'swf' boolean (default on) 8939 local to buffer 8940 Use a swapfile for the buffer. This option can be reset when a 8941 swapfile is not wanted for a specific buffer. For example, with 8942 confidential information that even root must not be able to access. 8943 Careful: All text will be in memory: 8944 - Don't use this for big files. 8945 - Recovery will be impossible! 8946 A swapfile will only be present when 'updatecount' is non-zero and 8947 'swapfile' is set. 8948 When 'swapfile' is reset, the swap file for the current buffer is 8949 immediately deleted. When 'swapfile' is set, and 'updatecount' is 8950 non-zero, a swap file is immediately created. 8951 Also see |swap-file| and 'swapsync'. 8952 If you want to open a new buffer without creating a swap file for it, 8953 use the |:noswapfile| modifier. 8954 See 'directory' for where the swap file is created. 8955 8956 This option is used together with 'bufhidden' and 'buftype' to 8957 specify special kinds of buffers. See |special-buffers|. 8958 8959 *'swapsync'* *'sws'* 8960 'swapsync' 'sws' string (default "fsync") 8961 global 8962 When this option is not empty a swap file is synced to disk after 8963 writing to it. This takes some time, especially on busy unix systems. 8964 When this option is empty parts of the swap file may be in memory and 8965 not written to disk. When the system crashes you may lose more work. 8966 On Unix the system does a sync now and then without Vim asking for it, 8967 so the disadvantage of setting this option off is small. On some 8968 systems the swap file will not be written at all. For a unix system 8969 setting it to "sync" will use the sync() call instead of the default 8970 fsync(), which may work better on some systems. 8971 The 'fsync' option is used for the actual file. 8972 8973 *'switchbuf'* *'swb'* 8974 'switchbuf' 'swb' string (default "") 8975 global 8976 This option controls the behavior when switching between buffers. 8977 This option is checked, when 8978 - jumping to errors with the |quickfix| commands (|:cc|, |:cn|, |:cp|, 8979 etc.). 8980 - jumping to a tag using the |:stag| command. 8981 - opening a file using the |CTRL-W_f| or |CTRL-W_F| command. 8982 - jumping to a buffer using a buffer split command (e.g. |:sbuffer|, 8983 |:sbnext|, or |:sbrewind|). 8984 Possible values (comma-separated list): 8985 useopen If included, jump to the first open window in the 8986 current tab page that contains the specified buffer 8987 (if there is one). Otherwise: Do not examine other 8988 windows. 8989 usetab Like "useopen", but also consider windows in other tab 8990 pages. 8991 split If included, split the current window before loading 8992 a buffer for a |quickfix| command that display errors. 8993 Otherwise: do not split, use current window (when used 8994 in the quickfix window: the previously used window or 8995 split if there is no other window). 8996 vsplit Just like "split" but split vertically. 8997 newtab Like "split", but open a new tab page. Overrules 8998 "split" when both are present. 8999 uselast If included, jump to the previously used window when 9000 jumping to errors with |quickfix| commands. 9001 If a window has 'winfixbuf' enabled, 'switchbuf' is currently not 9002 applied to the split window. 9003 9004 *'synmaxcol'* *'smc'* 9005 'synmaxcol' 'smc' number (default 3000) 9006 local to buffer 9007 {not available when compiled without the |+syntax| 9008 feature} 9009 Maximum column in which to search for syntax items. In long lines the 9010 text after this column is not highlighted and following lines may not 9011 be highlighted correctly, because the syntax state is cleared. 9012 This helps to avoid very slow redrawing for an XML file that is one 9013 long line. 9014 Set to zero to remove the limit. 9015 9016 *'syntax'* *'syn'* 9017 'syntax' 'syn' string (default empty) 9018 local to buffer |local-noglobal| 9019 {not available when compiled without the |+syntax| 9020 feature} 9021 When this option is set, the syntax with this name is loaded, unless 9022 syntax highlighting has been switched off with ":syntax off". 9023 Otherwise this option does not always reflect the current syntax (the 9024 b:current_syntax variable does). 9025 This option is most useful in a modeline, for a file which syntax is 9026 not automatically recognized. Example, in an IDL file: 9027 /* vim: set syntax=idl : */ ~ 9028 When a dot appears in the value then this separates two filetype 9029 names. Example: 9030 /* vim: set syntax=c.doxygen : */ ~ 9031 This will use the "c" syntax first, then the "doxygen" syntax. 9032 Note that the second one must be prepared to be loaded as an addition, 9033 otherwise it will be skipped. More than one dot may appear. 9034 To switch off syntax highlighting for the current file, use: > 9035 :set syntax=OFF 9036 < To switch syntax highlighting on according to the current value of the 9037 'filetype' option: > 9038 :set syntax=ON 9039 < What actually happens when setting the 'syntax' option is that the 9040 Syntax autocommand event is triggered with the value as argument. 9041 This option is not copied to another buffer, independent of the 's' or 9042 'S' flag in 'cpoptions'. 9043 Only alphanumeric characters, '.', '-' and '_' can be used. 9044 9045 *'tabclose'* *'tcl'* 9046 'tabclose' 'tcl' string (default "") 9047 global 9048 This option controls the behavior when closing tab pages (e.g., using 9049 |:tabclose|). When empty Vim goes to the next (right) tab page. 9050 9051 Possible values (comma-separated list): 9052 left If included, go to the previous tab page instead of 9053 the next one. 9054 uselast If included, go to the previously used tab page if 9055 possible. This option takes precedence over the 9056 others. 9057 9058 *'tabline'* *'tal'* 9059 'tabline' 'tal' string (default empty) 9060 global 9061 When non-empty, this option determines the content of the tab pages 9062 line at the top of the Vim window. When empty Vim will use a default 9063 tab pages line. See |setting-tabline| for more info. 9064 9065 The tab pages line only appears as specified with the 'showtabline' 9066 option and only when there is no GUI tab line. When 'e' is in 9067 'guioptions' and the GUI supports a tab line 'guitablabel' is used 9068 instead. Note that the two tab pages lines are very different. 9069 9070 The value is evaluated like with 'statusline'. You can use 9071 |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out 9072 the text to be displayed. Use "%1T" for the first label, "%2T" for 9073 the second one, etc. Use "%X" items for closing labels. 9074 9075 When changing something that is used in 'tabline' that does not 9076 trigger it to be updated, use |:redrawtabline|. 9077 This option cannot be set in a modeline when 'modelineexpr' is off. 9078 9079 Keep in mind that only one of the tab pages is the current one, others 9080 are invisible and you can't jump to their windows. 9081 9082 *'tabpagemax'* *'tpm'* 9083 'tabpagemax' 'tpm' number (default 10) 9084 global 9085 Maximum number of tab pages to be opened by the |-p| command line 9086 argument or the ":tab all" command. |tabpage| 9087 9088 *'tabpanel'* *'tpl'* *g:actual_curtabpage* 9089 'tabpanel' 'tpl' string (default empty) 9090 global 9091 When non-empty, this option determines the content of the |tabpanel|. 9092 The option consists of printf style '%' items interspersed with 9093 normal text, similar to the 'statusline' or 'tabline'. 9094 9095 When changing something that is used in 'tabpanel' that does not 9096 trigger it to be updated, use |:redrawtabpanel|. 9097 This option cannot be set in a modeline when 'modelineexpr' is off. 9098 9099 You can use |g:actual_curtabpage| within a function assigned to 9100 tabpanel. |g:actual_curtabpage| represents current tab's label number. 9101 You can use "%@" or "\n" to insert a newline: > 9102 9103 set tabpanel=%!TabPanel() 9104 function! TabPanel() abort 9105 return "(" .. g:actual_curtabpage .. ")%@ %f" 9106 endfunction 9107 < 9108 The result is: 9109 > 9110 +-----------+--------------------------------- 9111 |(1) | 9112 | ~/aaa.txt| 9113 |(2) | 9114 | ~/.vimrc | 9115 | | 9116 | | 9117 | | 9118 < 9119 Note: using "\n" is considered experimental and deprecated, prefer 9120 the |stl-%@| atom instead. 9121 9122 *'tabpanelopt'* *'tplo'* 9123 'tabpanelopt' 'tplo' string (default "") 9124 global 9125 Optional settings for the |tabpanel|, It can consist of the following 9126 items. Items must be separated by a comma. 9127 9128 align:{text} Specifies the position of the tabpanel. 9129 Currently supported positions are: 9130 left left-side (default) 9131 right right-side 9132 columns:{n} Number of columns of the tabpanel. (default 20) 9133 If this value is 0 or less than 'columns', the 9134 tabpanel will not be displayed. 9135 scrollbar A one-column scrollbar is always displayed at the 9136 right edge of the tabpanel, regardless of the 9137 "align:" setting. (default off) 9138 See |tabpanel-scroll|. 9139 vert The vertical separator is drawn at the boundary 9140 between the tabpanel and the buffer area. 9141 (default off) 9142 The character to be drawn uses "tpl_vert" from 9143 'fillchars'. 9144 Examples: > 9145 :set tabpanelopt=columns:16,align:right 9146 :set tabpanelopt= 9147 :set tabpanelopt=vert,align:right 9148 :set tabpanelopt=columns:16 9149 < 9150 *'tabstop'* *'ts'* 9151 'tabstop' 'ts' number (default 8) 9152 local to buffer 9153 Defines the column multiple used to display the Horizontal Tab 9154 character (ASCII 9); a Horizontal Tab always advances to the next tab 9155 stop. 9156 The value must be at least 1 and at most 9999. 9157 If Vim was compiled with |+vartabs| and 'vartabstop' is set, this 9158 option is ignored. 9159 Leave it at 8 unless you have a strong reason (see usr |30.5|). 9160 9161 9162 *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'* 9163 'tagbsearch' 'tbs' boolean (default on) 9164 global 9165 When searching for a tag (e.g., for the |:ta| command), Vim can either 9166 use a binary search or a linear search in a tags file. Binary 9167 searching makes searching for a tag a LOT faster, but a linear search 9168 will find more tags if the tags file wasn't properly sorted. 9169 Vim normally assumes that your tags files are sorted, or indicate that 9170 they are not sorted. Only when this is not the case does the 9171 'tagbsearch' option need to be switched off. 9172 9173 When 'tagbsearch' is on, binary searching is first used in the tags 9174 files. In certain situations, Vim will do a linear search instead for 9175 certain files, or retry all files with a linear search. When 9176 'tagbsearch' is off, only a linear search is done. 9177 9178 Linear searching is done anyway, for one file, when Vim finds a line 9179 at the start of the file indicating that it's not sorted: > 9180 !_TAG_FILE_SORTED 0 /some comment/ 9181 < [The whitespace before and after the '0' must be a single <Tab>] 9182 9183 When a binary search was done and no match was found in any of the 9184 files listed in 'tags', and case is ignored or a pattern is used 9185 instead of a normal tag name, a retry is done with a linear search. 9186 Tags in unsorted tags files, and matches with different case will only 9187 be found in the retry. 9188 9189 If a tag file indicates that it is case-fold sorted, the second, 9190 linear search can be avoided when case is ignored. Use a value of '2' 9191 in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold 9192 sorted with the -f switch to "sort" in most unices, as in the command: 9193 "sort -f -o tags tags". For Universal ctags and Exuberant ctags 9194 version 5.x or higher (at least 5.5) the --sort=foldcase switch can be 9195 used for this as well. Note that case must be folded to uppercase for 9196 this to work. 9197 9198 By default, tag searches are case-sensitive. Case is ignored when 9199 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is 9200 "ignore". 9201 Also when 'tagcase' is "followscs" and 'smartcase' is set, or 9202 'tagcase' is "smart", and the pattern contains only lowercase 9203 characters. 9204 9205 When 'tagbsearch' is off, tags searching is slower when a full match 9206 exists, but faster when no full match exists. Tags in unsorted tags 9207 files may only be found with 'tagbsearch' off. 9208 When the tags file is not sorted, or sorted in a wrong way (not on 9209 ASCII byte value), 'tagbsearch' should be off, or the line given above 9210 must be included in the tags file. 9211 This option doesn't affect commands that find all matching tags (e.g., 9212 command-line completion and ":help"). 9213 9214 *'tagcase'* *'tc'* 9215 'tagcase' 'tc' string (default "followic") 9216 global or local to buffer |global-local| 9217 This option specifies how case is handled when searching the tags 9218 file: 9219 followic Follow the 'ignorecase' option 9220 followscs Follow the 'smartcase' and 'ignorecase' options 9221 ignore Ignore case 9222 match Match case 9223 smart Ignore case unless an upper case letter is used 9224 NOTE: This option is set to the Vi default value when 'compatible' is 9225 set and to the Vim default value when 'compatible' is reset. 9226 9227 *'tagfunc'* *'tfu'* 9228 'tagfunc' 'tfu' string (default: empty) 9229 local to buffer 9230 {not available when compiled without the |+eval| 9231 feature} 9232 This option specifies a function to be used to perform tag searches 9233 (including |taglist()|). 9234 The function gets the tag pattern and should return a List of matching 9235 tags. See |tag-function| for an explanation of how to write the 9236 function and an example. The value can be the name of a function, a 9237 |lambda| or a |Funcref|. See |option-value-function| for more 9238 information. 9239 This option cannot be set from a |modeline| or in the |sandbox|, for 9240 security reasons. 9241 9242 *'taglength'* *'tl'* 9243 'taglength' 'tl' number (default 0) 9244 global 9245 If non-zero, tags are significant up to this number of characters. 9246 9247 *'tagrelative'* *'tr'* *'notagrelative'* *'notr'* 9248 'tagrelative' 'tr' boolean (Vim default: on, Vi default: off) 9249 global 9250 If on and using a tags file in another directory, file names in that 9251 tags file are relative to the directory where the tags file is. 9252 NOTE: This option is set to the Vi default value when 'compatible' is 9253 set and to the Vim default value when 'compatible' is reset. 9254 9255 *'tags'* *'tag'* *E433* 9256 'tags' 'tag' string (default "./tags,tags", when compiled with 9257 |+emacs_tags|: "./tags,./TAGS,tags,TAGS") 9258 global or local to buffer |global-local| 9259 Filenames for the tag command, separated by spaces or commas. To 9260 include a space or comma in a file name, precede it with backslashes 9261 (see |option-backslash| about including spaces/commas and backslashes). 9262 When a file name starts with "./", the '.' is replaced with the path 9263 of the current file. But only when the 'd' flag is not included in 9264 'cpoptions'. Environment variables are expanded |:set_env|. Also see 9265 |tags-option|. 9266 "*", "**" and other wildcards can be used to search for tags files in 9267 a directory tree. See |file-searching|. E.g., "/lib/**/tags" will 9268 find all files named "tags" below "/lib". The filename itself cannot 9269 contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find 9270 files called "tags?". 9271 The |tagfiles()| function can be used to get a list of the file names 9272 actually used. 9273 If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag 9274 files are also supported. They are automatically recognized. The 9275 default value becomes "./tags,./TAGS,tags,TAGS", unless case 9276 differences are ignored (MS-Windows). |emacs-tags| 9277 The use of |:set+=| and |:set-=| is preferred when adding or removing 9278 file names from the list. This avoids problems when a future version 9279 uses another default. 9280 9281 *'tagsecure'* *'tsc'* *'notagsecure'* *'notsc'* 9282 'tagsecure' 'tsc' boolean (default on) 9283 global 9284 When on, Vim refuses to follow tag entries whose file field looks like 9285 a URL ("scheme://..."), aborting the jump with error |E1576|. This 9286 prevents tag files from causing Vim to open URLs through |netrw|, which 9287 would trigger a network request and expose netrw's URL-handling code to 9288 attacker-controlled input or lead to environment exfiltration. 9289 9290 Tag files might be distributed alongside source code (e.g. via Git 9291 repositories) and may therefore be untrustworthy. Only disable 9292 this option if you fully control the tag files Vim will read. 9293 9294 This option cannot be set from a |modeline| or in the |sandbox|, for 9295 security reasons. 9296 9297 *'tagstack'* *'tgst'* *'notagstack'* *'notgst'* 9298 'tagstack' 'tgst' boolean (default on) 9299 global 9300 When on, the |tagstack| is used normally. When off, a ":tag" or 9301 ":tselect" command with an argument will not push the tag onto the 9302 tagstack. A following ":tag" without an argument, a ":pop" command or 9303 any other command that uses the tagstack will use the unmodified 9304 tagstack, but does change the pointer to the active entry. 9305 Resetting this option is useful when using a ":tag" command in a 9306 mapping which should not change the tagstack. 9307 9308 *'tcldll'* 9309 'tcldll' string (default depends on the build) 9310 global 9311 {only available when compiled with the |+tcl/dyn| 9312 feature} 9313 Specifies the name of the Tcl shared library. The default is 9314 DYNAMIC_TCL_DLL, which was specified at compile time. 9315 Environment variables are expanded |:set_env|. 9316 This option cannot be set from a |modeline| or in the |sandbox|, for 9317 security reasons. 9318 9319 *'term'* *E529* *E530* *E531* 9320 'term' string (default is $TERM, if that fails: 9321 in the GUI: "builtin_gui" 9322 on Amiga: "amiga" 9323 on Haiku: "xterm" 9324 on Mac: "mac-ansi" 9325 on Unix: "ansi" 9326 on VMS: "ansi" 9327 on Win 32: "win32") 9328 global 9329 Name of the terminal. Used for choosing the terminal control 9330 characters. Environment variables are expanded |:set_env|. 9331 For example: > 9332 :set term=$TERM 9333 < See |termcap|. 9334 9335 *'termbidi'* *'tbidi'* 9336 *'notermbidi'* *'notbidi'* 9337 'termbidi' 'tbidi' boolean (default off, on for "mlterm") 9338 global 9339 {only available when compiled with the |+arabic| 9340 feature} 9341 The terminal is in charge of Bi-directionality of text (as specified 9342 by Unicode). The terminal is also expected to do the required shaping 9343 that some languages (such as Arabic) require. 9344 Setting this option implies that 'rightleft' will not be set when 9345 'arabic' is set and the value of 'arabicshape' will be ignored. 9346 Note that setting 'termbidi' has the immediate effect that 9347 'arabicshape' is ignored, but 'rightleft' isn't changed automatically. 9348 This option is reset when the GUI is started. 9349 For further details see |arabic.txt|. 9350 9351 *'termencoding'* *'tenc'* 9352 'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8") 9353 global 9354 Encoding used for the terminal. This specifies what character 9355 encoding the keyboard produces and the display will understand. For 9356 the GUI it only applies to the keyboard ('encoding' is used for the 9357 display). 9358 *E617* *E950* 9359 Note: This does not apply to the GTK+ GUI. After the GUI has been 9360 successfully initialized, 'termencoding' is forcibly set to "utf-8". 9361 Any attempts to set a different value will be rejected, and an error 9362 message is shown. 9363 For the Win32 GUI and console versions 'termencoding' is not used, 9364 because the Win32 system always passes Unicode characters. 9365 When empty, the same encoding is used as for the 'encoding' option. 9366 This is the normal value. 9367 Not all combinations for 'termencoding' and 'encoding' are valid. See 9368 |encoding-table|. 9369 The value for this option must be supported by internal conversions or 9370 iconv(). When this is not possible no conversion will be done and you 9371 will probably experience problems with non-ASCII characters. 9372 Example: You are working with the locale set to euc-jp (Japanese) and 9373 want to edit a UTF-8 file: > 9374 :let &termencoding = &encoding 9375 :set encoding=utf-8 9376 < You need to do this when your system has no locale support for UTF-8. 9377 9378 *'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954* 9379 'termguicolors' 'tgc' boolean (default off) 9380 global 9381 {not available when compiled without the 9382 |+termguicolors| feature} 9383 When on, uses |highlight-guifg| and |highlight-guibg| attributes in 9384 the terminal (thus using 24-bit color). 9385 9386 Requires an ISO-8613-3 compatible terminal. If setting this option 9387 does not work (produces a colorless UI) reading |xterm-true-color| 9388 might help. 9389 9390 For Win32 console, Windows 10 version 1703 (Creators Update) or later 9391 is required. Use this check to find out: > 9392 if has('vcon') 9393 < This requires Vim to be built with the |+vtp| feature, see also 9394 |win32-term-colors|. 9395 9396 Note that the "cterm" attributes are still used, not the "gui" ones. 9397 9398 When using Vim with Windows Terminal, the background of Windows 9399 Terminal is normally filled with the Vim background color. Setting 9400 'termguicolors' and the guibg of the Normal highlight group to NONE 9401 will make the background transparent: > 9402 :hi Normal guibg=NONE 9403 < 9404 NOTE: This option is reset when 'compatible' is set. 9405 9406 *'termresize'* *'trz'* 9407 'termresize' 'trz' string (default "") 9408 global 9409 {only available in Unix, does not work in the GUI} 9410 Determines the method to use for detecting window resize events, 9411 possible values are: 9412 "sigwinch": Use the SIGWINCH signal. 9413 "inband": Receive resize events from the terminal via escape 9414 sequences (recommended if supported by terminal). 9415 "": Automatically choose depending on terminal. 9416 9417 The SIGWINCH handler is always available. If set to "inband" and the 9418 terminal does not support in-band window resize events, then the 9419 SIGWINCH handler will be used instead as a fallback. If set to "" 9420 (empty option), then "inband" will be used if Vim detects that the 9421 terminal supports it, otherwise "sigwinch". 9422 9423 9424 *'termsync'* *'tsy'* 9425 'termsync' 'tsy' boolean (default off) 9426 global 9427 If the host terminal supports it, buffer all screen updates made 9428 during a redraw cycle so that each screen is displayed in the terminal 9429 all at once. This can prevent tearing or flickering when the terminal 9430 updates faster than Vim can redraw. If the host terminal does not 9431 support it or if Vim is running graphically, then this option does 9432 nothing. 9433 9434 The specification can be found at: 9435 https://github.com/contour-terminal/vt-extensions/blob/master/synchronized-output.md 9436 9437 The terminal codes used are |t_BS| and |t_ES|. 9438 9439 *'termwinkey'* *'twk'* 9440 'termwinkey' 'twk' string (default "") 9441 local to window 9442 The key that starts a CTRL-W command in a terminal window. Other keys 9443 are sent to the job running in the window. 9444 The key can be specified as a single character, a |key-notation| (e.g. 9445 <Up>, <C-F>) or a letter preceded with a caret (e.g. `^F` is CTRL-F): > 9446 :set twk=X 9447 :set twk=^I 9448 :set twk=<C-L> 9449 < The string must be one key stroke but can be multiple bytes. 9450 When not set CTRL-W is used, so that CTRL-W : gets you to the command 9451 line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the 9452 command line. 9453 9454 *'termwinscroll'* *'twsl'* 9455 'termwinscroll' 'twsl' number (default 10000) 9456 local to buffer 9457 {not available when compiled without the 9458 |+terminal| feature} 9459 Number of scrollback lines to keep. When going over this limit the 9460 first 10% of the scrollback lines are deleted. This is just to reduce 9461 the memory usage. See |Terminal-Normal|. 9462 Also used as a limit for text sent to the terminal in one write, 9463 multiplied by the number of columns times 3 (average number of bytes 9464 per cell). 9465 9466 *'termwinsize'* *'tws'* 9467 'termwinsize' 'tws' string (default "") 9468 local to window 9469 Size used when opening the |terminal| window. Format: 9470 {rows}x{columns} or {rows}*{columns}. 9471 - When empty the terminal gets the size from the window. 9472 - When set with a "x" (e.g., "24x80") the terminal size is not 9473 adjusted to the window size. If the window is smaller only the 9474 top-left part is displayed. 9475 - When set with a "*" (e.g., "10*50") the terminal size follows the 9476 window size, but will not be smaller than the specified rows and/or 9477 columns. 9478 - When rows is zero then use the height of the window. 9479 - When columns is zero then use the width of the window. 9480 - Using "0x0" or "0*0" is the same as empty. 9481 - Can be overruled in the |term_start()| options with "term_rows" and 9482 "term_cols". 9483 9484 Examples: 9485 "30x0" uses 30 rows and the current window width. 9486 "20*0" uses at least 20 rows and the current window width. 9487 "0*40" uses the current window height and at least 40 columns. 9488 Note that the command running in the terminal window may still change 9489 the size of the terminal. In that case the Vim window will be 9490 adjusted to that size, if possible. 9491 9492 *'termwintype'* *'twt'* 9493 'termwintype' 'twt' string (default "") 9494 global 9495 {only available when compiled with the |terminal| 9496 feature on MS-Windows} 9497 Specify the virtual console (pty) used when opening the terminal 9498 window. 9499 9500 Possible values are: 9501 "" use ConPTY if it is stable, winpty otherwise 9502 "winpty" use winpty, fail if not supported 9503 "conpty" use |ConPTY|, fail if not supported 9504 9505 |ConPTY| support depends on the platform. Windows 10 October 2018 9506 Update is the first version that supports ConPTY, however it is still 9507 considered unstable. ConPTY has become stable with the initial release 9508 of Windows 11. winpty support needs to be installed. If neither is 9509 supported then you cannot open a terminal window. 9510 9511 *'terse'* *'noterse'* 9512 'terse' boolean (default off) 9513 global 9514 When set: Add 's' flag to 'shortmess' option (this makes the message 9515 for a search that hits the start or end of the file not being 9516 displayed). When reset: Remove 's' flag from 'shortmess' option. {Vi 9517 shortens a lot of messages} 9518 9519 *'textauto'* *'ta'* *'notextauto'* *'nota'* 9520 'textauto' 'ta' boolean (Vim default: on, Vi default: off) 9521 global 9522 This option is obsolete. Use 'fileformats'. 9523 For backwards compatibility, when 'textauto' is set, 'fileformats' is 9524 set to the default value for the current system. When 'textauto' is 9525 reset, 'fileformats' is made empty. 9526 NOTE: This option is set to the Vi default value when 'compatible' is 9527 set and to the Vim default value when 'compatible' is reset. 9528 9529 *'textmode'* *'tx'* *'notextmode'* *'notx'* 9530 'textmode' 'tx' boolean (Win32: default on, 9531 others: default off) 9532 local to buffer 9533 This option is obsolete. Use 'fileformat'. 9534 For backwards compatibility, when 'textmode' is set, 'fileformat' is 9535 set to "dos". When 'textmode' is reset, 'fileformat' is set to 9536 "unix". 9537 9538 *'textwidth'* *'tw'* 9539 'textwidth' 'tw' number (default 0) 9540 local to buffer 9541 Maximum width of text that is being inserted. A longer line will be 9542 broken after white space to get this width. A zero value disables 9543 this. 9544 'textwidth' is set to 0 when the 'paste' option is set and restored 9545 when 'paste' is reset. 9546 When 'textwidth' is zero, 'wrapmargin' may be used. See also 9547 'formatoptions' and |ins-textwidth|. 9548 When 'formatexpr' is set it will be used to break the line. 9549 NOTE: This option is set to 0 when 'compatible' is set. 9550 9551 *'thesaurus'* *'tsr'* 9552 'thesaurus' 'tsr' string (default "") 9553 global or local to buffer |global-local| 9554 List of file names, separated by commas, that are used to lookup words 9555 for thesaurus completion commands |i_CTRL-X_CTRL-T|. See 9556 |compl-thesaurus|. 9557 9558 This option is not used if 'thesaurusfunc' is set, either for the 9559 buffer or globally. 9560 9561 To include a comma in a file name precede it with a backslash. Spaces 9562 after a comma are ignored, otherwise spaces are included in the file 9563 name. See |option-backslash| about using backslashes. The use of 9564 |:set+=| and |:set-=| is preferred when adding or removing directories 9565 from the list. This avoids problems when a future version uses 9566 another default. 9567 Environment variables are expanded |:set_env|. 9568 Backticks cannot be used in this option for security reasons. 9569 9570 *'thesaurusfunc'* *'tsrfu'* 9571 'thesaurusfunc' 'tsrfu' string (default: empty) 9572 global or local to buffer |global-local| 9573 {not available when compiled without the |+eval| 9574 feature} 9575 This option specifies a function to be used for thesaurus completion 9576 with CTRL-X CTRL-T. |i_CTRL-X_CTRL-T| See |compl-thesaurusfunc|. 9577 The value can be the name of a function, a |lambda| or a |Funcref|. 9578 See |option-value-function| for more information. 9579 9580 This option cannot be set from a |modeline| or in the |sandbox|, for 9581 security reasons. 9582 9583 *'tildeop'* *'top'* *'notildeop'* *'notop'* 9584 'tildeop' 'top' boolean (default off) 9585 global 9586 When on: The tilde command "~" behaves like an operator. 9587 NOTE: This option is reset when 'compatible' is set. 9588 9589 *'timeout'* *'to'* *'notimeout'* *'noto'* 9590 'timeout' 'to' boolean (default on) 9591 global 9592 9593 *'ttimeout'* *'nottimeout'* 9594 'ttimeout' boolean (default off, set in |defaults.vim|) 9595 global 9596 These two options together determine the behavior when part of a 9597 mapped key sequence or keyboard code has been received: 9598 9599 'timeout' 'ttimeout' action ~ 9600 off off do not time out 9601 on on or off time out on :mappings and key codes 9602 off on time out on key codes 9603 9604 If both options are off, Vim will wait until either the complete 9605 mapping or key sequence has been received, or it is clear that there 9606 is no mapping or key sequence for the received characters. For 9607 example: if you have mapped "vl" and Vim has received 'v', the next 9608 character is needed to see if the 'v' is followed by an 'l'. 9609 When one of the options is on, Vim will wait for about 1 second for 9610 the next character to arrive. After that the already received 9611 characters are interpreted as single characters. The waiting time can 9612 be changed with the 'timeoutlen' option. 9613 On slow terminals or very busy systems timing out may cause 9614 malfunctioning cursor keys. If both options are off, Vim waits 9615 forever after an entered <Esc> if there are key codes that start 9616 with <Esc>. You will have to type <Esc> twice. If you do not have 9617 problems with key codes, but would like to have :mapped key 9618 sequences not timing out in 1 second, set the 'ttimeout' option and 9619 reset the 'timeout' option. 9620 9621 NOTE: 'ttimeout' is reset when 'compatible' is set. 9622 9623 *'timeoutlen'* *'tm'* 9624 'timeoutlen' 'tm' number (default 1000) 9625 global 9626 9627 *'ttimeoutlen'* *'ttm'* 9628 'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|) 9629 global 9630 The time in milliseconds that is waited for a key code or mapped key 9631 sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G 9632 when part of a command has been typed. 9633 Normally only 'timeoutlen' is used and 'ttimeoutlen' is -1. When a 9634 different timeout value for key codes is desired set 'ttimeoutlen' to 9635 a non-negative number. 9636 9637 ttimeoutlen mapping delay key code delay ~ 9638 < 0 'timeoutlen' 'timeoutlen' 9639 >= 0 'timeoutlen' 'ttimeoutlen' 9640 9641 The timeout only happens when the 'timeout' and 'ttimeout' options 9642 tell so. A useful setting would be > 9643 :set timeout timeoutlen=3000 ttimeoutlen=100 9644 < (time out on mapping after three seconds, time out on key codes after 9645 a tenth of a second). 9646 9647 *'title'* *'notitle'* 9648 'title' boolean (default off, on when title can be restored) 9649 global 9650 When on, the title of the window will be set to the value of 9651 'titlestring' (if it is not empty), or to: 9652 filename [+=-] (path) - VIM 9653 Where: 9654 filename the name of the file being edited 9655 - indicates the file cannot be modified, 'ma' off 9656 + indicates the file was modified 9657 = indicates the file is read-only 9658 =+ indicates the file is read-only and modified 9659 (path) is the path of the file being edited 9660 - VIM the server name |v:servername| or "VIM" 9661 Only works if the terminal supports setting window titles 9662 (currently Amiga console, Win32 console, all GUI versions and 9663 terminals with a non-empty 't_ts' option - these are Unix xterm and 9664 iris-ansi by default, where 't_ts' is taken from the builtin termcap). 9665 *X11* 9666 When Vim was compiled with HAVE_X11 defined, the original title will 9667 be restored if possible. The output of ":version" will include "+X11" 9668 when HAVE_X11 was defined, otherwise it will be "-X11". This also 9669 works for the icon name 'icon'. 9670 But: When Vim was started with the |-X| argument, restoring the title 9671 will not work (except in the GUI). 9672 If the title cannot be restored, it is set to the value of 'titleold'. 9673 You might want to restore the title outside of Vim then. 9674 When using an xterm from a remote machine you can use this command: > 9675 9676 rsh machine_name xterm -display $DISPLAY & 9677 ssh -X machine_name xterm & 9678 < 9679 then the WINDOWID environment variable should be inherited and the 9680 title of the window should change back to what it should be after 9681 exiting Vim. 9682 NOTE: GNU screen is not consistent in handling icon-title and title 9683 escape sequences between versions. In particular, screen 5 may swap 9684 title and icon-title. 9685 9686 *'titlelen'* 9687 'titlelen' number (default 85) 9688 global 9689 Gives the percentage of 'columns' to use for the length of the window 9690 title. When the title is longer, only the end of the path name is 9691 shown. A '<' character before the path name is used to indicate this. 9692 Using a percentage makes this adapt to the width of the window. But 9693 it won't work perfectly, because the actual number of characters 9694 available also depends on the font used and other things in the title 9695 bar. When 'titlelen' is zero the full path is used. Otherwise, 9696 values from 1 to 30000 percent can be used. 9697 'titlelen' is also used for the 'titlestring' option. 9698 9699 *'titleold'* 9700 'titleold' string (default "Thanks for flying Vim") 9701 global 9702 This option will be used for the window title when exiting Vim if the 9703 original title cannot be restored. Only happens if 'title' is on or 9704 'titlestring' is not empty. 9705 This option cannot be set from a |modeline| or in the |sandbox|, for 9706 security reasons. 9707 *'titlestring'* 9708 'titlestring' string (default "") 9709 global 9710 When this option is not empty, it will be used for the title of the 9711 window. This happens only when the 'title' option is on. 9712 Only works if the terminal supports setting window titles (currently 9713 Amiga console, Win32 console, all GUI versions and terminals with a 9714 non-empty 't_ts' option). 9715 When Vim was compiled with HAVE_X11 defined, the original title will 9716 be restored if possible, see |X11|. 9717 9718 When this option contains printf-style '%' items, they will be 9719 expanded according to the rules used for 'statusline'. If it contains 9720 an invalid '%' format, the value is used as-is and no error or warning 9721 will be given when the value is set. 9722 This option cannot be set in a modeline when 'modelineexpr' is off. 9723 9724 Example: > 9725 :auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p") 9726 :set title titlestring=%<%F%=%l/%L-%P titlelen=70 9727 < The value of 'titlelen' is used to align items in the middle or right 9728 of the available space. 9729 Some people prefer to have the file name first: > 9730 :set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%) 9731 < Note the use of "%{ }" and an expression to get the path of the file, 9732 without the file name. The "%( %)" constructs are used to add a 9733 separating space only when needed. 9734 NOTE: Use of special characters in 'titlestring' may cause the display 9735 to be garbled (e.g., when it contains a CR or NL character). 9736 {not available when compiled without the |+statusline| feature} 9737 9738 *'toolbar'* *'tb'* 9739 'toolbar' 'tb' string (default "icons,tooltips") 9740 global 9741 {only for |+GUI_GTK|, |+GUI_Motif| and |+GUI_Photon|} 9742 The contents of this option controls various toolbar settings. The 9743 possible values are: 9744 icons Toolbar buttons are shown with icons. 9745 text Toolbar buttons shown with text. 9746 horiz Icon and text of a toolbar button are 9747 horizontally arranged. 9748 {only in GTK+ 2 and GTK 4 GUI} 9749 tooltips Tooltips are active for toolbar buttons. 9750 Tooltips refer to the popup help text which appears after the mouse 9751 cursor is placed over a toolbar button for a brief moment. 9752 9753 If you want the toolbar to be shown with icons as well as text, do the 9754 following: > 9755 :set tb=icons,text 9756 < Motif cannot display icons and text at the same time. They 9757 will show icons if both are requested. 9758 9759 If none of the strings specified in 'toolbar' are valid or if 9760 'toolbar' is empty, this option is ignored. If you want to disable 9761 the toolbar, you need to set the 'guioptions' option. For example: > 9762 :set guioptions-=T 9763 < Also see |gui-toolbar|. 9764 9765 *'toolbariconsize'* *'tbis'* 9766 'toolbariconsize' 'tbis' string (default "small") 9767 global 9768 {only in the GTK+ GUI} 9769 Controls the size of toolbar icons. The possible values are: 9770 tiny Use tiny icons. 9771 small Use small icons (default). 9772 medium Use medium-sized icons. 9773 large Use large icons. 9774 huge Use even larger icons. 9775 giant Use very big icons. 9776 The exact dimensions in pixels of the various icon sizes depend on 9777 the current theme. Common dimensions are giant=48x48, huge=32x32, 9778 large=24x24, medium=24x24, small=20x20 and tiny=16x16. 9779 9780 If 'toolbariconsize' is empty, the global default size as determined 9781 by user preferences or the current theme is used. 9782 9783 *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* 9784 'ttybuiltin' 'tbi' boolean (default on) 9785 global 9786 When on, the builtin termcaps are searched before the external ones. 9787 When off the builtin termcaps are searched after the external ones. 9788 When this option is changed, you should set the 'term' option next for 9789 the change to take effect, for example: > 9790 :set notbi term=$TERM 9791 < See also |termcap|. 9792 Rationale: The default for this option is "on", because the builtin 9793 termcap entries are generally better (many systems contain faulty 9794 xterm entries...). 9795 9796 *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* 9797 'ttyfast' 'tf' boolean (default on) 9798 global 9799 Indicates a fast terminal connection. More characters will be sent to 9800 the screen for redrawing, instead of using insert/delete line 9801 commands. Improves smoothness of redrawing when there are multiple 9802 windows and the terminal does not support a scrolling region. 9803 Also enables the extra writing of characters at the end of each screen 9804 line for lines that wrap. This helps when using copy/paste with the 9805 mouse in an xterm and other terminals. 9806 9807 The default used to be set only for some terminal names, but these 9808 days nearly all terminals are fast, therefore the default is now "on". 9809 If you have a slow connection you may want to set this option off, 9810 e.g. depending on the host name: > 9811 if hostname() =~ 'faraway' 9812 set nottyfast 9813 endif 9814 < 9815 *'ttymouse'* *'ttym'* 9816 'ttymouse' 'ttym' string (default depends on 'term') 9817 global 9818 {only in Unix and VMS, doesn't work in the GUI; not 9819 available when compiled without |+mouse|} 9820 Name of the terminal type for which mouse codes are to be recognized. 9821 Currently these strings are valid: 9822 *xterm-mouse* 9823 xterm xterm-like mouse handling. The mouse generates 9824 "<Esc>[Mscr", where "scr" is three bytes: 9825 "s" = button state 9826 "c" = column plus 33 9827 "r" = row plus 33 9828 This only works up to 223 columns! See "dec", 9829 "urxvt", and "sgr" for solutions. 9830 xterm2 Works like "xterm", but with the xterm reporting the 9831 mouse position while the mouse is dragged. This works 9832 much faster and more precise. Your xterm must at 9833 least at patchlevel 88 / XFree 3.3.3 for this to 9834 work. See below for how Vim detects this 9835 automatically. 9836 *netterm-mouse* 9837 netterm NetTerm mouse handling. A left mouse click generates 9838 "<Esc>}r,c<CR>", where "r,c" are two decimal numbers 9839 for the row and column. No other mouse events are 9840 supported. 9841 *dec-mouse* 9842 dec DEC terminal mouse handling. The mouse generates a 9843 rather complex sequence, starting with "<Esc>[". 9844 This is also available for an Xterm, if it was 9845 configured with "--enable-dec-locator". 9846 *jsbterm-mouse* 9847 jsbterm JSB term mouse handling. 9848 *pterm-mouse* 9849 pterm QNX pterm mouse handling. 9850 *urxvt-mouse* 9851 urxvt Mouse handling for the urxvt (rxvt-unicode) terminal. 9852 The mouse works only if the terminal supports this 9853 encoding style, but it does not have 223 columns limit 9854 unlike "xterm" or "xterm2". 9855 *sgr-mouse* 9856 sgr Mouse handling for the terminal that emits SGR-styled 9857 mouse reporting. The mouse works even in columns 9858 beyond 223. This option is backward compatible with 9859 "xterm2" because it can also decode "xterm2" style 9860 mouse codes. 9861 9862 The mouse handling must be enabled at compile time |+mouse_xterm| 9863 |+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt| 9864 |+mouse_sgr|. 9865 Only "xterm"(2) is really recognized. NetTerm mouse codes are always 9866 recognized, if enabled at compile time. DEC terminal mouse codes 9867 are recognized if enabled at compile time, and 'ttymouse' is not 9868 "xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict 9869 with them). 9870 This option is automatically set to "xterm", when the 'term' option is 9871 set to a name that starts with "xterm", "mlterm", "screen", "tmux", 9872 "st" (full match only), "st-" or "stterm", and 'ttymouse' is not set 9873 already. 9874 If the terminfo/termcap entry "XM" exists and the first number is 9875 "1006" then 'ttymouse' will be set to "sgr". This works for many 9876 modern terminals. 9877 Additionally, if vim is compiled with the |+termresponse| feature and 9878 |t_RV| is set to the escape sequence to request the xterm version 9879 number, more intelligent detection is done. 9880 The "xterm2" value will be set if the xterm version is reported to be 9881 from 95 to 276. The "sgr" value will be set if Vim detects Mac 9882 Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or 9883 higher. 9884 If you do not want 'ttymouse' to be set to "xterm2" or "sgr" 9885 automatically, set t_RV to an empty string: > 9886 :set t_RV= 9887 < 9888 *'ttyscroll'* *'tsl'* 9889 'ttyscroll' 'tsl' number (default 999) 9890 global 9891 Maximum number of lines to scroll the screen. If there are more lines 9892 to scroll the window is redrawn. For terminals where scrolling is 9893 very slow and redrawing is not slow this can be set to a small number, 9894 e.g., 3, to speed up displaying. 9895 9896 *'ttytype'* *'tty'* 9897 'ttytype' 'tty' string (default from $TERM) 9898 global 9899 Alias for 'term', see above. 9900 Environment variables are expanded |:set_env|. 9901 9902 *'undodir'* *'udir'* 9903 'undodir' 'udir' string (default ".") 9904 global 9905 {only when compiled with the |+persistent_undo| feature} 9906 List of directory names for undo files, separated with commas. 9907 See 'backupdir' for details of the format. 9908 "." means using the directory of the file. The undo file name for 9909 "file.txt" is ".file.txt.un~". 9910 For other directories the file name is the full path of the edited 9911 file, with path separators replaced with "%". 9912 When writing: The first directory that exists is used. "." always 9913 works, no directories after "." will be used for writing. 9914 When reading all entries are tried to find an undo file. The first 9915 undo file that exists is used. When it cannot be read an error is 9916 given, no further entry is used. 9917 See |undo-persistence|. 9918 Environment variables are expanded |:set_env|. 9919 This option cannot be set from a |modeline| or in the |sandbox|, for 9920 security reasons. 9921 9922 *'undofile'* *'noundofile'* *'udf'* *'noudf'* 9923 'undofile' 'udf' boolean (default off) 9924 local to buffer 9925 {only when compiled with the |+persistent_undo| feature} 9926 When on, Vim automatically saves undo history to an undo file when 9927 writing a buffer to a file, and restores undo history from the same 9928 file on buffer read. 9929 The directory where the undo file is stored is specified by 'undodir'. 9930 For more information about this feature see |undo-persistence|. 9931 The undo file is not read when 'undoreload' causes the buffer from 9932 before a reload to be saved for undo. 9933 When 'undofile' is turned off the undo file is NOT deleted. 9934 NOTE: This option is reset when 'compatible' is set. 9935 9936 *'undolevels'* *'ul'* 9937 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS and Win32) 9938 global or local to buffer |global-local| 9939 Maximum number of changes that can be undone. Since undo information 9940 is kept in memory, higher numbers will cause more memory to be used. 9941 Nevertheless, a single change can already use a large amount of 9942 memory. Set to 0 for Vi compatibility: One level of undo and "u" 9943 undoes itself: > 9944 set ul=0 9945 < But you can also get Vi compatibility by including the 'u' flag in 9946 'cpoptions', and still be able to use CTRL-R to repeat undo. 9947 Also see |undo-two-ways|. 9948 Set to -1 for no undo at all. You might want to do this only for the 9949 current buffer: > 9950 setlocal ul=-1 9951 < This helps when you run out of memory for a single change. 9952 9953 The local value is set to -123456 when the global value is to be used. 9954 9955 Also see |clear-undo|. 9956 9957 *'undoreload'* *'ur'* 9958 'undoreload' 'ur' number (default 10000) 9959 global 9960 Save the whole buffer for undo when reloading it. This applies to the 9961 ":e!" command and reloading for when the buffer changed outside of 9962 Vim. |FileChangedShell| 9963 The save only happens when this option is negative or when the number 9964 of lines is smaller than the value of this option. 9965 Set this option to zero to disable undo for a reload. 9966 9967 When saving undo for a reload, any undo file is not read. 9968 9969 Note that this causes the whole buffer to be stored in memory. Set 9970 this option to a lower value if you run out of memory. 9971 9972 *'updatecount'* *'uc'* 9973 'updatecount' 'uc' number (default: 200) 9974 global 9975 After typing this many characters the swap file will be written to 9976 disk. When zero, no swap file will be created at all (see chapter on 9977 recovery |crash-recovery|). 'updatecount' is set to zero by starting 9978 Vim with the "-n" option, see |startup|. When editing in readonly 9979 mode this option will be initialized to 10000. 9980 The swapfile can be disabled per buffer with 'swapfile'. 9981 When 'updatecount' is set from zero to non-zero, swap files are 9982 created for all buffers that have 'swapfile' set. When 'updatecount' 9983 is set to zero, existing swap files are not deleted. 9984 Also see 'swapsync'. 9985 This option has no meaning in buffers where 'buftype' is "nofile" or 9986 "nowrite". 9987 9988 *'updatetime'* *'ut'* 9989 'updatetime' 'ut' number (default 4000) 9990 global 9991 If this many milliseconds nothing is typed the swap file will be 9992 written to disk (see |crash-recovery|). Also used for the 9993 |CursorHold| autocommand event. 9994 9995 *'varsofttabstop'* *'vsts'* 9996 'varsofttabstop' 'vsts' string (default "") 9997 local to buffer 9998 {only available when compiled with the |+vartabs| 9999 feature} 10000 Defines variable-width soft tab stops. The value is a comma-separated 10001 list of widths in columns. Each width defines the number of columns 10002 before the next soft tab stop. The last value repeats indefinitely. 10003 10004 For example, when editing assembly language files where statements 10005 start in the 9th column and comments in the 41st, it may be useful 10006 to use the following: > 10007 :set varsofttabstop=8,32,8 10008 < This sets soft tab stops at column 8, then at column 40 (8 + 32), and 10009 every 8 columns thereafter. 10010 10011 Note: this setting overrides 'softtabstop'. 10012 See section |30.5| of the user manual for detailed explanations on how 10013 Vim works with tabs and spaces. 10014 10015 *'vartabstop'* *'vts'* 10016 'vartabstop' 'vts' string (default "") 10017 local to buffer 10018 {only available when compiled with the |+vartabs| 10019 feature} 10020 Defines variable-width tab stops. The value is a comma-separated list 10021 of widths in columns. Each width defines the number of columns before 10022 the next tab stop; the last value repeats indefinitely. 10023 10024 For example: > 10025 :set vartabstop=4,8 10026 < This places the first tab stop 4 columns from the start of the line 10027 and each subsequent tab stop 8 columns apart. 10028 10029 Note: this setting overrides 'tabstop'. 10030 On UNIX, it is recommended to keep the default tabstop value of 8. 10031 Consider setting 'varsofttabstop' instead. 10032 See section |30.5| of the user manual for detailed explanations on how 10033 Vim works with tabs and spaces. 10034 10035 *'verbose'* *'vbs'* 10036 'verbose' 'vbs' number (default 0) 10037 global 10038 When bigger than zero, Vim will give messages about what it is doing. 10039 Currently, these messages are given: 10040 >= 1 When the viminfo file is read or written. 10041 >= 2 When a file is ":source"'ed. 10042 >= 4 Shell commands. 10043 >= 5 Every searched tags file and include file. 10044 >= 8 Files for which a group of autocommands is executed. 10045 >= 9 Every executed autocommand. 10046 >= 11 Finding items in a path 10047 >= 12 Every executed function. 10048 >= 13 When an exception is thrown, caught, finished, or discarded. 10049 >= 14 Anything pending in a ":finally" clause. 10050 >= 15 Every executed Ex command from a script (truncated at 200 10051 characters). 10052 >= 16 Every executed Ex command. 10053 10054 This option can also be set with the "-V" argument. See |-V|. 10055 This option is also set by the |:verbose| command. 10056 10057 When the 'verbosefile' option is set then the verbose messages are not 10058 displayed. 10059 10060 *'verbosefile'* *'vfile'* 10061 'verbosefile' 'vfile' string (default empty) 10062 global 10063 When not empty all messages are written in a file with this name. 10064 When the file exists messages are appended. 10065 Writing to the file ends when Vim exits or when 'verbosefile' is made 10066 empty. Writes are buffered, thus may not show up for some time. 10067 Setting 'verbosefile' to a new value is like making it empty first. 10068 The difference with |:redir| is that verbose messages are not 10069 displayed when 'verbosefile' is set. 10070 Environment variables are expanded |:set_env|. 10071 This option cannot be set from a |modeline| or in the |sandbox|, for 10072 security reasons. 10073 10074 *'viewdir'* *'vdir'* 10075 'viewdir' 'vdir' string (default for Amiga: "home:vimfiles/view", 10076 for Win32: "$HOME/vimfiles/view", 10077 for Unix: "$HOME/.vim/view" or 10078 "$XDG_CONFIG_HOME/vim/view" 10079 for VMS: "sys$login:vimfiles/view") 10080 global 10081 {not available when compiled without the |+mksession| 10082 feature} 10083 Name of the directory where to store files for |:mkview|. 10084 For $XDG_CONFIG_HOME see |xdg-base-dir|. 10085 Environment variables are expanded |:set_env|. 10086 This option cannot be set from a |modeline| or in the |sandbox|, for 10087 security reasons. 10088 10089 *'viewoptions'* *'vop'* 10090 'viewoptions' 'vop' string (default: "folds,options,cursor,curdir") 10091 global 10092 {not available when compiled without the |+mksession| 10093 feature} 10094 Changes the effect of the |:mkview| command. It is a comma-separated 10095 list of words. Each word enables saving and restoring something: 10096 word save and restore ~ 10097 cursor cursor position in file and in window 10098 folds manually created folds, opened/closed folds and local 10099 fold options 10100 options options and mappings local to a window or buffer (not 10101 global values for local options) 10102 localoptions same as "options" 10103 slash backslashes in file names replaced with forward 10104 slashes 10105 unix with Unix end-of-line format (single <NL>), even when 10106 on MS-Windows 10107 curdir the window-local directory, if set with `:lcd` 10108 10109 "slash" and "unix" are useful on MS-Windows when sharing view files 10110 with Unix. The Unix version of Vim cannot source dos format scripts, 10111 but the MS-Windows version of Vim can source unix format scripts. 10112 10113 *'viminfo'* *'vi'* *E526* *E527* *E528* 10114 'viminfo' 'vi' string (Vi default: "", Vim default for 10115 MS-Windows: '100,<50,s10,h,rA:,rB:, 10116 for Amiga: '100,<50,s10,h,rdf0:,rdf1:,rdf2: 10117 for others: '100,<50,s10,h) 10118 global 10119 {not available when compiled without the |+viminfo| 10120 feature} 10121 When non-empty, the viminfo file is read upon startup and written 10122 when exiting Vim (see |viminfo-file|). Except when 'viminfofile' is 10123 "NONE". 10124 The string should be a comma-separated list of parameters, each 10125 consisting of a single character identifying the particular parameter, 10126 followed by a number or string which specifies the value of that 10127 parameter. If a particular character is left out, then the default 10128 value is used for that parameter. The following is a list of the 10129 identifying characters and the effect of their value. 10130 CHAR VALUE ~ 10131 *viminfo-!* 10132 ! When included, save and restore global variables that start 10133 with an uppercase letter, and don't contain a lowercase 10134 letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis" 10135 and "_K_L_M" are not. Nested List and Dict items may not be 10136 read back correctly, you end up with an empty item. 10137 10138 Restoring |List|, |Dictionary| and |Tuple| variables is done by 10139 parsing their textual form with the Vim expression evaluator. 10140 Reading a viminfo file with "!" enabled is therefore only safe 10141 when the file is trusted. In particular, do not enable "!" 10142 before reading a viminfo file you obtained from another user, 10143 downloaded, or that is writable by another account. See 10144 also |viminfo-security|. 10145 *viminfo-quote* 10146 " Maximum number of lines saved for each register. Old name of 10147 the '<' item, with the disadvantage that you need to put a 10148 backslash before the ", otherwise it will be recognized as the 10149 start of a comment! 10150 *viminfo-%* 10151 % When included, save and restore the buffer list. If Vim is 10152 started with a file name argument, the buffer list is not 10153 restored. If Vim is started without a file name argument, the 10154 buffer list is restored from the viminfo file. Quickfix 10155 ('buftype'), unlisted ('buflisted'), unnamed and buffers on 10156 removable media (|viminfo-r|) are not saved. 10157 When followed by a number, the number specifies the maximum 10158 number of buffers that are stored. Without a number all 10159 buffers are stored. 10160 *viminfo-'* 10161 ' Maximum number of previously edited files for which the marks 10162 are remembered. This parameter must always be included when 10163 'viminfo' is non-empty. 10164 Including this item also means that the |jumplist| and the 10165 |changelist| are stored in the viminfo file. 10166 *viminfo-/* 10167 / Maximum number of items in the search pattern history to be 10168 saved. If non-zero, then the previous search and substitute 10169 patterns are also saved. When not included, the value of 10170 'history' is used. 10171 *viminfo-:* 10172 : Maximum number of items in the command-line history to be 10173 saved. When not included, the value of 'history' is used. 10174 *viminfo-<* 10175 < Maximum number of lines saved for each register. If zero then 10176 registers are not saved. When not included, all lines are 10177 saved. '"' is the old name for this item. 10178 Also see the 's' item below: limit specified in Kbyte. 10179 *viminfo-@* 10180 @ Maximum number of items in the input-line history to be 10181 saved. When not included, the value of 'history' is used. 10182 *viminfo-c* 10183 c When included, convert the text in the viminfo file from the 10184 'encoding' used when writing the file to the current 10185 'encoding'. See |viminfo-encoding|. 10186 *viminfo-f* 10187 f Whether file marks need to be stored. If zero, file marks ('0 10188 to '9, 'A to 'Z) are not stored. When not present or when 10189 non-zero, they are all stored. '0 is used for the current 10190 cursor position (when exiting or when doing ":wviminfo"). 10191 *viminfo-h* 10192 h Disable the effect of 'hlsearch' when loading the viminfo 10193 file. When not included, it depends on whether ":nohlsearch" 10194 has been used since the last search command. 10195 *viminfo-n* 10196 n Name of the viminfo file. The name must immediately follow 10197 the 'n'. Must be at the end of the option! If the 10198 'viminfofile' option is set, that file name overrides the one 10199 given here with 'viminfo'. Environment variables are 10200 expanded when opening the file, not when setting the option. 10201 *viminfo-r* 10202 r Removable media. The argument is a string (up to the next 10203 ','). This parameter can be given several times. Each 10204 specifies the start of a path for which no marks will be 10205 stored. This is to avoid removable media. For MS-Windows you 10206 could use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:". You can 10207 also use it for temp files, e.g., for Unix: "r/tmp". Case is 10208 ignored. Maximum length of each 'r' argument is 50 10209 characters. 10210 *viminfo-s* 10211 s Maximum size of an item in Kbyte. If zero then registers are 10212 not saved. Currently only applies to registers. The default 10213 "s10" will exclude registers with more than 10 Kbyte of text. 10214 Also see the '<' item above: line count limit. 10215 10216 Example: > 10217 :set viminfo='50,<1000,s100,:0,n~/vim/viminfo 10218 < 10219 '50 Marks will be remembered for the last 50 files you 10220 edited. 10221 <1000 Contents of registers (up to 1000 lines each) will be 10222 remembered. 10223 s100 Registers with more than 100 Kbyte text are skipped. 10224 :0 Command-line history will not be saved. 10225 n~/vim/viminfo The name of the file to use is "~/vim/viminfo". 10226 no / Since '/' is not specified, the default will be used, 10227 that is, save all of the search history, and also the 10228 previous search and substitute patterns. 10229 no % The buffer list will not be saved nor read back. 10230 no h 'hlsearch' highlighting will be restored. 10231 10232 When setting 'viminfo' from an empty value you can use |:rviminfo| to 10233 load the contents of the file, this is not done automatically. 10234 10235 This option cannot be set from a |modeline| or in the |sandbox|, for 10236 security reasons. 10237 NOTE: This option is set to the Vim default value when 'compatible' 10238 is reset. 10239 10240 *'viminfofile'* *'vif'* 10241 'viminfofile' 'vif' string (default: "") 10242 global 10243 {not available when compiled without the |+viminfo| 10244 feature} 10245 When non-empty, overrides the file name used for viminfo. 10246 When equal to "NONE" no viminfo file will be read or written. 10247 This option can be set with the |-i| command line flag. The |--clean| 10248 command line flag sets it to "NONE". 10249 Environment variables are expanded |:set_env|. 10250 This option cannot be set from a |modeline| or in the |sandbox|, for 10251 security reasons. 10252 10253 *'virtualedit'* *'ve'* 10254 'virtualedit' 've' string (default "") 10255 global or local to window |global-local| 10256 A comma-separated list of these words: 10257 block Allow virtual editing in Visual block mode. 10258 insert Allow virtual editing in Insert mode. 10259 all Allow virtual editing in all modes. 10260 onemore Allow the cursor to move just past the end of the line 10261 none When used as the local value, do not allow virtual 10262 editing even when the global value is set. When used 10263 as the global value, "none" is the same as "". 10264 NONE Alternative spelling of "none". 10265 10266 Virtual editing means that the cursor can be positioned where there is 10267 no actual character. This can be halfway into a tab or beyond the end 10268 of the line. Useful for selecting a rectangle in Visual mode and 10269 editing a table. 10270 "onemore" is not the same, it will only allow moving the cursor just 10271 after the last character of the line. This makes some commands more 10272 consistent. Previously the cursor was always past the end of the line 10273 if the line was empty. But it is far from Vi compatible. It may also 10274 break some plugins or Vim scripts. For example because |l| can move 10275 the cursor after the last character. Use with care! 10276 Using the `$` command will move to the last character in the line, not 10277 past it. This may actually move the cursor to the left! 10278 The `g$` command will move to the end of the screen line. 10279 It doesn't make sense to combine "all" with "onemore", but you will 10280 not get a warning for it. 10281 When combined with other words, "none" is ignored. 10282 NOTE: This option is set to "" when 'compatible' is set. 10283 10284 *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* 10285 'visualbell' 'vb' boolean (default off) 10286 global 10287 Use a visual bell instead of beeping. The terminal code to display 10288 the visual bell is given with 't_vb'. When no beep or flash is 10289 wanted, use: > 10290 :set vb t_vb= 10291 < If you want a short flash, you can use this on many terminals: > 10292 :set vb t_vb=[?5h$<100>[?5l 10293 < Here $<100> specifies the time, you can use a smaller or bigger value 10294 to get a shorter or longer flash. 10295 10296 Note: Vim will limit the bell to once per half a second. This avoids 10297 having to wait for the flashing to finish when there are lots of 10298 bells, e.g. on key repeat. This also happens without 'visualbell' 10299 set. 10300 10301 In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display 10302 for 20 msec. If you want to use a different time, use "<Esc>|40f", 10303 where 40 is the time in msec. 10304 10305 Note: When the GUI starts, 't_vb' is reset to its default value. You 10306 might want to set it again in your |gvimrc|. 10307 10308 Does not work on the Amiga, you always get a screen flash. 10309 Also see 'errorbells'. 10310 10311 *'warn'* *'nowarn'* 10312 'warn' boolean (default on) 10313 global 10314 Give a warning message when a shell command is used while the buffer 10315 has been changed. 10316 10317 *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'* 10318 'weirdinvert' 'wiv' boolean (default off) 10319 global 10320 This option has the same effect as the 't_xs' terminal option. 10321 It is provided for backwards compatibility with version 4.x. 10322 Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and 10323 vice versa. Has no effect when the GUI is running. 10324 10325 *'whichwrap'* *'ww'* 10326 'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "") 10327 global 10328 Allow specified keys that move the cursor left/right to move to the 10329 previous/next line when the cursor is on the first/last character in 10330 the line. Concatenate characters to allow this for these keys: 10331 char key mode ~ 10332 b <BS> Normal and Visual 10333 s <Space> Normal and Visual 10334 h "h" Normal and Visual (not recommended) 10335 l "l" Normal and Visual (not recommended) 10336 < <Left> Normal and Visual 10337 > <Right> Normal and Visual 10338 ~ "~" Normal 10339 [ <Left> Insert and Replace 10340 ] <Right> Insert and Replace 10341 For example: > 10342 :set ww=<,>,[,] 10343 < allows wrap only when cursor keys are used. 10344 When the movement keys are used in combination with a delete or change 10345 operator, the <EOL> also counts for a character. This makes "3h" 10346 different from "3dh" when the cursor crosses the end of a line. This 10347 is also true for "x" and "X", because they do the same as "dl" and 10348 "dh". If you use this, you may also want to use the mapping 10349 ":map <BS> X" to make backspace delete the character in front of the 10350 cursor. 10351 When 'l' is included and it is used after an operator at the end of a 10352 line (not an empty line) then it will not move to the next line. This 10353 makes "dl", "cl", "yl" etc. work normally. 10354 NOTE: This option is set to the Vi default value when 'compatible' is 10355 set and to the Vim default value when 'compatible' is reset. 10356 10357 *'wildchar'* *'wc'* 10358 'wildchar' 'wc' number (Vim default: <Tab>, Vi default: CTRL-E) 10359 global 10360 Character you have to type to start wildcard expansion in the 10361 command-line, as specified with 'wildmode'. 10362 More info here: |cmdline-completion|. 10363 The character is not recognized when used inside a macro. See 10364 'wildcharm' for that. 10365 Some keys will not work, such as CTRL-C, <CR> and Enter. 10366 <Esc> can be used, but hitting it twice in a row will still exit 10367 command-line as a failsafe measure. 10368 Although 'wc' is a number option, it can be specified as a number, a 10369 single character, a |key-notation| (e.g. <Up>, <C-F>) or a letter 10370 preceded with a caret (e.g. `^F` is CTRL-F): > 10371 :set wc=27 10372 :set wc=X 10373 :set wc=^I 10374 :set wc=<Tab> 10375 < 'wildchar' also enables completion in search pattern contexts such as 10376 |/|, |?|, |:s|, |:g|, |:v|, and |:vim|. To insert a literal <Tab> 10377 instead of triggering completion, type <C-V><Tab> or "\t". 10378 See also 'wildoptions' and |wildtrigger()|. 10379 NOTE: This option is set to the Vi default value when 'compatible' is 10380 set and to the Vim default value when 'compatible' is reset. 10381 10382 *'wildcharm'* *'wcm'* 10383 'wildcharm' 'wcm' number (default: none (0)) 10384 global 10385 'wildcharm' works exactly like 'wildchar', except that it is 10386 recognized when used inside a macro. You can find "spare" 10387 command-line keys suitable for this option by looking at 10388 |ex-edit-index|. Normally you'll never actually type 'wildcharm', 10389 just use it in mappings that automatically invoke completion mode, 10390 e.g.: > 10391 :set wcm=<C-Z> 10392 :cnoremap ss so $vim/sessions/*.vim<C-Z> 10393 < Then after typing :ss you can use CTRL-P & CTRL-N. 10394 10395 *'wildignore'* *'wig'* 10396 'wildignore' 'wig' string (default "") 10397 global 10398 A list of file patterns. A file that matches with one of these 10399 patterns is ignored when expanding |wildcards|, completing file or 10400 directory names, and influences the result of |expand()|, |glob()| and 10401 |globpath()| unless a flag is passed to disable this. 10402 The pattern is used like with |:autocmd|, see |autocmd-patterns|. 10403 Also see 'suffixes'. 10404 Example: > 10405 :set wildignore=*.o,*.obj 10406 < The use of |:set+=| and |:set-=| is preferred when adding or removing 10407 a pattern from the list. This avoids problems when a future version 10408 uses another default. 10409 10410 *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'* 10411 'wildignorecase' 'wic' boolean (default off) 10412 global 10413 When set case is ignored when completing file names and directories. 10414 Has no effect when 'fileignorecase' is set. 10415 Does not apply when the shell is used to expand wildcards, which 10416 happens when there are special characters. 10417 10418 *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* 10419 'wildmenu' 'wmnu' boolean (default on) 10420 global 10421 When 'wildmenu' is on, command-line completion operates in an enhanced 10422 mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, 10423 the possible matches are shown. 10424 When 'wildoptions' contains "pum", then the completion matches are 10425 shown in a popup menu. Otherwise they are displayed just above the 10426 command line, with the first match highlighted (overwriting the status 10427 line, if there is one). 10428 Keys that show the previous/next match, such as <Tab> or 10429 CTRL-P/CTRL-N, cause the highlight to move to the appropriate match. 10430 When 'wildmode' is used, "wildmenu" mode is used where "full" is 10431 specified. "longest" and "list" do not start "wildmenu" mode. 10432 You can check the current mode with |wildmenumode()|. 10433 If there are more matches than can fit in the line, a ">" is shown on 10434 the right and/or a "<" is shown on the left. The status line scrolls 10435 as needed. 10436 The "wildmenu" mode is abandoned when a key is hit that is not used 10437 for selecting a completion. 10438 While the "wildmenu" is active, the following keys have special 10439 meanings: 10440 CTRL-P - go to the previous entry 10441 CTRL-N - go to the next entry 10442 <CR> - in menu completion, when the cursor is just after a 10443 dot: move into a submenu. 10444 CTRL-E - end completion, go back to what was there before 10445 selecting a match. 10446 CTRL-Y - accept the currently selected match and stop 10447 completion. 10448 10449 When not using the popup menu for command line completion, the 10450 following keys have special meanings: 10451 <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) 10452 <Up> - in filename/menu name completion: move up into 10453 parent directory or parent menu. 10454 <Down> - in filename/menu name completion: move into a 10455 subdirectory or submenu. 10456 10457 When using the popup menu for command line completion, the following 10458 keys have special meanings: 10459 <Up> <Down> - select previous/next match (like CTRL-P/CTRL-N) 10460 <PageUp> - select a match several entries back 10461 <PageDown> - select a match several entries further 10462 <Left> - in filename/menu name completion: move up into 10463 parent directory or parent menu. 10464 <Right> - in filename/menu name completion: move into a 10465 subdirectory or submenu. 10466 10467 This makes the menus accessible from the console |console-menus|. 10468 10469 If you prefer the <Left> and <Right> keys to move the cursor instead 10470 of selecting a different match, use this: > 10471 :cnoremap <Left> <Space><BS><Left> 10472 :cnoremap <Right> <Space><BS><Right> 10473 < 10474 The "WildMenu" highlighting is used for displaying the current match 10475 |hl-WildMenu|. 10476 10477 *'wildmode'* *'wim'* 10478 'wildmode' 'wim' string (Vim default: "full") 10479 global 10480 Completion mode used for the character specified with 'wildchar'. 10481 This option is a comma-separated list of up to four parts, 10482 corresponding to the first, second, third, and fourth presses of 10483 'wildchar'. Each part is a colon-separated list of completion 10484 behaviors, which are applied simultaneously during that phase. 10485 10486 The possible behavior values are: 10487 "" Only complete (insert) the first match. No further 10488 matches are cycled or listed. 10489 "full" Complete the next full match. Cycles through all 10490 matches, returning to the original input after the 10491 last match. If 'wildmenu' is enabled, it will be 10492 shown. 10493 "longest" Complete to the longest common substring. If this 10494 doesn't extend the input, the next 'wildmode' part is 10495 used. 10496 "list" If multiple matches are found, list all of them. 10497 "lastused" When completing buffer names, sort them by most 10498 recently used (excluding the current buffer). Only 10499 applies to buffer name completion. 10500 "noselect" If 'wildmenu' is enabled, show the menu but do not 10501 preselect the first item. 10502 "noinsert" If 'wildmenu' is enabled, show the menu and preselect 10503 the first match, but do not insert it in the command 10504 line. If both "noinsert" and "noselect" are present, 10505 "noselect" takes precedence. 10506 If only one match exists, it is completed fully, unless "noselect" or 10507 "noinsert" is specified. 10508 10509 Some useful combinations of colon-separated values: 10510 "longest:full" Start with the longest common string and show 10511 'wildmenu' (if enabled). Does not cycle 10512 through full matches. 10513 "list:full" List all matches and complete first match. 10514 "list:longest" List all matches and complete till the longest 10515 common prefix. 10516 "list:lastused" List all matches. When completing buffers, 10517 sort them by most recently used (excluding the 10518 current buffer). 10519 "noselect:lastused" Do not preselect the first item in 'wildmenu' 10520 if it is active. When completing buffers, 10521 sort them by most recently used (excluding the 10522 current buffer). 10523 10524 Examples: > 10525 :set wildmode=full 10526 < Complete full match on every press (default behavior) > 10527 :set wildmode=longest,full 10528 < First press: longest common substring 10529 Second press: cycle through full matches > 10530 :set wildmode=list:full 10531 < First press: list all matches and complete the first one > 10532 :set wildmode=list,full 10533 < First press: list matches only 10534 Second press: complete full matches > 10535 :set wildmode=longest,list 10536 < First press: longest common substring 10537 Second press: list all matches > 10538 :set wildmode=noselect:full 10539 < First press: show 'wildmenu' without completing or selecting 10540 Second press: cycle full matches > 10541 :set wildmode=noselect:lastused,full 10542 < Same as above, but buffer matches are sorted by time last used 10543 More info here: |cmdline-completion|. 10544 10545 *'wildoptions'* *'wop'* 10546 'wildoptions' 'wop' string (default "") 10547 global 10548 A list of words that change how |cmdline-completion| is done. 10549 10550 The following values are supported: 10551 exacttext When this flag is present, search pattern completion 10552 (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|) 10553 shows exact buffer text as menu items, without 10554 preserving regexp artifacts like position 10555 anchors (e.g., |/\<|). This provides more intuitive 10556 menu items that match the actual buffer text. 10557 However, searches may be less accurate since the 10558 pattern is not preserved exactly. 10559 By default, Vim preserves the typed pattern (with 10560 anchors) and appends the matched word. This preserves 10561 search correctness, especially when using regular 10562 expressions or with 'smartcase' enabled. However, the 10563 case of the appended matched word may not exactly 10564 match the case of the word in the buffer. 10565 fuzzy Use |fuzzy-matching| to find completion matches. When 10566 this value is specified, wildcard expansion will not 10567 be used for completion. The matches will be sorted by 10568 the "best match" rather than alphabetically sorted. 10569 This will find more matches than the wildcard 10570 expansion. Currently fuzzy matching based completion 10571 is not supported for file and directory names and 10572 instead wildcard expansion is used. 10573 pum Display the completion matches using the popup menu in 10574 the same style as the |ins-completion-menu|. When an 10575 info popup is shown next to the menu, it can be 10576 scrolled by moving the mouse pointer on top of it and 10577 using the scroll wheel, or with the keyboard like in 10578 Insert mode completion, see |popupmenu-keys|. 10579 tagfile When using CTRL-D to list matching tags, the kind of 10580 tag and the file of the tag is listed. Only one match 10581 is displayed per line. Often used tag kinds are: 10582 d #define 10583 f function 10584 10585 This option does not apply to |ins-completion|. See 'completeopt' for 10586 that. 10587 10588 *'winaltkeys'* *'wak'* 10589 'winaltkeys' 'wak' string (default "menu") 10590 global 10591 {only used in Win32, Motif, GTK and Photon GUI} 10592 Some GUI versions allow the access to menu entries by using the ALT 10593 key in combination with a character that appears underlined in the 10594 menu. This conflicts with the use of the ALT key for mappings and 10595 entering special characters. This option tells what to do: 10596 no Don't use ALT keys for menus. ALT key combinations can be 10597 mapped, but there is no automatic handling. This can then be 10598 done with the |:simalt| command. 10599 yes ALT key handling is done by the windowing system. ALT key 10600 combinations cannot be mapped. 10601 menu Using ALT in combination with a character that is a menu 10602 shortcut key, will be handled by the windowing system. Other 10603 keys can be mapped. 10604 If the menu is disabled by excluding 'm' from 'guioptions', the ALT 10605 key is never used for the menu. 10606 This option is not used for <F10>; on Win32 and with GTK <F10> will 10607 select the menu, unless it has been mapped. 10608 10609 *'wincolor'* *'wcr'* 10610 'wincolor' 'wcr' string (default empty) 10611 local to window 10612 DEPRECATED: Use 'winhighlight' if possible, this option uses 10613 'winhighlight' internally by setting it to: >vim 10614 set winhighlight=!(:HighlightGroup 10615 < If this option is set and 'winhighlight' is changed, then it will not 10616 update the option value. For example, if 'wincolor' is set to "A" and 10617 then 'winhighlight' is to an empty value, then 'wincolor' will still 10618 remain as "A". Additionally, the existing value in 'winhighlight' will 10619 be discarded when this option is set. 10620 10621 Highlight group name to use for this window instead of the Normal 10622 color |hl-Normal|. For other |highlight-groups|, see 'winhighlight'. 10623 Note that it is not recommended to set this and 'winhighlight' at the 10624 same time. 10625 10626 *'window'* *'wi'* 10627 'window' 'wi' number (default screen height - 1) 10628 global 10629 Window height used for |CTRL-F| and |CTRL-B| when there is only one 10630 window and the value is smaller than 'lines' minus one. The screen 10631 will scroll 'window' minus two lines, with a minimum of one. 10632 When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll 10633 in a much smarter way, taking care of wrapping lines. 10634 When resizing the Vim window, and the value is smaller than 1 or more 10635 than or equal to 'lines' it will be set to 'lines' minus 1. 10636 Note: Do not confuse this with the height of the Vim window, use 10637 'lines' for that. 10638 10639 *'winfixbuf'* *'wfb'* 10640 'winfixbuf' 'wfb' boolean (default off) 10641 local to window 10642 If enabled, the window and the buffer it is displaying are paired. 10643 For example, attempting to change the buffer with |:edit| will fail. 10644 Other commands which change a window's buffer such as |:cnext| will 10645 also skip any window with 'winfixbuf' enabled. However if an Ex 10646 command has a "!" modifier, it can force switching buffers. 10647 10648 *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 10649 'winfixheight' 'wfh' boolean (default off) 10650 local to window |local-noglobal| 10651 Keep the window height when windows are opened or closed and 10652 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the 10653 |preview-window| and |quickfix-window|. 10654 The height may be changed anyway when running out of room. 10655 10656 *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'* 10657 'winfixwidth' 'wfw' boolean (default off) 10658 local to window |local-noglobal| 10659 Keep the window width when windows are opened or closed and 10660 'equalalways' is set. Also for |CTRL-W_=|. 10661 The width may be changed anyway when running out of room. 10662 10663 *'winheight'* *'wh'* *E591* 10664 'winheight' 'wh' number (default 1) 10665 global 10666 Minimal number of lines for the current window. This is not a hard 10667 minimum, Vim will use fewer lines if there is not enough room. If the 10668 focus goes to a window that is smaller, its size is increased, at the 10669 cost of the height of other windows. 10670 Set 'winheight' to a small number for normal editing. 10671 Set it to 999 to make the current window fill most of the screen. 10672 Other windows will be only 'winminheight' high. This has the drawback 10673 that ":all" will create only two windows. To avoid "vim -o 1 2 3 4" 10674 to create only two windows, set the option after startup is done, 10675 using the |VimEnter| event: > 10676 au VimEnter * set winheight=999 10677 < Minimum value is 1. 10678 The height is not adjusted after one of the commands that change the 10679 height of the current window. 10680 'winheight' applies to the current window. Use 'winminheight' to set 10681 the minimal height for other windows. 10682 10683 *'winhighlight'* *'whl'* 10684 'winhighlight' 'whl' string (default empty) 10685 local to window 10686 Window-local highlight group mappings. Comma-delimited list of 10687 highlight |group-name| pairs "{hl-from}:{hl-to},..." where each 10688 {hl-from} is a |highlight-groups| item to be overridden by {hl-to} 10689 group in the window. If {hl-from} is "Normal", then it will always 10690 map to the "(" (window color) value in 'highlight'. 10691 10692 If a highlight group name starts with "!", then it is assumed to map 10693 to a value in 'highlight'. For example, this will override the 10694 visual mode setting: >vim 10695 set winhighlight=!v:SomeHighlightGroup 10696 < This will map the occasion "v" to occasion "l" >vim 10697 set winhighlight=!v:!l 10698 < 10699 Highlights of vertical separators are determined by the window to the 10700 left of the separator. The 'tabline' highlight of a tabpage is 10701 decided by the last-focused window of the tabpage. Highlights of 10702 the popupmenu are determined by the current window. Highlights in the 10703 message area cannot be overridden. 10704 10705 When handling highlight group links, if a highlight group (which may 10706 be a link as well) is overridden by 'winhighlight', then all highlight 10707 groups that link to it will be affected. For example, if highlight 10708 group C links to B which links to A, then >vim 10709 set winhighlight=B:SomeHighlightGroup 10710 < will make SomeHighlightGroup override groups B and C, but not A. 10711 10712 *'winminheight'* *'wmh'* 10713 'winminheight' 'wmh' number (default 1) 10714 global 10715 The minimal height of a window, when it's not the current window. 10716 This is a hard minimum, windows will never become smaller. 10717 When set to zero, windows may be "squashed" to zero lines (i.e. just a 10718 status bar) if necessary. They will return to at least one line when 10719 they become active (since the cursor has to have somewhere to go.) 10720 Use 'winheight' to set the minimal height of the current window. 10721 This option is only checked when making a window smaller. Don't use a 10722 large number, it will cause errors when opening more than a few 10723 windows. A value of 0 to 3 is reasonable. 10724 10725 *'winminwidth'* *'wmw'* 10726 'winminwidth' 'wmw' number (default 1) 10727 global 10728 The minimal width of a window, when it's not the current window. 10729 This is a hard minimum, windows will never become smaller. 10730 When set to zero, windows may be "squashed" to zero columns (i.e. just 10731 a vertical separator) if necessary. They will return to at least one 10732 line when they become active (since the cursor has to have somewhere 10733 to go.) 10734 Use 'winwidth' to set the minimal width of the current window. 10735 This option is only checked when making a window smaller. Don't use a 10736 large number, it will cause errors when opening more than a few 10737 windows. A value of 0 to 12 is reasonable. 10738 10739 *'winptydll'* 10740 'winptydll' string (default "winpty32.dll" or "winpty64.dll") 10741 global 10742 {only available when compiled with the |terminal| 10743 feature on MS-Windows} 10744 Specifies the name of the winpty shared library, used for the 10745 |:terminal| command. The default depends on whether Vim was built as 10746 a 32-bit or 64-bit executable. If not found, "winpty.dll" is tried as 10747 a fallback. 10748 Environment variables are expanded |:set_env|. 10749 This option cannot be set from a |modeline| or in the |sandbox|, for 10750 security reasons. 10751 10752 *'winwidth'* *'wiw'* *E592* 10753 'winwidth' 'wiw' number (default 20) 10754 global 10755 Minimal number of columns for the current window. This is not a hard 10756 minimum, Vim will use fewer columns if there is not enough room. If 10757 the current window is smaller, its size is increased, at the cost of 10758 the width of other windows. Set it to 999 to make the current window 10759 always fill the screen. Set it to a small number for normal editing. 10760 The width is not adjusted after one of the commands to change the 10761 width of the current window. 10762 'winwidth' applies to the current window. Use 'winminwidth' to set 10763 the minimal width for other windows. 10764 10765 *'wlseat'* *'wse'* 10766 'wlseat' 'wse' string (default "") 10767 global 10768 {only when the |+wayland| feature is included} 10769 Specifies the Wayland seat to use for Wayland functionality, 10770 specifically the clipboard. If the seat does not exist, then the 10771 option will still be set to the new value, with the Wayland clipboard 10772 being unavailable as a result. If an empty value is passed then Vim 10773 will attempt to use the first seat found available. Updating this 10774 option will also update |v:clipmethod|. 10775 10776 *'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'* 10777 'wlsteal' 'wst' boolean (default off) 10778 global 10779 DEPRECATED: This option is no longer used; changing it has no effect. 10780 10781 When enabled, then allow Vim to steal focus by creating a temporary 10782 surface, in order to access the clipboard. 10783 10784 *'wltimeoutlen'* *'wtm'* 10785 'wltimeoutlen' 'wtm' number (default 500) 10786 global 10787 {only when the |+wayland| feature is included} 10788 The timeout in milliseconds before Vim gives up on waiting for the 10789 Wayland compositor. While Vim waits on the compositor, it is 10790 unresponsive to input and does not update the screen. Therefore 10791 setting this to a lower value may make Vim feel more responsive in 10792 some cases. On the other hand, it may also mean you receive errors 10793 when the compositor takes more time to respond than usual. 10794 10795 *'wrap'* *'nowrap'* 10796 'wrap' boolean (default on) 10797 local to window 10798 This option changes how text is displayed. It doesn't change the text 10799 in the buffer, see 'textwidth' for that. 10800 When on, lines longer than the width of the window will wrap and 10801 displaying continues on the next line. When off lines will not wrap 10802 and only part of long lines will be displayed. When the cursor is 10803 moved to a part that is not shown, the screen will scroll 10804 horizontally. 10805 The line will be broken in the middle of a word if necessary. See 10806 'linebreak' to get the break at a word boundary. 10807 To make scrolling horizontally a bit more useful, try this: > 10808 :set sidescroll=5 10809 :set listchars+=precedes:<,extends:> 10810 < See 'sidescroll', 'listchars' and |wrap-off|. 10811 This option can't be set from a |modeline| when the 'diff' option is 10812 on. 10813 If 'nowrap' was set from a |modeline| or in the |sandbox|, '>' is used 10814 as the |lcs-extends| character regardless of the value of the 'list' 10815 and 'listchars' options. This is to prevent malicious code outside 10816 the viewport from going unnoticed. Use `:setlocal nowrap` manually 10817 afterwards to disable this behavior. 10818 10819 *'wrapmargin'* *'wm'* 10820 'wrapmargin' 'wm' number (default 0) 10821 local to buffer 10822 Number of characters from the right window border where wrapping 10823 starts. When typing text beyond this limit, an <EOL> will be inserted 10824 and inserting continues on the next line. 10825 Options that add a margin, such as 'number' and 'foldcolumn', cause 10826 the text width to be further reduced. This is Vi compatible. 10827 When 'textwidth' is non-zero, this option is not used. 10828 This option is set to 0 when 'paste' is set and restored when 'paste' 10829 is reset. 10830 See also 'formatoptions' and |ins-textwidth|. 10831 10832 *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'* 10833 'wrapscan' 'ws' boolean (default on) *E384* *E385* 10834 global 10835 Searches wrap around the end of the file. Also applies to |]s| and 10836 |[s|, searching for spelling mistakes. 10837 10838 *'write'* *'nowrite'* 10839 'write' boolean (default on) 10840 global 10841 Allows writing files. When not set, writing a file is not allowed. 10842 Can be used for a view-only mode, where modifications to the text are 10843 still allowed. Can be reset with the |-m| or |-M| command line 10844 argument. Filtering text is still possible, even though this requires 10845 writing a temporary file. 10846 10847 *'writeany'* *'wa'* *'nowriteany'* *'nowa'* 10848 'writeany' 'wa' boolean (default off) 10849 global 10850 Allows writing to any file with no need for "!" override. 10851 10852 *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'* 10853 'writebackup' 'wb' boolean (default on with |+writebackup| feature, off 10854 otherwise) 10855 global 10856 Make a backup before overwriting a file. The backup is removed after 10857 the file was successfully written, unless the 'backup' option is 10858 also on. 10859 WARNING: Switching this option off means that when Vim fails to write 10860 your buffer correctly and then, for whatever reason, Vim exits, you 10861 lose both the original file and what you were writing. Only reset 10862 this option if your file system is almost full and it makes the write 10863 fail (and make sure not to exit Vim until the write was successful). 10864 See |backup-table| for another explanation. 10865 When the 'backupskip' pattern matches, a backup is not made anyway. 10866 Depending on 'backupcopy' the backup is a new file or the original 10867 file renamed (and a new file is written). 10868 NOTE: This option is set to the default value when 'compatible' is 10869 set. 10870 10871 *'writedelay'* *'wd'* 10872 'writedelay' 'wd' number (default 0) 10873 global 10874 The number of milliseconds to wait for each character sent to the 10875 screen. When non-zero, characters are sent to the terminal one by 10876 one. For debugging purposes. 10877 10878 *'xtermcodes'* *'noxtermcodes'* 10879 'xtermcodes' boolean (default on) 10880 global 10881 When detecting xterm patchlevel 141 or higher with the termresponse 10882 mechanism and this option is set, Vim will request the actual terminal 10883 key codes and number of colors from the terminal. This takes care of 10884 various configuration options of the terminal that cannot be obtained 10885 from the termlib/terminfo entry, see |xterm-codes|. 10886 A side effect may be that t_Co changes and Vim will redraw the 10887 display. 10888 10889 10890 vim:tw=78:ts=8:noet:ft=help:norl: