You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6876 lines
294KB

  1. *options.txt* Nvim
  2. VIM REFERENCE MANUAL by Bram Moolenaar
  3. Options *options*
  4. For an overview of options see quickref.txt |option-list|.
  5. Vim has a number of internal variables and switches which can be set to
  6. achieve special effects. These options come in three forms:
  7. boolean can only be on or off *boolean* *toggle*
  8. number has a numeric value
  9. string has a string value
  10. Type |gO| to see the table of contents.
  11. ==============================================================================
  12. 1. Setting options *set-option* *E764*
  13. *:se* *:set*
  14. :se[t] Show all options that differ from their default value.
  15. :se[t] all Show all options.
  16. *E518* *E519*
  17. :se[t] {option}? Show value of {option}.
  18. :se[t] {option} Toggle option: set, switch it on.
  19. Number option: show value.
  20. String option: show value.
  21. :se[t] no{option} Toggle option: Reset, switch it off.
  22. *:set-!* *:set-inv*
  23. :se[t] {option}! or
  24. :se[t] inv{option} Toggle option: Invert value.
  25. *:set-default* *:set-&* *:set-&vi* *:set-&vim*
  26. :se[t] {option}& Reset option to its default value.
  27. :se[t] {option}&vi Reset option to its Vi default value.
  28. :se[t] {option}&vim Reset option to its Vim default value.
  29. :se[t] all& Set all options to their default value. The values of
  30. these options are not changed:
  31. 'columns'
  32. 'lines'
  33. Warning: This may have a lot of side effects.
  34. *:set-args* *E487* *E521*
  35. :se[t] {option}={value} or
  36. :se[t] {option}:{value}
  37. Set string or number option to {value}.
  38. For numeric options the value can be given in decimal,
  39. hex (preceded with 0x) or octal (preceded with '0').
  40. The old value can be inserted by typing 'wildchar' (by
  41. default this is a <Tab>). See |cmdline-completion|.
  42. White space between {option} and '=' is allowed and
  43. will be ignored. White space between '=' and {value}
  44. is not allowed.
  45. See |option-backslash| for using white space and
  46. backslashes in {value}.
  47. :se[t] {option}+={value} *:set+=*
  48. Add the {value} to a number option, or append the
  49. {value} to a string option. When the option is a
  50. comma separated list, a comma is added, unless the
  51. value was empty.
  52. If the option is a list of flags, superfluous flags
  53. are removed. When adding a flag that was already
  54. present the option value doesn't change.
  55. Also see |:set-args| above.
  56. :se[t] {option}^={value} *:set^=*
  57. Multiply the {value} to a number option, or prepend
  58. the {value} to a string option. When the option is a
  59. comma separated list, a comma is added, unless the
  60. value was empty.
  61. Also see |:set-args| above.
  62. :se[t] {option}-={value} *:set-=*
  63. Subtract the {value} from a number option, or remove
  64. the {value} from a string option, if it is there.
  65. If the {value} is not found in a string option, there
  66. is no error or warning. When the option is a comma
  67. separated list, a comma is deleted, unless the option
  68. becomes empty.
  69. When the option is a list of flags, {value} must be
  70. exactly as they appear in the option. Remove flags
  71. one by one to avoid problems.
  72. Also see |:set-args| above.
  73. The {option} arguments to ":set" may be repeated. For example: >
  74. :set ai nosi sw=3 ts=3
  75. If you make an error in one of the arguments, an error message will be given
  76. and the following arguments will be ignored.
  77. *:set-verbose*
  78. When 'verbose' is non-zero, displaying an option value will also tell where it
  79. was last set. Example: >
  80. :verbose set shiftwidth cindent?
  81. < shiftwidth=4 ~
  82. Last set from modeline line 1 ~
  83. cindent ~
  84. Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
  85. This is only done when specific option values are requested, not for ":verbose
  86. set all" or ":verbose set" without an argument.
  87. When the option was set by hand there is no "Last set" message.
  88. When the option was set while executing a function, user command or
  89. autocommand, the script in which it was defined is reported.
  90. A few special texts:
  91. Last set from modeline line 1 ~
  92. Option was set in a |modeline|.
  93. Last set from --cmd argument ~
  94. Option was set with command line argument |--cmd| or +.
  95. Last set from -c argument ~
  96. Option was set with command line argument |-c|, +, |-S| or
  97. |-q|.
  98. Last set from environment variable ~
  99. Option was set from an environment variable, $VIMINIT,
  100. $GVIMINIT or $EXINIT.
  101. Last set from error handler ~
  102. Option was cleared when evaluating it resulted in an error.
  103. *option-backslash*
  104. To include white space in a string option value it has to be preceded with a
  105. backslash. To include a backslash you have to use two. Effectively this
  106. means that the number of backslashes in an option value is halved (rounded
  107. down).
  108. A few examples: >
  109. :set tags=tags\ /usr/tags results in "tags /usr/tags"
  110. :set tags=tags\\,file results in "tags\,file"
  111. :set tags=tags\\\ file results in "tags\ file"
  112. The "|" character separates a ":set" command from a following command. To
  113. include the "|" in the option value, use "\|" instead. This example sets the
  114. 'titlestring' option to "hi|there": >
  115. :set titlestring=hi\|there
  116. This sets the 'titlestring' option to "hi" and 'iconstring' to "there": >
  117. :set titlestring=hi|set iconstring=there
  118. Similarly, the double quote character starts a comment. To include the '"' in
  119. the option value, use '\"' instead. This example sets the 'titlestring'
  120. option to 'hi "there"': >
  121. :set titlestring=hi\ \"there\"
  122. For Windows backslashes in file names are mostly not removed. More
  123. precise: For options that expect a file name (those where environment
  124. variables are expanded) a backslash before a normal file name character is not
  125. removed. But a backslash before a special character (space, backslash, comma,
  126. etc.) is used like explained above.
  127. There is one special situation, when the value starts with "\\": >
  128. :set dir=\\machine\path results in "\\machine\path"
  129. :set dir=\\\\machine\\path results in "\\machine\path"
  130. :set dir=\\path\\file results in "\\path\file" (wrong!)
  131. For the first one the start is kept, but for the second one the backslashes
  132. are halved. This makes sure it works both when you expect backslashes to be
  133. halved and when you expect the backslashes to be kept. The third gives a
  134. result which is probably not what you want. Avoid it.
  135. *add-option-flags* *remove-option-flags*
  136. *E539* *E550* *E551* *E552*
  137. Some options are a list of flags. When you want to add a flag to such an
  138. option, without changing the existing ones, you can do it like this: >
  139. :set guioptions+=a
  140. Remove a flag from an option like this: >
  141. :set guioptions-=a
  142. This removes the 'a' flag from 'guioptions'.
  143. Note that you should add or remove one flag at a time. If 'guioptions' has
  144. the value "ab", using "set guioptions-=ba" won't work, because the string "ba"
  145. doesn't appear.
  146. *:set_env* *expand-env* *expand-environment-var*
  147. Environment variables in specific string options will be expanded. If the
  148. environment variable exists the '$' and the following environment variable
  149. name is replaced with its value. If it does not exist the '$' and the name
  150. are not modified. Any non-id character (not a letter, digit or '_') may
  151. follow the environment variable name. That character and what follows is
  152. appended to the value of the environment variable. Examples: >
  153. :set term=$TERM.new
  154. :set path=/usr/$INCLUDE,$HOME/include,.
  155. When adding or removing a string from an option with ":set opt-=val" or ":set
  156. opt+=val" the expansion is done before the adding or removing.
  157. Handling of local options *local-options*
  158. Some of the options only apply to a window or buffer. Each window or buffer
  159. has its own copy of this option, thus each can have its own value. This
  160. allows you to set 'list' in one window but not in another. And set
  161. 'shiftwidth' to 3 in one buffer and 4 in another.
  162. The following explains what happens to these local options in specific
  163. situations. You don't really need to know all of this, since Vim mostly uses
  164. the option values you would expect. Unfortunately, doing what the user
  165. expects is a bit complicated...
  166. When splitting a window, the local options are copied to the new window. Thus
  167. right after the split the contents of the two windows look the same.
  168. When editing a new buffer, its local option values must be initialized. Since
  169. the local options of the current buffer might be specifically for that buffer,
  170. these are not used. Instead, for each buffer-local option there also is a
  171. global value, which is used for new buffers. With ":set" both the local and
  172. global value is changed. With "setlocal" only the local value is changed,
  173. thus this value is not used when editing a new buffer.
  174. When editing a buffer that has been edited before, the options from the window
  175. that was last closed are used again. If this buffer has been edited in this
  176. window, the values from back then are used. Otherwise the values from the
  177. last closed window where the buffer was edited last are used.
  178. It's possible to set a local window option specifically for a type of buffer.
  179. When you edit another buffer in the same window, you don't want to keep
  180. using these local window options. Therefore Vim keeps a global value of the
  181. local window options, which is used when editing another buffer. Each window
  182. has its own copy of these values. Thus these are local to the window, but
  183. global to all buffers in the window. With this you can do: >
  184. :e one
  185. :set list
  186. :e two
  187. Now the 'list' option will also be set in "two", since with the ":set list"
  188. command you have also set the global value. >
  189. :set nolist
  190. :e one
  191. :setlocal list
  192. :e two
  193. Now the 'list' option is not set, because ":set nolist" resets the global
  194. value, ":setlocal list" only changes the local value and ":e two" gets the
  195. global value. Note that if you do this next: >
  196. :e one
  197. You will get back the 'list' value as it was the last time you edited "one".
  198. The options local to a window are remembered for each buffer. This also
  199. happens when the buffer is not loaded, but they are lost when the buffer is
  200. wiped out |:bwipe|.
  201. *:setl* *:setlocal*
  202. :setl[ocal] ... Like ":set" but set only the value local to the
  203. current buffer or window. Not all options have a
  204. local value. If the option does not have a local
  205. value the global value is set.
  206. With the "all" argument: display local values for all
  207. local options.
  208. Without argument: Display local values for all local
  209. options which are different from the default.
  210. When displaying a specific local option, show the
  211. local value. For a global/local boolean option, when
  212. the global value is being used, "--" is displayed
  213. before the option name.
  214. For a global option the global value is
  215. shown (but that might change in the future).
  216. :setl[ocal] {option}< Set the local value of {option} to its global value by
  217. copying the value.
  218. :se[t] {option}< For |global-local| options: Remove the local value of
  219. {option}, so that the global value will be used.
  220. *:setg* *:setglobal*
  221. :setg[lobal] ... Like ":set" but set only the global value for a local
  222. option without changing the local value.
  223. When displaying an option, the global value is shown.
  224. With the "all" argument: display global values for all
  225. local options.
  226. Without argument: display global values for all local
  227. options which are different from the default.
  228. For buffer-local and window-local options:
  229. Command global value local value ~
  230. :set option=value set set
  231. :setlocal option=value - set
  232. :setglobal option=value set -
  233. :set option? - display
  234. :setlocal option? - display
  235. :setglobal option? display -
  236. Global options with a local value *global-local*
  237. Options are global when you mostly use one value for all buffers and windows.
  238. For some global options it's useful to sometimes have a different local value.
  239. You can set the local value with ":setlocal". That buffer or window will then
  240. use the local value, while other buffers and windows continue using the global
  241. value.
  242. For example, you have two windows, both on C source code. They use the global
  243. 'makeprg' option. If you do this in one of the two windows: >
  244. :set makeprg=gmake
  245. then the other window will switch to the same value. There is no need to set
  246. the 'makeprg' option in the other C source window too.
  247. However, if you start editing a Perl file in a new window, you want to use
  248. another 'makeprg' for it, without changing the value used for the C source
  249. files. You use this command: >
  250. :setlocal makeprg=perlmake
  251. You can switch back to using the global value by making the local value empty: >
  252. :setlocal makeprg=
  253. This only works for a string option. For a boolean option you need to use the
  254. "<" flag, like this: >
  255. :setlocal autoread<
  256. Note that for non-boolean options using "<" copies the global value to the
  257. local value, it doesn't switch back to using the global value (that matters
  258. when the global value changes later). You can also use: >
  259. :set path<
  260. This will make the local value of 'path' empty, so that the global value is
  261. used. Thus it does the same as: >
  262. :setlocal path=
  263. Note: In the future more global options can be made global-local. Using
  264. ":setlocal" on a global option might work differently then.
  265. Setting the filetype
  266. :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype*
  267. Set the 'filetype' option to {filetype}, but only if
  268. not done yet in a sequence of (nested) autocommands.
  269. This is short for: >
  270. :if !did_filetype()
  271. : setlocal filetype={filetype}
  272. :endif
  273. < This command is used in a filetype.vim file to avoid
  274. setting the 'filetype' option twice, causing different
  275. settings and syntax files to be loaded.
  276. When the optional FALLBACK argument is present, a
  277. later :setfiletype command will override the
  278. 'filetype'. This is to used for filetype detections
  279. that are just a guess. |did_filetype()| will return
  280. false after this command.
  281. *option-window* *optwin*
  282. :bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options*
  283. :opt[ions] Open a window for viewing and setting all options.
  284. Options are grouped by function.
  285. Offers short help for each option. Hit <CR> on the
  286. short help to open a help window with more help for
  287. the option.
  288. Modify the value of the option and hit <CR> on the
  289. "set" line to set the new value. For window and
  290. buffer specific options, the last accessed window is
  291. used to set the option value in, unless this is a help
  292. window, in which case the window below help window is
  293. used (skipping the option-window).
  294. *$HOME*
  295. Using "~" is like using "$HOME", but it is only recognized at the start of an
  296. option and after a space or comma.
  297. On Unix systems "~user" can be used too. It is replaced by the home directory
  298. of user "user". Example: >
  299. :set path=~mool/include,/usr/include,.
  300. On Unix systems the form "${HOME}" can be used too. The name between {} can
  301. contain non-id characters then. Note that if you want to use this for the
  302. "gf" command, you need to add the '{' and '}' characters to 'isfname'.
  303. NOTE: expanding environment variables and "~/" is only done with the ":set"
  304. command, not when assigning a value to an option with ":let".
  305. *$HOME-windows*
  306. On MS-Windows, if $HOME is not defined as an environment variable, then
  307. at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH.
  308. If $HOMEDRIVE is not set then $USERPROFILE is used.
  309. This expanded value is not exported to the environment, this matters when
  310. running an external command: >
  311. :echo system('set | findstr ^HOME=')
  312. and >
  313. :echo luaeval('os.getenv("HOME")')
  314. should echo nothing (an empty string) despite exists('$HOME') being true.
  315. When setting $HOME to a non-empty string it will be exported to the
  316. subprocesses.
  317. Note the maximum length of an expanded option is limited. How much depends on
  318. the system, mostly it is something like 256 or 1024 characters.
  319. ==============================================================================
  320. 2. Automatically setting options *auto-setting*
  321. Besides changing options with the ":set" command, there are three alternatives
  322. to set options automatically for one or more files:
  323. 1. When starting Vim initializations are read from various places. See
  324. |initialization|. Most of them are performed for all editing sessions,
  325. and some of them depend on the directory where Vim is started.
  326. You can create an initialization file with |:mkvimrc|, |:mkview| and
  327. |:mksession|.
  328. 2. If you start editing a new file, the automatic commands are executed.
  329. This can be used to set options for files matching a particular pattern and
  330. many other things. See |autocommand|.
  331. 3. If you start editing a new file, and the 'modeline' option is on, a
  332. number of lines at the beginning and end of the file are checked for
  333. modelines. This is explained here.
  334. *modeline* *vim:* *vi:* *ex:* *E520*
  335. There are two forms of modelines. The first form:
  336. [text]{white}{vi:|vim:|ex:}[white]{options}
  337. [text] any text or empty
  338. {white} at least one blank character (<Space> or <Tab>)
  339. {vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
  340. [white] optional white space
  341. {options} a list of option settings, separated with white space
  342. or ':', where each part between ':' is the argument
  343. for a ":set" command (can be empty)
  344. Examples:
  345. vi:noai:sw=3 ts=6 ~
  346. vim: tw=77 ~
  347. The second form (this is compatible with some versions of Vi):
  348. [text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
  349. [text] any text or empty
  350. {white} at least one blank character (<Space> or <Tab>)
  351. {vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:"
  352. [white] optional white space
  353. se[t] the string "set " or "se " (note the space); When
  354. "Vim" is used it must be "set".
  355. {options} a list of options, separated with white space, which
  356. is the argument for a ":set" command
  357. : a colon
  358. [text] any text or empty
  359. Examples:
  360. /* vim: set ai tw=75: */ ~
  361. /* Vim: set ai tw=75: */ ~
  362. The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the
  363. chance that a normal word like "lex:" is caught. There is one exception:
  364. "vi:" and "vim:" can also be at the start of the line (for compatibility with
  365. version 3.0). Using "ex:" at the start of the line will be ignored (this
  366. could be short for "example:").
  367. *modeline-local*
  368. The options are set like with ":setlocal": The new value only applies to the
  369. buffer and window that contain the file. Although it's possible to set global
  370. options from a modeline, this is unusual. If you have two windows open and
  371. the files in it set the same global option to a different value, the result
  372. depends on which one was opened last.
  373. When editing a file that was already loaded, only the window-local options
  374. from the modeline are used. Thus if you manually changed a buffer-local
  375. option after opening the file, it won't be changed if you edit the same buffer
  376. in another window. But window-local options will be set.
  377. *modeline-version*
  378. If the modeline is only to be used for some versions of Vim, the version
  379. number can be specified where "vim:" or "Vim:" is used:
  380. vim{vers}: version {vers} or later
  381. vim<{vers}: version before {vers}
  382. vim={vers}: version {vers}
  383. vim>{vers}: version after {vers}
  384. {vers} is 700 for Vim 7.0 (hundred times the major version plus minor).
  385. For example, to use a modeline only for Vim 7.0:
  386. /* vim700: set foldmethod=marker */ ~
  387. To use a modeline for Vim after version 7.2:
  388. /* vim>702: set cole=2: */ ~
  389. There can be no blanks between "vim" and the ":".
  390. The modeline is ignored if {vers} does not fit in an integer.
  391. The number of lines that are checked can be set with the 'modelines' option.
  392. If 'modeline' is off or 'modelines' is 0 no lines are checked.
  393. Note that for the first form all of the rest of the line is used, thus a line
  394. like:
  395. /* vi:ts=4: */ ~
  396. will give an error message for the trailing "*/". This line is OK:
  397. /* vi:set ts=4: */ ~
  398. If an error is detected the rest of the line is skipped.
  399. If you want to include a ':' in a set command precede it with a '\'. The
  400. backslash in front of the ':' will be removed. Example:
  401. /* vi:set dir=c\:\tmp: */ ~
  402. This sets the 'dir' option to "c:\tmp". Only a single backslash before the
  403. ':' is removed. Thus to include "\:" you have to specify "\\:".
  404. *E992*
  405. No other commands than "set" are supported, for security reasons (somebody
  406. might create a Trojan horse text file with modelines). And not all options
  407. can be set. For some options a flag is set, so that when the value is used
  408. the |sandbox| is effective. Some options can only be set from the modeline
  409. when 'modelineexpr' is set (the default is off).
  410. Still, there is always a small risk that a modeline causes trouble. E.g.,
  411. when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly.
  412. So disable modelines before editing untrusted text. The mail ftplugin does
  413. this, for example.
  414. Hint: If you would like to do something else than setting an option, you could
  415. define an autocommand that checks the file for a specific string. For
  416. example: >
  417. au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif
  418. And define a function SetVar() that does something with the line containing
  419. "VAR".
  420. ==============================================================================
  421. 3. Options summary *option-summary*
  422. In the list below all the options are mentioned with their full name and with
  423. an abbreviation if there is one. Both forms may be used.
  424. In this document when a boolean option is "set" that means that ":set option"
  425. is entered. When an option is "reset", ":set nooption" is used.
  426. Most options are the same in all windows and buffers. There are a few that
  427. are specific to how the text is presented in a window. These can be set to a
  428. different value in each window. For example the 'list' option can be set in
  429. one window and reset in another for the same text, giving both types of view
  430. at the same time. There are a few options that are specific to a certain
  431. file. These can have a different value for each file or buffer. For example
  432. the 'textwidth' option can be 78 for a normal text file and 0 for a C
  433. program.
  434. global one option for all buffers and windows
  435. local to window each window has its own copy of this option
  436. local to buffer each buffer has its own copy of this option
  437. When creating a new window the option values from the currently active window
  438. are used as a default value for the window-specific options. For the
  439. buffer-specific options this depends on the 's' and 'S' flags in the
  440. 'cpoptions' option. If 's' is included (which is the default) the values for
  441. buffer options are copied from the currently active buffer when a buffer is
  442. first entered. If 'S' is present the options are copied each time the buffer
  443. is entered, this is almost like having global options. If 's' and 'S' are not
  444. present, the options are copied from the currently active buffer when the
  445. buffer is created.
  446. Hidden options *hidden-options*
  447. Not all options are supported in all versions. This depends on the supported
  448. features and sometimes on the system. A remark about this is in curly braces
  449. below. When an option is not supported it may still be set without getting an
  450. error, this is called a hidden option. You can't get the value of a hidden
  451. option though, it is not stored.
  452. To test if option "foo" can be used with ":set" use something like this: >
  453. if exists('&foo')
  454. This also returns true for a hidden option. To test if option "foo" is really
  455. supported use something like this: >
  456. if exists('+foo')
  457. <
  458. *E355*
  459. A jump table for the options with a short description can be found at |Q_op|.
  460. *'aleph'* *'al'* *aleph* *Aleph*
  461. 'aleph' 'al' number (default 224)
  462. global
  463. The ASCII code for the first letter of the Hebrew alphabet. The
  464. routine that maps the keyboard in Hebrew mode, both in Insert mode
  465. (when hkmap is set) and on the command-line (when hitting CTRL-_)
  466. outputs the Hebrew characters in the range [aleph..aleph+26].
  467. aleph=128 applies to PC code, and aleph=224 applies to ISO 8859-8.
  468. See |rileft.txt|.
  469. *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'*
  470. 'allowrevins' 'ari' boolean (default off)
  471. global
  472. Allow CTRL-_ in Insert and Command-line mode. This is default off, to
  473. avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get
  474. into reverse Insert mode, and don't know how to get out. See
  475. 'revins'.
  476. *'ambiwidth'* *'ambw'*
  477. 'ambiwidth' 'ambw' string (default: "single")
  478. global
  479. Tells Vim what to do with characters with East Asian Width Class
  480. Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
  481. letters, Cyrillic letters).
  482. There are currently two possible values:
  483. "single": Use the same width as characters in US-ASCII. This is
  484. expected by most users.
  485. "double": Use twice the width of ASCII characters.
  486. *E834* *E835*
  487. The value "double" cannot be used if 'listchars' or 'fillchars'
  488. contains a character that would be double width.
  489. There are a number of CJK fonts for which the width of glyphs for
  490. those characters are solely based on how many octets they take in
  491. legacy/traditional CJK encodings. In those encodings, Euro,
  492. Registered sign, Greek/Cyrillic letters are represented by two octets,
  493. therefore those fonts have "wide" glyphs for them. This is also
  494. true of some line drawing characters used to make tables in text
  495. file. Therefore, when a CJK font is used for GUI Vim or
  496. Vim is running inside a terminal (emulators) that uses a CJK font
  497. (or Vim is run inside an xterm invoked with "-cjkwidth" option.),
  498. this option should be set to "double" to match the width perceived
  499. by Vim with the width of glyphs in the font. Perhaps it also has
  500. to be set to "double" under CJK Windows XP when the system locale is
  501. set to one of CJK locales.
  502. See Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11).
  503. Vim may set this option automatically at startup time when Vim is
  504. compiled with the |+termresponse| feature and if t_u7 is set to the
  505. escape sequence to request cursor position report.
  506. *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
  507. 'autochdir' 'acd' boolean (default off)
  508. global
  509. When on, Vim will change the current working directory whenever you
  510. open a file, switch buffers, delete a buffer or open/close a window.
  511. It will change to the directory containing the file which was opened
  512. or selected.
  513. Note: When this option is on some plugins may not work.
  514. *'arabic'* *'arab'* *'noarabic'* *'noarab'*
  515. 'arabic' 'arab' boolean (default off)
  516. local to window
  517. This option can be set to start editing Arabic text.
  518. Setting this option will:
  519. - Set the 'rightleft' option, unless 'termbidi' is set.
  520. - Set the 'arabicshape' option, unless 'termbidi' is set.
  521. - Set the 'keymap' option to "arabic"; in Insert mode CTRL-^ toggles
  522. between typing English and Arabic key mapping.
  523. - Set the 'delcombine' option
  524. Resetting this option will:
  525. - Reset the 'rightleft' option.
  526. - Disable the use of 'keymap' (without changing its value).
  527. Note that 'arabicshape' and 'delcombine' are not reset (it is a global
  528. option).
  529. Also see |arabic.txt|.
  530. *'arabicshape'* *'arshape'*
  531. *'noarabicshape'* *'noarshape'*
  532. 'arabicshape' 'arshape' boolean (default on)
  533. global
  534. When on and 'termbidi' is off, the required visual character
  535. corrections that need to take place for displaying the Arabic language
  536. take effect. Shaping, in essence, gets enabled; the term is a broad
  537. one which encompasses:
  538. a) the changing/morphing of characters based on their location
  539. within a word (initial, medial, final and stand-alone).
  540. b) the enabling of the ability to compose characters
  541. c) the enabling of the required combining of some characters
  542. When disabled the display shows each character's true stand-alone
  543. form.
  544. Arabic is a complex language which requires other settings, for
  545. further details see |arabic.txt|.
  546. *'autoindent'* *'ai'* *'noautoindent'* *'noai'*
  547. 'autoindent' 'ai' boolean (default on)
  548. local to buffer
  549. Copy indent from current line when starting a new line (typing <CR>
  550. in Insert mode or when using the "o" or "O" command). If you do not
  551. type anything on the new line except <BS> or CTRL-D and then type
  552. <Esc>, CTRL-O or <CR>, the indent is deleted again. Moving the cursor
  553. to another line has the same effect, unless the 'I' flag is included
  554. in 'cpoptions'.
  555. When autoindent is on, formatting (with the "gq" command or when you
  556. reach 'textwidth' in Insert mode) uses the indentation of the first
  557. line.
  558. When 'smartindent' or 'cindent' is on the indent is changed in
  559. a different way.
  560. The 'autoindent' option is reset when the 'paste' option is set and
  561. restored when 'paste' is reset.
  562. {small difference from Vi: After the indent is deleted when typing
  563. <Esc> or <CR>, the cursor position when moving up or down is after the
  564. deleted indent; Vi puts the cursor somewhere in the deleted indent}.
  565. *'autoread'* *'ar'* *'noautoread'* *'noar'*
  566. 'autoread' 'ar' boolean (default on)
  567. global or local to buffer |global-local|
  568. When a file has been detected to have been changed outside of Vim and
  569. it has not been changed inside of Vim, automatically read it again.
  570. When the file has been deleted this is not done, so you have the text
  571. from before it was deleted. When it appears again then it is read.
  572. |timestamp|
  573. If this option has a local value, use this command to switch back to
  574. using the global value: >
  575. :set autoread<
  576. <
  577. *'autowrite'* *'aw'* *'noautowrite'* *'noaw'*
  578. 'autowrite' 'aw' boolean (default off)
  579. global
  580. Write the contents of the file, if it has been modified, on each
  581. :next, :rewind, :last, :first, :previous, :stop, :suspend, :tag, :!,
  582. :make, CTRL-] and CTRL-^ command; and when a :buffer, CTRL-O, CTRL-I,
  583. '{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
  584. Note that for some commands the 'autowrite' option is not used, see
  585. 'autowriteall' for that.
  586. Some buffers will not be written, specifically when 'buftype' is
  587. "nowrite", "nofile", "terminal" or "prompt".
  588. *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
  589. 'autowriteall' 'awa' boolean (default off)
  590. global
  591. Like 'autowrite', but also used for commands ":edit", ":enew", ":quit",
  592. ":qall", ":exit", ":xit", ":recover" and closing the Vim window.
  593. Setting this option also implies that Vim behaves like 'autowrite' has
  594. been set.
  595. *'background'* *'bg'*
  596. 'background' 'bg' string (default "dark")
  597. global
  598. When set to "dark" or "light", adjusts the default color groups for
  599. that background type. The |TUI| or other UI sets this on startup
  600. (triggering |OptionSet|) if it can detect the background color.
  601. This option does NOT change the background color, it tells Nvim what
  602. the "inherited" (terminal/GUI) background looks like.
  603. See |:hi-normal| if you want to set the background color explicitly.
  604. *g:colors_name*
  605. When a color scheme is loaded (the "g:colors_name" variable is set)
  606. setting 'background' will cause the color scheme to be reloaded. If
  607. the color scheme adjusts to the value of 'background' this will work.
  608. However, if the color scheme sets 'background' itself the effect may
  609. be undone. First delete the "g:colors_name" variable when needed.
  610. Normally this option would be set in the vimrc file. Possibly
  611. depending on the terminal name. Example: >
  612. :if $TERM ==# "xterm"
  613. : set background=dark
  614. :endif
  615. < When this option is set, the default settings for the highlight groups
  616. will change. To use other settings, place ":highlight" commands AFTER
  617. the setting of the 'background' option.
  618. This option is also used in the "$VIMRUNTIME/syntax/syntax.vim" file
  619. to select the colors for syntax highlighting. After changing this
  620. option, you must load syntax.vim again to see the result. This can be
  621. done with ":syntax on".
  622. *'backspace'* *'bs'*
  623. 'backspace' 'bs' string (default "indent,eol,start")
  624. global
  625. Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
  626. mode. This is a list of items, separated by commas. Each item allows
  627. a way to backspace over something:
  628. value effect ~
  629. indent allow backspacing over autoindent
  630. eol allow backspacing over line breaks (join lines)
  631. start allow backspacing over the start of insert; CTRL-W and CTRL-U
  632. stop once at the start of insert.
  633. When the value is empty, Vi compatible backspacing is used.
  634. For backwards compatibility with version 5.4 and earlier:
  635. value effect ~
  636. 0 same as ":set backspace=" (Vi compatible)
  637. 1 same as ":set backspace=indent,eol"
  638. 2 same as ":set backspace=indent,eol,start"
  639. *'backup'* *'bk'* *'nobackup'* *'nobk'*
  640. 'backup' 'bk' boolean (default off)
  641. global
  642. Make a backup before overwriting a file. Leave it around after the
  643. file has been successfully written. If you do not want to keep the
  644. backup file, but you do want a backup while the file is being
  645. written, reset this option and set the 'writebackup' option (this is
  646. the default). If you do not want a backup file at all reset both
  647. options (use this if your file system is almost full). See the
  648. |backup-table| for more explanations.
  649. When the 'backupskip' pattern matches, a backup is not made anyway.
  650. When 'patchmode' is set, the backup may be renamed to become the
  651. oldest version of a file.
  652. *'backupcopy'* *'bkc'*
  653. 'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto")
  654. global or local to buffer |global-local|
  655. When writing a file and a backup is made, this option tells how it's
  656. done. This is a comma separated list of words.
  657. The main values are:
  658. "yes" make a copy of the file and overwrite the original one
  659. "no" rename the file and write a new one
  660. "auto" one of the previous, what works best
  661. Extra values that can be combined with the ones above are:
  662. "breaksymlink" always break symlinks when writing
  663. "breakhardlink" always break hardlinks when writing
  664. Making a copy and overwriting the original file:
  665. - Takes extra time to copy the file.
  666. + When the file has special attributes, is a (hard/symbolic) link or
  667. has a resource fork, all this is preserved.
  668. - When the file is a link the backup will have the name of the link,
  669. not of the real file.
  670. Renaming the file and writing a new one:
  671. + It's fast.
  672. - Sometimes not all attributes of the file can be copied to the new
  673. file.
  674. - When the file is a link the new file will not be a link.
  675. The "auto" value is the middle way: When Vim sees that renaming file
  676. is possible without side effects (the attributes can be passed on and
  677. the file is not a link) that is used. When problems are expected, a
  678. copy will be made.
  679. The "breaksymlink" and "breakhardlink" values can be used in
  680. combination with any of "yes", "no" and "auto". When included, they
  681. force Vim to always break either symbolic or hard links by doing
  682. exactly what the "no" option does, renaming the original file to
  683. become the backup and writing a new file in its place. This can be
  684. useful for example in source trees where all the files are symbolic or
  685. hard links and any changes should stay in the local source tree, not
  686. be propagated back to the original source.
  687. *crontab*
  688. One situation where "no" and "auto" will cause problems: A program
  689. that opens a file, invokes Vim to edit that file, and then tests if
  690. the open file was changed (through the file descriptor) will check the
  691. backup file instead of the newly created file. "crontab -e" is an
  692. example.
  693. When a copy is made, the original file is truncated and then filled
  694. with the new text. This means that protection bits, owner and
  695. symbolic links of the original file are unmodified. The backup file
  696. however, is a new file, owned by the user who edited the file. The
  697. group of the backup is set to the group of the original file. If this
  698. fails, the protection bits for the group are made the same as for
  699. others.
  700. When the file is renamed this is the other way around: The backup has
  701. the same attributes of the original file, and the newly written file
  702. is owned by the current user. When the file was a (hard/symbolic)
  703. link, the new file will not! That's why the "auto" value doesn't
  704. rename when the file is a link. The owner and group of the newly
  705. written file will be set to the same ones as the original file, but
  706. the system may refuse to do this. In that case the "auto" value will
  707. again not rename the file.
  708. *'backupdir'* *'bdir'*
  709. 'backupdir' 'bdir' string (default ".,$XDG_DATA_HOME/nvim/backup")
  710. global
  711. List of directories for the backup file, separated with commas.
  712. - The backup file will be created in the first directory in the list
  713. where this is possible. The directory must exist, Vim will not
  714. create it for you.
  715. - Empty means that no backup file will be created ('patchmode' is
  716. impossible!). Writing may fail because of this.
  717. - A directory "." means to put the backup file in the same directory
  718. as the edited file.
  719. - A directory starting with "./" (or ".\" for Windows) means to
  720. put the backup file relative to where the edited file is. The
  721. leading "." is replaced with the path name of the edited file.
  722. ("." inside a directory name has no special meaning).
  723. - Spaces after the comma are ignored, other spaces are considered part
  724. of the directory name. To have a space at the start of a directory
  725. name, precede it with a backslash.
  726. - To include a comma in a directory name precede it with a backslash.
  727. - A directory name may end in an '/'.
  728. - Environment variables are expanded |:set_env|.
  729. - Careful with '\' characters, type one before a space, type two to
  730. get one in the option (see |option-backslash|), for example: >
  731. :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
  732. < - For backwards compatibility with Vim version 3.0 a '>' at the start
  733. of the option is removed.
  734. See also 'backup' and 'writebackup' options.
  735. If you want to hide your backup files on Unix, consider this value: >
  736. :set backupdir=./.backup,~/.backup,.,/tmp
  737. < You must create a ".backup" directory in each directory and in your
  738. home directory for this to work properly.
  739. The use of |:set+=| and |:set-=| is preferred when adding or removing
  740. directories from the list. This avoids problems when a future version
  741. uses another default.
  742. This option cannot be set from a |modeline| or in the |sandbox|, for
  743. security reasons.
  744. *'backupext'* *'bex'* *E589*
  745. 'backupext' 'bex' string (default "~")
  746. global
  747. String which is appended to a file name to make the name of the
  748. backup file. The default is quite unusual, because this avoids
  749. accidentally overwriting existing files with a backup file. You might
  750. prefer using ".bak", but make sure that you don't have files with
  751. ".bak" that you want to keep.
  752. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  753. If you like to keep a lot of backups, you could use a BufWritePre
  754. autocommand to change 'backupext' just before writing the file to
  755. include a timestamp. >
  756. :au BufWritePre * let &bex = '-' . strftime("%Y%b%d%X") . '~'
  757. < Use 'backupdir' to put the backup in a different directory.
  758. *'backupskip'* *'bsk'*
  759. 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*"
  760. Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*"
  761. Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
  762. global
  763. A list of file patterns. When one of the patterns matches with the
  764. name of the file which is written, no backup file is created. Both
  765. the specified file name and the full path name of the file are used.
  766. The pattern is used like with |:autocmd|, see |autocmd-pattern|.
  767. Watch out for special characters, see |option-backslash|.
  768. When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the
  769. default value. "/tmp/*" is only used for Unix.
  770. WARNING: Not having a backup file means that when Vim fails to write
  771. your buffer correctly and then, for whatever reason, Vim exits, you
  772. lose both the original file and what you were writing. Only disable
  773. backups if you don't care about losing the file.
  774. Note that environment variables are not expanded. If you want to use
  775. $HOME you must expand it explicitly, e.g.: >
  776. :let backupskip = escape(expand('$HOME'), '\') . '/tmp/*'
  777. < Note that the default also makes sure that "crontab -e" works (when a
  778. backup would be made by renaming the original file crontab won't see
  779. the newly created file). Also see 'backupcopy' and |crontab|.
  780. *'balloondelay'* *'bdlay'*
  781. 'balloondelay' 'bdlay' Removed.
  782. *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
  783. 'ballooneval' 'beval' Removed.
  784. *'balloonexpr'* *'bexpr'*
  785. 'balloonexpr' 'bexpr' Removed.
  786. *'belloff'* *'bo'*
  787. 'belloff' 'bo' string (default "all")
  788. global
  789. Specifies for which events the bell will not be rung. It is a comma
  790. separated list of items. For each item that is present, the bell
  791. will be silenced. This is most useful to specify specific events in
  792. insert mode to be silenced.
  793. item meaning when present ~
  794. all All events.
  795. backspace When hitting <BS> or <Del> and deleting results in an
  796. error.
  797. cursor Fail to move around using the cursor keys or
  798. <PageUp>/<PageDown> in |Insert-mode|.
  799. complete Error occurred when using |i_CTRL-X_CTRL-K| or
  800. |i_CTRL-X_CTRL-T|.
  801. copy Cannot copy char from insert mode using |i_CTRL-Y| or
  802. |i_CTRL-E|.
  803. ctrlg Unknown Char after <C-G> in Insert mode.
  804. error Other Error occurred (e.g. try to join last line)
  805. (mostly used in |Normal-mode| or |Cmdline-mode|).
  806. esc hitting <Esc> in |Normal-mode|.
  807. ex In |Visual-mode|, hitting |Q| results in an error.
  808. hangul Error occurred when using hangul input.
  809. insertmode Pressing <Esc> in 'insertmode'.
  810. lang Calling the beep module for Lua/Mzscheme/TCL.
  811. mess No output available for |g<|.
  812. showmatch Error occurred for 'showmatch' function.
  813. operator Empty region error |cpo-E|.
  814. register Unknown register after <C-R> in |Insert-mode|.
  815. shell Bell from shell output |:!|.
  816. spell Error happened on spell suggest.
  817. wildmode More matches in |cmdline-completion| available
  818. (depends on the 'wildmode' setting).
  819. This is most useful to fine tune when in Insert mode the bell should
  820. be rung. For Normal mode and Ex commands, the bell is often rung to
  821. indicate that an error occurred. It can be silenced by adding the
  822. "error" keyword.
  823. *'binary'* *'bin'* *'nobinary'* *'nobin'*
  824. 'binary' 'bin' boolean (default off)
  825. local to buffer
  826. This option should be set before editing a binary file. You can also
  827. use the |-b| Vim argument. When this option is switched on a few
  828. options will be changed (also when it already was on):
  829. 'textwidth' will be set to 0
  830. 'wrapmargin' will be set to 0
  831. 'modeline' will be off
  832. 'expandtab' will be off
  833. Also, 'fileformat' and 'fileformats' options will not be used, the
  834. file is read and written like 'fileformat' was "unix" (a single <NL>
  835. separates lines).
  836. The 'fileencoding' and 'fileencodings' options will not be used, the
  837. file is read without conversion.
  838. NOTE: When you start editing a(nother) file while the 'bin' option is
  839. on, settings from autocommands may change the settings again (e.g.,
  840. 'textwidth'), causing trouble when editing. You might want to set
  841. 'bin' again when the file has been loaded.
  842. The previous values of these options are remembered and restored when
  843. 'bin' is switched from on to off. Each buffer has its own set of
  844. saved option values.
  845. To edit a file with 'binary' set you can use the |++bin| argument.
  846. This avoids you have to do ":set bin", which would have effect for all
  847. files you edit.
  848. When writing a file the <EOL> for the last line is only written if
  849. there was one in the original file (normally Vim appends an <EOL> to
  850. the last line if there is none; this would make the file longer). See
  851. the 'endofline' option.
  852. *'bomb'* *'nobomb'*
  853. 'bomb' boolean (default off)
  854. local to buffer
  855. When writing a file and the following conditions are met, a BOM (Byte
  856. Order Mark) is prepended to the file:
  857. - this option is on
  858. - the 'binary' option is off
  859. - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big
  860. endian variants.
  861. Some applications use the BOM to recognize the encoding of the file.
  862. Often used for UCS-2 files on MS-Windows. For other applications it
  863. causes trouble, for example: "cat file1 file2" makes the BOM of file2
  864. appear halfway through the resulting file. Gcc doesn't accept a BOM.
  865. When Vim reads a file and 'fileencodings' starts with "ucs-bom", a
  866. check for the presence of the BOM is done and 'bomb' set accordingly.
  867. Unless 'binary' is set, it is removed from the first line, so that you
  868. don't see it when editing. When you don't change the options, the BOM
  869. will be restored when writing the file.
  870. *'breakat'* *'brk'*
  871. 'breakat' 'brk' string (default " ^I!@*-+;:,./?")
  872. global
  873. This option lets you choose which characters might cause a line
  874. break if 'linebreak' is on. Only works for ASCII characters.
  875. *'breakindent'* *'bri'*
  876. 'breakindent' 'bri' boolean (default off)
  877. local to window
  878. Every wrapped line will continue visually indented (same amount of
  879. space as the beginning of that line), thus preserving horizontal blocks
  880. of text.
  881. *'breakindentopt'* *'briopt'*
  882. 'breakindentopt' 'briopt' string (default empty)
  883. local to window
  884. Settings for 'breakindent'. It can consist of the following optional
  885. items and must be separated by a comma:
  886. min:{n} Minimum text width that will be kept after
  887. applying 'breakindent', even if the resulting
  888. text should normally be narrower. This prevents
  889. text indented almost to the right window border
  890. occupying lot of vertical space when broken.
  891. shift:{n} After applying 'breakindent', the wrapped line's
  892. beginning will be shifted by the given number of
  893. characters. It permits dynamic French paragraph
  894. indentation (negative) or emphasizing the line
  895. continuation (positive).
  896. sbr Display the 'showbreak' value before applying the
  897. additional indent.
  898. The default value for min is 20 and shift is 0.
  899. *'browsedir'* *'bsdir'*
  900. 'browsedir' 'bsdir' string (default: "last")
  901. global
  902. Which directory to use for the file browser:
  903. last Use same directory as with last file browser, where a
  904. file was opened or saved.
  905. buffer Use the directory of the related buffer.
  906. current Use the current directory.
  907. {path} Use the specified directory
  908. *'bufhidden'* *'bh'*
  909. 'bufhidden' 'bh' string (default: "")
  910. local to buffer
  911. This option specifies what happens when a buffer is no longer
  912. displayed in a window:
  913. <empty> follow the global 'hidden' option
  914. hide hide the buffer (don't unload it), also when 'hidden'
  915. is not set
  916. unload unload the buffer, also when 'hidden' is set or using
  917. |:hide|
  918. delete delete the buffer from the buffer list, also when
  919. 'hidden' is set or using |:hide|, like using
  920. |:bdelete|
  921. wipe wipe out the buffer from the buffer list, also when
  922. 'hidden' is set or using |:hide|, like using
  923. |:bwipeout|
  924. CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
  925. are lost without a warning. Also, these values may break autocommands
  926. that switch between buffers temporarily.
  927. This option is used together with 'buftype' and 'swapfile' to specify
  928. special kinds of buffers. See |special-buffers|.
  929. *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85*
  930. 'buflisted' 'bl' boolean (default: on)
  931. local to buffer
  932. When this option is set, the buffer shows up in the buffer list. If
  933. it is reset it is not used for ":bnext", "ls", the Buffers menu, etc.
  934. This option is reset by Vim for buffers that are only used to remember
  935. a file name or marks. Vim sets it when starting to edit a buffer.
  936. But not when moving to a buffer with ":buffer".
  937. *'buftype'* *'bt'* *E382*
  938. 'buftype' 'bt' string (default: "")
  939. local to buffer
  940. The value of this option specifies the type of a buffer:
  941. <empty> normal buffer
  942. acwrite buffer will always be written with |BufWriteCmd|s
  943. help help buffer (do not set this manually)
  944. nofile buffer is not related to a file, will not be written
  945. nowrite buffer will not be written
  946. quickfix list of errors |:cwindow| or locations |:lwindow|
  947. terminal |terminal-emulator| buffer
  948. This option is used together with 'bufhidden' and 'swapfile' to
  949. specify special kinds of buffers. See |special-buffers|.
  950. Be careful with changing this option, it can have many side effects!
  951. A "quickfix" buffer is only used for the error list and the location
  952. list. This value is set by the |:cwindow| and |:lwindow| commands and
  953. you are not supposed to change it.
  954. "nofile" and "nowrite" buffers are similar:
  955. both: The buffer is not to be written to disk, ":w" doesn't
  956. work (":w filename" does work though).
  957. both: The buffer is never considered to be |'modified'|.
  958. There is no warning when the changes will be lost, for
  959. example when you quit Vim.
  960. both: A swap file is only created when using too much memory
  961. (when 'swapfile' has been reset there is never a swap
  962. file).
  963. nofile only: The buffer name is fixed, it is not handled like a
  964. file name. It is not modified in response to a |:cd|
  965. command.
  966. both: When using ":e bufname" and already editing "bufname"
  967. the buffer is made empty and autocommands are
  968. triggered as usual for |:edit|.
  969. *E676*
  970. "acwrite" implies that the buffer name is not related to a file, like
  971. "nofile", but it will be written. Thus, in contrast to "nofile" and
  972. "nowrite", ":w" does work and a modified buffer can't be abandoned
  973. without saving. For writing there must be matching |BufWriteCmd|,
  974. |FileWriteCmd| or |FileAppendCmd| autocommands.
  975. *'casemap'* *'cmp'*
  976. 'casemap' 'cmp' string (default: "internal,keepascii")
  977. global
  978. Specifies details about changing the case of letters. It may contain
  979. these words, separated by a comma:
  980. internal Use internal case mapping functions, the current
  981. locale does not change the case mapping. When
  982. "internal" is omitted, the towupper() and towlower()
  983. system library functions are used when available.
  984. keepascii For the ASCII characters (0x00 to 0x7f) use the US
  985. case mapping, the current locale is not effective.
  986. This probably only matters for Turkish.
  987. *'cdpath'* *'cd'* *E344* *E346*
  988. 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
  989. global
  990. This is a list of directories which will be searched when using the
  991. |:cd| and |:lcd| commands, provided that the directory being searched
  992. for has a relative path, not an absolute part starting with "/", "./"
  993. or "../", the 'cdpath' option is not used then.
  994. The 'cdpath' option's value has the same form and semantics as
  995. |'path'|. Also see |file-searching|.
  996. The default value is taken from $CDPATH, with a "," prepended to look
  997. in the current directory first.
  998. If the default value taken from $CDPATH is not what you want, include
  999. a modified version of the following command in your vimrc file to
  1000. override it: >
  1001. :let &cdpath = ',' . substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
  1002. < This option cannot be set from a |modeline| or in the |sandbox|, for
  1003. security reasons.
  1004. (parts of 'cdpath' can be passed to the shell to expand file names).
  1005. *'cedit'*
  1006. 'cedit' string (Vim default: CTRL-F, Vi default: "")
  1007. global
  1008. The key used in Command-line Mode to open the command-line window.
  1009. Only non-printable keys are allowed.
  1010. The key can be specified as a single character, but it is difficult to
  1011. type. The preferred way is to use the <> notation. Examples: >
  1012. :exe "set cedit=\<C-Y>"
  1013. :exe "set cedit=\<Esc>"
  1014. < |Nvi| also has this option, but it only uses the first character.
  1015. See |cmdwin|.
  1016. *'channel'*
  1017. 'channel' number (default: 0)
  1018. local to buffer
  1019. |channel| connected to the buffer, or 0 if no channel is connected.
  1020. In a |:terminal| buffer this is the terminal channel.
  1021. Read-only.
  1022. *'charconvert'* *'ccv'* *E202* *E214* *E513*
  1023. 'charconvert' 'ccv' string (default "")
  1024. global
  1025. An expression that is used for character encoding conversion. It is
  1026. evaluated when a file that is to be read or has been written has a
  1027. different encoding from what is desired.
  1028. 'charconvert' is not used when the internal iconv() function is
  1029. supported and is able to do the conversion. Using iconv() is
  1030. preferred, because it is much faster.
  1031. 'charconvert' is not used when reading stdin |--|, because there is no
  1032. file to convert from. You will have to save the text in a file first.
  1033. The expression must return zero or an empty string for success,
  1034. non-zero for failure.
  1035. See |encoding-names| for possible encoding names.
  1036. Additionally, names given in 'fileencodings' and 'fileencoding' are
  1037. used.
  1038. Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8"
  1039. is done internally by Vim, 'charconvert' is not used for this.
  1040. Also used for Unicode conversion.
  1041. Example: >
  1042. set charconvert=CharConvert()
  1043. fun CharConvert()
  1044. system("recode "
  1045. \ . v:charconvert_from . ".." . v:charconvert_to
  1046. \ . " <" . v:fname_in . " >" v:fname_out)
  1047. return v:shell_error
  1048. endfun
  1049. < The related Vim variables are:
  1050. v:charconvert_from name of the current encoding
  1051. v:charconvert_to name of the desired encoding
  1052. v:fname_in name of the input file
  1053. v:fname_out name of the output file
  1054. Note that v:fname_in and v:fname_out will never be the same.
  1055. This option cannot be set from a |modeline| or in the |sandbox|, for
  1056. security reasons.
  1057. *'cindent'* *'cin'* *'nocindent'* *'nocin'*
  1058. 'cindent' 'cin' boolean (default off)
  1059. local to buffer
  1060. Enables automatic C program indenting. See 'cinkeys' to set the keys
  1061. that trigger reindenting in insert mode and 'cinoptions' to set your
  1062. preferred indent style.
  1063. If 'indentexpr' is not empty, it overrules 'cindent'.
  1064. If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty,
  1065. the "=" operator indents using this algorithm rather than calling an
  1066. external program.
  1067. See |C-indenting|.
  1068. When you don't like the way 'cindent' works, try the 'smartindent'
  1069. option or 'indentexpr'.
  1070. This option is not used when 'paste' is set.
  1071. *'cinkeys'* *'cink'*
  1072. 'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
  1073. local to buffer
  1074. A list of keys that, when typed in Insert mode, cause reindenting of
  1075. the current line. Only used if 'cindent' is on and 'indentexpr' is
  1076. empty.
  1077. For the format of this option see |cinkeys-format|.
  1078. See |C-indenting|.
  1079. *'cinoptions'* *'cino'*
  1080. 'cinoptions' 'cino' string (default "")
  1081. local to buffer
  1082. The 'cinoptions' affect the way 'cindent' reindents lines in a C
  1083. program. See |cinoptions-values| for the values of this option, and
  1084. |C-indenting| for info on C indenting in general.
  1085. *'cinwords'* *'cinw'*
  1086. 'cinwords' 'cinw' string (default "if,else,while,do,for,switch")
  1087. local to buffer
  1088. These keywords start an extra indent in the next line when
  1089. 'smartindent' or 'cindent' is set. For 'cindent' this is only done at
  1090. an appropriate place (inside {}).
  1091. Note that 'ignorecase' isn't used for 'cinwords'. If case doesn't
  1092. matter, include the keyword both the uppercase and lowercase:
  1093. "if,If,IF".
  1094. *'clipboard'* *'cb'*
  1095. 'clipboard' 'cb' string (default "")
  1096. global
  1097. This option is a list of comma separated names.
  1098. These names are recognized:
  1099. *clipboard-unnamed*
  1100. unnamed When included, Vim will use the clipboard register '*'
  1101. for all yank, delete, change and put operations which
  1102. would normally go to the unnamed register. When a
  1103. register is explicitly specified, it will always be
  1104. used regardless of whether "unnamed" is in 'clipboard'
  1105. or not. The clipboard register can always be
  1106. explicitly accessed using the "* notation. Also see
  1107. |clipboard|.
  1108. *clipboard-unnamedplus*
  1109. unnamedplus A variant of the "unnamed" flag which uses the
  1110. clipboard register '+' (|quoteplus|) instead of
  1111. register '*' for all yank, delete, change and put
  1112. operations which would normally go to the unnamed
  1113. register. When "unnamed" is also included to the
  1114. option, yank and delete operations (but not put)
  1115. will additionally copy the text into register
  1116. '*'. See |clipboard|.
  1117. *'cmdheight'* *'ch'*
  1118. 'cmdheight' 'ch' number (default 1)
  1119. global
  1120. Number of screen lines to use for the command-line. Helps avoiding
  1121. |hit-enter| prompts.
  1122. The value of this option is stored with the tab page, so that each tab
  1123. page can have a different value.
  1124. *'cmdwinheight'* *'cwh'*
  1125. 'cmdwinheight' 'cwh' number (default 7)
  1126. global
  1127. Number of screen lines to use for the command-line window. |cmdwin|
  1128. *'colorcolumn'* *'cc'*
  1129. 'colorcolumn' 'cc' string (default "")
  1130. local to window
  1131. 'colorcolumn' is a comma separated list of screen columns that are
  1132. highlighted with ColorColumn |hl-ColorColumn|. Useful to align
  1133. text. Will make screen redrawing slower.
  1134. The screen column can be an absolute number, or a number preceded with
  1135. '+' or '-', which is added to or subtracted from 'textwidth'. >
  1136. :set cc=+1 " highlight column after 'textwidth'
  1137. :set cc=+1,+2,+3 " highlight three columns after 'textwidth'
  1138. :hi ColorColumn ctermbg=lightgrey guibg=lightgrey
  1139. <
  1140. When 'textwidth' is zero then the items with '-' and '+' are not used.
  1141. A maximum of 256 columns are highlighted.
  1142. *'columns'* *'co'* *E594*
  1143. 'columns' 'co' number (default 80 or terminal width)
  1144. global
  1145. Number of columns of the screen. Normally this is set by the terminal
  1146. initialization and does not have to be set by hand.
  1147. When Vim is running in the GUI or in a resizable window, setting this
  1148. option will cause the window size to be changed. When you only want
  1149. to use the size for the GUI, put the command in your |ginit.vim| file.
  1150. When you set this option and Vim is unable to change the physical
  1151. number of columns of the display, the display may be messed up. For
  1152. the GUI it is always possible and Vim limits the number of columns to
  1153. what fits on the screen. You can use this command to get the widest
  1154. window possible: >
  1155. :set columns=9999
  1156. < Minimum value is 12, maximum value is 10000.
  1157. *'comments'* *'com'* *E524* *E525*
  1158. 'comments' 'com' string (default
  1159. "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
  1160. local to buffer
  1161. A comma separated list of strings that can start a comment line. See
  1162. |format-comments|. See |option-backslash| about using backslashes to
  1163. insert a space.
  1164. *'commentstring'* *'cms'* *E537*
  1165. 'commentstring' 'cms' string (default "/*%s*/")
  1166. local to buffer
  1167. A template for a comment. The "%s" in the value is replaced with the
  1168. comment text. Currently only used to add markers for folding, see
  1169. |fold-marker|.
  1170. *'complete'* *'cpt'* *E535*
  1171. 'complete' 'cpt' string (default: ".,w,b,u,t")
  1172. local to buffer
  1173. This option specifies how keyword completion |ins-completion| works
  1174. when CTRL-P or CTRL-N are used. It is also used for whole-line
  1175. completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
  1176. and the places to scan. It is a comma separated list of flags:
  1177. . scan the current buffer ('wrapscan' is ignored)
  1178. w scan buffers from other windows
  1179. b scan other loaded buffers that are in the buffer list
  1180. u scan the unloaded buffers that are in the buffer list
  1181. U scan the buffers that are not in the buffer list
  1182. k scan the files given with the 'dictionary' option
  1183. kspell use the currently active spell checking |spell|
  1184. k{dict} scan the file {dict}. Several "k" flags can be given,
  1185. patterns are valid too. For example: >
  1186. :set cpt=k/usr/dict/*,k~/spanish
  1187. < s scan the files given with the 'thesaurus' option
  1188. s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns
  1189. are valid too.
  1190. i scan current and included files
  1191. d scan current and included files for defined name or macro
  1192. |i_CTRL-X_CTRL-D|
  1193. ] tag completion
  1194. t same as "]"
  1195. Unloaded buffers are not loaded, thus their autocmds |:autocmd| are
  1196. not executed, this may lead to unexpected completions from some files
  1197. (gzipped files for example). Unloaded buffers are not scanned for
  1198. whole-line completion.
  1199. As you can see, CTRL-N and CTRL-P can be used to do any 'iskeyword'-
  1200. based expansion (e.g., dictionary |i_CTRL-X_CTRL-K|, included patterns
  1201. |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions).
  1202. *'completefunc'* *'cfu'*
  1203. 'completefunc' 'cfu' string (default: empty)
  1204. local to buffer
  1205. This option specifies a function to be used for Insert mode completion
  1206. with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
  1207. See |complete-functions| for an explanation of how the function is
  1208. invoked and what it should return.
  1209. This option cannot be set from a |modeline| or in the |sandbox|, for
  1210. security reasons.
  1211. *'completeopt'* *'cot'*
  1212. 'completeopt' 'cot' string (default: "menu,preview")
  1213. global
  1214. A comma separated list of options for Insert mode completion
  1215. |ins-completion|. The supported values are:
  1216. menu Use a popup menu to show the possible completions. The
  1217. menu is only shown when there is more than one match and
  1218. sufficient colors are available. |ins-completion-menu|
  1219. menuone Use the popup menu also when there is only one match.
  1220. Useful when there is additional information about the
  1221. match, e.g., what file it comes from.
  1222. longest Only insert the longest common text of the matches. If
  1223. the menu is displayed you can use CTRL-L to add more
  1224. characters. Whether case is ignored depends on the kind
  1225. of completion. For buffer text the 'ignorecase' option is
  1226. used.
  1227. preview Show extra information about the currently selected
  1228. completion in the preview window. Only works in
  1229. combination with "menu" or "menuone".
  1230. noinsert Do not insert any text for a match until the user selects
  1231. a match from the menu. Only works in combination with
  1232. "menu" or "menuone". No effect if "longest" is present.
  1233. noselect Do not select a match in the menu, force the user to
  1234. select one from the menu. Only works in combination with
  1235. "menu" or "menuone".
  1236. *'concealcursor'* *'cocu'*
  1237. 'concealcursor' 'cocu' string (default: "")
  1238. local to window
  1239. Sets the modes in which text in the cursor line can also be concealed.
  1240. When the current mode is listed then concealing happens just like in
  1241. other lines.
  1242. n Normal mode
  1243. v Visual mode
  1244. i Insert mode
  1245. c Command line editing, for 'incsearch'
  1246. 'v' applies to all lines in the Visual area, not only the cursor.
  1247. A useful value is "nc". This is used in help files. So long as you
  1248. are moving around text is concealed, but when starting to insert text
  1249. or selecting a Visual area the concealed text is displayed, so that
  1250. you can see what you are doing.
  1251. Keep in mind that the cursor position is not always where it's
  1252. displayed. E.g., when moving vertically it may change column.
  1253. *'conceallevel'* *'cole'*
  1254. 'conceallevel' 'cole' number (default 0)
  1255. local to window
  1256. Determine how text with the "conceal" syntax attribute |:syn-conceal|
  1257. is shown:
  1258. Value Effect ~
  1259. 0 Text is shown normally
  1260. 1 Each block of concealed text is replaced with one
  1261. character. If the syntax item does not have a custom
  1262. replacement character defined (see |:syn-cchar|) the
  1263. character defined in 'listchars' is used.
  1264. It is highlighted with the "Conceal" highlight group.
  1265. 2 Concealed text is completely hidden unless it has a
  1266. custom replacement character defined (see
  1267. |:syn-cchar|).
  1268. 3 Concealed text is completely hidden.
  1269. Note: in the cursor line concealed text is not hidden, so that you can
  1270. edit and copy the text. This can be changed with the 'concealcursor'
  1271. option.
  1272. *'confirm'* *'cf'* *'noconfirm'* *'nocf'*
  1273. 'confirm' 'cf' boolean (default off)
  1274. global
  1275. When 'confirm' is on, certain operations that would normally
  1276. fail because of unsaved changes to a buffer, e.g. ":q" and ":e",
  1277. instead raise a dialog asking if you wish to save the current
  1278. file(s). You can still use a ! to unconditionally |abandon| a buffer.
  1279. If 'confirm' is off you can still activate confirmation for one
  1280. command only (this is most useful in mappings) with the |:confirm|
  1281. command.
  1282. Also see the |confirm()| function and the 'v' flag in 'guioptions'.
  1283. *'copyindent'* *'ci'* *'nocopyindent'* *'noci'*
  1284. 'copyindent' 'ci' boolean (default off)
  1285. local to buffer
  1286. Copy the structure of the existing lines indent when autoindenting a
  1287. new line. Normally the new indent is reconstructed by a series of
  1288. tabs followed by spaces as required (unless |'expandtab'| is enabled,
  1289. in which case only spaces are used). Enabling this option makes the
  1290. new line copy whatever characters were used for indenting on the
  1291. existing line. 'expandtab' has no effect on these characters, a Tab
  1292. remains a Tab. If the new indent is greater than on the existing
  1293. line, the remaining space is filled in the normal manner.
  1294. See 'preserveindent'.
  1295. *'cpoptions'* *'cpo'* *cpo*
  1296. 'cpoptions' 'cpo' string (Vim default: "aABceFs",
  1297. Vi default: all flags)
  1298. global
  1299. A sequence of single character flags. When a character is present
  1300. this indicates Vi-compatible behavior. This is used for things where
  1301. not being Vi-compatible is mostly or sometimes preferred.
  1302. 'cpoptions' stands for "compatible-options".
  1303. Commas can be added for readability.
  1304. To avoid problems with flags that are added in the future, use the
  1305. "+=" and "-=" feature of ":set" |add-option-flags|.
  1306. contains behavior ~
  1307. *cpo-a*
  1308. a When included, a ":read" command with a file name
  1309. argument will set the alternate file name for the
  1310. current window.
  1311. *cpo-A*
  1312. A When included, a ":write" command with a file name
  1313. argument will set the alternate file name for the
  1314. current window.
  1315. *cpo-b*
  1316. b "\|" in a ":map" command is recognized as the end of
  1317. the map command. The '\' is included in the mapping,
  1318. the text after the '|' is interpreted as the next
  1319. command. Use a CTRL-V instead of a backslash to
  1320. include the '|' in the mapping. Applies to all
  1321. mapping, abbreviation, menu and autocmd commands.
  1322. See also |map_bar|.
  1323. *cpo-B*
  1324. B A backslash has no special meaning in mappings,
  1325. abbreviations, user commands and the "to" part of the
  1326. menu commands. Remove this flag to be able to use a
  1327. backslash like a CTRL-V. For example, the command
  1328. ":map X \<Esc>" results in X being mapped to:
  1329. 'B' included: "\^[" (^[ is a real <Esc>)
  1330. 'B' excluded: "<Esc>" (5 characters)
  1331. *cpo-c*
  1332. c Searching continues at the end of any match at the
  1333. cursor position, but not further than the start of the
  1334. next line. When not present searching continues
  1335. one character from the cursor position. With 'c'
  1336. "abababababab" only gets three matches when repeating
  1337. "/abab", without 'c' there are five matches.
  1338. *cpo-C*
  1339. C Do not concatenate sourced lines that start with a
  1340. backslash. See |line-continuation|.
  1341. *cpo-d*
  1342. d Using "./" in the 'tags' option doesn't mean to use
  1343. the tags file relative to the current file, but the
  1344. tags file in the current directory.
  1345. *cpo-D*
  1346. D Can't use CTRL-K to enter a digraph after Normal mode
  1347. commands with a character argument, like |r|, |f| and
  1348. |t|.
  1349. *cpo-e*
  1350. e When executing a register with ":@r", always add a
  1351. <CR> to the last line, also when the register is not
  1352. linewise. If this flag is not present, the register
  1353. is not linewise and the last line does not end in a
  1354. <CR>, then the last line is put on the command-line
  1355. and can be edited before hitting <CR>.
  1356. *cpo-E*
  1357. E It is an error when using "y", "d", "c", "g~", "gu" or
  1358. "gU" on an Empty region. The operators only work when
  1359. at least one character is to be operated on. Example:
  1360. This makes "y0" fail in the first column.
  1361. *cpo-f*
  1362. f When included, a ":read" command with a file name
  1363. argument will set the file name for the current buffer,
  1364. if the current buffer doesn't have a file name yet.
  1365. *cpo-F*
  1366. F When included, a ":write" command with a file name
  1367. argument will set the file name for the current
  1368. buffer, if the current buffer doesn't have a file name
  1369. yet. Also see |cpo-P|.
  1370. *cpo-i*
  1371. i When included, interrupting the reading of a file will
  1372. leave it modified.
  1373. *cpo-I*
  1374. I When moving the cursor up or down just after inserting
  1375. indent for 'autoindent', do not delete the indent.
  1376. *cpo-J*
  1377. J A |sentence| has to be followed by two spaces after
  1378. the '.', '!' or '?'. A <Tab> is not recognized as
  1379. white space.
  1380. *cpo-K*
  1381. K Don't wait for a key code to complete when it is
  1382. halfway through a mapping. This breaks mapping
  1383. <F1><F1> when only part of the second <F1> has been
  1384. read. It enables cancelling the mapping by typing
  1385. <F1><Esc>.
  1386. *cpo-l*
  1387. l Backslash in a [] range in a search pattern is taken
  1388. literally, only "\]", "\^", "\-" and "\\" are special.
  1389. See |/[]|
  1390. 'l' included: "/[ \t]" finds <Space>, '\' and 't'
  1391. 'l' excluded: "/[ \t]" finds <Space> and <Tab>
  1392. *cpo-L*
  1393. L When the 'list' option is set, 'wrapmargin',
  1394. 'textwidth', 'softtabstop' and Virtual Replace mode
  1395. (see |gR|) count a <Tab> as two characters, instead of
  1396. the normal behavior of a <Tab>.
  1397. *cpo-m*
  1398. m When included, a showmatch will always wait half a
  1399. second. When not included, a showmatch will wait half
  1400. a second or until a character is typed. |'showmatch'|
  1401. *cpo-M*
  1402. M When excluded, "%" matching will take backslashes into
  1403. account. Thus in "( \( )" and "\( ( \)" the outer
  1404. parenthesis match. When included "%" ignores
  1405. backslashes, which is Vi compatible.
  1406. *cpo-n*
  1407. n When included, the column used for 'number' and
  1408. 'relativenumber' will also be used for text of wrapped
  1409. lines.
  1410. *cpo-o*
  1411. o Line offset to search command is not remembered for
  1412. next search.
  1413. *cpo-O*
  1414. O Don't complain if a file is being overwritten, even
  1415. when it didn't exist when editing it. This is a
  1416. protection against a file unexpectedly created by
  1417. someone else. Vi didn't complain about this.
  1418. *cpo-p*
  1419. p Vi compatible Lisp indenting. When not present, a
  1420. slightly better algorithm is used.
  1421. *cpo-P*
  1422. P When included, a ":write" command that appends to a
  1423. file will set the file name for the current buffer, if
  1424. the current buffer doesn't have a file name yet and
  1425. the 'F' flag is also included |cpo-F|.
  1426. *cpo-q*
  1427. q When joining multiple lines leave the cursor at the
  1428. position where it would be when joining two lines.
  1429. *cpo-r*
  1430. r Redo ("." command) uses "/" to repeat a search
  1431. command, instead of the actually used search string.
  1432. *cpo-R*
  1433. R Remove marks from filtered lines. Without this flag
  1434. marks are kept like |:keepmarks| was used.
  1435. *cpo-s*
  1436. s Set buffer options when entering the buffer for the
  1437. first time. This is like it is in Vim version 3.0.
  1438. And it is the default. If not present the options are
  1439. set when the buffer is created.
  1440. *cpo-S*
  1441. S Set buffer options always when entering a buffer
  1442. (except 'readonly', 'fileformat', 'filetype' and
  1443. 'syntax'). This is the (most) Vi compatible setting.
  1444. The options are set to the values in the current
  1445. buffer. When you change an option and go to another
  1446. buffer, the value is copied. Effectively makes the
  1447. buffer options global to all buffers.
  1448. 's' 'S' copy buffer options
  1449. no no when buffer created
  1450. yes no when buffer first entered (default)
  1451. X yes each time when buffer entered (vi comp.)
  1452. *cpo-t*
  1453. t Search pattern for the tag command is remembered for
  1454. "n" command. Otherwise Vim only puts the pattern in
  1455. the history for search pattern, but doesn't change the
  1456. last used search pattern.
  1457. *cpo-u*
  1458. u Undo is Vi compatible. See |undo-two-ways|.
  1459. *cpo-v*
  1460. v Backspaced characters remain visible on the screen in
  1461. Insert mode. Without this flag the characters are
  1462. erased from the screen right away. With this flag the
  1463. screen newly typed text overwrites backspaced
  1464. characters.
  1465. *cpo-W*
  1466. W Don't overwrite a readonly file. When omitted, ":w!"
  1467. overwrites a readonly file, if possible.
  1468. *cpo-x*
  1469. x <Esc> on the command-line executes the command-line.
  1470. The default in Vim is to abandon the command-line,
  1471. because <Esc> normally aborts a command. |c_<Esc>|
  1472. *cpo-X*
  1473. X When using a count with "R" the replaced text is
  1474. deleted only once. Also when repeating "R" with "."
  1475. and a count.
  1476. *cpo-y*
  1477. y A yank command can be redone with ".".
  1478. *cpo-Z*
  1479. Z When using "w!" while the 'readonly' option is set,
  1480. don't reset 'readonly'.
  1481. *cpo-!*
  1482. ! When redoing a filter command, use the last used
  1483. external command, whatever it was. Otherwise the last
  1484. used -filter- command is used.
  1485. *cpo-$*
  1486. $ When making a change to one line, don't redisplay the
  1487. line, but put a '$' at the end of the changed text.
  1488. The changed text will be overwritten when you type the
  1489. new text. The line is redisplayed if you type any
  1490. command that moves the cursor from the insertion
  1491. point.
  1492. *cpo-%*
  1493. % Vi-compatible matching is done for the "%" command.
  1494. Does not recognize "#if", "#endif", etc.
  1495. Does not recognize "/*" and "*/".
  1496. Parens inside single and double quotes are also
  1497. counted, causing a string that contains a paren to
  1498. disturb the matching. For example, in a line like
  1499. "if (strcmp("foo(", s))" the first paren does not
  1500. match the last one. When this flag is not included,
  1501. parens inside single and double quotes are treated
  1502. specially. When matching a paren outside of quotes,
  1503. everything inside quotes is ignored. When matching a
  1504. paren inside quotes, it will find the matching one (if
  1505. there is one). This works very well for C programs.
  1506. This flag is also used for other features, such as
  1507. C-indenting.
  1508. *cpo-+*
  1509. + When included, a ":write file" command will reset the
  1510. 'modified' flag of the buffer, even though the buffer
  1511. itself may still be different from its file.
  1512. *cpo->*
  1513. > When appending to a register, put a line break before
  1514. the appended text.
  1515. *cpo-;*
  1516. ; When using |,| or |;| to repeat the last |t| search
  1517. and the cursor is right in front of the searched
  1518. character, the cursor won't move. When not included,
  1519. the cursor would skip over it and jump to the
  1520. following occurrence.
  1521. *cpo-_*
  1522. _ When using |cw| on a word, do not include the
  1523. whitespace following the word in the motion.
  1524. *'cscopepathcomp'* *'cspc'*
  1525. 'cscopepathcomp' 'cspc' number (default 0)
  1526. global
  1527. Determines how many components of the path to show in a list of tags.
  1528. See |cscopepathcomp|.
  1529. *'cscopeprg'* *'csprg'*
  1530. 'cscopeprg' 'csprg' string (default "cscope")
  1531. global
  1532. Specifies the command to execute cscope. See |cscopeprg|.
  1533. This option cannot be set from a |modeline| or in the |sandbox|, for
  1534. security reasons.
  1535. *'cscopequickfix'* *'csqf'*
  1536. 'cscopequickfix' 'csqf' string (default "")
  1537. global
  1538. Specifies whether to use quickfix window to show cscope results.
  1539. See |cscopequickfix|.
  1540. *'cscoperelative'* *'csre'* *'nocscoperelative'* *'nocsre'*
  1541. 'cscoperelative' 'csre' boolean (default off)
  1542. global
  1543. In the absence of a prefix (-P) for cscope. setting this option enables
  1544. to use the basename of cscope.out path as the prefix.
  1545. See |cscoperelative|.
  1546. *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
  1547. 'cscopetag' 'cst' boolean (default off)
  1548. global
  1549. Use cscope for tag commands. See |cscope-options|.
  1550. *'cscopetagorder'* *'csto'*
  1551. 'cscopetagorder' 'csto' number (default 0)
  1552. global
  1553. Determines the order in which ":cstag" performs a search. See
  1554. |cscopetagorder|.
  1555. *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'*
  1556. 'cursorbind' 'crb' boolean (default off)
  1557. local to window
  1558. When this option is set, as the cursor in the current
  1559. window moves other cursorbound windows (windows that also have
  1560. this option set) move their cursors to the corresponding line and
  1561. column. This option is useful for viewing the
  1562. differences between two versions of a file (see 'diff'); in diff mode,
  1563. inserted and deleted lines (though not characters within a line) are
  1564. taken into account.
  1565. *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
  1566. 'cursorcolumn' 'cuc' boolean (default off)
  1567. local to window
  1568. Highlight the screen column of the cursor with CursorColumn
  1569. |hl-CursorColumn|. Useful to align text. Will make screen redrawing
  1570. slower.
  1571. If you only want the highlighting in the current window you can use
  1572. these autocommands: >
  1573. au WinLeave * set nocursorline nocursorcolumn
  1574. au WinEnter * set cursorline cursorcolumn
  1575. <
  1576. *'cursorline'* *'cul'* *'nocursorline'* *'nocul'*
  1577. 'cursorline' 'cul' boolean (default off)
  1578. local to window
  1579. Highlight the screen line of the cursor with CursorLine
  1580. |hl-CursorLine|. Useful to easily spot the cursor. Will make screen
  1581. redrawing slower.
  1582. When Visual mode is active the highlighting isn't used to make it
  1583. easier to see the selected text.
  1584. *'debug'*
  1585. 'debug' string (default "")
  1586. global
  1587. These values can be used:
  1588. msg Error messages that would otherwise be omitted will be given
  1589. anyway.
  1590. throw Error messages that would otherwise be omitted will be given
  1591. anyway and also throw an exception and set |v:errmsg|.
  1592. beep A message will be given when otherwise only a beep would be
  1593. produced.
  1594. The values can be combined, separated by a comma.
  1595. "msg" and "throw" are useful for debugging 'foldexpr', 'formatexpr' or
  1596. 'indentexpr'.
  1597. *'define'* *'def'*
  1598. 'define' 'def' string (default "^\s*#\s*define")
  1599. global or local to buffer |global-local|
  1600. Pattern to be used to find a macro definition. It is a search
  1601. pattern, just like for the "/" command. This option is used for the
  1602. commands like "[i" and "[d" |include-search|. The 'isident' option is
  1603. used to recognize the defined name after the match:
  1604. {match with 'define'}{non-ID chars}{defined name}{non-ID char}
  1605. See |option-backslash| about inserting backslashes to include a space
  1606. or backslash.
  1607. The default value is for C programs. For C++ this value would be
  1608. useful, to include const type declarations: >
  1609. ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
  1610. < When using the ":set" command, you need to double the backslashes!
  1611. *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
  1612. 'delcombine' 'deco' boolean (default off)
  1613. global
  1614. If editing Unicode and this option is set, backspace and Normal mode
  1615. "x" delete each combining character on its own. When it is off (the
  1616. default) the character along with its combining characters are
  1617. deleted.
  1618. Note: When 'delcombine' is set "xx" may work different from "2x"!
  1619. This is useful for Arabic, Hebrew and many other languages where one
  1620. may have combining characters overtop of base characters, and want
  1621. to remove only the combining ones.
  1622. *'dictionary'* *'dict'*
  1623. 'dictionary' 'dict' string (default "")
  1624. global or local to buffer |global-local|
  1625. List of file names, separated by commas, that are used to lookup words
  1626. for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should
  1627. contain a list of words. This can be one word per line, or several
  1628. words per line, separated by non-keyword characters (white space is
  1629. preferred). Maximum line length is 510 bytes.
  1630. When this option is empty or an entry "spell" is present, and spell
  1631. checking is enabled, words in the word lists for the currently active
  1632. 'spelllang' are used. See |spell|.
  1633. To include a comma in a file name precede it with a backslash. Spaces
  1634. after a comma are ignored, otherwise spaces are included in the file
  1635. name. See |option-backslash| about using backslashes.
  1636. This has nothing to do with the |Dictionary| variable type.
  1637. Where to find a list of words?
  1638. - BSD/macOS include the "/usr/share/dict/words" file.
  1639. - Try "apt install spell" to get the "/usr/share/dict/words" file on
  1640. apt-managed systems (Debian/Ubuntu).
  1641. The use of |:set+=| and |:set-=| is preferred when adding or removing
  1642. directories from the list. This avoids problems when a future version
  1643. uses another default.
  1644. Backticks cannot be used in this option for security reasons.
  1645. *'diff'* *'nodiff'*
  1646. 'diff' boolean (default off)
  1647. local to window
  1648. Join the current window in the group of windows that shows differences
  1649. between files. See |diff-mode|.
  1650. *'dex'* *'diffexpr'*
  1651. 'diffexpr' 'dex' string (default "")
  1652. global
  1653. Expression which is evaluated to obtain a diff file (either ed-style
  1654. or unified-style) from two versions of a file. See |diff-diffexpr|.
  1655. This option cannot be set from a |modeline| or in the |sandbox|, for
  1656. security reasons.
  1657. *'dip'* *'diffopt'*
  1658. 'diffopt' 'dip' string (default "internal,filler")
  1659. global
  1660. Option settings for diff mode. It can consist of the following items.
  1661. All are optional. Items must be separated by a comma.
  1662. filler Show filler lines, to keep the text
  1663. synchronized with a window that has inserted
  1664. lines at the same position. Mostly useful
  1665. when windows are side-by-side and 'scrollbind'
  1666. is set.
  1667. context:{n} Use a context of {n} lines between a change
  1668. and a fold that contains unchanged lines.
  1669. When omitted a context of six lines is used.
  1670. See |fold-diff|.
  1671. iblank Ignore changes where lines are all blank. Adds
  1672. the "-B" flag to the "diff" command if
  1673. 'diffexpr' is empty. Check the documentation
  1674. of the "diff" command for what this does
  1675. exactly.
  1676. NOTE: the diff windows will get out of sync,
  1677. because no differences between blank lines are
  1678. taken into account.
  1679. icase Ignore changes in case of text. "a" and "A"
  1680. are considered the same. Adds the "-i" flag
  1681. to the "diff" command if 'diffexpr' is empty.
  1682. iwhite Ignore changes in amount of white space. Adds
  1683. the "-b" flag to the "diff" command if
  1684. 'diffexpr' is empty. Check the documentation
  1685. of the "diff" command for what this does
  1686. exactly. It should ignore adding trailing
  1687. white space, but not leading white space.
  1688. iwhiteall Ignore all white space changes. Adds
  1689. the "-w" flag to the "diff" command if
  1690. 'diffexpr' is empty. Check the documentation
  1691. of the "diff" command for what this does
  1692. exactly.
  1693. iwhiteeol Ignore white space changes at end of line.
  1694. Adds the "-Z" flag to the "diff" command if
  1695. 'diffexpr' is empty. Check the documentation
  1696. of the "diff" command for what this does
  1697. exactly.
  1698. horizontal Start diff mode with horizontal splits (unless
  1699. explicitly specified otherwise).
  1700. vertical Start diff mode with vertical splits (unless
  1701. explicitly specified otherwise).
  1702. hiddenoff Do not use diff mode for a buffer when it
  1703. becomes hidden.
  1704. foldcolumn:{n} Set the 'foldcolumn' option to {n} when
  1705. starting diff mode. Without this 2 is used.
  1706. internal Use the internal diff library. This is
  1707. ignored when 'diffexpr' is set. *E960*
  1708. When running out of memory when writing a
  1709. buffer this item will be ignored for diffs
  1710. involving that buffer. Set the 'verbose'
  1711. option to see when this happens.
  1712. indent-heuristic
  1713. Use the indent heuristic for the internal
  1714. diff library.
  1715. algorithm:{text} Use the specified diff algorithm with the
  1716. internal diff engine. Currently supported
  1717. algorithms are:
  1718. myers the default algorithm
  1719. minimal spend extra time to generate the
  1720. smallest possible diff
  1721. patience patience diff algorithm
  1722. histogram histogram diff algorithm
  1723. Examples: >
  1724. :set diffopt=internal,filler,context:4
  1725. :set diffopt=
  1726. :set diffopt=internal,filler,foldcolumn:3
  1727. :set diffopt-=internal " do NOT use the internal diff parser
  1728. <
  1729. *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
  1730. 'digraph' 'dg' boolean (default off)
  1731. global
  1732. Enable the entering of digraphs in Insert mode with {char1} <BS>
  1733. {char2}. See |digraphs|.
  1734. *'directory'* *'dir'*
  1735. 'directory' 'dir' string (default "$XDG_DATA_HOME/nvim/swap//")
  1736. global
  1737. List of directory names for the swap file, separated with commas.
  1738. - The swap file will be created in the first directory where this is
  1739. possible. If it is not possible in any directory, but last
  1740. directory listed in the option does not exist, it is created.
  1741. - Empty means that no swap file will be used (recovery is
  1742. impossible!).
  1743. - A directory "." means to put the swap file in the same directory as
  1744. the edited file. On Unix, a dot is prepended to the file name, so
  1745. it doesn't show in a directory listing. On MS-Windows the "hidden"
  1746. attribute is set and a dot prepended if possible.
  1747. - A directory starting with "./" (or ".\" for Windows) means to
  1748. put the swap file relative to where the edited file is. The leading
  1749. "." is replaced with the path name of the edited file.
  1750. - For Unix and Win32, if a directory ends in two path separators "//"
  1751. or "\\", the swap file name will be built from the complete path to
  1752. the file with all path separators substituted to percent '%' signs.
  1753. This will ensure file name uniqueness in the preserve directory.
  1754. On Win32, when a separating comma is following, you must use "//",
  1755. since "\\" will include the comma in the file name.
  1756. - Spaces after the comma are ignored, other spaces are considered part
  1757. of the directory name. To have a space at the start of a directory
  1758. name, precede it with a backslash.
  1759. - To include a comma in a directory name precede it with a backslash.
  1760. - A directory name may end in an ':' or '/'.
  1761. - Environment variables are expanded |:set_env|.
  1762. - Careful with '\' characters, type one before a space, type two to
  1763. get one in the option (see |option-backslash|), for example: >
  1764. :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
  1765. < - For backwards compatibility with Vim version 3.0 a '>' at the start
  1766. of the option is removed.
  1767. Using "." first in the list is recommended. This means that editing
  1768. the same file twice will result in a warning. Using "/tmp" on Unix is
  1769. discouraged: When the system crashes you lose the swap file.
  1770. "/var/tmp" is often not cleared when rebooting, thus is a better
  1771. choice than "/tmp". But it can contain a lot of files, your swap
  1772. files get lost in the crowd. That is why a "tmp" directory in your
  1773. home directory is tried first.
  1774. The use of |:set+=| and |:set-=| is preferred when adding or removing
  1775. directories from the list. This avoids problems when a future version
  1776. uses another default.
  1777. This option cannot be set from a |modeline| or in the |sandbox|, for
  1778. security reasons.
  1779. *'display'* *'dy'*
  1780. 'display' 'dy' string (default "lastline,msgsep", Vi default: "")
  1781. global
  1782. Change the way text is displayed. This is comma separated list of
  1783. flags:
  1784. lastline When included, as much as possible of the last line
  1785. in a window will be displayed. "@@@" is put in the
  1786. last columns of the last screen line to indicate the
  1787. rest of the line is not displayed.
  1788. truncate Like "lastline", but "@@@" is displayed in the first
  1789. column of the last screen line. Overrules "lastline".
  1790. uhex Show unprintable characters hexadecimal as <xx>
  1791. instead of using ^C and ~C.
  1792. msgsep When showing messages longer than 'cmdheight', only
  1793. scroll the message lines, not the entire screen. The
  1794. separator line is decorated by |hl-MsgSeparator| and
  1795. the "msgsep" flag of 'fillchars'.
  1796. When neither "lastline" nor "truncate" is included, a last line that
  1797. doesn't fit is replaced with "@" lines.
  1798. *'eadirection'* *'ead'*
  1799. 'eadirection' 'ead' string (default "both")
  1800. global
  1801. Tells when the 'equalalways' option applies:
  1802. ver vertically, width of windows is not affected
  1803. hor horizontally, height of windows is not affected
  1804. both width and height of windows is affected
  1805. *'emoji'* *'emo'*
  1806. 'emoji' 'emo' boolean (default: on)
  1807. global
  1808. When on all Unicode emoji characters are considered to be full width.
  1809. *'encoding'* *'enc'* *E543*
  1810. 'encoding' 'enc'
  1811. String-encoding used internally and for |RPC| communication.
  1812. Always UTF-8.
  1813. See 'fileencoding' to control file-content encoding.
  1814. *'endofline'* *'eol'* *'noendofline'* *'noeol'*
  1815. 'endofline' 'eol' boolean (default on)
  1816. local to buffer
  1817. When writing a file and this option is off and the 'binary' option
  1818. is on, or 'fixeol' option is off, no <EOL> will be written for the
  1819. last line in the file. This option is automatically set or reset when
  1820. starting to edit a new file, depending on whether file has an <EOL>
  1821. for the last line in the file. Normally you don't have to set or
  1822. reset this option.
  1823. When 'binary' is off and 'fixeol' is on the value is not used when
  1824. writing the file. When 'binary' is on or 'fixeol' is off it is used
  1825. to remember the presence of a <EOL> for the last line in the file, so
  1826. that when you write the file the situation from the original file can
  1827. be kept. But you can change it if you want to.
  1828. *'equalalways'* *'ea'* *'noequalalways'* *'noea'*
  1829. 'equalalways' 'ea' boolean (default on)
  1830. global
  1831. When on, all the windows are automatically made the same size after
  1832. splitting or closing a window. This also happens the moment the
  1833. option is switched on. When off, splitting a window will reduce the
  1834. size of the current window and leave the other windows the same. When
  1835. closing a window the extra lines are given to the window next to it
  1836. (depending on 'splitbelow' and 'splitright').
  1837. When mixing vertically and horizontally split windows, a minimal size
  1838. is computed and some windows may be larger if there is room. The
  1839. 'eadirection' option tells in which direction the size is affected.
  1840. Changing the height and width of a window can be avoided by setting
  1841. 'winfixheight' and 'winfixwidth', respectively.
  1842. If a window size is specified when creating a new window sizes are
  1843. currently not equalized (it's complicated, but may be implemented in
  1844. the future).
  1845. *'equalprg'* *'ep'*
  1846. 'equalprg' 'ep' string (default "")
  1847. global or local to buffer |global-local|
  1848. External program to use for "=" command. When this option is empty
  1849. the internal formatting functions are used; either 'lisp', 'cindent'
  1850. or 'indentexpr'. When Vim was compiled without internal formatting,
  1851. the "indent" program is used.
  1852. Environment variables are expanded |:set_env|. See |option-backslash|
  1853. about including spaces and backslashes.
  1854. This option cannot be set from a |modeline| or in the |sandbox|, for
  1855. security reasons.
  1856. *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'*
  1857. 'errorbells' 'eb' boolean (default off)
  1858. global
  1859. Ring the bell (beep or screen flash) for error messages. This only
  1860. makes a difference for error messages, the bell will be used always
  1861. for a lot of errors without a message (e.g., hitting <Esc> in Normal
  1862. mode). See 'visualbell' to make the bell behave like a screen flash
  1863. or do nothing. See 'belloff' to finetune when to ring the bell.
  1864. *'errorfile'* *'ef'*
  1865. 'errorfile' 'ef' string (default: "errors.err")
  1866. global
  1867. Name of the errorfile for the QuickFix mode (see |:cf|).
  1868. When the "-q" command-line argument is used, 'errorfile' is set to the
  1869. following argument. See |-q|.
  1870. NOT used for the ":make" command. See 'makeef' for that.
  1871. Environment variables are expanded |:set_env|.
  1872. See |option-backslash| about including spaces and backslashes.
  1873. This option cannot be set from a |modeline| or in the |sandbox|, for
  1874. security reasons.
  1875. *'errorformat'* *'efm'*
  1876. 'errorformat' 'efm' string (default is very long)
  1877. global or local to buffer |global-local|
  1878. Scanf-like description of the format for the lines in the error file
  1879. (see |errorformat|).
  1880. *'eventignore'* *'ei'*
  1881. 'eventignore' 'ei' string (default "")
  1882. global
  1883. A list of autocommand event names, which are to be ignored.
  1884. When set to "all" or when "all" is one of the items, all autocommand
  1885. events are ignored, autocommands will not be executed.
  1886. Otherwise this is a comma separated list of event names. Example: >
  1887. :set ei=WinEnter,WinLeave
  1888. <
  1889. *'expandtab'* *'et'* *'noexpandtab'* *'noet'*
  1890. 'expandtab' 'et' boolean (default off)
  1891. local to buffer
  1892. In Insert mode: Use the appropriate number of spaces to insert a
  1893. <Tab>. Spaces are used in indents with the '>' and '<' commands and
  1894. when 'autoindent' is on. To insert a real tab when 'expandtab' is
  1895. on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|.
  1896. This option is reset when the 'paste' option is set and restored when
  1897. the 'paste' option is reset.
  1898. *'fileencoding'* *'fenc'* *E213*
  1899. 'fileencoding' 'fenc' string (default: "")
  1900. local to buffer
  1901. File-content encoding for the current buffer. Conversion is done with
  1902. iconv() or as specified with 'charconvert'.
  1903. When 'fileencoding' is not UTF-8, conversion will be done when
  1904. writing the file. For reading see below.
  1905. When 'fileencoding' is empty, the file will be saved with UTF-8
  1906. encoding (no conversion when reading or writing a file).
  1907. WARNING: Conversion to a non-Unicode encoding can cause loss of
  1908. information!
  1909. See |encoding-names| for the possible values. Additionally, values may be
  1910. specified that can be handled by the converter, see
  1911. |mbyte-conversion|.
  1912. When reading a file 'fileencoding' will be set from 'fileencodings'.
  1913. To read a file in a certain encoding it won't work by setting
  1914. 'fileencoding', use the |++enc| argument. One exception: when
  1915. 'fileencodings' is empty the value of 'fileencoding' is used.
  1916. For a new file the global value of 'fileencoding' is used.
  1917. Prepending "8bit-" and "2byte-" has no meaning here, they are ignored.
  1918. When the option is set, the value is converted to lowercase. Thus
  1919. you can set it with uppercase values too. '_' characters are
  1920. replaced with '-'. If a name is recognized from the list at
  1921. |encoding-names|, it is replaced by the standard name. For example
  1922. "ISO8859-2" becomes "iso-8859-2".
  1923. When this option is set, after starting to edit a file, the 'modified'
  1924. option is set, because the file would be different when written.
  1925. Keep in mind that changing 'fenc' from a modeline happens
  1926. AFTER the text has been read, thus it applies to when the file will be
  1927. written. If you do set 'fenc' in a modeline, you might want to set
  1928. 'nomodified' to avoid not being able to ":q".
  1929. This option cannot be changed when 'modifiable' is off.
  1930. *'fileencodings'* *'fencs'*
  1931. 'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1")
  1932. global
  1933. This is a list of character encodings considered when starting to edit
  1934. an existing file. When a file is read, Vim tries to use the first
  1935. mentioned character encoding. If an error is detected, the next one
  1936. in the list is tried. When an encoding is found that works,
  1937. 'fileencoding' is set to it. If all fail, 'fileencoding' is set to
  1938. an empty string, which means that UTF-8 is used.
  1939. WARNING: Conversion can cause loss of information! You can use
  1940. the |++bad| argument to specify what is done with characters
  1941. that can't be converted.
  1942. For an empty file or a file with only ASCII characters most encodings
  1943. will work and the first entry of 'fileencodings' will be used (except
  1944. "ucs-bom", which requires the BOM to be present). If you prefer
  1945. another encoding use an BufReadPost autocommand event to test if your
  1946. preferred encoding is to be used. Example: >
  1947. au BufReadPost * if search('\S', 'w') == 0 |
  1948. \ set fenc=iso-2022-jp | endif
  1949. < This sets 'fileencoding' to "iso-2022-jp" if the file does not contain
  1950. non-blank characters.
  1951. When the |++enc| argument is used then the value of 'fileencodings' is
  1952. not used.
  1953. Note that 'fileencodings' is not used for a new file, the global value
  1954. of 'fileencoding' is used instead. You can set it with: >
  1955. :setglobal fenc=iso-8859-2
  1956. < This means that a non-existing file may get a different encoding than
  1957. an empty file.
  1958. The special value "ucs-bom" can be used to check for a Unicode BOM
  1959. (Byte Order Mark) at the start of the file. It must not be preceded
  1960. by "utf-8" or another Unicode encoding for this to work properly.
  1961. An entry for an 8-bit encoding (e.g., "latin1") should be the last,
  1962. because Vim cannot detect an error, thus the encoding is always
  1963. accepted.
  1964. The special value "default" can be used for the encoding from the
  1965. environment. It is useful when your environment uses a non-latin1
  1966. encoding, such as Russian.
  1967. When a file contains an illegal UTF-8 byte sequence it won't be
  1968. recognized as "utf-8". You can use the |8g8| command to find the
  1969. illegal byte sequence.
  1970. WRONG VALUES: WHAT'S WRONG:
  1971. latin1,utf-8 "latin1" will always be used
  1972. utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8
  1973. file
  1974. cp1250,latin1 "cp1250" will always be used
  1975. If 'fileencodings' is empty, 'fileencoding' is not modified.
  1976. See 'fileencoding' for the possible values.
  1977. Setting this option does not have an effect until the next time a file
  1978. is read.
  1979. *'fileformat'* *'ff'*
  1980. 'fileformat' 'ff' string (Windows default: "dos",
  1981. Unix default: "unix",
  1982. Macintosh default: "mac")
  1983. local to buffer
  1984. This gives the <EOL> of the current buffer, which is used for
  1985. reading/writing the buffer from/to a file:
  1986. dos <CR> <NL>
  1987. unix <NL>
  1988. mac <CR>
  1989. When "dos" is used, CTRL-Z at the end of a file is ignored.
  1990. See |file-formats| and |file-read|.
  1991. For the character encoding of the file see 'fileencoding'.
  1992. When 'binary' is set, the value of 'fileformat' is ignored, file I/O
  1993. works like it was set to "unix".
  1994. This option is set automatically when starting to edit a file and
  1995. 'fileformats' is not empty and 'binary' is off.
  1996. When this option is set, after starting to edit a file, the 'modified'
  1997. option is set, because the file would be different when written.
  1998. This option cannot be changed when 'modifiable' is off.
  1999. *'fileformats'* *'ffs'*
  2000. 'fileformats' 'ffs' string (default:
  2001. Vim+Vi Win32: "dos,unix",
  2002. Vim Unix: "unix,dos",
  2003. Vim Mac: "mac,unix,dos",
  2004. Vi others: "")
  2005. global
  2006. This gives the end-of-line (<EOL>) formats that will be tried when
  2007. starting to edit a new buffer and when reading a file into an existing
  2008. buffer:
  2009. - When empty, the format defined with 'fileformat' will be used
  2010. always. It is not set automatically.
  2011. - When set to one name, that format will be used whenever a new buffer
  2012. is opened. 'fileformat' is set accordingly for that buffer. The
  2013. 'fileformats' name will be used when a file is read into an existing
  2014. buffer, no matter what 'fileformat' for that buffer is set to.
  2015. - When more than one name is present, separated by commas, automatic
  2016. <EOL> detection will be done when reading a file. When starting to
  2017. edit a file, a check is done for the <EOL>:
  2018. 1. If all lines end in <CR><NL>, and 'fileformats' includes "dos",
  2019. 'fileformat' is set to "dos".
  2020. 2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
  2021. is set to "unix". Note that when a <NL> is found without a
  2022. preceding <CR>, "unix" is preferred over "dos".
  2023. 3. If 'fileformat' has not yet been set, and if a <CR> is found, and
  2024. if 'fileformats' includes "mac", 'fileformat' is set to "mac".
  2025. This means that "mac" is only chosen when:
  2026. "unix" is not present or no <NL> is found in the file, and
  2027. "dos" is not present or no <CR><NL> is found in the file.
  2028. Except: if "unix" was chosen, but there is a <CR> before
  2029. the first <NL>, and there appear to be more <CR>s than <NL>s in
  2030. the first few lines, "mac" is used.
  2031. 4. If 'fileformat' is still not set, the first name from
  2032. 'fileformats' is used.
  2033. When reading a file into an existing buffer, the same is done, but
  2034. this happens like 'fileformat' has been set appropriately for that
  2035. file only, the option is not changed.
  2036. When 'binary' is set, the value of 'fileformats' is not used.
  2037. When Vim starts up with an empty buffer the first item is used. You
  2038. can overrule this by setting 'fileformat' in your .vimrc.
  2039. For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
  2040. are ":source"ed and for vimrc files, automatic <EOL> detection may be
  2041. done:
  2042. - When 'fileformats' is empty, there is no automatic detection. Dos
  2043. format will be used.
  2044. - When 'fileformats' is set to one or more names, automatic detection
  2045. is done. This is based on the first <NL> in the file: If there is a
  2046. <CR> in front of it, Dos format is used, otherwise Unix format is
  2047. used.
  2048. Also see |file-formats|.
  2049. *'fileignorecase'* *'fic'* *'nofileignorecase'* *'nofic'*
  2050. 'fileignorecase' 'fic' boolean (default on for systems where case in file
  2051. names is normally ignored)
  2052. global
  2053. When set case is ignored when using file names and directories.
  2054. See 'wildignorecase' for only ignoring case when doing completion.
  2055. *'filetype'* *'ft'*
  2056. 'filetype' 'ft' string (default: "")
  2057. local to buffer
  2058. When this option is set, the FileType autocommand event is triggered.
  2059. All autocommands that match with the value of this option will be
  2060. executed. Thus the value of 'filetype' is used in place of the file
  2061. name.
  2062. Otherwise this option does not always reflect the current file type.
  2063. This option is normally set when the file type is detected. To enable
  2064. this use the ":filetype on" command. |:filetype|
  2065. Setting this option to a different value is most useful in a modeline,
  2066. for a file for which the file type is not automatically recognized.
  2067. Example, for in an IDL file:
  2068. /* vim: set filetype=idl : */ ~
  2069. |FileType| |filetypes|
  2070. When a dot appears in the value then this separates two filetype
  2071. names. Example:
  2072. /* vim: set filetype=c.doxygen : */ ~
  2073. This will use the "c" filetype first, then the "doxygen" filetype.
  2074. This works both for filetype plugins and for syntax files. More than
  2075. one dot may appear.
  2076. This option is not copied to another buffer, independent of the 's' or
  2077. 'S' flag in 'cpoptions'.
  2078. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  2079. *'fillchars'* *'fcs'*
  2080. 'fillchars' 'fcs' string (default "")
  2081. local to window
  2082. Characters to fill the statuslines and vertical separators.
  2083. It is a comma separated list of items:
  2084. item default Used for ~
  2085. stl:c ' ' or '^' statusline of the current window
  2086. stlnc:c ' ' or '=' statusline of the non-current windows
  2087. vert:c '│' or '|' vertical separators |:vsplit|
  2088. fold:c '·' or '-' filling 'foldtext'
  2089. diff:c '-' deleted lines of the 'diff' option
  2090. msgsep:c ' ' message separator 'display'
  2091. eob:c '~' empty lines at the end of a buffer
  2092. Any one that is omitted will fall back to the default. For "stl" and
  2093. "stlnc" the space will be used when there is highlighting, '^' or '='
  2094. otherwise.
  2095. If 'ambiwidth' is "double" then "vert" and "fold" default to
  2096. single-byte alternatives.
  2097. Example: >
  2098. :set fillchars=stl:^,stlnc:=,vert:│,fold:·,diff:-
  2099. < This is similar to the default, except that these characters will also
  2100. be used when there is highlighting.
  2101. for "stl" and "stlnc" only single-byte values are supported.
  2102. The highlighting used for these items:
  2103. item highlight group ~
  2104. stl:c StatusLine |hl-StatusLine|
  2105. stlnc:c StatusLineNC |hl-StatusLineNC|
  2106. vert:c VertSplit |hl-VertSplit|
  2107. fold:c Folded |hl-Folded|
  2108. diff:c DiffDelete |hl-DiffDelete|
  2109. eob:c EndOfBuffer |hl-EndOfBuffer|
  2110. *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
  2111. 'fixendofline' 'fixeol' boolean (default on)
  2112. local to buffer
  2113. When writing a file and this option is on, <EOL> at the end of file
  2114. will be restored if missing. Turn this option off if you want to
  2115. preserve the situation from the original file.
  2116. When the 'binary' option is set the value of this option doesn't
  2117. matter.
  2118. See the 'endofline' option.
  2119. *'foldclose'* *'fcl'*
  2120. 'foldclose' 'fcl' string (default "")
  2121. global
  2122. When set to "all", a fold is closed when the cursor isn't in it and
  2123. its level is higher than 'foldlevel'. Useful if you want folds to
  2124. automatically close when moving out of them.
  2125. *'foldcolumn'* *'fdc'*
  2126. 'foldcolumn' 'fdc' number (default 0)
  2127. local to window
  2128. When non-zero, a column with the specified width is shown at the side
  2129. of the window which indicates open and closed folds. The maximum
  2130. value is 12.
  2131. See |folding|.
  2132. *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'*
  2133. 'foldenable' 'fen' boolean (default on)
  2134. local to window
  2135. When off, all folds are open. This option can be used to quickly
  2136. switch between showing all text unfolded and viewing the text with
  2137. folds (including manually opened or closed folds). It can be toggled
  2138. with the |zi| command. The 'foldcolumn' will remain blank when
  2139. 'foldenable' is off.
  2140. This option is set by commands that create a new fold or close a fold.
  2141. See |folding|.
  2142. *'foldexpr'* *'fde'*
  2143. 'foldexpr' 'fde' string (default: "0")
  2144. local to window
  2145. The expression used for when 'foldmethod' is "expr". It is evaluated
  2146. for each line to obtain its fold level. See |fold-expr|.
  2147. The expression will be evaluated in the |sandbox| if set from a
  2148. modeline, see |sandbox-option|.
  2149. This option can't be set from a |modeline| when the 'diff' option is
  2150. on or the 'modelineexpr' option is off.
  2151. It is not allowed to change text or jump to another window while
  2152. evaluating 'foldexpr' |textlock|.
  2153. *'foldignore'* *'fdi'*
  2154. 'foldignore' 'fdi' string (default: "#")
  2155. local to window
  2156. Used only when 'foldmethod' is "indent". Lines starting with
  2157. characters in 'foldignore' will get their fold level from surrounding
  2158. lines. White space is skipped before checking for this character.
  2159. The default "#" works well for C programs. See |fold-indent|.
  2160. *'foldlevel'* *'fdl'*
  2161. 'foldlevel' 'fdl' number (default: 0)
  2162. local to window
  2163. Sets the fold level: Folds with a higher level will be closed.
  2164. Setting this option to zero will close all folds. Higher numbers will
  2165. close fewer folds.
  2166. This option is set by commands like |zm|, |zM| and |zR|.
  2167. See |fold-foldlevel|.
  2168. *'foldlevelstart'* *'fdls'*
  2169. 'foldlevelstart' 'fdls' number (default: -1)
  2170. global
  2171. Sets 'foldlevel' when starting to edit another buffer in a window.
  2172. Useful to always start editing with all folds closed (value zero),
  2173. some folds closed (one) or no folds closed (99).
  2174. This is done before reading any modeline, thus a setting in a modeline
  2175. overrules this option. Starting to edit a file for |diff-mode| also
  2176. ignores this option and closes all folds.
  2177. It is also done before BufReadPre autocommands, to allow an autocmd to
  2178. overrule the 'foldlevel' value for specific files.
  2179. When the value is negative, it is not used.
  2180. *'foldmarker'* *'fmr'* *E536*
  2181. 'foldmarker' 'fmr' string (default: "{{{,}}}")
  2182. local to window
  2183. The start and end marker used when 'foldmethod' is "marker". There
  2184. must be one comma, which separates the start and end marker. The
  2185. marker is a literal string (a regular expression would be too slow).
  2186. See |fold-marker|.
  2187. *'foldmethod'* *'fdm'*
  2188. 'foldmethod' 'fdm' string (default: "manual")
  2189. local to window
  2190. The kind of folding used for the current window. Possible values:
  2191. |fold-manual| manual Folds are created manually.
  2192. |fold-indent| indent Lines with equal indent form a fold.
  2193. |fold-expr| expr 'foldexpr' gives the fold level of a line.
  2194. |fold-marker| marker Markers are used to specify folds.
  2195. |fold-syntax| syntax Syntax highlighting items specify folds.
  2196. |fold-diff| diff Fold text that is not changed.
  2197. *'foldminlines'* *'fml'*
  2198. 'foldminlines' 'fml' number (default: 1)
  2199. local to window
  2200. Sets the number of screen lines above which a fold can be displayed
  2201. closed. Also for manually closed folds. With the default value of
  2202. one a fold can only be closed if it takes up two or more screen lines.
  2203. Set to zero to be able to close folds of just one screen line.
  2204. Note that this only has an effect on what is displayed. After using
  2205. "zc" to close a fold, which is displayed open because it's smaller
  2206. than 'foldminlines', a following "zc" may close a containing fold.
  2207. *'foldnestmax'* *'fdn'*
  2208. 'foldnestmax' 'fdn' number (default: 20)
  2209. local to window
  2210. Sets the maximum nesting of folds for the "indent" and "syntax"
  2211. methods. This avoids that too many folds will be created. Using more
  2212. than 20 doesn't work, because the internal limit is 20.
  2213. *'foldopen'* *'fdo'*
  2214. 'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix,
  2215. search,tag,undo")
  2216. global
  2217. Specifies for which type of commands folds will be opened, if the
  2218. command moves the cursor into a closed fold. It is a comma separated
  2219. list of items.
  2220. NOTE: When the command is part of a mapping this option is not used.
  2221. Add the |zv| command to the mapping to get the same effect.
  2222. (rationale: the mapping may want to control opening folds itself)
  2223. item commands ~
  2224. all any
  2225. block "(", "{", "[[", "[{", etc.
  2226. hor horizontal movements: "l", "w", "fx", etc.
  2227. insert any command in Insert mode
  2228. jump far jumps: "G", "gg", etc.
  2229. mark jumping to a mark: "'m", CTRL-O, etc.
  2230. percent "%"
  2231. quickfix ":cn", ":crew", ":make", etc.
  2232. search search for a pattern: "/", "n", "*", "gd", etc.
  2233. (not for a search pattern in a ":" command)
  2234. Also for |[s| and |]s|.
  2235. tag jumping to a tag: ":ta", CTRL-T, etc.
  2236. undo undo or redo: "u" and CTRL-R
  2237. When a movement command is used for an operator (e.g., "dl" or "y%")
  2238. this option is not used. This means the operator will include the
  2239. whole closed fold.
  2240. Note that vertical movements are not here, because it would make it
  2241. very difficult to move onto a closed fold.
  2242. In insert mode the folds containing the cursor will always be open
  2243. when text is inserted.
  2244. To close folds you can re-apply 'foldlevel' with the |zx| command or
  2245. set the 'foldclose' option to "all".
  2246. *'foldtext'* *'fdt'*
  2247. 'foldtext' 'fdt' string (default: "foldtext()")
  2248. local to window
  2249. An expression which is used to specify the text displayed for a closed
  2250. fold. See |fold-foldtext|.
  2251. The expression will be evaluated in the |sandbox| if set from a
  2252. modeline, see |sandbox-option|.
  2253. This option cannot be set in a modeline when 'modelineexpr' is off.
  2254. It is not allowed to change text or jump to another window while
  2255. evaluating 'foldtext' |textlock|.
  2256. *'formatexpr'* *'fex'*
  2257. 'formatexpr' 'fex' string (default "")
  2258. local to buffer
  2259. Expression which is evaluated to format a range of lines for the |gq|
  2260. operator or automatic formatting (see 'formatoptions'). When this
  2261. option is empty 'formatprg' is used.
  2262. The |v:lnum| variable holds the first line to be formatted.
  2263. The |v:count| variable holds the number of lines to be formatted.
  2264. The |v:char| variable holds the character that is going to be
  2265. inserted if the expression is being evaluated due to
  2266. automatic formatting. This can be empty. Don't insert
  2267. it yet!
  2268. Example: >
  2269. :set formatexpr=mylang#Format()
  2270. < This will invoke the mylang#Format() function in the
  2271. autoload/mylang.vim file in 'runtimepath'. |autoload|
  2272. The expression is also evaluated when 'textwidth' is set and adding
  2273. text beyond that limit. This happens under the same conditions as
  2274. when internal formatting is used. Make sure the cursor is kept in the
  2275. same spot relative to the text then! The |mode()| function will
  2276. return "i" or "R" in this situation.
  2277. When the expression evaluates to non-zero Vim will fall back to using
  2278. the internal format mechanism.
  2279. The expression will be evaluated in the |sandbox| when set from a
  2280. modeline, see |sandbox-option|. That stops the option from working,
  2281. since changing the buffer text is not allowed.
  2282. This option cannot be set in a modeline when 'modelineexpr' is off.
  2283. NOTE: This option is set to "" when 'compatible' is set.
  2284. *'formatlistpat'* *'flp'*
  2285. 'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*")
  2286. local to buffer
  2287. A pattern that is used to recognize a list header. This is used for
  2288. the "n" flag in 'formatoptions'.
  2289. The pattern must match exactly the text that will be the indent for
  2290. the line below it. You can use |/\ze| to mark the end of the match
  2291. while still checking more characters. There must be a character
  2292. following the pattern, when it matches the whole line it is handled
  2293. like there is no match.
  2294. The default recognizes a number, followed by an optional punctuation
  2295. character and white space.
  2296. *'formatoptions'* *'fo'*
  2297. 'formatoptions' 'fo' string (default: "tcqj", Vi default: "vt")
  2298. local to buffer
  2299. This is a sequence of letters which describes how automatic
  2300. formatting is to be done. See |fo-table|. When the 'paste' option is
  2301. on, no formatting is done (like 'formatoptions' is empty). Commas can
  2302. be inserted for readability.
  2303. To avoid problems with flags that are added in the future, use the
  2304. "+=" and "-=" feature of ":set" |add-option-flags|.
  2305. *'formatprg'* *'fp'*
  2306. 'formatprg' 'fp' string (default "")
  2307. global or local to buffer |global-local|
  2308. The name of an external program that will be used to format the lines
  2309. selected with the |gq| operator. The program must take the input on
  2310. stdin and produce the output on stdout. The Unix program "fmt" is
  2311. such a program.
  2312. If the 'formatexpr' option is not empty it will be used instead.
  2313. Otherwise, if 'formatprg' option is an empty string, the internal
  2314. format function will be used |C-indenting|.
  2315. Environment variables are expanded |:set_env|. See |option-backslash|
  2316. about including spaces and backslashes.
  2317. This option cannot be set from a |modeline| or in the |sandbox|, for
  2318. security reasons.
  2319. *'fsync'* *'fs'*
  2320. 'fsync' 'fs' boolean (default off)
  2321. global
  2322. When on, the OS function fsync() will be called after saving a file
  2323. (|:write|, |writefile()|, …), |swap-file| and |shada-file|. This
  2324. flushes the file to disk, ensuring that it is safely written.
  2325. Slow on some systems: writing buffers, quitting Nvim, and other
  2326. operations may sometimes take a few seconds.
  2327. Files are ALWAYS flushed ('fsync' is ignored) when:
  2328. - |CursorHold| event is triggered
  2329. - |:preserve| is called
  2330. - system signals low battery life
  2331. - Nvim exits abnormally
  2332. This option cannot be set from a |modeline| or in the |sandbox|, for
  2333. security reasons.
  2334. *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
  2335. 'gdefault' 'gd' boolean (default off)
  2336. global
  2337. When on, the ":substitute" flag 'g' is default on. This means that
  2338. all matches in a line are substituted instead of one. When a 'g' flag
  2339. is given to a ":substitute" command, this will toggle the substitution
  2340. of all or one match. See |complex-change|.
  2341. command 'gdefault' on 'gdefault' off ~
  2342. :s/// subst. all subst. one
  2343. :s///g subst. one subst. all
  2344. :s///gg subst. all subst. one
  2345. DEPRECATED: Setting this option may break plugins that are not aware
  2346. of this option. Also, many users get confused that adding the /g flag
  2347. has the opposite effect of that it normally does.
  2348. *'grepformat'* *'gfm'*
  2349. 'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
  2350. global
  2351. Format to recognize for the ":grep" command output.
  2352. This is a scanf-like string that uses the same format as the
  2353. 'errorformat' option: see |errorformat|.
  2354. *'grepprg'* *'gp'*
  2355. 'grepprg' 'gp' string (default "grep -n ",
  2356. Unix: "grep -n $* /dev/null")
  2357. global or local to buffer |global-local|
  2358. Program to use for the |:grep| command. This option may contain '%'
  2359. and '#' characters, which are expanded like when used in a command-
  2360. line. The placeholder "$*" is allowed to specify where the arguments
  2361. will be included. Environment variables are expanded |:set_env|. See
  2362. |option-backslash| about including spaces and backslashes.
  2363. When your "grep" accepts the "-H" argument, use this to make ":grep"
  2364. also work well with a single file: >
  2365. :set grepprg=grep\ -nH
  2366. < Special value: When 'grepprg' is set to "internal" the |:grep| command
  2367. works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like
  2368. |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|.
  2369. See also the section |:make_makeprg|, since most of the comments there
  2370. apply equally to 'grepprg'.
  2371. This option cannot be set from a |modeline| or in the |sandbox|, for
  2372. security reasons.
  2373. *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*
  2374. 'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20")
  2375. global
  2376. Configures the cursor style for each mode. Works in the GUI and many
  2377. terminals. See |tui-cursor-shape|.
  2378. To disable cursor-styling, reset the option: >
  2379. :set guicursor=
  2380. < To enable mode shapes, "Cursor" highlight, and blinking: >
  2381. :set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
  2382. \,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor
  2383. \,sm:block-blinkwait175-blinkoff150-blinkon175
  2384. < The option is a comma separated list of parts. Each part consists of a
  2385. mode-list and an argument-list:
  2386. mode-list:argument-list,mode-list:argument-list,..
  2387. The mode-list is a dash separated list of these modes:
  2388. n Normal mode
  2389. v Visual mode
  2390. ve Visual mode with 'selection' "exclusive" (same as 'v',
  2391. if not specified)
  2392. o Operator-pending mode
  2393. i Insert mode
  2394. r Replace mode
  2395. c Command-line Normal (append) mode
  2396. ci Command-line Insert mode
  2397. cr Command-line Replace mode
  2398. sm showmatch in Insert mode
  2399. a all modes
  2400. The argument-list is a dash separated list of these arguments:
  2401. hor{N} horizontal bar, {N} percent of the character height
  2402. ver{N} vertical bar, {N} percent of the character width
  2403. block block cursor, fills the whole character
  2404. [only one of the above three should be present]
  2405. blinkwait{N} *cursor-blinking*
  2406. blinkon{N}
  2407. blinkoff{N}
  2408. blink times for cursor: blinkwait is the delay before
  2409. the cursor starts blinking, blinkon is the time that
  2410. the cursor is shown and blinkoff is the time that the
  2411. cursor is not shown. The times are in msec. When one
  2412. of the numbers is zero, there is no blinking. E.g.: >
  2413. :set guicursor=n:blinkon0
  2414. < {group-name}
  2415. Highlight group name that sets the color and font for
  2416. the cursor. |inverse|/reverse and no group-name are
  2417. interpreted as "the host terminal default cursor
  2418. colors" which usually invert bg and fg colors.
  2419. {group-name}/{group-name}
  2420. Two highlight group names, the first is used when
  2421. no language mappings are used, the other when they
  2422. are. |language-mapping|
  2423. Examples of parts:
  2424. n-c-v:block-nCursor In Normal, Command-line and Visual mode, use a
  2425. block cursor with colors from the "nCursor"
  2426. highlight group
  2427. n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20
  2428. In Normal et al. modes, use a block cursor
  2429. with the default colors defined by the host
  2430. terminal. In Insert-likes modes, use
  2431. a vertical bar cursor with colors from
  2432. "Cursor" highlight group. In Replace-likes
  2433. modes, use a underline cursor with
  2434. default colors.
  2435. i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150
  2436. In Insert and Command-line Insert mode, use a
  2437. 30% vertical bar cursor with colors from the
  2438. "iCursor" highlight group. Blink a bit
  2439. faster.
  2440. The 'a' mode is different. It will set the given argument-list for
  2441. all modes. It does not reset anything to defaults. This can be used
  2442. to do a common setting for all modes. For example, to switch off
  2443. blinking: "a:blinkon0"
  2444. Examples of cursor highlighting: >
  2445. :highlight Cursor gui=reverse guifg=NONE guibg=NONE
  2446. :highlight Cursor gui=NONE guifg=bg guibg=fg
  2447. <
  2448. *'guifont'* *'gfn'*
  2449. *E235* *E596*
  2450. 'guifont' 'gfn' string (default "")
  2451. global
  2452. This is a list of fonts which will be used for the GUI version of Vim.
  2453. In its simplest form the value is just one font name. When
  2454. the font cannot be found you will get an error message. To try other
  2455. font names a list can be specified, font names separated with commas.
  2456. The first valid font is used.
  2457. On systems where 'guifontset' is supported (X11) and 'guifontset' is
  2458. not empty, then 'guifont' is not used.
  2459. Spaces after a comma are ignored. To include a comma in a font name
  2460. precede it with a backslash. Setting an option requires an extra
  2461. backslash before a space and a backslash. See also
  2462. |option-backslash|. For example: >
  2463. :set guifont=Screen15,\ 7x13,font\\,with\\,commas
  2464. < will make Vim try to use the font "Screen15" first, and if it fails it
  2465. will try to use "7x13" and then "font,with,commas" instead.
  2466. If none of the fonts can be loaded, Vim will keep the current setting.
  2467. If an empty font list is given, Vim will try using other resource
  2468. settings (for X, it will use the Vim.font resource), and finally it
  2469. will try some builtin default which should always be there ("7x13" in
  2470. the case of X). The font names given should be "normal" fonts. Vim
  2471. will try to find the related bold and italic fonts.
  2472. For Win32 and Mac OS: >
  2473. :set guifont=*
  2474. < will bring up a font requester, where you can pick the font you want.
  2475. The font name depends on the GUI used.
  2476. For Mac OSX you can use something like this: >
  2477. :set guifont=Monaco:h10
  2478. < *E236*
  2479. Note that the fonts must be mono-spaced (all characters have the same
  2480. width).
  2481. To preview a font on X11, you might be able to use the "xfontsel"
  2482. program. The "xlsfonts" program gives a list of all available fonts.
  2483. For the Win32 GUI *E244* *E245*
  2484. - takes these options in the font name:
  2485. hXX - height is XX (points, can be floating-point)
  2486. wXX - width is XX (points, can be floating-point)
  2487. b - bold
  2488. i - italic
  2489. u - underline
  2490. s - strikeout
  2491. cXX - character set XX. Valid charsets are: ANSI, ARABIC,
  2492. BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
  2493. HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
  2494. SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
  2495. Normally you would use "cDEFAULT".
  2496. Use a ':' to separate the options.
  2497. - A '_' can be used in the place of a space, so you don't need to use
  2498. backslashes to escape the spaces.
  2499. - Examples: >
  2500. :set guifont=courier_new:h12:w5:b:cRUSSIAN
  2501. :set guifont=Andale_Mono:h7.5:w4.5
  2502. <
  2503. *'guifontset'* *'gfs'*
  2504. *E250* *E252* *E234* *E597* *E598*
  2505. 'guifontset' 'gfs' string (default "")
  2506. global
  2507. When not empty, specifies two (or more) fonts to be used. The first
  2508. one for normal English, the second one for your special language. See
  2509. |xfontset|.
  2510. Setting this option also means that all font names will be handled as
  2511. a fontset name. Also the ones used for the "font" argument of the
  2512. |:highlight| command.
  2513. The fonts must match with the current locale. If fonts for the
  2514. character sets that the current locale uses are not included, setting
  2515. 'guifontset' will fail.
  2516. Note the difference between 'guifont' and 'guifontset': In 'guifont'
  2517. the comma-separated names are alternative names, one of which will be
  2518. used. In 'guifontset' the whole string is one fontset name,
  2519. including the commas. It is not possible to specify alternative
  2520. fontset names.
  2521. This example works on many X11 systems: >
  2522. :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*
  2523. <
  2524. *'guifontwide'* *'gfw'* *E231* *E533* *E534*
  2525. 'guifontwide' 'gfw' string (default "")
  2526. global
  2527. When not empty, specifies a comma-separated list of fonts to be used
  2528. for double-width characters. The first font that can be loaded is
  2529. used.
  2530. Note: The size of these fonts must be exactly twice as wide as the one
  2531. specified with 'guifont' and the same height.
  2532. 'guifontwide' is only used when 'guifontset' is empty or invalid.
  2533. When 'guifont' is set and a valid font is found in it and
  2534. 'guifontwide' is empty Vim will attempt to find a matching
  2535. double-width font and set 'guifontwide' to it.
  2536. Windows +multibyte only: *guifontwide_win_mbyte*
  2537. If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
  2538. *'guioptions'* *'go'*
  2539. 'guioptions' 'go' string (default "egmrLT" (MS-Windows))
  2540. global
  2541. This option only has an effect in the GUI version of Vim. It is a
  2542. sequence of letters which describes what components and options of the
  2543. GUI should be used.
  2544. To avoid problems with flags that are added in the future, use the
  2545. "+=" and "-=" feature of ":set" |add-option-flags|.
  2546. Valid letters are as follows:
  2547. *guioptions_a* *'go-a'*
  2548. 'a' Autoselect: If present, then whenever VISUAL mode is started,
  2549. or the Visual area extended, Vim tries to become the owner of
  2550. the windowing system's global selection. This means that the
  2551. Visually highlighted text is available for pasting into other
  2552. applications as well as into Vim itself. When the Visual mode
  2553. ends, possibly due to an operation on the text, or when an
  2554. application wants to paste the selection, the highlighted text
  2555. is automatically yanked into the "* selection register.
  2556. Thus the selection is still available for pasting into other
  2557. applications after the VISUAL mode has ended.
  2558. If not present, then Vim won't become the owner of the
  2559. windowing system's global selection unless explicitly told to
  2560. by a yank or delete operation for the "* register.
  2561. The same applies to the modeless selection.
  2562. *'go-P'*
  2563. 'P' Like autoselect but using the "+ register instead of the "*
  2564. register.
  2565. *'go-A'*
  2566. 'A' Autoselect for the modeless selection. Like 'a', but only
  2567. applies to the modeless selection.
  2568. 'guioptions' autoselect Visual autoselect modeless ~
  2569. "" - -
  2570. "a" yes yes
  2571. "A" - yes
  2572. "aA" yes yes
  2573. *'go-c'*
  2574. 'c' Use console dialogs instead of popup dialogs for simple
  2575. choices.
  2576. *'go-e'*
  2577. 'e' Add tab pages when indicated with 'showtabline'.
  2578. 'guitablabel' can be used to change the text in the labels.
  2579. When 'e' is missing a non-GUI tab pages line may be used.
  2580. The GUI tabs are only supported on some systems, currently
  2581. Mac OS/X and MS-Windows.
  2582. *'go-i'*
  2583. 'i' Use a Vim icon.
  2584. *'go-m'*
  2585. 'm' Menu bar is present.
  2586. *'go-M'*
  2587. 'M' The system menu "$VIMRUNTIME/menu.vim" is not sourced. Note
  2588. that this flag must be added in the vimrc file, before
  2589. switching on syntax or filetype recognition (when the |gvimrc|
  2590. file is sourced the system menu has already been loaded; the
  2591. `:syntax on` and `:filetype on` commands load the menu too).
  2592. *'go-g'*
  2593. 'g' Grey menu items: Make menu items that are not active grey. If
  2594. 'g' is not included inactive menu items are not shown at all.
  2595. *'go-T'*
  2596. 'T' Include Toolbar. Currently only in Win32 GUI.
  2597. *'go-r'*
  2598. 'r' Right-hand scrollbar is always present.
  2599. *'go-R'*
  2600. 'R' Right-hand scrollbar is present when there is a vertically
  2601. split window.
  2602. *'go-l'*
  2603. 'l' Left-hand scrollbar is always present.
  2604. *'go-L'*
  2605. 'L' Left-hand scrollbar is present when there is a vertically
  2606. split window.
  2607. *'go-b'*
  2608. 'b' Bottom (horizontal) scrollbar is present. Its size depends on
  2609. the longest visible line, or on the cursor line if the 'h'
  2610. flag is included. |gui-horiz-scroll|
  2611. *'go-h'*
  2612. 'h' Limit horizontal scrollbar size to the length of the cursor
  2613. line. Reduces computations. |gui-horiz-scroll|
  2614. And yes, you may even have scrollbars on the left AND the right if
  2615. you really want to :-). See |gui-scrollbars| for more information.
  2616. *'go-v'*
  2617. 'v' Use a vertical button layout for dialogs. When not included,
  2618. a horizontal layout is preferred, but when it doesn't fit a
  2619. vertical layout is used anyway.
  2620. *'go-p'*
  2621. 'p' Use Pointer callbacks for X11 GUI. This is required for some
  2622. window managers. If the cursor is not blinking or hollow at
  2623. the right moment, try adding this flag. This must be done
  2624. before starting the GUI. Set it in your |gvimrc|. Adding or
  2625. removing it after the GUI has started has no effect.
  2626. *'go-k'*
  2627. 'k' Keep the GUI window size when adding/removing a scrollbar, or
  2628. toolbar, tabline, etc. Instead, the behavior is similar to
  2629. when the window is maximized and will adjust 'lines' and
  2630. 'columns' to fit to the window. Without the 'k' flag Vim will
  2631. try to keep 'lines' and 'columns the same when adding and
  2632. removing GUI components.
  2633. *'guitablabel'* *'gtl'*
  2634. 'guitablabel' 'gtl' string (default empty)
  2635. global
  2636. When nonempty describes the text to use in a label of the GUI tab
  2637. pages line. When empty and when the result is empty Vim will use a
  2638. default label. See |setting-guitablabel| for more info.
  2639. The format of this option is like that of 'statusline'.
  2640. 'guitabtooltip' is used for the tooltip, see below.
  2641. The expression will be evaluated in the |sandbox| when set from a
  2642. modeline, see |sandbox-option|.
  2643. This option cannot be set in a modeline when 'modelineexpr' is off.
  2644. Only used when the GUI tab pages line is displayed. 'e' must be
  2645. present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
  2646. used.
  2647. *'guitabtooltip'* *'gtt'*
  2648. 'guitabtooltip' 'gtt' string (default empty)
  2649. global
  2650. When nonempty describes the text to use in a tooltip for the GUI tab
  2651. pages line. When empty Vim will use a default tooltip.
  2652. This option is otherwise just like 'guitablabel' above.
  2653. You can include a line break. Simplest method is to use |:let|: >
  2654. :let &guitabtooltip = "line one\nline two"
  2655. <
  2656. *'helpfile'* *'hf'*
  2657. 'helpfile' 'hf' string (default (MSDOS) "$VIMRUNTIME\doc\help.txt"
  2658. (others) "$VIMRUNTIME/doc/help.txt")
  2659. global
  2660. Name of the main help file. All distributed help files should be
  2661. placed together in one directory. Additionally, all "doc" directories
  2662. in 'runtimepath' will be used.
  2663. Environment variables are expanded |:set_env|. For example:
  2664. "$VIMRUNTIME/doc/help.txt". If $VIMRUNTIME is not set, $VIM is also
  2665. tried. Also see |$VIMRUNTIME| and |option-backslash| about including
  2666. spaces and backslashes.
  2667. This option cannot be set from a |modeline| or in the |sandbox|, for
  2668. security reasons.
  2669. *'helpheight'* *'hh'*
  2670. 'helpheight' 'hh' number (default 20)
  2671. global
  2672. Minimal initial height of the help window when it is opened with the
  2673. ":help" command. The initial height of the help window is half of the
  2674. current window, or (when the 'ea' option is on) the same as other
  2675. windows. When the height is less than 'helpheight', the height is
  2676. set to 'helpheight'. Set to zero to disable.
  2677. *'helplang'* *'hlg'*
  2678. 'helplang' 'hlg' string (default: messages language or empty)
  2679. global
  2680. Comma separated list of languages. Vim will use the first language
  2681. for which the desired help can be found. The English help will always
  2682. be used as a last resort. You can add "en" to prefer English over
  2683. another language, but that will only find tags that exist in that
  2684. language and not in the English help.
  2685. Example: >
  2686. :set helplang=de,it
  2687. < This will first search German, then Italian and finally English help
  2688. files.
  2689. When using |CTRL-]| and ":help!" in a non-English help file Vim will
  2690. try to find the tag in the current language before using this option.
  2691. See |help-translated|.
  2692. *'hidden'* *'hid'* *'nohidden'* *'nohid'*
  2693. 'hidden' 'hid' boolean (default off)
  2694. global
  2695. When off a buffer is unloaded when it is |abandon|ed. When on a
  2696. buffer becomes hidden when it is |abandon|ed. If the buffer is still
  2697. displayed in another window, it does not become hidden, of course.
  2698. The commands that move through the buffer list sometimes make a buffer
  2699. hidden although the 'hidden' option is off: When the buffer is
  2700. modified, 'autowrite' is off or writing is not possible, and the '!'
  2701. flag was used. See also |windows.txt|.
  2702. To only make one buffer hidden use the 'bufhidden' option.
  2703. This option is set for one command with ":hide {command}" |:hide|.
  2704. WARNING: It's easy to forget that you have changes in hidden buffers.
  2705. Think twice when using ":q!" or ":qa!".
  2706. *'history'* *'hi'*
  2707. 'history' 'hi' number (Vim default: 10000, Vi default: 0)
  2708. global
  2709. A history of ":" commands, and a history of previous search patterns
  2710. is remembered. This option decides how many entries may be stored in
  2711. each of these histories (see |cmdline-editing|).
  2712. The maximum value is 10000.
  2713. *'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
  2714. 'hkmap' 'hk' boolean (default off)
  2715. global
  2716. When on, the keyboard is mapped for the Hebrew character set.
  2717. Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
  2718. toggle this option. See |rileft.txt|.
  2719. *'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
  2720. 'hkmapp' 'hkp' boolean (default off)
  2721. global
  2722. When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
  2723. This is useful if you have a non-Hebrew keyboard.
  2724. See |rileft.txt|.
  2725. *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
  2726. 'hlsearch' 'hls' boolean (default on)
  2727. global
  2728. When there is a previous search pattern, highlight all its matches.
  2729. The |hl-Search| highlight group determines the highlighting. Note that
  2730. only the matching text is highlighted, any offsets are not applied.
  2731. See also: 'incsearch' and |:match|.
  2732. When you get bored looking at the highlighted matches, you can turn it
  2733. off with |:nohlsearch|. This does not change the option value, as
  2734. soon as you use a search command, the highlighting comes back.
  2735. 'redrawtime' specifies the maximum time spent on finding matches.
  2736. When the search pattern can match an end-of-line, Vim will try to
  2737. highlight all of the matched text. However, this depends on where the
  2738. search starts. This will be the first line in the window or the first
  2739. line below a closed fold. A match in a previous line which is not
  2740. drawn may not continue in a newly drawn line.
  2741. You can specify whether the highlight status is restored on startup
  2742. with the 'h' flag in 'shada' |shada-h|.
  2743. *'icon'* *'noicon'*
  2744. 'icon' boolean (default off, on when title can be restored)
  2745. global
  2746. When on, the icon text of the window will be set to the value of
  2747. 'iconstring' (if it is not empty), or to the name of the file
  2748. currently being edited. Only the last part of the name is used.
  2749. Overridden by the 'iconstring' option.
  2750. Only works if the terminal supports setting window icons.
  2751. *'iconstring'*
  2752. 'iconstring' string (default "")
  2753. global
  2754. When this option is not empty, it will be used for the icon text of
  2755. the window. This happens only when the 'icon' option is on.
  2756. Only works if the terminal supports setting window icon text
  2757. When this option contains printf-style '%' items, they will be
  2758. expanded according to the rules used for 'statusline'. See
  2759. 'titlestring' for example settings.
  2760. This option cannot be set in a modeline when 'modelineexpr' is off.
  2761. *'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
  2762. 'ignorecase' 'ic' boolean (default off)
  2763. global
  2764. Ignore case in search patterns. Also used when searching in the tags
  2765. file.
  2766. Also see 'smartcase' and 'tagcase'.
  2767. Can be overruled by using "\c" or "\C" in the pattern, see
  2768. |/ignorecase|.
  2769. *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
  2770. 'imcmdline' 'imc' boolean (default off)
  2771. global
  2772. When set the Input Method is always on when starting to edit a command
  2773. line, unless entering a search pattern (see 'imsearch' for that).
  2774. Setting this option is useful when your input method allows entering
  2775. English characters directly, e.g., when it's used to type accented
  2776. characters with dead keys.
  2777. *'imdisable'* *'imd'* *'noimdisable'* *'noimd'*
  2778. 'imdisable' 'imd' boolean (default off, on for some systems (SGI))
  2779. global
  2780. When set the Input Method is never used. This is useful to disable
  2781. the IM when it doesn't work properly.
  2782. Currently this option is on by default for SGI/IRIX machines. This
  2783. may change in later releases.
  2784. *'iminsert'* *'imi'*
  2785. 'iminsert' 'imi' number (default 0)
  2786. local to buffer
  2787. Specifies whether :lmap or an Input Method (IM) is to be used in
  2788. Insert mode. Valid values:
  2789. 0 :lmap is off and IM is off
  2790. 1 :lmap is ON and IM is off
  2791. 2 :lmap is off and IM is ON
  2792. 2 is available only when compiled with the |+multi_byte_ime|, |+xim|
  2793. or |global-ime|.
  2794. To always reset the option to zero when leaving Insert mode with <Esc>
  2795. this can be used: >
  2796. :inoremap <ESC> <ESC>:set iminsert=0<CR>
  2797. < This makes :lmap and IM turn off automatically when leaving Insert
  2798. mode.
  2799. Note that this option changes when using CTRL-^ in Insert mode
  2800. |i_CTRL-^|.
  2801. The value is set to 1 when setting 'keymap' to a valid keymap name.
  2802. It is also used for the argument of commands like "r" and "f".
  2803. *'imsearch'* *'ims'*
  2804. 'imsearch' 'ims' number (default -1)
  2805. local to buffer
  2806. Specifies whether :lmap or an Input Method (IM) is to be used when
  2807. entering a search pattern. Valid values:
  2808. -1 the value of 'iminsert' is used, makes it look like
  2809. 'iminsert' is also used when typing a search pattern
  2810. 0 :lmap is off and IM is off
  2811. 1 :lmap is ON and IM is off
  2812. 2 :lmap is off and IM is ON
  2813. Note that this option changes when using CTRL-^ in Command-line mode
  2814. |c_CTRL-^|.
  2815. The value is set to 1 when it is not -1 and setting the 'keymap'
  2816. option to a valid keymap name.
  2817. *'inccommand'* *'icm'*
  2818. 'inccommand' 'icm' string (default "")
  2819. global
  2820. "nosplit": Shows the effects of a command incrementally, as you type.
  2821. "split" : Also shows partial off-screen results in a preview window.
  2822. Works for |:substitute|, |:smagic|, |:snomagic|. |hl-Substitute|
  2823. If the preview is too slow (exceeds 'redrawtime') then 'inccommand' is
  2824. automatically disabled until |Command-line-mode| is done.
  2825. *'include'* *'inc'*
  2826. 'include' 'inc' string (default "^\s*#\s*include")
  2827. global or local to buffer |global-local|
  2828. Pattern to be used to find an include command. It is a search
  2829. pattern, just like for the "/" command (See |pattern|). The default
  2830. value is for C programs. This option is used for the commands "[i",
  2831. "]I", "[d", etc.
  2832. Normally the 'isfname' option is used to recognize the file name that
  2833. comes after the matched pattern. But if "\zs" appears in the pattern
  2834. then the text matched from "\zs" to the end, or until "\ze" if it
  2835. appears, is used as the file name. Use this to include characters
  2836. that are not in 'isfname', such as a space. You can then use
  2837. 'includeexpr' to process the matched text.
  2838. See |option-backslash| about including spaces and backslashes.
  2839. *'includeexpr'* *'inex'*
  2840. 'includeexpr' 'inex' string (default "")
  2841. local to buffer
  2842. Expression to be used to transform the string found with the 'include'
  2843. option to a file name. Mostly useful to change "." to "/" for Java: >
  2844. :set includeexpr=substitute(v:fname,'\\.','/','g')
  2845. < The "v:fname" variable will be set to the file name that was detected.
  2846. Also used for the |gf| command if an unmodified file name can't be
  2847. found. Allows doing "gf" on the name after an 'include' statement.
  2848. Also used for |<cfile>|.
  2849. The expression will be evaluated in the |sandbox| when set from a
  2850. modeline, see |sandbox-option|.
  2851. This option cannot be set in a modeline when 'modelineexpr' is off.
  2852. It is not allowed to change text or jump to another window while
  2853. evaluating 'includeexpr' |textlock|.
  2854. *'incsearch'* *'is'* *'noincsearch'* *'nois'*
  2855. 'incsearch' 'is' boolean (default on)
  2856. global
  2857. While typing a search command, show where the pattern, as it was typed
  2858. so far, matches. The matched string is highlighted. If the pattern
  2859. is invalid or not found, nothing is shown. The screen will be updated
  2860. often, this is only useful on fast terminals.
  2861. < Note that the match will be shown, but the cursor will return to its
  2862. original position when no match is found and when pressing <Esc>. You
  2863. still need to finish the search command with <Enter> to move the
  2864. cursor to the match.
  2865. You can use the CTRL-G and CTRL-T keys to move to the next and
  2866. previous match. |c_CTRL-G| |c_CTRL-T|
  2867. Vim only searches for about half a second. With a complicated
  2868. pattern and/or a lot of text the match may not be found. This is to
  2869. avoid that Vim hangs while you are typing the pattern.
  2870. The |hl-IncSearch| highlight group determines the highlighting.
  2871. When 'hlsearch' is on, all matched strings are highlighted too while
  2872. typing a search command. See also: 'hlsearch'.
  2873. If you don't want to turn 'hlsearch' on, but want to highlight all
  2874. matches while searching, you can turn on and off 'hlsearch' with
  2875. autocmd. Example: >
  2876. augroup vimrc-incsearch-highlight
  2877. autocmd!
  2878. autocmd CmdlineEnter /,\? :set hlsearch
  2879. autocmd CmdlineLeave /,\? :set nohlsearch
  2880. augroup END
  2881. <
  2882. CTRL-L can be used to add one character from after the current match
  2883. to the command line. If 'ignorecase' and 'smartcase' are set and the
  2884. command line has no uppercase characters, the added character is
  2885. converted to lowercase.
  2886. CTRL-R CTRL-W can be used to add the word at the end of the current
  2887. match, excluding the characters that were already typed.
  2888. *'indentexpr'* *'inde'*
  2889. 'indentexpr' 'inde' string (default "")
  2890. local to buffer
  2891. Expression which is evaluated to obtain the proper indent for a line.
  2892. It is used when a new line is created, for the |=| operator and
  2893. in Insert mode as specified with the 'indentkeys' option.
  2894. When this option is not empty, it overrules the 'cindent' and
  2895. 'smartindent' indenting. When 'lisp' is set, this option is
  2896. overridden by the Lisp indentation algorithm.
  2897. When 'paste' is set this option is not used for indenting.
  2898. The expression is evaluated with |v:lnum| set to the line number for
  2899. which the indent is to be computed. The cursor is also in this line
  2900. when the expression is evaluated (but it may be moved around).
  2901. The expression must return the number of spaces worth of indent. It
  2902. can return "-1" to keep the current indent (this means 'autoindent' is
  2903. used for the indent).
  2904. Functions useful for computing the indent are |indent()|, |cindent()|
  2905. and |lispindent()|.
  2906. The evaluation of the expression must not have side effects! It must
  2907. not change the text, jump to another window, etc. Afterwards the
  2908. cursor position is always restored, thus the cursor may be moved.
  2909. Normally this option would be set to call a function: >
  2910. :set indentexpr=GetMyIndent()
  2911. < Error messages will be suppressed, unless the 'debug' option contains
  2912. "msg".
  2913. See |indent-expression|.
  2914. The expression will be evaluated in the |sandbox| when set from a
  2915. modeline, see |sandbox-option|.
  2916. This option cannot be set in a modeline when 'modelineexpr' is off.
  2917. It is not allowed to change text or jump to another window while
  2918. evaluating 'indentexpr' |textlock|.
  2919. *'indentkeys'* *'indk'*
  2920. 'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
  2921. local to buffer
  2922. A list of keys that, when typed in Insert mode, cause reindenting of
  2923. the current line. Only happens if 'indentexpr' isn't empty.
  2924. The format is identical to 'cinkeys', see |indentkeys-format|.
  2925. See |C-indenting| and |indent-expression|.
  2926. *'infercase'* *'inf'* *'noinfercase'* *'noinf'*
  2927. 'infercase' 'inf' boolean (default off)
  2928. local to buffer
  2929. When doing keyword completion in insert mode |ins-completion|, and
  2930. 'ignorecase' is also on, the case of the match is adjusted depending
  2931. on the typed text. If the typed text contains a lowercase letter
  2932. where the match has an upper case letter, the completed part is made
  2933. lowercase. If the typed text has no lowercase letters and the match
  2934. has a lowercase letter where the typed text has an uppercase letter,
  2935. and there is a letter before it, the completed part is made uppercase.
  2936. With 'noinfercase' the match is used as-is.
  2937. *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
  2938. 'insertmode' 'im' boolean (default off)
  2939. global
  2940. Makes Vim work in a way that Insert mode is the default mode. Useful
  2941. if you want to use Vim as a modeless editor.
  2942. These Insert mode commands will be useful:
  2943. - Use the cursor keys to move around.
  2944. - Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When
  2945. this is a mapping, it is executed as if 'insertmode' was off.
  2946. Normal mode remains active until the mapping is finished.
  2947. - Use CTRL-L to execute a number of Normal mode commands, then use
  2948. <Esc> to get back to Insert mode. Note that CTRL-L moves the cursor
  2949. left, like <Esc> does when 'insertmode' isn't set. |i_CTRL-L|
  2950. These items change when 'insertmode' is set:
  2951. - when starting to edit of a file, Vim goes to Insert mode.
  2952. - <Esc> in Insert mode is a no-op and beeps.
  2953. - <Esc> in Normal mode makes Vim go to Insert mode.
  2954. - CTRL-L in Insert mode is a command, it is not inserted.
  2955. - CTRL-Z in Insert mode suspends Vim, see |CTRL-Z|. *i_CTRL-Z*
  2956. However, when <Esc> is used inside a mapping, it behaves like
  2957. 'insertmode' was not set. This was done to be able to use the same
  2958. mappings with 'insertmode' set or not set.
  2959. When executing commands with |:normal| 'insertmode' is not used.
  2960. *'isfname'* *'isf'*
  2961. 'isfname' 'isf' string (default for Windows:
  2962. "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
  2963. otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
  2964. global
  2965. The characters specified by this option are included in file names and
  2966. path names. Filenames are used for commands like "gf", "[i" and in
  2967. the tags file. It is also used for "\f" in a |pattern|.
  2968. Multi-byte characters 256 and above are always included, only the
  2969. characters up to 255 are specified with this option.
  2970. For UTF-8 the characters 0xa0 to 0xff are included as well.
  2971. Think twice before adding white space to this option. Although a
  2972. space may appear inside a file name, the effect will be that Vim
  2973. doesn't know where a file name starts or ends when doing completion.
  2974. It most likely works better without a space in 'isfname'.
  2975. Note that on systems using a backslash as path separator, Vim tries to
  2976. do its best to make it work as you would expect. That is a bit
  2977. tricky, since Vi originally used the backslash to escape special
  2978. characters. Vim will not remove a backslash in front of a normal file
  2979. name character on these systems, but it will on Unix and alikes. The
  2980. '&' and '^' are not included by default, because these are special for
  2981. cmd.exe.
  2982. The format of this option is a list of parts, separated with commas.
  2983. Each part can be a single character number or a range. A range is two
  2984. character numbers with '-' in between. A character number can be a
  2985. decimal number between 0 and 255 or the ASCII character itself (does
  2986. not work for digits). Example:
  2987. "_,-,128-140,#-43" (include '_' and '-' and the range
  2988. 128 to 140 and '#' to 43)
  2989. If a part starts with '^', the following character number or range
  2990. will be excluded from the option. The option is interpreted from left
  2991. to right. Put the excluded character after the range where it is
  2992. included. To include '^' itself use it as the last character of the
  2993. option or the end of a range. Example:
  2994. "^a-z,#,^" (exclude 'a' to 'z', include '#' and '^')
  2995. If the character is '@', all characters where isalpha() returns TRUE
  2996. are included. Normally these are the characters a to z and A to Z,
  2997. plus accented characters. To include '@' itself use "@-@". Examples:
  2998. "@,^a-z" All alphabetic characters, excluding lower
  2999. case ASCII letters.
  3000. "a-z,A-Z,@-@" All letters plus the '@' character.
  3001. A comma can be included by using it where a character number is
  3002. expected. Example:
  3003. "48-57,,,_" Digits, comma and underscore.
  3004. A comma can be excluded by prepending a '^'. Example:
  3005. " -~,^,,9" All characters from space to '~', excluding
  3006. comma, plus <Tab>.
  3007. See |option-backslash| about including spaces and backslashes.
  3008. *'isident'* *'isi'*
  3009. 'isident' 'isi' string (default for Windows:
  3010. "@,48-57,_,128-167,224-235"
  3011. otherwise: "@,48-57,_,192-255")
  3012. global
  3013. The characters given by this option are included in identifiers.
  3014. Identifiers are used in recognizing environment variables and after a
  3015. match of the 'define' option. It is also used for "\i" in a
  3016. |pattern|. See 'isfname' for a description of the format of this
  3017. option. For '@' only characters up to 255 are used.
  3018. Careful: If you change this option, it might break expanding
  3019. environment variables. E.g., when '/' is included and Vim tries to
  3020. expand "$HOME/.local/share/nvim/shada/main.shada". Maybe you should
  3021. change 'iskeyword' instead.
  3022. *'iskeyword'* *'isk'*
  3023. 'iskeyword' 'isk' string (default: @,48-57,_,192-255
  3024. Vi default: @,48-57,_)
  3025. local to buffer
  3026. Keywords are used in searching and recognizing with many commands:
  3027. "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
  3028. 'isfname' for a description of the format of this option. For '@'
  3029. characters above 255 check the "word" character class.
  3030. For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
  3031. For a help file it is set to all non-blank printable characters except
  3032. '*', '"' and '|' (so that CTRL-] on a command finds the help for that
  3033. command).
  3034. When the 'lisp' option is on the '-' character is always included.
  3035. This option also influences syntax highlighting, unless the syntax
  3036. uses |:syn-iskeyword|.
  3037. *'isprint'* *'isp'*
  3038. 'isprint' 'isp' string (default: "@,161-255")
  3039. global
  3040. The characters given by this option are displayed directly on the
  3041. screen. It is also used for "\p" in a |pattern|. The characters from
  3042. space (ASCII 32) to '~' (ASCII 126) are always displayed directly,
  3043. even when they are not included in 'isprint' or excluded. See
  3044. 'isfname' for a description of the format of this option.
  3045. Non-printable characters are displayed with two characters:
  3046. 0 - 31 "^@" - "^_"
  3047. 32 - 126 always single characters
  3048. 127 "^?"
  3049. 128 - 159 "~@" - "~_"
  3050. 160 - 254 "| " - "|~"
  3051. 255 "~?"
  3052. Illegal bytes from 128 to 255 (invalid UTF-8) are
  3053. displayed as <xx>, with the hexadecimal value of the byte.
  3054. When 'display' contains "uhex" all unprintable characters are
  3055. displayed as <xx>.
  3056. The SpecialKey highlighting will be used for unprintable characters.
  3057. |hl-SpecialKey|
  3058. Multi-byte characters 256 and above are always included, only the
  3059. characters up to 255 are specified with this option. When a character
  3060. is printable but it is not available in the current font, a
  3061. replacement character will be shown.
  3062. Unprintable and zero-width Unicode characters are displayed as <xxxx>.
  3063. There is no option to specify these characters.
  3064. *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'*
  3065. 'joinspaces' 'js' boolean (default on)
  3066. global
  3067. Insert two spaces after a '.', '?' and '!' with a join command.
  3068. Otherwise only one space is inserted.
  3069. *'keymap'* *'kmp'* *E544*
  3070. 'keymap' 'kmp' string (default "")
  3071. local to buffer
  3072. Name of a keyboard mapping. See |mbyte-keymap|.
  3073. Setting this option to a valid keymap name has the side effect of
  3074. setting 'iminsert' to one, so that the keymap becomes effective.
  3075. 'imsearch' is also set to one, unless it was -1
  3076. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  3077. *'keymodel'* *'km'*
  3078. 'keymodel' 'km' string (default "")
  3079. global
  3080. List of comma separated words, which enable special things that keys
  3081. can do. These values can be used:
  3082. startsel Using a shifted special key starts selection (either
  3083. Select mode or Visual mode, depending on "key" being
  3084. present in 'selectmode').
  3085. stopsel Using a not-shifted special key stops selection.
  3086. Special keys in this context are the cursor keys, <End>, <Home>,
  3087. <PageUp> and <PageDown>.
  3088. The 'keymodel' option is set by the |:behave| command.
  3089. *'keywordprg'* *'kp'*
  3090. 'keywordprg' 'kp' string (default ":Man", Windows: ":help")
  3091. global or local to buffer |global-local|
  3092. Program to use for the |K| command. Environment variables are
  3093. expanded |:set_env|. ":help" may be used to access the Vim internal
  3094. help. (Note that previously setting the global option to the empty
  3095. value did this, which is now deprecated.)
  3096. When the first character is ":", the command is invoked as a Vim
  3097. command prefixed with [count].
  3098. When "man" or "man -s" is used, Vim will automatically translate
  3099. a [count] for the "K" command to a section number.
  3100. See |option-backslash| about including spaces and backslashes.
  3101. Example: >
  3102. :set keywordprg=man\ -s
  3103. :set keywordprg=:Man
  3104. < This option cannot be set from a |modeline| or in the |sandbox|, for
  3105. security reasons.
  3106. *'langmap'* *'lmap'* *E357* *E358*
  3107. 'langmap' 'lmap' string (default "")
  3108. global
  3109. This option allows switching your keyboard into a special language
  3110. mode. When you are typing text in Insert mode the characters are
  3111. inserted directly. When in Normal mode the 'langmap' option takes
  3112. care of translating these special characters to the original meaning
  3113. of the key. This means you don't have to change the keyboard mode to
  3114. be able to execute Normal mode commands.
  3115. This is the opposite of the 'keymap' option, where characters are
  3116. mapped in Insert mode.
  3117. Also consider resetting 'langremap' to avoid 'langmap' applies to
  3118. characters resulting from a mapping.
  3119. This option cannot be set from a |modeline| or in the |sandbox|, for
  3120. security reasons.
  3121. Example (for Greek, in UTF-8): *greek* >
  3122. :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
  3123. < Example (exchanges meaning of z and y for commands): >
  3124. :set langmap=zy,yz,ZY,YZ
  3125. <
  3126. The 'langmap' option is a list of parts, separated with commas. Each
  3127. part can be in one of two forms:
  3128. 1. A list of pairs. Each pair is a "from" character immediately
  3129. followed by the "to" character. Examples: "aA", "aAbBcC".
  3130. 2. A list of "from" characters, a semi-colon and a list of "to"
  3131. characters. Example: "abc;ABC"
  3132. Example: "aA,fgh;FGH,cCdDeE"
  3133. Special characters need to be preceded with a backslash. These are
  3134. ";", ',' and backslash itself.
  3135. This will allow you to activate vim actions without having to switch
  3136. back and forth between the languages. Your language characters will
  3137. be understood as normal vim English characters (according to the
  3138. langmap mappings) in the following cases:
  3139. o Normal/Visual mode (commands, buffer/register names, user mappings)
  3140. o Insert/Replace Mode: Register names after CTRL-R
  3141. o Insert/Replace Mode: Mappings
  3142. Characters entered in Command-line mode will NOT be affected by
  3143. this option. Note that this option can be changed at any time
  3144. allowing to switch between mappings for different languages/encodings.
  3145. Use a mapping to avoid having to type it each time!
  3146. *'langmenu'* *'lm'*
  3147. 'langmenu' 'lm' string (default "")
  3148. global
  3149. Language to use for menu translation. Tells which file is loaded
  3150. from the "lang" directory in 'runtimepath': >
  3151. "lang/menu_" . &langmenu . ".vim"
  3152. < (without the spaces). For example, to always use the Dutch menus, no
  3153. matter what $LANG is set to: >
  3154. :set langmenu=nl_NL.ISO_8859-1
  3155. < When 'langmenu' is empty, |v:lang| is used.
  3156. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  3157. If your $LANG is set to a non-English language but you do want to use
  3158. the English menus: >
  3159. :set langmenu=none
  3160. < This option must be set before loading menus, switching on filetype
  3161. detection or syntax highlighting. Once the menus are defined setting
  3162. this option has no effect. But you could do this: >
  3163. :source $VIMRUNTIME/delmenu.vim
  3164. :set langmenu=de_DE.ISO_8859-1
  3165. :source $VIMRUNTIME/menu.vim
  3166. < Warning: This deletes all menus that you defined yourself!
  3167. *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
  3168. 'langremap' 'lrm' boolean (default off)
  3169. global
  3170. When off, setting 'langmap' does not apply to characters resulting from
  3171. a mapping. If setting 'langmap' disables some of your mappings, make
  3172. sure this option is off.
  3173. *'laststatus'* *'ls'*
  3174. 'laststatus' 'ls' number (default 2)
  3175. global
  3176. The value of this option influences when the last window will have a
  3177. status line:
  3178. 0: never
  3179. 1: only if there are at least two windows
  3180. 2: always
  3181. The screen looks nicer with a status line if you have several
  3182. windows, but it takes another screen line. |status-line|
  3183. *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
  3184. 'lazyredraw' 'lz' boolean (default off)
  3185. global
  3186. When this option is set, the screen will not be redrawn while
  3187. executing macros, registers and other commands that have not been
  3188. typed. Also, updating the window title is postponed. To force an
  3189. update use |:redraw|.
  3190. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'*
  3191. 'linebreak' 'lbr' boolean (default off)
  3192. local to window
  3193. If on, Vim will wrap long lines at a character in 'breakat' rather
  3194. than at the last character that fits on the screen. Unlike
  3195. 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
  3196. it only affects the way the file is displayed, not its contents.
  3197. If 'breakindent' is set, line is visually indented. Then, the value
  3198. of 'showbreak' is used to put in front of wrapped lines. This option
  3199. is not used when the 'wrap' option is off.
  3200. Note that <Tab> characters after an <EOL> are mostly not displayed
  3201. with the right amount of white space.
  3202. *'lines'* *E593*
  3203. 'lines' number (default 24 or terminal height)
  3204. global
  3205. Number of lines of the Vim window.
  3206. Normally you don't need to set this. It is done automatically by the
  3207. terminal initialization code.
  3208. When Vim is running in the GUI or in a resizable window, setting this
  3209. option will cause the window size to be changed. When you only want
  3210. to use the size for the GUI, put the command in your |gvimrc| file.
  3211. Vim limits the number of lines to what fits on the screen. You can
  3212. use this command to get the tallest window possible: >
  3213. :set lines=999
  3214. < Minimum value is 2, maximum value is 1000.
  3215. *'linespace'* *'lsp'*
  3216. 'linespace' 'lsp' number (default 0)
  3217. global
  3218. {only in the GUI}
  3219. Number of pixel lines inserted between characters. Useful if the font
  3220. uses the full character cell height, making lines touch each other.
  3221. When non-zero there is room for underlining.
  3222. With some fonts there can be too much room between lines (to have
  3223. space for ascents and descents). Then it makes sense to set
  3224. 'linespace' to a negative value. This may cause display problems
  3225. though!
  3226. *'lisp'* *'nolisp'*
  3227. 'lisp' boolean (default off)
  3228. local to buffer
  3229. Lisp mode: When <Enter> is typed in insert mode set the indent for
  3230. the next line to Lisp standards (well, sort of). Also happens with
  3231. "cc" or "S". 'autoindent' must also be on for this to work. The 'p'
  3232. flag in 'cpoptions' changes the method of indenting: Vi compatible or
  3233. better. Also see 'lispwords'.
  3234. The '-' character is included in keyword characters. Redefines the
  3235. "=" operator to use this same indentation algorithm rather than
  3236. calling an external program if 'equalprg' is empty.
  3237. This option is not used when 'paste' is set.
  3238. *'lispwords'* *'lw'*
  3239. 'lispwords' 'lw' string (default is very long)
  3240. global or local to buffer |global-local|
  3241. Comma separated list of words that influence the Lisp indenting.
  3242. |'lisp'|
  3243. *'list'* *'nolist'*
  3244. 'list' boolean (default off)
  3245. local to window
  3246. List mode: Show tabs as CTRL-I is displayed, display $ after end of
  3247. line. Useful to see the difference between tabs and spaces and for
  3248. trailing blanks. Further changed by the 'listchars' option.
  3249. The cursor is displayed at the start of the space a Tab character
  3250. occupies, not at the end as usual in Normal mode. To get this cursor
  3251. position while displaying Tabs with spaces, use: >
  3252. :set list lcs=tab:\ \
  3253. <
  3254. Note that list mode will also affect formatting (set with 'textwidth'
  3255. or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for
  3256. changing the way tabs are displayed.
  3257. *'listchars'* *'lcs'*
  3258. 'listchars' 'lcs' string (default: "tab:> ,trail:-,nbsp:+"
  3259. Vi default: "eol:$")
  3260. local to window
  3261. Strings to use in 'list' mode and for the |:list| command. It is a
  3262. comma separated list of string settings.
  3263. *lcs-eol*
  3264. eol:c Character to show at the end of each line. When
  3265. omitted, there is no extra character at the end of the
  3266. line.
  3267. *lcs-tab*
  3268. tab:xy[z] Two or three characters to be used to show a tab.
  3269. The third character is optional.
  3270. tab:xy The 'x' is always used, then 'y' as many times as will
  3271. fit. Thus "tab:>-" displays:
  3272. >
  3273. >-
  3274. >--
  3275. etc.
  3276. tab:xyz The 'z' is always used, then 'x' is prepended, and
  3277. then 'y' is used as many times as will fit. Thus
  3278. "tab:<->" displays:
  3279. >
  3280. <>
  3281. <->
  3282. <-->
  3283. etc.
  3284. When "tab:" is omitted, a tab is shown as ^I.
  3285. *lcs-space*
  3286. space:c Character to show for a space. When omitted, spaces
  3287. are left blank.
  3288. *lcs-trail*
  3289. trail:c Character to show for trailing spaces. When omitted,
  3290. trailing spaces are blank. Overrides the "space"
  3291. setting for trailing spaces.
  3292. *lcs-extends*
  3293. extends:c Character to show in the last column, when 'wrap' is
  3294. off and the line continues beyond the right of the
  3295. screen.
  3296. *lcs-precedes*
  3297. precedes:c Character to show in the first column, when 'wrap'
  3298. is off and there is text preceding the character
  3299. visible in the first column.
  3300. *lcs-conceal*
  3301. conceal:c Character to show in place of concealed text, when
  3302. 'conceallevel' is set to 1. A space when omitted.
  3303. *lcs-nbsp*
  3304. nbsp:c Character to show for a non-breakable space character
  3305. (0xA0 (160 decimal) and U+202F). Left blank when
  3306. omitted.
  3307. The characters ':' and ',' should not be used. UTF-8 characters can
  3308. be used. All characters must be single width.
  3309. Examples: >
  3310. :set lcs=tab:>-,trail:-
  3311. :set lcs=tab:>-,eol:<,nbsp:%
  3312. :set lcs=extends:>,precedes:<
  3313. < |hl-NonText| highlighting will be used for "eol", "extends" and
  3314. "precedes". |hl-Whitespace| for "nbsp", "space", "tab" and "trail".
  3315. *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
  3316. 'loadplugins' 'lpl' boolean (default on)
  3317. global
  3318. When on the plugin scripts are loaded when starting up |load-plugins|.
  3319. This option can be reset in your |vimrc| file to disable the loading
  3320. of plugins.
  3321. Note that using the "-u NONE" and "--noplugin" command line arguments
  3322. reset this option. |-u| |--noplugin|
  3323. *'magic'* *'nomagic'*
  3324. 'magic' boolean (default on)
  3325. global
  3326. Changes the special characters that can be used in search patterns.
  3327. See |pattern|.
  3328. WARNING: Switching this option off most likely breaks plugins! That
  3329. is because many patterns assume it's on and will fail when it's off.
  3330. Only switch it off when working with old Vi scripts. In any other
  3331. situation write patterns that work when 'magic' is on. Include "\M"
  3332. when you want to |/\M|.
  3333. *'makeef'* *'mef'*
  3334. 'makeef' 'mef' string (default: "")
  3335. global
  3336. Name of the errorfile for the |:make| command (see |:make_makeprg|)
  3337. and the |:grep| command.
  3338. When it is empty, an internally generated temp file will be used.
  3339. When "##" is included, it is replaced by a number to make the name
  3340. unique. This makes sure that the ":make" command doesn't overwrite an
  3341. existing file.
  3342. NOT used for the ":cf" command. See 'errorfile' for that.
  3343. Environment variables are expanded |:set_env|.
  3344. See |option-backslash| about including spaces and backslashes.
  3345. This option cannot be set from a |modeline| or in the |sandbox|, for
  3346. security reasons.
  3347. *'makeencoding'* *'menc'*
  3348. 'makeencoding' 'menc' string (default "")
  3349. global or local to buffer |global-local|
  3350. Encoding used for reading the output of external commands. When empty,
  3351. encoding is not converted.
  3352. This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`,
  3353. `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`,
  3354. and `:laddfile`.
  3355. This would be mostly useful when you use MS-Windows. If |+iconv| is
  3356. enabled and GNU libiconv is used, setting 'makeencoding' to "char" has
  3357. the same effect as setting to the system locale encoding. Example: >
  3358. :set makeencoding=char " system locale is used
  3359. <
  3360. *'makeprg'* *'mp'*
  3361. 'makeprg' 'mp' string (default "make")
  3362. global or local to buffer |global-local|
  3363. Program to use for the ":make" command. See |:make_makeprg|.
  3364. This option may contain '%' and '#' characters (see |:_%| and |:_#|),
  3365. which are expanded to the current and alternate file name. Use |::S|
  3366. to escape file names in case they contain special characters.
  3367. Environment variables are expanded |:set_env|. See |option-backslash|
  3368. about including spaces and backslashes.
  3369. Note that a '|' must be escaped twice: once for ":set" and once for
  3370. the interpretation of a command. When you use a filter called
  3371. "myfilter" do it like this: >
  3372. :set makeprg=gmake\ \\\|\ myfilter
  3373. < The placeholder "$*" can be given (even multiple times) to specify
  3374. where the arguments will be included, for example: >
  3375. :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
  3376. < This option cannot be set from a |modeline| or in the |sandbox|, for
  3377. security reasons.
  3378. *'matchpairs'* *'mps'*
  3379. 'matchpairs' 'mps' string (default "(:),{:},[:]")
  3380. local to buffer
  3381. Characters that form pairs. The |%| command jumps from one to the
  3382. other.
  3383. Only character pairs are allowed that are different, thus you cannot
  3384. jump between two double quotes.
  3385. The characters must be separated by a colon.
  3386. The pairs must be separated by a comma. Example for including '<' and
  3387. '>' (HTML): >
  3388. :set mps+=<:>
  3389. < A more exotic example, to jump between the '=' and ';' in an
  3390. assignment, useful for languages like C and Java: >
  3391. :au FileType c,cpp,java set mps+==:;
  3392. < For a more advanced way of using "%", see the matchit.vim plugin in
  3393. the $VIMRUNTIME/plugin directory. |add-local-help|
  3394. *'matchtime'* *'mat'*
  3395. 'matchtime' 'mat' number (default 5)
  3396. global
  3397. Tenths of a second to show the matching paren, when 'showmatch' is
  3398. set. Note that this is not in milliseconds, like other options that
  3399. set a time. This is to be compatible with Nvi.
  3400. *'maxcombine'* *'mco'*
  3401. 'maxcombine' 'mco' Removed. |vim-differences|
  3402. Nvim always displays up to 6 combining characters. You can still edit
  3403. text with more than 6 combining characters, you just can't see them.
  3404. Use |g8| or |ga|. See |mbyte-combining|.
  3405. *'maxfuncdepth'* *'mfd'*
  3406. 'maxfuncdepth' 'mfd' number (default 100)
  3407. global
  3408. Maximum depth of function calls for user functions. This normally
  3409. catches endless recursion. When using a recursive function with
  3410. more depth, set 'maxfuncdepth' to a bigger number. But this will use
  3411. more memory, there is the danger of failing when memory is exhausted.
  3412. Increasing this limit above 200 also changes the maximum for Ex
  3413. command recursion, see |E169|.
  3414. See also |:function|.
  3415. *'maxmapdepth'* *'mmd'* *E223*
  3416. 'maxmapdepth' 'mmd' number (default 1000)
  3417. global
  3418. Maximum number of times a mapping is done without resulting in a
  3419. character to be used. This normally catches endless mappings, like
  3420. ":map x y" with ":map y x". It still does not catch ":map g wg",
  3421. because the 'w' is used before the next mapping is done. See also
  3422. |key-mapping|.
  3423. *'maxmempattern'* *'mmp'*
  3424. 'maxmempattern' 'mmp' number (default 1000)
  3425. global
  3426. Maximum amount of memory (in Kbyte) to use for pattern matching.
  3427. The maximum value is about 2000000. Use this to work without a limit.
  3428. *E363*
  3429. When Vim runs into the limit it gives an error message and mostly
  3430. behaves like CTRL-C was typed.
  3431. Running into the limit often means that the pattern is very
  3432. inefficient or too complex. This may already happen with the pattern
  3433. "\(.\)*" on a very long line. ".*" works much better.
  3434. Might also happen on redraw, when syntax rules try to match a complex
  3435. text structure.
  3436. Vim may run out of memory before hitting the 'maxmempattern' limit, in
  3437. which case you get an "Out of memory" error instead.
  3438. *'menuitems'* *'mis'*
  3439. 'menuitems' 'mis' number (default 25)
  3440. global
  3441. Maximum number of items to use in a menu. Used for menus that are
  3442. generated from a list of items, e.g., the Buffers menu. Changing this
  3443. option has no direct effect, the menu must be refreshed first.
  3444. *'mkspellmem'* *'msm'*
  3445. 'mkspellmem' 'msm' string (default "460000,2000,500")
  3446. global
  3447. Parameters for |:mkspell|. This tunes when to start compressing the
  3448. word tree. Compression can be slow when there are many words, but
  3449. it's needed to avoid running out of memory. The amount of memory used
  3450. per word depends very much on how similar the words are, that's why
  3451. this tuning is complicated.
  3452. There are three numbers, separated by commas:
  3453. {start},{inc},{added}
  3454. For most languages the uncompressed word tree fits in memory. {start}
  3455. gives the amount of memory in Kbyte that can be used before any
  3456. compression is done. It should be a bit smaller than the amount of
  3457. memory that is available to Vim.
  3458. When going over the {start} limit the {inc} number specifies the
  3459. amount of memory in Kbyte that can be allocated before another
  3460. compression is done. A low number means compression is done after
  3461. less words are added, which is slow. A high number means more memory
  3462. will be allocated.
  3463. After doing compression, {added} times 1024 words can be added before
  3464. the {inc} limit is ignored and compression is done when any extra
  3465. amount of memory is needed. A low number means there is a smaller
  3466. chance of hitting the {inc} limit, less memory is used but it's
  3467. slower.
  3468. The languages for which these numbers are important are Italian and
  3469. Hungarian. The default works for when you have about 512 Mbyte. If
  3470. you have 1 Gbyte you could use: >
  3471. :set mkspellmem=900000,3000,800
  3472. < If you have less than 512 Mbyte |:mkspell| may fail for some
  3473. languages, no matter what you set 'mkspellmem' to.
  3474. This option cannot be set from a |modeline| or in the |sandbox|.
  3475. *'modeline'* *'ml'* *'nomodeline'* *'noml'*
  3476. 'modeline' 'ml' boolean (Vim default: on (off for root),
  3477. Vi default: off)
  3478. local to buffer
  3479. If 'modeline' is on 'modelines' gives the number of lines that is
  3480. checked for set commands. If 'modeline' is off or 'modelines' is zero
  3481. no lines are checked. See |modeline|.
  3482. *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'*
  3483. 'modelineexpr' 'mle' boolean (default: off)
  3484. global
  3485. When on allow some options that are an expression to be set in the
  3486. modeline. Check the option for whether it is affected by
  3487. 'modelineexpr'. Also see |modeline|.
  3488. *'modelines'* *'mls'*
  3489. 'modelines' 'mls' number (default 5)
  3490. global
  3491. If 'modeline' is on 'modelines' gives the number of lines that is
  3492. checked for set commands. If 'modeline' is off or 'modelines' is zero
  3493. no lines are checked. See |modeline|.
  3494. *'modifiable'* *'ma'* *'nomodifiable'* *'noma'* *E21*
  3495. 'modifiable' 'ma' boolean (default on)
  3496. local to buffer
  3497. When off the buffer contents cannot be changed. The 'fileformat' and
  3498. 'fileencoding' options also can't be changed.
  3499. Can be reset on startup with the |-M| command line argument.
  3500. *'modified'* *'mod'* *'nomodified'* *'nomod'*
  3501. 'modified' 'mod' boolean (default off)
  3502. local to buffer
  3503. When on, the buffer is considered to be modified. This option is set
  3504. when:
  3505. 1. A change was made to the text since it was last written. Using the
  3506. |undo| command to go back to the original text will reset the
  3507. option. But undoing changes that were made before writing the
  3508. buffer will set the option again, since the text is different from
  3509. when it was written.
  3510. 2. 'fileformat' or 'fileencoding' is different from its original
  3511. value. The original value is set when the buffer is read or
  3512. written. A ":set nomodified" command also resets the original
  3513. values to the current values and the 'modified' option will be
  3514. reset.
  3515. Similarly for 'eol' and 'bomb'.
  3516. This option is not set when a change is made to the buffer as the
  3517. result of a BufNewFile, BufRead/BufReadPost, BufWritePost,
  3518. FileAppendPost or VimLeave autocommand event. See |gzip-example| for
  3519. an explanation.
  3520. When 'buftype' is "nowrite" or "nofile" this option may be set, but
  3521. will be ignored.
  3522. Note that the text may actually be the same, e.g. 'modified' is set
  3523. when using "rA" on an "A".
  3524. *'more'* *'nomore'*
  3525. 'more' boolean (Vim default: on, Vi default: off)
  3526. global
  3527. When on, listings pause when the whole screen is filled. You will get
  3528. the |more-prompt|. When this option is off there are no pauses, the
  3529. listing continues until finished.
  3530. *'mouse'* *E538*
  3531. 'mouse' string (default "")
  3532. global
  3533. Enables mouse support. For example, to enable the mouse in Normal mode
  3534. and Visual mode: >
  3535. :set mouse=nv
  3536. <
  3537. To temporarily disable mouse support, hold the shift key while using
  3538. the mouse.
  3539. Mouse support can be enabled for different modes:
  3540. n Normal mode
  3541. v Visual mode
  3542. i Insert mode
  3543. c Command-line mode
  3544. h all previous modes when editing a help file
  3545. a all previous modes
  3546. r for |hit-enter| and |more-prompt| prompt
  3547. Left-click anywhere in a text buffer to place the cursor there. This
  3548. works with operators too, e.g. type |d| then left-click to delete text
  3549. from the current cursor position to the position where you clicked.
  3550. Drag the |status-line| or vertical separator of a window to resize it.
  3551. If enabled for "v" (Visual mode) then double-click selects word-wise,
  3552. triple-click makes it line-wise, and quadruple-click makes it
  3553. rectangular block-wise.
  3554. For scrolling with a mouse wheel see |scroll-mouse-wheel|.
  3555. Note: When enabling the mouse in a terminal, copy/paste will use the
  3556. "* register if possible. See also 'clipboard'.
  3557. Related options:
  3558. 'mousefocus' window focus follows mouse pointer
  3559. 'mousemodel' what mouse button does which action
  3560. 'mousehide' hide mouse pointer while typing text
  3561. 'selectmode' whether to start Select mode or Visual mode
  3562. The :behave command provides some "profiles" for mouse behavior.
  3563. *:behave* *:be*
  3564. :be[have] {model} Set behavior for mouse and selection. Valid
  3565. arguments are:
  3566. mswin MS-Windows behavior
  3567. xterm Xterm behavior
  3568. Using ":behave" changes these options:
  3569. option mswin xterm ~
  3570. 'selectmode' "mouse,key" ""
  3571. 'mousemodel' "popup" "extend"
  3572. 'keymodel' "startsel,stopsel" ""
  3573. 'selection' "exclusive" "inclusive"
  3574. *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
  3575. 'mousefocus' 'mousef' boolean (default off)
  3576. global
  3577. {only works in the GUI}
  3578. The window that the mouse pointer is on is automatically activated.
  3579. When changing the window layout or window focus in another way, the
  3580. mouse pointer is moved to the window with keyboard focus. Off is the
  3581. default because it makes using the pull down menus a little goofy, as
  3582. a pointer transit may activate a window unintentionally.
  3583. *'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
  3584. 'mousehide' 'mh' boolean (default on)
  3585. global
  3586. {only works in the GUI}
  3587. When on, the mouse pointer is hidden when characters are typed.
  3588. The mouse pointer is restored when the mouse is moved.
  3589. *'mousemodel'* *'mousem'*
  3590. 'mousemodel' 'mousem' string (default "extend")
  3591. global
  3592. Sets the model to use for the mouse. The name mostly specifies what
  3593. the right mouse button is used for:
  3594. extend Right mouse button extends a selection. This works
  3595. like in an xterm.
  3596. popup Right mouse button pops up a menu. The shifted left
  3597. mouse button extends a selection. This works like
  3598. with Microsoft Windows.
  3599. popup_setpos Like "popup", but the cursor will be moved to the
  3600. position where the mouse was clicked, and thus the
  3601. selected operation will act upon the clicked object.
  3602. If clicking inside a selection, that selection will
  3603. be acted upon, i.e. no cursor move. This implies of
  3604. course, that right clicking outside a selection will
  3605. end Visual mode.
  3606. Overview of what button does what for each model:
  3607. mouse extend popup(_setpos) ~
  3608. left click place cursor place cursor
  3609. left drag start selection start selection
  3610. shift-left search word extend selection
  3611. right click extend selection popup menu (place cursor)
  3612. right drag extend selection -
  3613. middle click paste paste
  3614. In the "popup" model the right mouse button produces a pop-up menu.
  3615. You need to define this first, see |popup-menu|.
  3616. In a terminal the popup menu works if Vim is compiled with the
  3617. |+insert_expand| option.
  3618. Note that you can further refine the meaning of buttons with mappings.
  3619. See |mouse-overview|. But mappings are NOT used for modeless selection.
  3620. Example: >
  3621. :map <S-LeftMouse> <RightMouse>
  3622. :map <S-LeftDrag> <RightDrag>
  3623. :map <S-LeftRelease> <RightRelease>
  3624. :map <2-S-LeftMouse> <2-RightMouse>
  3625. :map <2-S-LeftDrag> <2-RightDrag>
  3626. :map <2-S-LeftRelease> <2-RightRelease>
  3627. :map <3-S-LeftMouse> <3-RightMouse>
  3628. :map <3-S-LeftDrag> <3-RightDrag>
  3629. :map <3-S-LeftRelease> <3-RightRelease>
  3630. :map <4-S-LeftMouse> <4-RightMouse>
  3631. :map <4-S-LeftDrag> <4-RightDrag>
  3632. :map <4-S-LeftRelease> <4-RightRelease>
  3633. <
  3634. Mouse commands requiring the CTRL modifier can be simulated by typing
  3635. the "g" key before using the mouse:
  3636. "g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click)
  3637. "g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
  3638. The 'mousemodel' option is set by the |:behave| command.
  3639. *'mouseshape'* *'mouses'* *E547*
  3640. 'mouseshape' 'mouses' string (default "i:beam,r:beam,s:updown,sd:cross,
  3641. m:no,ml:up-arrow,v:rightup-arrow")
  3642. global
  3643. This option tells Vim what the mouse pointer should look like in
  3644. different modes. The option is a comma separated list of parts, much
  3645. like used for 'guicursor'. Each part consist of a mode/location-list
  3646. and an argument-list:
  3647. mode-list:shape,mode-list:shape,..
  3648. The mode-list is a dash separated list of these modes/locations:
  3649. In a normal window: ~
  3650. n Normal mode
  3651. v Visual mode
  3652. ve Visual mode with 'selection' "exclusive" (same as 'v',
  3653. if not specified)
  3654. o Operator-pending mode
  3655. i Insert mode
  3656. r Replace mode
  3657. Others: ~
  3658. c appending to the command-line
  3659. ci inserting in the command-line
  3660. cr replacing in the command-line
  3661. m at the 'Hit ENTER' or 'More' prompts
  3662. ml idem, but cursor in the last line
  3663. e any mode, pointer below last window
  3664. s any mode, pointer on a status line
  3665. sd any mode, while dragging a status line
  3666. vs any mode, pointer on a vertical separator line
  3667. vd any mode, while dragging a vertical separator line
  3668. a everywhere
  3669. The shape is one of the following:
  3670. avail name looks like ~
  3671. w x arrow Normal mouse pointer
  3672. w x blank no pointer at all (use with care!)
  3673. w x beam I-beam
  3674. w x updown up-down sizing arrows
  3675. w x leftright left-right sizing arrows
  3676. w x busy The system's usual busy pointer
  3677. w x no The system's usual 'no input' pointer
  3678. x udsizing indicates up-down resizing
  3679. x lrsizing indicates left-right resizing
  3680. x crosshair like a big thin +
  3681. x hand1 black hand
  3682. x hand2 white hand
  3683. x pencil what you write with
  3684. x question big ?
  3685. x rightup-arrow arrow pointing right-up
  3686. w x up-arrow arrow pointing up
  3687. x <number> any X11 pointer number (see X11/cursorfont.h)
  3688. The "avail" column contains a 'w' if the shape is available for Win32,
  3689. x for X11.
  3690. Any modes not specified or shapes not available use the normal mouse
  3691. pointer.
  3692. Example: >
  3693. :set mouseshape=s:udsizing,m:no
  3694. < will make the mouse turn to a sizing arrow over the status lines and
  3695. indicate no input when the hit-enter prompt is displayed (since
  3696. clicking the mouse has no effect in this state.)
  3697. *'mousetime'* *'mouset'*
  3698. 'mousetime' 'mouset' number (default 500)
  3699. global
  3700. Defines the maximum time in msec between two mouse clicks for the
  3701. second click to be recognized as a multi click.
  3702. *'nrformats'* *'nf'*
  3703. 'nrformats' 'nf' string (default "bin,hex")
  3704. local to buffer
  3705. This defines what bases Vim will consider for numbers when using the
  3706. CTRL-A and CTRL-X commands for adding to and subtracting from a number
  3707. respectively; see |CTRL-A| for more info on these commands.
  3708. alpha If included, single alphabetical characters will be
  3709. incremented or decremented. This is useful for a list with a
  3710. letter index a), b), etc. *octal-nrformats*
  3711. octal If included, numbers that start with a zero will be considered
  3712. to be octal. Example: Using CTRL-A on "007" results in "010".
  3713. hex If included, numbers starting with "0x" or "0X" will be
  3714. considered to be hexadecimal. Example: Using CTRL-X on
  3715. "0x100" results in "0x0ff".
  3716. bin If included, numbers starting with "0b" or "0B" will be
  3717. considered to be binary. Example: Using CTRL-X on
  3718. "0b1000" subtracts one, resulting in "0b0111".
  3719. Numbers which simply begin with a digit in the range 1-9 are always
  3720. considered decimal. This also happens for numbers that are not
  3721. recognized as octal or hex.
  3722. *'number'* *'nu'* *'nonumber'* *'nonu'*
  3723. 'number' 'nu' boolean (default off)
  3724. local to window
  3725. Print the line number in front of each line. When the 'n' option is
  3726. excluded from 'cpoptions' a wrapped line will not use the column of
  3727. line numbers.
  3728. Use the 'numberwidth' option to adjust the room for the line number.
  3729. When a long, wrapped line doesn't start with the first character, '-'
  3730. characters are put before the number.
  3731. For highlighting see |hl-LineNr|, |hl-CursorLineNr|, and the
  3732. |:sign-define| "numhl" argument.
  3733. *number_relativenumber*
  3734. The 'relativenumber' option changes the displayed number to be
  3735. relative to the cursor. Together with 'number' there are these
  3736. four combinations (cursor in line 3):
  3737. 'nonu' 'nu' 'nonu' 'nu'
  3738. 'nornu' 'nornu' 'rnu' 'rnu'
  3739. |apple | 1 apple | 2 apple | 2 apple
  3740. |pear | 2 pear | 1 pear | 1 pear
  3741. |nobody | 3 nobody | 0 nobody |3 nobody
  3742. |there | 4 there | 1 there | 1 there
  3743. *'numberwidth'* *'nuw'*
  3744. 'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
  3745. local to window
  3746. Minimal number of columns to use for the line number. Only relevant
  3747. when the 'number' or 'relativenumber' option is set or printing lines
  3748. with a line number. Since one space is always between the number and
  3749. the text, there is one less character for the number itself.
  3750. The value is the minimum width. A bigger width is used when needed to
  3751. fit the highest line number in the buffer respectively the number of
  3752. rows in the window, depending on whether 'number' or 'relativenumber'
  3753. is set. Thus with the Vim default of 4 there is room for a line number
  3754. up to 999. When the buffer has 1000 lines five columns will be used.
  3755. The minimum value is 1, the maximum value is 10.
  3756. *'omnifunc'* *'ofu'*
  3757. 'omnifunc' 'ofu' string (default: empty)
  3758. local to buffer
  3759. This option specifies a function to be used for Insert mode omni
  3760. completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
  3761. See |complete-functions| for an explanation of how the function is
  3762. invoked and what it should return.
  3763. This option is usually set by a filetype plugin:
  3764. |:filetype-plugin-on|
  3765. This option cannot be set from a |modeline| or in the |sandbox|, for
  3766. security reasons.
  3767. *'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
  3768. 'opendevice' 'odev' boolean (default off)
  3769. global
  3770. {only for Windows}
  3771. Enable reading and writing from devices. This may get Vim stuck on a
  3772. device that can be opened but doesn't actually do the I/O. Therefore
  3773. it is off by default.
  3774. Note that on Windows editing "aux.h", "lpt1.txt" and the like also
  3775. result in editing a device.
  3776. *'operatorfunc'* *'opfunc'*
  3777. 'operatorfunc' 'opfunc' string (default: empty)
  3778. global
  3779. This option specifies a function to be called by the |g@| operator.
  3780. See |:map-operator| for more info and an example.
  3781. This option cannot be set from a |modeline| or in the |sandbox|, for
  3782. security reasons.
  3783. *'packpath'* *'pp'*
  3784. 'packpath' 'pp' string (default: see 'runtimepath')
  3785. Directories used to find packages. See |packages|.
  3786. *'paragraphs'* *'para'*
  3787. 'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
  3788. global
  3789. Specifies the nroff macros that separate paragraphs. These are pairs
  3790. of two letters (see |object-motions|).
  3791. *'paste'* *'nopaste'*
  3792. 'paste' boolean (default off)
  3793. global
  3794. This option is obsolete; |bracketed-paste-mode| is built-in.
  3795. Put Vim in Paste mode. This is useful if you want to cut or copy
  3796. some text from one window and paste it in Vim. This will avoid
  3797. unexpected effects.
  3798. Setting this option is useful when using Vim in a terminal, where Vim
  3799. cannot distinguish between typed text and pasted text. In the GUI, Vim
  3800. knows about pasting and will mostly do the right thing without 'paste'
  3801. being set. The same is true for a terminal where Vim handles the
  3802. mouse clicks itself.
  3803. This option is reset when starting the GUI. Thus if you set it in
  3804. your vimrc it will work in a terminal, but not in the GUI. Setting
  3805. 'paste' in the GUI has side effects: e.g., the Paste toolbar button
  3806. will no longer work in Insert mode, because it uses a mapping.
  3807. When the 'paste' option is switched on (also when it was already on):
  3808. - mapping in Insert mode and Command-line mode is disabled
  3809. - abbreviations are disabled
  3810. - 'autoindent' is reset
  3811. - 'expandtab' is reset
  3812. - 'formatoptions' is used like it is empty
  3813. - 'revins' is reset
  3814. - 'ruler' is reset
  3815. - 'showmatch' is reset
  3816. - 'smartindent' is reset
  3817. - 'smarttab' is reset
  3818. - 'softtabstop' is set to 0
  3819. - 'textwidth' is set to 0
  3820. - 'wrapmargin' is set to 0
  3821. These options keep their value, but their effect is disabled:
  3822. - 'cindent'
  3823. - 'indentexpr'
  3824. - 'lisp'
  3825. NOTE: When you start editing another file while the 'paste' option is
  3826. on, settings from the modelines or autocommands may change the
  3827. settings again, causing trouble when pasting text. You might want to
  3828. set the 'paste' option again.
  3829. When the 'paste' option is reset the mentioned options are restored to
  3830. the value before the moment 'paste' was switched from off to on.
  3831. Resetting 'paste' before ever setting it does not have any effect.
  3832. Since mapping doesn't work while 'paste' is active, you need to use
  3833. the 'pastetoggle' option to toggle the 'paste' option with some key.
  3834. *'pastetoggle'* *'pt'*
  3835. 'pastetoggle' 'pt' string (default "")
  3836. global
  3837. When non-empty, specifies the key sequence that toggles the 'paste'
  3838. option. This is like specifying a mapping: >
  3839. :map {keys} :set invpaste<CR>
  3840. < Where {keys} is the value of 'pastetoggle'.
  3841. The difference is that it will work even when 'paste' is set.
  3842. 'pastetoggle' works in Insert mode and Normal mode, but not in
  3843. Command-line mode.
  3844. Mappings are checked first, thus overrule 'pastetoggle'. However,
  3845. when 'paste' is on mappings are ignored in Insert mode, thus you can do
  3846. this: >
  3847. :map <F10> :set paste<CR>
  3848. :map <F11> :set nopaste<CR>
  3849. :imap <F10> <C-O>:set paste<CR>
  3850. :imap <F11> <nop>
  3851. :set pastetoggle=<F11>
  3852. < This will make <F10> start paste mode and <F11> stop paste mode.
  3853. Note that typing <F10> in paste mode inserts "<F10>", since in paste
  3854. mode everything is inserted literally, except the 'pastetoggle' key
  3855. sequence.
  3856. No timeout is used, this means that a multi-key 'pastetoggle' can not
  3857. be triggered manually.
  3858. *'pex'* *'patchexpr'*
  3859. 'patchexpr' 'pex' string (default "")
  3860. global
  3861. Expression which is evaluated to apply a patch to a file and generate
  3862. the resulting new version of the file. See |diff-patchexpr|.
  3863. *'patchmode'* *'pm'* *E205* *E206*
  3864. 'patchmode' 'pm' string (default "")
  3865. global
  3866. When non-empty the oldest version of a file is kept. This can be used
  3867. to keep the original version of a file if you are changing files in a
  3868. source distribution. Only the first time that a file is written a
  3869. copy of the original file will be kept. The name of the copy is the
  3870. name of the original file with the string in the 'patchmode' option
  3871. appended. This option should start with a dot. Use a string like
  3872. ".orig" or ".org". 'backupdir' must not be empty for this to work
  3873. (Detail: The backup file is renamed to the patchmode file after the
  3874. new file has been successfully written, that's why it must be possible
  3875. to write a backup file). If there was no file to be backed up, an
  3876. empty file is created.
  3877. When the 'backupskip' pattern matches, a patchmode file is not made.
  3878. Using 'patchmode' for compressed files appends the extension at the
  3879. end (e.g., "file.gz.orig"), thus the resulting name isn't always
  3880. recognized as a compressed file.
  3881. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  3882. *'path'* *'pa'* *E343* *E345* *E347* *E854*
  3883. 'path' 'pa' string (default on Unix: ".,/usr/include,,"
  3884. other systems: ".,,")
  3885. global or local to buffer |global-local|
  3886. This is a list of directories which will be searched when using the
  3887. |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands,
  3888. provided that the file being searched for has a relative path (not
  3889. starting with "/", "./" or "../"). The directories in the 'path'
  3890. option may be relative or absolute.
  3891. - Use commas to separate directory names: >
  3892. :set path=.,/usr/local/include,/usr/include
  3893. < - Spaces can also be used to separate directory names (for backwards
  3894. compatibility with version 3.0). To have a space in a directory
  3895. name, precede it with an extra backslash, and escape the space: >
  3896. :set path=.,/dir/with\\\ space
  3897. < - To include a comma in a directory name precede it with an extra
  3898. backslash: >
  3899. :set path=.,/dir/with\\,comma
  3900. < - To search relative to the directory of the current file, use: >
  3901. :set path=.
  3902. < - To search in the current directory use an empty string between two
  3903. commas: >
  3904. :set path=,,
  3905. < - A directory name may end in a ':' or '/'.
  3906. - Environment variables are expanded |:set_env|.
  3907. - When using |netrw.vim| URLs can be used. For example, adding
  3908. "http://www.vim.org" will make ":find index.html" work.
  3909. - Search upwards and downwards in a directory tree using "*", "**" and
  3910. ";". See |file-searching| for info and syntax.
  3911. - Careful with '\' characters, type two to get one in the option: >
  3912. :set path=.,c:\\include
  3913. < Or just use '/' instead: >
  3914. :set path=.,c:/include
  3915. < Don't forget "." or files won't even be found in the same directory as
  3916. the file!
  3917. The maximum length is limited. How much depends on the system, mostly
  3918. it is something like 256 or 1024 characters.
  3919. You can check if all the include files are found, using the value of
  3920. 'path', see |:checkpath|.
  3921. The use of |:set+=| and |:set-=| is preferred when adding or removing
  3922. directories from the list. This avoids problems when a future version
  3923. uses another default. To remove the current directory use: >
  3924. :set path-=
  3925. < To add the current directory use: >
  3926. :set path+=
  3927. < To use an environment variable, you probably need to replace the
  3928. separator. Here is an example to append $INCL, in which directory
  3929. names are separated with a semi-colon: >
  3930. :let &path = &path . "," . substitute($INCL, ';', ',', 'g')
  3931. < Replace the ';' with a ':' or whatever separator is used. Note that
  3932. this doesn't work when $INCL contains a comma or white space.
  3933. *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
  3934. 'preserveindent' 'pi' boolean (default off)
  3935. local to buffer
  3936. When changing the indent of the current line, preserve as much of the
  3937. indent structure as possible. Normally the indent is replaced by a
  3938. series of tabs followed by spaces as required (unless |'expandtab'| is
  3939. enabled, in which case only spaces are used). Enabling this option
  3940. means the indent will preserve as many existing characters as possible
  3941. for indenting, and only add additional tabs or spaces as required.
  3942. 'expandtab' does not apply to the preserved white space, a Tab remains
  3943. a Tab.
  3944. NOTE: When using ">>" multiple times the resulting indent is a mix of
  3945. tabs and spaces. You might not like this.
  3946. Also see 'copyindent'.
  3947. Use |:retab| to clean up white space.
  3948. *'previewheight'* *'pvh'*
  3949. 'previewheight' 'pvh' number (default 12)
  3950. global
  3951. Default height for a preview window. Used for |:ptag| and associated
  3952. commands. Used for |CTRL-W_}| when no count is given.
  3953. *'previewwindow'* *'nopreviewwindow'*
  3954. *'pvw'* *'nopvw'* *E590*
  3955. 'previewwindow' 'pvw' boolean (default off)
  3956. local to window
  3957. Identifies the preview window. Only one window can have this option
  3958. set. It's normally not set directly, but by using one of the commands
  3959. |:ptag|, |:pedit|, etc.
  3960. *'printdevice'* *'pdev'*
  3961. 'printdevice' 'pdev' string (default empty)
  3962. global
  3963. The name of the printer to be used for |:hardcopy|.
  3964. See |pdev-option|.
  3965. This option cannot be set from a |modeline| or in the |sandbox|, for
  3966. security reasons.
  3967. *'printencoding'* *'penc'*
  3968. 'printencoding' 'penc' string (default empty, except for some systems)
  3969. global
  3970. Sets the character encoding used when printing.
  3971. See |penc-option|.
  3972. *'printexpr'* *'pexpr'*
  3973. 'printexpr' 'pexpr' string (default: see below)
  3974. global
  3975. Expression used to print the PostScript produced with |:hardcopy|.
  3976. See |pexpr-option|.
  3977. This option cannot be set from a |modeline| or in the |sandbox|, for
  3978. security reasons.
  3979. *'printfont'* *'pfn'*
  3980. 'printfont' 'pfn' string (default "courier")
  3981. global
  3982. The name of the font that will be used for |:hardcopy|.
  3983. See |pfn-option|.
  3984. *'printheader'* *'pheader'*
  3985. 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
  3986. global
  3987. The format of the header produced in |:hardcopy| output.
  3988. See |pheader-option|.
  3989. *'printmbcharset'* *'pmbcs'*
  3990. 'printmbcharset' 'pmbcs' string (default "")
  3991. global
  3992. The CJK character set to be used for CJK output from |:hardcopy|.
  3993. See |pmbcs-option|.
  3994. *'printmbfont'* *'pmbfn'*
  3995. 'printmbfont' 'pmbfn' string (default "")
  3996. global
  3997. List of font names to be used for CJK output from |:hardcopy|.
  3998. See |pmbfn-option|.
  3999. *'printoptions'* *'popt'*
  4000. 'printoptions' 'popt' string (default "")
  4001. global
  4002. List of items that control the format of the output of |:hardcopy|.
  4003. See |popt-option|.
  4004. *'prompt'* *'noprompt'*
  4005. 'prompt' boolean (default on)
  4006. global
  4007. When on a ":" prompt is used in Ex mode.
  4008. *'pumheight'* *'ph'*
  4009. 'pumheight' 'ph' number (default 0)
  4010. global
  4011. Determines the maximum number of items to show in the popup menu for
  4012. Insert mode completion. When zero as much space as available is used.
  4013. |ins-completion-menu|.
  4014. *'pumblend'* *'pb'*
  4015. 'pumblend' 'pb' number (default 0)
  4016. global
  4017. Enables pseudo-transparency for the |popup-menu|. Valid values are in
  4018. the range of 0 for fully opaque popupmenu (disabled) to 100 for fully
  4019. transparent background. Values between 0-30 are typically most useful.
  4020. It is possible to override the level for individual highlights within
  4021. the popupmenu using |highlight-blend|. For instance, to enable
  4022. transparency but force the current selected element to be fully opaque: >
  4023. :set pumblend=15
  4024. :hi PmenuSel blend=0
  4025. <
  4026. UI-dependent. Works best with RGB colors. 'termguicolors'
  4027. *'pyxversion'* *'pyx'*
  4028. 'pyxversion' 'pyx' number (default depends on the build)
  4029. global
  4030. Specifies the python version used for pyx* functions and commands
  4031. |python_x|. The default value is as follows:
  4032. |provider| installed Default ~
  4033. |+python| and |+python3| 0
  4034. only |+python| 2
  4035. only |+python3| 3
  4036. Available values are 0, 2 and 3.
  4037. If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of
  4038. any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3`
  4039. sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets
  4040. to 2 if Python 2 is available.
  4041. See also: |has-pythonx|
  4042. If only |+python| or |+python3| are available,
  4043. 'pyxversion' has no effect. The pyx* functions and commands are
  4044. always the same as the installed version.
  4045. This option cannot be set from a |modeline| or in the |sandbox|, for
  4046. security reasons.
  4047. *'quoteescape'* *'qe'*
  4048. 'quoteescape' 'qe' string (default "\")
  4049. local to buffer
  4050. The characters that are used to escape quotes in a string. Used for
  4051. objects like a', a" and a` |a'|.
  4052. When one of the characters in this option is found inside a string,
  4053. the following character will be skipped. The default value makes the
  4054. text "foo\"bar\\" considered to be one string.
  4055. *'readonly'* *'ro'* *'noreadonly'* *'noro'*
  4056. 'readonly' 'ro' boolean (default off)
  4057. local to buffer
  4058. If on, writes fail unless you use a '!'. Protects you from
  4059. accidentally overwriting a file. Default on when Vim is started
  4060. in read-only mode ("vim -R") or when the executable is called "view".
  4061. When using ":w!" the 'readonly' option is reset for the current
  4062. buffer, unless the 'Z' flag is in 'cpoptions'.
  4063. When using the ":view" command the 'readonly' option is
  4064. set for the newly edited buffer.
  4065. See 'modifiable' for disallowing changes to the buffer.
  4066. *'redrawtime'* *'rdt'*
  4067. 'redrawtime' 'rdt' number (default 2000)
  4068. global
  4069. Time in milliseconds for redrawing the display. Applies to
  4070. 'hlsearch', 'inccommand', |:match| highlighting and syntax
  4071. highlighting.
  4072. When redrawing takes more than this many milliseconds no further
  4073. matches will be highlighted.
  4074. For syntax highlighting the time applies per window. When over the
  4075. limit syntax highlighting is disabled until |CTRL-L| is used.
  4076. This is used to avoid that Vim hangs when using a very complicated
  4077. pattern.
  4078. *'regexpengine'* *'re'*
  4079. 'regexpengine' 're' number (default 0)
  4080. global
  4081. This selects the default regexp engine. |two-engines|
  4082. The possible values are:
  4083. 0 automatic selection
  4084. 1 old engine
  4085. 2 NFA engine
  4086. Note that when using the NFA engine and the pattern contains something
  4087. that is not supported the pattern will not match. This is only useful
  4088. for debugging the regexp engine.
  4089. Using automatic selection enables Vim to switch the engine, if the
  4090. default engine becomes too costly. E.g., when the NFA engine uses too
  4091. many states. This should prevent Vim from hanging on a combination of
  4092. a complex pattern with long text.
  4093. *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
  4094. 'relativenumber' 'rnu' boolean (default off)
  4095. local to window
  4096. Show the line number relative to the line with the cursor in front of
  4097. each line. Relative line numbers help you use the |count| you can
  4098. precede some vertical motion commands (e.g. j k + -) with, without
  4099. having to calculate it yourself. Especially useful in combination with
  4100. other commands (e.g. y d c < > gq gw =).
  4101. When the 'n' option is excluded from 'cpoptions' a wrapped
  4102. line will not use the column of line numbers.
  4103. The 'numberwidth' option can be used to set the room used for the line
  4104. number.
  4105. When a long, wrapped line doesn't start with the first character, '-'
  4106. characters are put before the number.
  4107. See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
  4108. the number.
  4109. The number in front of the cursor line also depends on the value of
  4110. 'number', see |number_relativenumber| for all combinations of the two
  4111. options.
  4112. *'remap'* *'noremap'*
  4113. 'remap' boolean (default on)
  4114. global
  4115. Allows for mappings to work recursively. If you do not want this for
  4116. a single entry, use the :noremap[!] command.
  4117. NOTE: To avoid portability problems with Vim scripts, always keep
  4118. this option at the default "on". Only switch it off when working with
  4119. old Vi scripts.
  4120. *'report'*
  4121. 'report' number (default 2)
  4122. global
  4123. Threshold for reporting number of lines changed. When the number of
  4124. changed lines is more than 'report' a message will be given for most
  4125. ":" commands. If you want it always, set 'report' to 0.
  4126. For the ":substitute" command the number of substitutions is used
  4127. instead of the number of lines.
  4128. *'revins'* *'ri'* *'norevins'* *'nori'*
  4129. 'revins' 'ri' boolean (default off)
  4130. global
  4131. Inserting characters in Insert mode will work backwards. See "typing
  4132. backwards" |ins-reverse|. This option can be toggled with the CTRL-_
  4133. command in Insert mode, when 'allowrevins' is set.
  4134. This option is reset when 'paste' is set and restored when 'paste' is
  4135. reset.
  4136. *'rightleft'* *'rl'* *'norightleft'* *'norl'*
  4137. 'rightleft' 'rl' boolean (default off)
  4138. local to window
  4139. When on, display orientation becomes right-to-left, i.e., characters
  4140. that are stored in the file appear from the right to the left.
  4141. Using this option, it is possible to edit files for languages that
  4142. are written from the right to the left such as Hebrew and Arabic.
  4143. This option is per window, so it is possible to edit mixed files
  4144. simultaneously, or to view the same file in both ways (this is
  4145. useful whenever you have a mixed text file with both right-to-left
  4146. and left-to-right strings so that both sets are displayed properly
  4147. in different windows). Also see |rileft.txt|.
  4148. *'rightleftcmd'* *'rlc'*
  4149. 'rightleftcmd' 'rlc' string (default "search")
  4150. local to window
  4151. Each word in this option enables the command line editing to work in
  4152. right-to-left mode for a group of commands:
  4153. search "/" and "?" commands
  4154. This is useful for languages such as Hebrew and Arabic.
  4155. The 'rightleft' option must be set for 'rightleftcmd' to take effect.
  4156. *'ruler'* *'ru'* *'noruler'* *'noru'*
  4157. 'ruler' 'ru' boolean (default on)
  4158. global
  4159. Show the line and column number of the cursor position, separated by a
  4160. comma. When there is room, the relative position of the displayed
  4161. text in the file is shown on the far right:
  4162. Top first line is visible
  4163. Bot last line is visible
  4164. All first and last line are visible
  4165. 45% relative position in the file
  4166. If 'rulerformat' is set, it will determine the contents of the ruler.
  4167. Each window has its own ruler. If a window has a status line, the
  4168. ruler is shown there. Otherwise it is shown in the last line of the
  4169. screen. If the statusline is given by 'statusline' (i.e. not empty),
  4170. this option takes precedence over 'ruler' and 'rulerformat'
  4171. If the number of characters displayed is different from the number of
  4172. bytes in the text (e.g., for a TAB or a multi-byte character), both
  4173. the text column (byte number) and the screen column are shown,
  4174. separated with a dash.
  4175. For an empty line "0-1" is shown.
  4176. For an empty buffer the line number will also be zero: "0,0-1".
  4177. This option is reset when 'paste' is set and restored when 'paste' is
  4178. reset.
  4179. If you don't want to see the ruler all the time but want to know where
  4180. you are, use "g CTRL-G" |g_CTRL-G|.
  4181. *'rulerformat'* *'ruf'*
  4182. 'rulerformat' 'ruf' string (default empty)
  4183. global
  4184. When this option is not empty, it determines the content of the ruler
  4185. string, as displayed for the 'ruler' option.
  4186. The format of this option is like that of 'statusline'.
  4187. This option cannot be set in a modeline when 'modelineexpr' is off.
  4188. The default ruler width is 17 characters. To make the ruler 15
  4189. characters wide, put "%15(" at the start and "%)" at the end.
  4190. Example: >
  4191. :set rulerformat=%15(%c%V\ %p%%%)
  4192. <
  4193. *'runtimepath'* *'rtp'* *vimfiles*
  4194. 'runtimepath' 'rtp' string (default: "$XDG_CONFIG_HOME/nvim,
  4195. $XDG_CONFIG_DIRS[1]/nvim,
  4196. $XDG_CONFIG_DIRS[2]/nvim,
  4197. $XDG_DATA_HOME/nvim[-data]/site,
  4198. $XDG_DATA_DIRS[1]/nvim/site,
  4199. $XDG_DATA_DIRS[2]/nvim/site,
  4200. $VIMRUNTIME,
  4201. $XDG_DATA_DIRS[2]/nvim/site/after,
  4202. $XDG_DATA_DIRS[1]/nvim/site/after,
  4203. $XDG_DATA_HOME/nvim[-data]/site/after,
  4204. $XDG_CONFIG_DIRS[2]/nvim/after,
  4205. $XDG_CONFIG_DIRS[1]/nvim/after,
  4206. $XDG_CONFIG_HOME/nvim/after")
  4207. global
  4208. List of directories to be searched for these runtime files:
  4209. filetype.vim filetypes by file name |new-filetype|
  4210. scripts.vim filetypes by file contents |new-filetype-scripts|
  4211. autoload/ automatically loaded scripts |autoload-functions|
  4212. colors/ color scheme files |:colorscheme|
  4213. compiler/ compiler files |:compiler|
  4214. doc/ documentation |write-local-help|
  4215. ftplugin/ filetype plugins |write-filetype-plugin|
  4216. indent/ indent scripts |indent-expression|
  4217. keymap/ key mapping files |mbyte-keymap|
  4218. lang/ menu translations |:menutrans|
  4219. menu.vim GUI menus |menu.vim|
  4220. pack/ packages |:packadd|
  4221. plugin/ plugin scripts |write-plugin|
  4222. print/ files for printing |postscript-print-encoding|
  4223. rplugin/ |remote-plugin| scripts
  4224. spell/ spell checking files |spell|
  4225. syntax/ syntax files |mysyntaxfile|
  4226. tutor/ tutorial files |:Tutor|
  4227. And any other file searched for with the |:runtime| command.
  4228. Defaults are setup to search these locations:
  4229. 1. Your home directory, for personal preferences.
  4230. Given by `stdpath("config")`. |$XDG_CONFIG_HOME|
  4231. 2. Directories which must contain configuration files according to
  4232. |xdg| ($XDG_CONFIG_DIRS, defaults to /etc/xdg). This also contains
  4233. preferences from system administrator.
  4234. 3. Data home directory, for plugins installed by user.
  4235. Given by `stdpath("data")`. |$XDG_DATA_HOME|
  4236. 4. nvim/site subdirectories for each directory in $XDG_DATA_DIRS.
  4237. This is for plugins which were installed by system administrator,
  4238. but are not part of the Nvim distribution. XDG_DATA_DIRS defaults
  4239. to /usr/local/share/:/usr/share/, so system administrators are
  4240. expected to install site plugins to /usr/share/nvim/site.
  4241. 5. $VIMRUNTIME, for files distributed with Neovim.
  4242. *after-directory*
  4243. 6, 7, 8, 9. In after/ subdirectories of 1, 2, 3 and 4, with reverse
  4244. ordering. This is for preferences to overrule or add to the
  4245. distributed defaults or system-wide settings (rarely needed).
  4246. More entries are added when using |packages|. If it gets very long
  4247. then `:set rtp` will be truncated, use `:echo &rtp` to see the full
  4248. string.
  4249. Note that, unlike 'path', no wildcards like "**" are allowed. Normal
  4250. wildcards are allowed, but can significantly slow down searching for
  4251. runtime files. For speed, use as few items as possible and avoid
  4252. wildcards.
  4253. See |:runtime|.
  4254. Example: >
  4255. :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME
  4256. < This will use the directory "~/vimruntime" first (containing your
  4257. personal Vim runtime files), then "/mygroup/vim" (shared between a
  4258. group of people) and finally "$VIMRUNTIME" (the distributed runtime
  4259. files).
  4260. You probably should always include $VIMRUNTIME somewhere, to use the
  4261. distributed runtime files. You can put a directory before $VIMRUNTIME
  4262. to find files which replace a distributed runtime files. You can put
  4263. a directory after $VIMRUNTIME to find files which add to distributed
  4264. runtime files.
  4265. When Vim is started with |--clean| the home directory entries are not
  4266. included.
  4267. This option cannot be set from a |modeline| or in the |sandbox|, for
  4268. security reasons.
  4269. *'scroll'* *'scr'*
  4270. 'scroll' 'scr' number (default: half the window height)
  4271. local to window
  4272. Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
  4273. set to half the number of lines in the window when the window size
  4274. changes. If you give a count to the CTRL-U or CTRL-D command it will
  4275. be used as the new value for 'scroll'. Reset to half the window
  4276. height with ":set scroll=0".
  4277. *'scrollback'* *'scbk'*
  4278. 'scrollback' 'scbk' number (default: 10000)
  4279. local to buffer
  4280. Maximum number of lines kept beyond the visible screen. Lines at the
  4281. top are deleted if new lines exceed this limit.
  4282. Minimum is 1, maximum is 100000.
  4283. Only in |terminal| buffers.
  4284. *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
  4285. 'scrollbind' 'scb' boolean (default off)
  4286. local to window
  4287. See also |scroll-binding|. When this option is set, the current
  4288. window scrolls as other scrollbind windows (windows that also have
  4289. this option set) scroll. This option is useful for viewing the
  4290. differences between two versions of a file, see 'diff'.
  4291. See |'scrollopt'| for options that determine how this option should be
  4292. interpreted.
  4293. This option is mostly reset when splitting a window to edit another
  4294. file. This means that ":split | edit file" results in two windows
  4295. with scroll-binding, but ":split file" does not.
  4296. *'scrolljump'* *'sj'*
  4297. 'scrolljump' 'sj' number (default 1)
  4298. global
  4299. Minimal number of lines to scroll when the cursor gets off the
  4300. screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E,
  4301. CTRL-D). Useful if your terminal scrolls very slowly.
  4302. When set to a negative number from -1 to -100 this is used as the
  4303. percentage of the window height. Thus -50 scrolls half the window
  4304. height.
  4305. *'scrolloff'* *'so'*
  4306. 'scrolloff' 'so' number (default 0)
  4307. global
  4308. Minimal number of screen lines to keep above and below the cursor.
  4309. This will make some context visible around where you are working. If
  4310. you set it to a very large value (999) the cursor line will always be
  4311. in the middle of the window (except at the start or end of the file or
  4312. when long lines wrap).
  4313. For scrolling horizontally see 'sidescrolloff'.
  4314. *'scrollopt'* *'sbo'*
  4315. 'scrollopt' 'sbo' string (default "ver,jump")
  4316. global
  4317. This is a comma-separated list of words that specifies how
  4318. 'scrollbind' windows should behave. 'sbo' stands for ScrollBind
  4319. Options.
  4320. The following words are available:
  4321. ver Bind vertical scrolling for 'scrollbind' windows
  4322. hor Bind horizontal scrolling for 'scrollbind' windows
  4323. jump Applies to the offset between two windows for vertical
  4324. scrolling. This offset is the difference in the first
  4325. displayed line of the bound windows. When moving
  4326. around in a window, another 'scrollbind' window may
  4327. reach a position before the start or after the end of
  4328. the buffer. The offset is not changed though, when
  4329. moving back the 'scrollbind' window will try to scroll
  4330. to the desired position when possible.
  4331. When now making that window the current one, two
  4332. things can be done with the relative offset:
  4333. 1. When "jump" is not included, the relative offset is
  4334. adjusted for the scroll position in the new current
  4335. window. When going back to the other window, the
  4336. new relative offset will be used.
  4337. 2. When "jump" is included, the other windows are
  4338. scrolled to keep the same relative offset. When
  4339. going back to the other window, it still uses the
  4340. same relative offset.
  4341. Also see |scroll-binding|.
  4342. When 'diff' mode is active there always is vertical scroll binding,
  4343. even when "ver" isn't there.
  4344. *'sections'* *'sect'*
  4345. 'sections' 'sect' string (default "SHNHH HUnhsh")
  4346. global
  4347. Specifies the nroff macros that separate sections. These are pairs of
  4348. two letters (See |object-motions|). The default makes a section start
  4349. at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh".
  4350. *'secure'* *'nosecure'* *E523*
  4351. 'secure' boolean (default off)
  4352. global
  4353. When on, ":autocmd", shell and write commands are not allowed in
  4354. ".nvimrc" and ".exrc" in the current directory and map commands are
  4355. displayed. Switch it off only if you know that you will not run into
  4356. problems, or when the 'exrc' option is off. On Unix this option is
  4357. only used if the ".nvimrc" or ".exrc" is not owned by you. This can be
  4358. dangerous if the systems allows users to do a "chown". You better set
  4359. 'secure' at the end of your |init.vim| then.
  4360. This option cannot be set from a |modeline| or in the |sandbox|, for
  4361. security reasons.
  4362. *'selection'* *'sel'*
  4363. 'selection' 'sel' string (default "inclusive")
  4364. global
  4365. This option defines the behavior of the selection. It is only used
  4366. in Visual and Select mode.
  4367. Possible values:
  4368. value past line inclusive ~
  4369. old no yes
  4370. inclusive yes yes
  4371. exclusive yes no
  4372. "past line" means that the cursor is allowed to be positioned one
  4373. character past the line.
  4374. "inclusive" means that the last character of the selection is included
  4375. in an operation. For example, when "x" is used to delete the
  4376. selection.
  4377. When "old" is used and 'virtualedit' allows the cursor to move past
  4378. the end of line the line break still isn't included.
  4379. Note that when "exclusive" is used and selecting from the end
  4380. backwards, you cannot include the last character of a line, when
  4381. starting in Normal mode and 'virtualedit' empty.
  4382. The 'selection' option is set by the |:behave| command.
  4383. *'selectmode'* *'slm'*
  4384. 'selectmode' 'slm' string (default "")
  4385. global
  4386. This is a comma separated list of words, which specifies when to start
  4387. Select mode instead of Visual mode, when a selection is started.
  4388. Possible values:
  4389. mouse when using the mouse
  4390. key when using shifted special keys
  4391. cmd when using "v", "V" or CTRL-V
  4392. See |Select-mode|.
  4393. The 'selectmode' option is set by the |:behave| command.
  4394. *'sessionoptions'* *'ssop'*
  4395. 'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds,
  4396. help,tabpages,winsize"
  4397. Vi default: "blank,buffers,curdir,folds,
  4398. help,options,tabpages,winsize")
  4399. global
  4400. Changes the effect of the |:mksession| command. It is a comma
  4401. separated list of words. Each word enables saving and restoring
  4402. something:
  4403. word save and restore ~
  4404. blank empty windows
  4405. buffers hidden and unloaded buffers, not just those in windows
  4406. curdir the current directory
  4407. folds manually created folds, opened/closed folds and local
  4408. fold options
  4409. globals global variables that start with an uppercase letter
  4410. and contain at least one lowercase letter. Only
  4411. String and Number types are stored.
  4412. help the help window
  4413. localoptions options and mappings local to a window or buffer (not
  4414. global values for local options)
  4415. options all options and mappings (also global values for local
  4416. options)
  4417. resize size of the Vim window: 'lines' and 'columns'
  4418. sesdir the directory in which the session file is located
  4419. will become the current directory (useful with
  4420. projects accessed over a network from different
  4421. systems)
  4422. slash backslashes in file names replaced with forward
  4423. slashes
  4424. tabpages all tab pages; without this only the current tab page
  4425. is restored, so that you can make a session for each
  4426. tab page separately
  4427. terminal include terminal windows where the command can be
  4428. restored
  4429. unix with Unix end-of-line format (single <NL>), even when
  4430. on Windows or DOS
  4431. winpos position of the whole Vim window
  4432. winsize window sizes
  4433. Don't include both "curdir" and "sesdir".
  4434. When neither "curdir" nor "sesdir" is included, file names are stored
  4435. with absolute paths.
  4436. "slash" and "unix" are useful on Windows when sharing session files
  4437. with Unix. The Unix version of Vim cannot source dos format scripts,
  4438. but the Windows version of Vim can source unix format scripts.
  4439. *'shada'* *'sd'* *E526* *E527* *E528*
  4440. 'shada' 'sd' string (Vim default for
  4441. Win32: !,'100,<50,s10,h,rA:,rB:
  4442. others: !,'100,<50,s10,h
  4443. Vi default: "")
  4444. global
  4445. When non-empty, the shada file is read upon startup and written
  4446. when exiting Vim (see |shada-file|). The string should be a comma
  4447. separated list of parameters, each consisting of a single character
  4448. identifying the particular parameter, followed by a number or string
  4449. which specifies the value of that parameter. If a particular
  4450. character is left out, then the default value is used for that
  4451. parameter. The following is a list of the identifying characters and
  4452. the effect of their value.
  4453. CHAR VALUE ~
  4454. *shada-!*
  4455. ! When included, save and restore global variables that start
  4456. with an uppercase letter, and don't contain a lowercase
  4457. letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
  4458. and "_K_L_M" are not. Nested List and Dict items may not be
  4459. read back correctly, you end up with an empty item.
  4460. *shada-quote*
  4461. " Maximum number of lines saved for each register. Old name of
  4462. the '<' item, with the disadvantage that you need to put a
  4463. backslash before the ", otherwise it will be recognized as the
  4464. start of a comment!
  4465. *shada-%*
  4466. % When included, save and restore the buffer list. If Vim is
  4467. started with a file name argument, the buffer list is not
  4468. restored. If Vim is started without a file name argument, the
  4469. buffer list is restored from the shada file. Quickfix
  4470. ('buftype'), unlisted ('buflisted'), unnamed and buffers on
  4471. removable media (|shada-r|) are not saved.
  4472. When followed by a number, the number specifies the maximum
  4473. number of buffers that are stored. Without a number all
  4474. buffers are stored.
  4475. *shada-'*
  4476. ' Maximum number of previously edited files for which the marks
  4477. are remembered. This parameter must always be included when
  4478. 'shada' is non-empty.
  4479. Including this item also means that the |jumplist| and the
  4480. |changelist| are stored in the shada file.
  4481. *shada-/*
  4482. / Maximum number of items in the search pattern history to be
  4483. saved. If non-zero, then the previous search and substitute
  4484. patterns are also saved. When not included, the value of
  4485. 'history' is used.
  4486. *shada-:*
  4487. : Maximum number of items in the command-line history to be
  4488. saved. When not included, the value of 'history' is used.
  4489. *shada-<*
  4490. < Maximum number of lines saved for each register. If zero then
  4491. registers are not saved. When not included, all lines are
  4492. saved. '"' is the old name for this item.
  4493. Also see the 's' item below: limit specified in KiB.
  4494. *shada-@*
  4495. @ Maximum number of items in the input-line history to be
  4496. saved. When not included, the value of 'history' is used.
  4497. *shada-c*
  4498. c Dummy option, kept for compatibility reasons. Has no actual
  4499. effect: ShaDa always uses UTF-8 and 'encoding' value is fixed
  4500. to UTF-8 as well.
  4501. *shada-f*
  4502. f Whether file marks need to be stored. If zero, file marks ('0
  4503. to '9, 'A to 'Z) are not stored. When not present or when
  4504. non-zero, they are all stored. '0 is used for the current
  4505. cursor position (when exiting or when doing |:wshada|).
  4506. *shada-h*
  4507. h Disable the effect of 'hlsearch' when loading the shada
  4508. file. When not included, it depends on whether ":nohlsearch"
  4509. has been used since the last search command.
  4510. *shada-n*
  4511. n Name of the shada file. The name must immediately follow
  4512. the 'n'. Must be at the end of the option! If the
  4513. 'shadafile' option is set, that file name overrides the one
  4514. given here with 'shada'. Environment variables are
  4515. expanded when opening the file, not when setting the option.
  4516. *shada-r*
  4517. r Removable media. The argument is a string (up to the next
  4518. ','). This parameter can be given several times. Each
  4519. specifies the start of a path for which no marks will be
  4520. stored. This is to avoid removable media. For Windows you
  4521. could use "ra:,rb:". You can also use it for temp files,
  4522. e.g., for Unix: "r/tmp". Case is ignored.
  4523. *shada-s*
  4524. s Maximum size of an item contents in KiB. If zero then nothing
  4525. is saved. Unlike Vim this applies to all items, except for
  4526. the buffer list and header. Full item size is off by three
  4527. unsigned integers: with `s10` maximum item size may be 1 byte
  4528. (type: 7-bit integer) + 9 bytes (timestamp: up to 64-bit
  4529. integer) + 3 bytes (item size: up to 16-bit integer because
  4530. 2^8 < 10240 < 2^16) + 10240 bytes (requested maximum item
  4531. contents size) = 10253 bytes.
  4532. Example: >
  4533. :set shada='50,<1000,s100,:0,n~/nvim/shada
  4534. <
  4535. '50 Marks will be remembered for the last 50 files you
  4536. edited.
  4537. <1000 Contents of registers (up to 1000 lines each) will be
  4538. remembered.
  4539. s100 Items with contents occupying more then 100 KiB are
  4540. skipped.
  4541. :0 Command-line history will not be saved.
  4542. n~/nvim/shada The name of the file to use is "~/nvim/shada".
  4543. no / Since '/' is not specified, the default will be used,
  4544. that is, save all of the search history, and also the
  4545. previous search and substitute patterns.
  4546. no % The buffer list will not be saved nor read back.
  4547. no h 'hlsearch' highlighting will be restored.
  4548. When setting 'shada' from an empty value you can use |:rshada| to
  4549. load the contents of the file, this is not done automatically.
  4550. This option cannot be set from a |modeline| or in the |sandbox|, for
  4551. security reasons.
  4552. *'shadafile'* *'sdf'*
  4553. 'shadafile' 'sdf' string (default: "")
  4554. global
  4555. When non-empty, overrides the file name used for |shada| (viminfo).
  4556. When equal to "NONE" no shada file will be read or written.
  4557. This option can be set with the |-i| command line flag. The |--clean|
  4558. command line flag sets it to "NONE".
  4559. This option cannot be set from a |modeline| or in the |sandbox|, for
  4560. security reasons.
  4561. *'shell'* *'sh'* *E91*
  4562. 'shell' 'sh' string (default $SHELL or "sh",
  4563. Windows: "cmd.exe")
  4564. global
  4565. Name of the shell to use for ! and :! commands. When changing the
  4566. value also check these options: 'shellpipe', 'shellslash'
  4567. 'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'.
  4568. It is allowed to give an argument to the command, e.g. "csh -f".
  4569. See |option-backslash| about including spaces and backslashes.
  4570. Environment variables are expanded |:set_env|.
  4571. If the name of the shell contains a space, you might need to enclose
  4572. it in quotes. Example: >
  4573. :set shell=\"c:\program\ files\unix\sh.exe\"\ -f
  4574. < Note the backslash before each quote (to avoid starting a comment) and
  4575. each space (to avoid ending the option value), so better use |:let-&|
  4576. like this: >
  4577. :let &shell='"C:\Program Files\unix\sh.exe" -f'
  4578. < Also note that the "-f" is not inside the quotes, because it is not
  4579. part of the command name.
  4580. *shell-unquoting*
  4581. Rules regarding quotes:
  4582. 1. Option is split on space and tab characters that are not inside
  4583. quotes: "abc def" runs shell named "abc" with additional argument
  4584. "def", '"abc def"' runs shell named "abc def" with no additional
  4585. arguments (here and below: additional means “additional to
  4586. 'shellcmdflag'”).
  4587. 2. Quotes in option may be present in any position and any number:
  4588. '"abc"', '"a"bc', 'a"b"c', 'ab"c"' and '"a"b"c"' are all equivalent
  4589. to just "abc".
  4590. 3. Inside quotes backslash preceding backslash means one backslash.
  4591. Backslash preceding quote means one quote. Backslash preceding
  4592. anything else means backslash and next character literally:
  4593. '"a\\b"' is the same as "a\b", '"a\\"b"' runs shell named literally
  4594. 'a"b', '"a\b"' is the same as "a\b" again.
  4595. 4. Outside of quotes backslash always means itself, it cannot be used
  4596. to escape quote: 'a\"b"' is the same as "a\b".
  4597. Note that such processing is done after |:set| did its own round of
  4598. unescaping, so to keep yourself sane use |:let-&| like shown above.
  4599. *shell-powershell*
  4600. To use powershell (on Windows): >
  4601. set shell=powershell shellquote=( shellpipe=\| shellredir=> shellxquote=
  4602. set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
  4603. < This option cannot be set from a |modeline| or in the |sandbox|, for
  4604. security reasons.
  4605. *'shellcmdflag'* *'shcf'*
  4606. 'shellcmdflag' 'shcf' string (default: "-c"; Windows: "/s /c")
  4607. global
  4608. Flag passed to the shell to execute "!" and ":!" commands; e.g.,
  4609. `bash.exe -c ls` or `cmd.exe /s /c "dir"`. For Windows
  4610. systems, the default is set according to the value of 'shell', to
  4611. reduce the need to set this option by the user.
  4612. On Unix it can have more than one flag. Each white space separated
  4613. part is passed as an argument to the shell command.
  4614. See |option-backslash| about including spaces and backslashes.
  4615. See |shell-unquoting| which talks about separating this option into
  4616. multiple arguments.
  4617. This option cannot be set from a |modeline| or in the |sandbox|, for
  4618. security reasons.
  4619. *'shellpipe'* *'sp'*
  4620. 'shellpipe' 'sp' string (default ">", "| tee", "|& tee" or "2>&1| tee")
  4621. global
  4622. String to be used to put the output of the ":make" command in the
  4623. error file. See also |:make_makeprg|. See |option-backslash| about
  4624. including spaces and backslashes.
  4625. The name of the temporary file can be represented by "%s" if necessary
  4626. (the file name is appended automatically if no %s appears in the value
  4627. of this option).
  4628. For Windows the default is ">". The output is directly saved in a file
  4629. and not echoed to the screen.
  4630. For Unix the default it "| tee". The stdout of the compiler is saved
  4631. in a file and echoed to the screen. If the 'shell' option is "csh" or
  4632. "tcsh" after initializations, the default becomes "|& tee". If the
  4633. 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh" or "bash" the
  4634. default becomes "2>&1| tee". This means that stderr is also included.
  4635. Before using the 'shell' option a path is removed, thus "/bin/sh" uses
  4636. "sh".
  4637. The initialization of this option is done after reading the vimrc
  4638. and the other initializations, so that when the 'shell' option is set
  4639. there, the 'shellpipe' option changes automatically, unless it was
  4640. explicitly set before.
  4641. When 'shellpipe' is set to an empty string, no redirection of the
  4642. ":make" output will be done. This is useful if you use a 'makeprg'
  4643. that writes to 'makeef' by itself. If you want no piping, but do
  4644. want to include the 'makeef', set 'shellpipe' to a single space.
  4645. Don't forget to precede the space with a backslash: ":set sp=\ ".
  4646. In the future pipes may be used for filtering and this option will
  4647. become obsolete (at least for Unix).
  4648. This option cannot be set from a |modeline| or in the |sandbox|, for
  4649. security reasons.
  4650. *'shellquote'* *'shq'*
  4651. 'shellquote' 'shq' string (default: ""; Windows, when 'shell'
  4652. contains "sh" somewhere: "\"")
  4653. global
  4654. Quoting character(s), put around the command passed to the shell, for
  4655. the "!" and ":!" commands. The redirection is kept outside of the
  4656. quoting. See 'shellxquote' to include the redirection. It's
  4657. probably not useful to set both options.
  4658. This is an empty string by default. Only known to be useful for
  4659. third-party shells on Windows systems, such as the MKS Korn Shell
  4660. or bash, where it should be "\"". The default is adjusted according
  4661. the value of 'shell', to reduce the need to set this option by the
  4662. user.
  4663. This option cannot be set from a |modeline| or in the |sandbox|, for
  4664. security reasons.
  4665. *'shellredir'* *'srr'*
  4666. 'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
  4667. global
  4668. String to be used to put the output of a filter command in a temporary
  4669. file. See also |:!|. See |option-backslash| about including spaces
  4670. and backslashes.
  4671. The name of the temporary file can be represented by "%s" if necessary
  4672. (the file name is appended automatically if no %s appears in the value
  4673. of this option).
  4674. The default is ">". For Unix, if the 'shell' option is "csh", "tcsh"
  4675. or "zsh" during initializations, the default becomes ">&". If the
  4676. 'shell' option is "sh", "ksh" or "bash" the default becomes
  4677. ">%s 2>&1". This means that stderr is also included.
  4678. For Win32, the Unix checks are done and additionally "cmd" is checked
  4679. for, which makes the default ">%s 2>&1". Also, the same names with
  4680. ".exe" appended are checked for.
  4681. The initialization of this option is done after reading the vimrc
  4682. and the other initializations, so that when the 'shell' option is set
  4683. there, the 'shellredir' option changes automatically unless it was
  4684. explicitly set before.
  4685. In the future pipes may be used for filtering and this option will
  4686. become obsolete (at least for Unix).
  4687. This option cannot be set from a |modeline| or in the |sandbox|, for
  4688. security reasons.
  4689. *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
  4690. 'shellslash' 'ssl' boolean (default off)
  4691. global
  4692. {only for Windows}
  4693. When set, a forward slash is used when expanding file names. This is
  4694. useful when a Unix-like shell is used instead of command.com or
  4695. cmd.exe. Backward slashes can still be typed, but they are changed to
  4696. forward slashes by Vim.
  4697. Note that setting or resetting this option has no effect for some
  4698. existing file names, thus this option needs to be set before opening
  4699. any file for best results. This might change in the future.
  4700. 'shellslash' only works when a backslash can be used as a path
  4701. separator. To test if this is so use: >
  4702. if exists('+shellslash')
  4703. <
  4704. *'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'*
  4705. 'shelltemp' 'stmp' boolean (Vim default on, Vi default off)
  4706. global
  4707. When on, use temp files for shell commands. When off use a pipe.
  4708. When using a pipe is not possible temp files are used anyway.
  4709. The advantage of using a pipe is that nobody can read the temp file
  4710. and the 'shell' command does not need to support redirection.
  4711. The advantage of using a temp file is that the file type and encoding
  4712. can be detected.
  4713. The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
  4714. |FilterWritePost| autocommands event are not triggered when
  4715. 'shelltemp' is off.
  4716. |system()| does not respect this option, it always uses pipes.
  4717. *'shellxescape'* *'sxe'*
  4718. 'shellxescape' 'sxe' string (default: "")
  4719. global
  4720. When 'shellxquote' is set to "(" then the characters listed in this
  4721. option will be escaped with a '^' character. This makes it possible
  4722. to execute most external commands with cmd.exe.
  4723. *'shellxquote'* *'sxq'*
  4724. 'shellxquote' 'sxq' string (default: "", Windows: "\"")
  4725. global
  4726. Quoting character(s), put around the command passed to the shell, for
  4727. the "!" and ":!" commands. Includes the redirection. See
  4728. 'shellquote' to exclude the redirection. It's probably not useful
  4729. to set both options.
  4730. When the value is '(' then ')' is appended. When the value is '"('
  4731. then ')"' is appended.
  4732. When the value is '(' then also see 'shellxescape'.
  4733. This option cannot be set from a |modeline| or in the |sandbox|, for
  4734. security reasons.
  4735. *'shiftround'* *'sr'* *'noshiftround'* *'nosr'*
  4736. 'shiftround' 'sr' boolean (default off)
  4737. global
  4738. Round indent to multiple of 'shiftwidth'. Applies to > and <
  4739. commands. CTRL-T and CTRL-D in Insert mode always round the indent to
  4740. a multiple of 'shiftwidth' (this is Vi compatible).
  4741. *'shiftwidth'* *'sw'*
  4742. 'shiftwidth' 'sw' number (default 8)
  4743. local to buffer
  4744. Number of spaces to use for each step of (auto)indent. Used for
  4745. |'cindent'|, |>>|, |<<|, etc.
  4746. When zero the 'ts' value will be used. Use the |shiftwidth()|
  4747. function to get the effective shiftwidth value.
  4748. *'shortmess'* *'shm'*
  4749. 'shortmess' 'shm' string (Vim default "filnxtToOF", Vi default: "S")
  4750. global
  4751. This option helps to avoid all the |hit-enter| prompts caused by file
  4752. messages, for example with CTRL-G, and to avoid some other messages.
  4753. It is a list of flags:
  4754. flag meaning when present ~
  4755. f use "(3 of 5)" instead of "(file 3 of 5)"
  4756. i use "[noeol]" instead of "[Incomplete last line]"
  4757. l use "999L, 888C" instead of "999 lines, 888 characters"
  4758. m use "[+]" instead of "[Modified]"
  4759. n use "[New]" instead of "[New File]"
  4760. r use "[RO]" instead of "[readonly]"
  4761. w use "[w]" instead of "written" for file write message
  4762. and "[a]" instead of "appended" for ':w >> file' command
  4763. x use "[dos]" instead of "[dos format]", "[unix]" instead of
  4764. "[unix format]" and "[mac]" instead of "[mac format]".
  4765. a all of the above abbreviations
  4766. o overwrite message for writing a file with subsequent message
  4767. for reading a file (useful for ":wn" or when 'autowrite' on)
  4768. O message for reading a file overwrites any previous message.
  4769. Also for quickfix message (e.g., ":cn").
  4770. s don't give "search hit BOTTOM, continuing at TOP" or "search
  4771. hit TOP, continuing at BOTTOM" messages
  4772. t truncate file message at the start if it is too long to fit
  4773. on the command-line, "<" will appear in the left most column.
  4774. Ignored in Ex mode.
  4775. T truncate other messages in the middle if they are too long to
  4776. fit on the command line. "..." will appear in the middle.
  4777. Ignored in Ex mode.
  4778. W don't give "written" or "[w]" when writing a file
  4779. A don't give the "ATTENTION" message when an existing swap file
  4780. is found.
  4781. I don't give the intro message when starting Vim |:intro|.
  4782. c don't give |ins-completion-menu| messages. For example,
  4783. "-- XXX completion (YYY)", "match 1 of 2", "The only match",
  4784. "Pattern not found", "Back at original", etc.
  4785. q use "recording" instead of "recording @a"
  4786. F don't give the file info when editing a file, like `:silent`
  4787. was used for the command; note that this also affects messages
  4788. from autocommands
  4789. S do not show search count message when searching, e.g.
  4790. "[1/5]"
  4791. This gives you the opportunity to avoid that a change between buffers
  4792. requires you to hit <Enter>, but still gives as useful a message as
  4793. possible for the space available. To get the whole message that you
  4794. would have got with 'shm' empty, use ":file!"
  4795. Useful values:
  4796. shm= No abbreviation of message.
  4797. shm=a Abbreviation, but no loss of information.
  4798. shm=at Abbreviation, and truncate message when necessary.
  4799. *'showbreak'* *'sbr'* *E595*
  4800. 'showbreak' 'sbr' string (default "")
  4801. global
  4802. String to put at the start of lines that have been wrapped. Useful
  4803. values are "> " or "+++ ": >
  4804. :set showbreak=>\
  4805. < Note the backslash to escape the trailing space. It's easier like
  4806. this: >
  4807. :let &showbreak = '+++ '
  4808. < Only printable single-cell characters are allowed, excluding <Tab> and
  4809. comma (in a future version the comma might be used to separate the
  4810. part that is shown at the end and at the start of a line).
  4811. The |hl-NonText| highlight group determines the highlighting.
  4812. Note that tabs after the showbreak will be displayed differently.
  4813. If you want the 'showbreak' to appear in between line numbers, add the
  4814. "n" flag to 'cpoptions'.
  4815. *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
  4816. 'showcmd' 'sc' boolean (Vim default: on, Vi default: off)
  4817. global
  4818. Show (partial) command in the last line of the screen. Set this
  4819. option off if your terminal is slow.
  4820. In Visual mode the size of the selected area is shown:
  4821. - When selecting characters within a line, the number of characters.
  4822. If the number of bytes is different it is also displayed: "2-6"
  4823. means two characters and six bytes.
  4824. - When selecting more than one line, the number of lines.
  4825. - When selecting a block, the size in screen characters:
  4826. {lines}x{columns}.
  4827. *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
  4828. 'showfulltag' 'sft' boolean (default off)
  4829. global
  4830. When completing a word in insert mode (see |ins-completion|) from the
  4831. tags file, show both the tag name and a tidied-up form of the search
  4832. pattern (if there is one) as possible matches. Thus, if you have
  4833. matched a C function, you can see a template for what arguments are
  4834. required (coding style permitting).
  4835. Note that this doesn't work well together with having "longest" in
  4836. 'completeopt', because the completion from the search pattern may not
  4837. match the typed text.
  4838. *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'*
  4839. 'showmatch' 'sm' boolean (default off)
  4840. global
  4841. When a bracket is inserted, briefly jump to the matching one. The
  4842. jump is only done if the match can be seen on the screen. The time to
  4843. show the match can be set with 'matchtime'.
  4844. A Beep is given if there is no match (no matter if the match can be
  4845. seen or not).
  4846. This option is reset when 'paste' is set and restored when 'paste' is
  4847. reset.
  4848. When the 'm' flag is not included in 'cpoptions', typing a character
  4849. will immediately move the cursor back to where it belongs.
  4850. See the "sm" field in 'guicursor' for setting the cursor shape and
  4851. blinking when showing the match.
  4852. The 'matchpairs' option can be used to specify the characters to show
  4853. matches for. 'rightleft' and 'revins' are used to look for opposite
  4854. matches.
  4855. Also see the matchparen plugin for highlighting the match when moving
  4856. around |pi_paren.txt|.
  4857. Note: Use of the short form is rated PG.
  4858. *'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
  4859. 'showmode' 'smd' boolean (Vim default: on, Vi default: off)
  4860. global
  4861. If in Insert, Replace or Visual mode put a message on the last line.
  4862. The |hl-ModeMsg| highlight group determines the highlighting.
  4863. *'showtabline'* *'stal'*
  4864. 'showtabline' 'stal' number (default 1)
  4865. global
  4866. The value of this option specifies when the line with tab page labels
  4867. will be displayed:
  4868. 0: never
  4869. 1: only if there are at least two tab pages
  4870. 2: always
  4871. This is both for the GUI and non-GUI implementation of the tab pages
  4872. line.
  4873. See |tab-page| for more information about tab pages.
  4874. *'sidescroll'* *'ss'*
  4875. 'sidescroll' 'ss' number (default 1)
  4876. global
  4877. The minimal number of columns to scroll horizontally. Used only when
  4878. the 'wrap' option is off and the cursor is moved off of the screen.
  4879. When it is zero the cursor will be put in the middle of the screen.
  4880. When using a slow terminal set it to a large number or 0. Not used
  4881. for "zh" and "zl" commands.
  4882. *'sidescrolloff'* *'siso'*
  4883. 'sidescrolloff' 'siso' number (default 0)
  4884. global
  4885. The minimal number of screen columns to keep to the left and to the
  4886. right of the cursor if 'nowrap' is set. Setting this option to a
  4887. value greater than 0 while having |'sidescroll'| also at a non-zero
  4888. value makes some context visible in the line you are scrolling in
  4889. horizontally (except at beginning of the line). Setting this option
  4890. to a large value (like 999) has the effect of keeping the cursor
  4891. horizontally centered in the window, as long as one does not come too
  4892. close to the beginning of the line.
  4893. Example: Try this together with 'sidescroll' and 'listchars' as
  4894. in the following example to never allow the cursor to move
  4895. onto the "extends" character: >
  4896. :set nowrap sidescroll=1 listchars=extends:>,precedes:<
  4897. :set sidescrolloff=1
  4898. <
  4899. *'signcolumn'* *'scl'*
  4900. 'signcolumn' 'scl' string (default "auto")
  4901. local to window
  4902. When and how to draw the signcolumn. Valid values are:
  4903. "auto" only when there is a sign to display
  4904. "auto:[1-9]" resize to accommodate multiple signs up to the
  4905. given number (maximum 9), e.g. "auto:4"
  4906. "no" never
  4907. "yes" always
  4908. "yes:[1-9]" always, with fixed space for signs up to the given
  4909. number (maximum 9), e.g. "yes:3"
  4910. *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
  4911. 'smartcase' 'scs' boolean (default off)
  4912. global
  4913. Override the 'ignorecase' option if the search pattern contains upper
  4914. case characters. Only used when the search pattern is typed and
  4915. 'ignorecase' option is on. Used for the commands "/", "?", "n", "N",
  4916. ":g" and ":s". Not used for "*", "#", "gd", tag search, etc. After
  4917. "*" and "#" you can make 'smartcase' used by doing a "/" command,
  4918. recalling the search pattern from history and hitting <Enter>.
  4919. *'smartindent'* *'si'* *'nosmartindent'* *'nosi'*
  4920. 'smartindent' 'si' boolean (default off)
  4921. local to buffer
  4922. Do smart autoindenting when starting a new line. Works for C-like
  4923. programs, but can also be used for other languages. 'cindent' does
  4924. something like this, works better in most cases, but is more strict,
  4925. see |C-indenting|. When 'cindent' is on or 'indentexpr' is set,
  4926. setting 'si' has no effect. 'indentexpr' is a more advanced
  4927. alternative.
  4928. Normally 'autoindent' should also be on when using 'smartindent'.
  4929. An indent is automatically inserted:
  4930. - After a line ending in '{'.
  4931. - After a line starting with a keyword from 'cinwords'.
  4932. - Before a line starting with '}' (only with the "O" command).
  4933. When typing '}' as the first character in a new line, that line is
  4934. given the same indent as the matching '{'.
  4935. When typing '#' as the first character in a new line, the indent for
  4936. that line is removed, the '#' is put in the first column. The indent
  4937. is restored for the next line. If you don't want this, use this
  4938. mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
  4939. When using the ">>" command, lines starting with '#' are not shifted
  4940. right.
  4941. This option is reset when 'paste' is set and restored when 'paste' is
  4942. reset.
  4943. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
  4944. 'smarttab' 'sta' boolean (default on)
  4945. global
  4946. When on, a <Tab> in front of a line inserts blanks according to
  4947. 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
  4948. <BS> will delete a 'shiftwidth' worth of space at the start of the
  4949. line.
  4950. When off, a <Tab> always inserts blanks according to 'tabstop' or
  4951. 'softtabstop'. 'shiftwidth' is only used for shifting text left or
  4952. right |shift-left-right|.
  4953. What gets inserted (a <Tab> or spaces) depends on the 'expandtab'
  4954. option. Also see |ins-expandtab|. When 'expandtab' is not set, the
  4955. number of spaces is minimized by using <Tab>s.
  4956. This option is reset when 'paste' is set and restored when 'paste' is
  4957. reset.
  4958. *'softtabstop'* *'sts'*
  4959. 'softtabstop' 'sts' number (default 0)
  4960. local to buffer
  4961. Number of spaces that a <Tab> counts for while performing editing
  4962. operations, like inserting a <Tab> or using <BS>. It "feels" like
  4963. <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is
  4964. used. This is useful to keep the 'ts' setting at its standard value
  4965. of 8, while being able to edit like it is set to 'sts'. However,
  4966. commands like "x" still work on the actual characters.
  4967. When 'sts' is zero, this feature is off.
  4968. When 'sts' is negative, the value of 'shiftwidth' is used.
  4969. 'softtabstop' is set to 0 when the 'paste' option is set and restored
  4970. when 'paste' is reset.
  4971. See also |ins-expandtab|. When 'expandtab' is not set, the number of
  4972. spaces is minimized by using <Tab>s.
  4973. The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is
  4974. set.
  4975. *'spell'* *'nospell'*
  4976. 'spell' boolean (default off)
  4977. local to window
  4978. When on spell checking will be done. See |spell|.
  4979. The languages are specified with 'spelllang'.
  4980. *'spellcapcheck'* *'spc'*
  4981. 'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+")
  4982. local to buffer
  4983. Pattern to locate the end of a sentence. The following word will be
  4984. checked to start with a capital letter. If not then it is highlighted
  4985. with SpellCap |hl-SpellCap| (unless the word is also badly spelled).
  4986. When this check is not wanted make this option empty.
  4987. Only used when 'spell' is set.
  4988. Be careful with special characters, see |option-backslash| about
  4989. including spaces and backslashes.
  4990. To set this option automatically depending on the language, see
  4991. |set-spc-auto|.
  4992. *'spellfile'* *'spf'*
  4993. 'spellfile' 'spf' string (default empty)
  4994. local to buffer
  4995. Name of the word list file where words are added for the |zg| and |zw|
  4996. commands. It must end in ".{encoding}.add". You need to include the
  4997. path, otherwise the file is placed in the current directory.
  4998. *E765*
  4999. It may also be a comma separated list of names. A count before the
  5000. |zg| and |zw| commands can be used to access each. This allows using
  5001. a personal word list file and a project word list file.
  5002. When a word is added while this option is empty Vim will set it for
  5003. you: Using the first directory in 'runtimepath' that is writable. If
  5004. there is no "spell" directory yet it will be created. For the file
  5005. name the first language name that appears in 'spelllang' is used,
  5006. ignoring the region.
  5007. The resulting ".spl" file will be used for spell checking, it does not
  5008. have to appear in 'spelllang'.
  5009. Normally one file is used for all regions, but you can add the region
  5010. name if you want to. However, it will then only be used when
  5011. 'spellfile' is set to it, for entries in 'spelllang' only files
  5012. without region name will be found.
  5013. This option cannot be set from a |modeline| or in the |sandbox|, for
  5014. security reasons.
  5015. *'spelllang'* *'spl'*
  5016. 'spelllang' 'spl' string (default "en")
  5017. local to buffer
  5018. A comma separated list of word list names. When the 'spell' option is
  5019. on spellchecking will be done for these languages. Example: >
  5020. set spelllang=en_us,nl,medical
  5021. < This means US English, Dutch and medical words are recognized. Words
  5022. that are not recognized will be highlighted.
  5023. The word list name must not include a comma or dot. Using a dash is
  5024. recommended to separate the two letter language name from a
  5025. specification. Thus "en-rare" is used for rare English words.
  5026. A region name must come last and have the form "_xx", where "xx" is
  5027. the two-letter, lower case region name. You can use more than one
  5028. region by listing them: "en_us,en_ca" supports both US and Canadian
  5029. English, but not words specific for Australia, New Zealand or Great
  5030. Britain. (Note: currently en_au and en_nz dictionaries are older than
  5031. en_ca, en_gb and en_us).
  5032. If the name "cjk" is included East Asian characters are excluded from
  5033. spell checking. This is useful when editing text that also has Asian
  5034. words.
  5035. *E757*
  5036. As a special case the name of a .spl file can be given as-is. The
  5037. first "_xx" in the name is removed and used as the region name
  5038. (_xx is an underscore, two letters and followed by a non-letter).
  5039. This is mainly for testing purposes. You must make sure the correct
  5040. encoding is used, Vim doesn't check it.
  5041. How the related spell files are found is explained here: |spell-load|.
  5042. If the |spellfile.vim| plugin is active and you use a language name
  5043. for which Vim cannot find the .spl file in 'runtimepath' the plugin
  5044. will ask you if you want to download the file.
  5045. After this option has been set successfully, Vim will source the files
  5046. "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
  5047. up to the first character that is not an ASCII letter and not a dash.
  5048. Also see |set-spc-auto|.
  5049. *'spellsuggest'* *'sps'*
  5050. 'spellsuggest' 'sps' string (default "best")
  5051. global
  5052. Methods used for spelling suggestions. Both for the |z=| command and
  5053. the |spellsuggest()| function. This is a comma-separated list of
  5054. items:
  5055. best Internal method that works best for English. Finds
  5056. changes like "fast" and uses a bit of sound-a-like
  5057. scoring to improve the ordering.
  5058. double Internal method that uses two methods and mixes the
  5059. results. The first method is "fast", the other method
  5060. computes how much the suggestion sounds like the bad
  5061. word. That only works when the language specifies
  5062. sound folding. Can be slow and doesn't always give
  5063. better results.
  5064. fast Internal method that only checks for simple changes:
  5065. character inserts/deletes/swaps. Works well for
  5066. simple typing mistakes.
  5067. {number} The maximum number of suggestions listed for |z=|.
  5068. Not used for |spellsuggest()|. The number of
  5069. suggestions is never more than the value of 'lines'
  5070. minus two.
  5071. file:{filename} Read file {filename}, which must have two columns,
  5072. separated by a slash. The first column contains the
  5073. bad word, the second column the suggested good word.
  5074. Example:
  5075. theribal/terrible ~
  5076. Use this for common mistakes that do not appear at the
  5077. top of the suggestion list with the internal methods.
  5078. Lines without a slash are ignored, use this for
  5079. comments.
  5080. The word in the second column must be correct,
  5081. otherwise it will not be used. Add the word to an
  5082. ".add" file if it is currently flagged as a spelling
  5083. mistake.
  5084. The file is used for all languages.
  5085. expr:{expr} Evaluate expression {expr}. Use a function to avoid
  5086. trouble with spaces. |v:val| holds the badly spelled
  5087. word. The expression must evaluate to a List of
  5088. Lists, each with a suggestion and a score.
  5089. Example:
  5090. [['the', 33], ['that', 44]] ~
  5091. Set 'verbose' and use |z=| to see the scores that the
  5092. internal methods use. A lower score is better.
  5093. This may invoke |spellsuggest()| if you temporarily
  5094. set 'spellsuggest' to exclude the "expr:" part.
  5095. Errors are silently ignored, unless you set the
  5096. 'verbose' option to a non-zero value.
  5097. Only one of "best", "double" or "fast" may be used. The others may
  5098. appear several times in any order. Example: >
  5099. :set sps=file:~/.config/nvim/sugg,best,expr:MySuggest()
  5100. <
  5101. This option cannot be set from a |modeline| or in the |sandbox|, for
  5102. security reasons.
  5103. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
  5104. 'splitbelow' 'sb' boolean (default off)
  5105. global
  5106. When on, splitting a window will put the new window below the current
  5107. one. |:split|
  5108. *'splitright'* *'spr'* *'nosplitright'* *'nospr'*
  5109. 'splitright' 'spr' boolean (default off)
  5110. global
  5111. When on, splitting a window will put the new window right of the
  5112. current one. |:vsplit|
  5113. *'startofline'* *'sol'* *'nostartofline'* *'nosol'*
  5114. 'startofline' 'sol' boolean (default on)
  5115. global
  5116. When "on" the commands listed below move the cursor to the first
  5117. non-blank of the line. When off the cursor is kept in the same column
  5118. (if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
  5119. CTRL-F, "G", "H", "M", "L", gg, and to the commands "d", "<<" and ">>"
  5120. with a linewise operator, with "%" with a count and to buffer changing
  5121. commands (CTRL-^, :bnext, :bNext, etc.). Also for an Ex command that
  5122. only has a line number, e.g., ":25" or ":+".
  5123. In case of buffer changing commands the cursor is placed at the column
  5124. where it was the last time the buffer was edited.
  5125. *'statusline'* *'stl'* *E540* *E542*
  5126. 'statusline' 'stl' string (default empty)
  5127. global or local to window |global-local|
  5128. When nonempty, this option determines the content of the status line.
  5129. Also see |status-line|.
  5130. The option consists of printf style '%' items interspersed with
  5131. normal text. Each status line item is of the form:
  5132. %-0{minwid}.{maxwid}{item}
  5133. All fields except the {item} are optional. A single percent sign can
  5134. be given as "%%". Up to 80 items can be specified. *E541*
  5135. When the option starts with "%!" then it is used as an expression,
  5136. evaluated and the result is used as the option value. Example: >
  5137. :set statusline=%!MyStatusLine()
  5138. < The result can contain %{} items that will be evaluated too.
  5139. Note that the "%!" expression is evaluated in the context of the
  5140. current window and buffer, while %{} items are evaluated in the
  5141. context of the window that the statusline belongs to.
  5142. When there is error while evaluating the option then it will be made
  5143. empty to avoid further errors. Otherwise screen updating would loop.
  5144. Note that the only effect of 'ruler' when this option is set (and
  5145. 'laststatus' is 2) is controlling the output of |CTRL-G|.
  5146. field meaning ~
  5147. - Left justify the item. The default is right justified
  5148. when minwid is larger than the length of the item.
  5149. 0 Leading zeroes in numeric items. Overridden by '-'.
  5150. minwid Minimum width of the item, padding as set by '-' & '0'.
  5151. Value must be 50 or less.
  5152. maxwid Maximum width of the item. Truncation occurs with a '<'
  5153. on the left for text items. Numeric items will be
  5154. shifted down to maxwid-2 digits followed by '>'number
  5155. where number is the amount of missing digits, much like
  5156. an exponential notation.
  5157. item A one letter code as described below.
  5158. Following is a description of the possible statusline items. The
  5159. second character in "item" is the type:
  5160. N for number
  5161. S for string
  5162. F for flags as described below
  5163. - not applicable
  5164. item meaning ~
  5165. f S Path to the file in the buffer, as typed or relative to current
  5166. directory.
  5167. F S Full path to the file in the buffer.
  5168. t S File name (tail) of file in the buffer.
  5169. m F Modified flag, text is "[+]"; "[-]" if 'modifiable' is off.
  5170. M F Modified flag, text is ",+" or ",-".
  5171. r F Readonly flag, text is "[RO]".
  5172. R F Readonly flag, text is ",RO".
  5173. h F Help buffer flag, text is "[help]".
  5174. H F Help buffer flag, text is ",HLP".
  5175. w F Preview window flag, text is "[Preview]".
  5176. W F Preview window flag, text is ",PRV".
  5177. y F Type of file in the buffer, e.g., "[vim]". See 'filetype'.
  5178. Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'.
  5179. q S "[Quickfix List]", "[Location List]" or empty.
  5180. k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
  5181. being used: "<keymap>"
  5182. n N Buffer number.
  5183. b N Value of character under cursor.
  5184. B N As above, in hexadecimal.
  5185. o N Byte number in file of byte under cursor, first byte is 1.
  5186. Mnemonic: Offset from start of file (with one added)
  5187. O N As above, in hexadecimal.
  5188. N N Printer page number. (Only works in the 'printheader' option.)
  5189. l N Line number.
  5190. L N Number of lines in buffer.
  5191. c N Column number.
  5192. v N Virtual column number.
  5193. V N Virtual column number as -{num}. Not displayed if equal to 'c'.
  5194. p N Percentage through file in lines as in |CTRL-G|.
  5195. P S Percentage through file of displayed window. This is like the
  5196. percentage described for 'ruler'. Always 3 in length, unless
  5197. translated.
  5198. a S Argument list status as in default title. ({current} of {max})
  5199. Empty if the argument file count is zero or one.
  5200. { NF Evaluate expression between '%{' and '}' and substitute result.
  5201. Note that there is no '%' before the closing '}'.
  5202. ( - Start of item group. Can be used for setting the width and
  5203. alignment of a section. Must be followed by %) somewhere.
  5204. ) - End of item group. No width fields allowed.
  5205. T N For 'tabline': start of tab page N label. Use %T or %X to end
  5206. the label. Clicking this label with left mouse button switches
  5207. to the specified tab page.
  5208. X N For 'tabline': start of close tab N label. Use %X or %T to end
  5209. the label, e.g.: %3Xclose%X. Use %999X for a "close current
  5210. tab" label. Clicking this label with left mouse button closes
  5211. specified tab page.
  5212. @ N For 'tabline': start of execute function label. Use %X or %T to
  5213. end the label, e.g.: %10@SwitchBuffer@foo.c%X. Clicking this
  5214. label runs specified function: in the example when clicking once
  5215. using left mouse button on "foo.c" "SwitchBuffer(10, 1, 'l',
  5216. ' ')" expression will be run. Function receives the
  5217. following arguments in order:
  5218. 1. minwid field value or zero if no N was specified
  5219. 2. number of mouse clicks to detect multiple clicks
  5220. 3. mouse button used: "l", "r" or "m" for left, right or middle
  5221. button respectively; one should not rely on third argument
  5222. being only "l", "r" or "m": any other non-empty string value
  5223. that contains only ASCII lower case letters may be expected
  5224. for other mouse buttons
  5225. 4. modifiers pressed: string which contains "s" if shift
  5226. modifier was pressed, "c" for control, "a" for alt and "m"
  5227. for meta; currently if modifier is not pressed string
  5228. contains space instead, but one should not rely on presence
  5229. of spaces or specific order of modifiers: use |stridx()| to
  5230. test whether some modifier is present; string is guaranteed
  5231. to contain only ASCII letters and spaces, one letter per
  5232. modifier; "?" modifier may also be present, but its presence
  5233. is a bug that denotes that new mouse button recognition was
  5234. added without modifying code that reacts on mouse clicks on
  5235. this label.
  5236. Note: to test whether your version of Neovim contains this
  5237. feature use `has('tablineat')`.
  5238. < - Where to truncate line if too long. Default is at the start.
  5239. No width fields allowed.
  5240. = - Separation point between alignment sections. Each section will
  5241. be separated by an equal number of spaces.
  5242. No width fields allowed.
  5243. # - Set highlight group. The name must follow and then a # again.
  5244. Thus use %#HLname# for highlight group HLname. The same
  5245. highlighting is used, also for the statusline of non-current
  5246. windows.
  5247. * - Set highlight group to User{N}, where {N} is taken from the
  5248. minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
  5249. The difference between User{N} and StatusLine will be applied
  5250. to StatusLineNC for the statusline of non-current windows.
  5251. The number N must be between 1 and 9. See |hl-User1..9|
  5252. When displaying a flag, Vim removes the leading comma, if any, when
  5253. that flag comes right after plaintext. This will make a nice display
  5254. when flags are used like in the examples below.
  5255. When all items in a group becomes an empty string (i.e. flags that are
  5256. not set) and a minwid is not set for the group, the whole group will
  5257. become empty. This will make a group like the following disappear
  5258. completely from the statusline when none of the flags are set. >
  5259. :set statusline=...%(\ [%M%R%H]%)...
  5260. < *g:actual_curbuf*
  5261. Beware that an expression is evaluated each and every time the status
  5262. line is displayed. The current buffer and current window will be set
  5263. temporarily to that of the window (and buffer) whose statusline is
  5264. currently being drawn. The expression will evaluate in this context.
  5265. The variable "g:actual_curbuf" is set to the `bufnr()` number of the
  5266. real current buffer.
  5267. The 'statusline' option will be evaluated in the |sandbox| if set from
  5268. a modeline, see |sandbox-option|.
  5269. This option cannot be set in a modeline when 'modelineexpr' is off.
  5270. It is not allowed to change text or jump to another window while
  5271. evaluating 'statusline' |textlock|.
  5272. If the statusline is not updated when you want it (e.g., after setting
  5273. a variable that's used in an expression), you can force an update by
  5274. setting an option without changing its value. Example: >
  5275. :let &ro = &ro
  5276. < A result of all digits is regarded a number for display purposes.
  5277. Otherwise the result is taken as flag text and applied to the rules
  5278. described above.
  5279. Watch out for errors in expressions. They may render Vim unusable!
  5280. If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and
  5281. edit your vimrc or whatever with "vim --clean" to get it right.
  5282. Examples:
  5283. Emulate standard status line with 'ruler' set >
  5284. :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
  5285. < Similar, but add ASCII value of char under the cursor (like "ga") >
  5286. :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
  5287. < Display byte count and byte value, modified flag in red. >
  5288. :set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
  5289. :hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
  5290. < Display a ,GZ flag if a compressed file is loaded >
  5291. :set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
  5292. < In the |:autocmd|'s: >
  5293. :let b:gzflag = 1
  5294. < And: >
  5295. :unlet b:gzflag
  5296. < And define this function: >
  5297. :function VarExists(var, val)
  5298. : if exists(a:var) | return a:val | else | return '' | endif
  5299. :endfunction
  5300. <
  5301. *'suffixes'* *'su'*
  5302. 'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj")
  5303. global
  5304. Files with these suffixes get a lower priority when multiple files
  5305. match a wildcard. See |suffixes|. Commas can be used to separate the
  5306. suffixes. Spaces after the comma are ignored. A dot is also seen as
  5307. the start of a suffix. To avoid a dot or comma being recognized as a
  5308. separator, precede it with a backslash (see |option-backslash| about
  5309. including spaces and backslashes).
  5310. See 'wildignore' for completely ignoring files.
  5311. The use of |:set+=| and |:set-=| is preferred when adding or removing
  5312. suffixes from the list. This avoids problems when a future version
  5313. uses another default.
  5314. *'suffixesadd'* *'sua'*
  5315. 'suffixesadd' 'sua' string (default "")
  5316. local to buffer
  5317. Comma separated list of suffixes, which are used when searching for a
  5318. file for the "gf", "[I", etc. commands. Example: >
  5319. :set suffixesadd=.java
  5320. <
  5321. *'swapfile'* *'swf'* *'noswapfile'* *'noswf'*
  5322. 'swapfile' 'swf' boolean (default on)
  5323. local to buffer
  5324. Use a swapfile for the buffer. This option can be reset when a
  5325. swapfile is not wanted for a specific buffer. For example, with
  5326. confidential information that even root must not be able to access.
  5327. Careful: All text will be in memory:
  5328. - Don't use this for big files.
  5329. - Recovery will be impossible!
  5330. A swapfile will only be present when |'updatecount'| is non-zero and
  5331. 'swapfile' is set.
  5332. When 'swapfile' is reset, the swap file for the current buffer is
  5333. immediately deleted. When 'swapfile' is set, and 'updatecount' is
  5334. non-zero, a swap file is immediately created.
  5335. Also see |swap-file|.
  5336. If you want to open a new buffer without creating a swap file for it,
  5337. use the |:noswapfile| modifier.
  5338. See 'directory' for where the swap file is created.
  5339. This option is used together with 'bufhidden' and 'buftype' to
  5340. specify special kinds of buffers. See |special-buffers|.
  5341. *'switchbuf'* *'swb'*
  5342. 'switchbuf' 'swb' string (default "")
  5343. global
  5344. This option controls the behavior when switching between buffers.
  5345. Possible values (comma separated list):
  5346. useopen If included, jump to the first open window that
  5347. contains the specified buffer (if there is one).
  5348. Otherwise: Do not examine other windows.
  5349. This setting is checked with |quickfix| commands, when
  5350. jumping to errors (":cc", ":cn", "cp", etc.). It is
  5351. also used in all buffer related split commands, for
  5352. example ":sbuffer", ":sbnext", or ":sbrewind".
  5353. usetab Like "useopen", but also consider windows in other tab
  5354. pages.
  5355. split If included, split the current window before loading
  5356. a buffer for a |quickfix| command that display errors.
  5357. Otherwise: do not split, use current window.
  5358. vsplit Just like "split" but split vertically.
  5359. newtab Like "split", but open a new tab page. Overrules
  5360. "split" when both are present.
  5361. *'synmaxcol'* *'smc'*
  5362. 'synmaxcol' 'smc' number (default 3000)
  5363. local to buffer
  5364. Maximum column in which to search for syntax items. In long lines the
  5365. text after this column is not highlighted and following lines may not
  5366. be highlighted correctly, because the syntax state is cleared.
  5367. This helps to avoid very slow redrawing for an XML file that is one
  5368. long line.
  5369. Set to zero to remove the limit.
  5370. *'syntax'* *'syn'*
  5371. 'syntax' 'syn' string (default empty)
  5372. local to buffer
  5373. When this option is set, the syntax with this name is loaded, unless
  5374. syntax highlighting has been switched off with ":syntax off".
  5375. Otherwise this option does not always reflect the current syntax (the
  5376. b:current_syntax variable does).
  5377. This option is most useful in a modeline, for a file which syntax is
  5378. not automatically recognized. Example, in an IDL file:
  5379. /* vim: set syntax=idl : */ ~
  5380. When a dot appears in the value then this separates two filetype
  5381. names. Example:
  5382. /* vim: set syntax=c.doxygen : */ ~
  5383. This will use the "c" syntax first, then the "doxygen" syntax.
  5384. Note that the second one must be prepared to be loaded as an addition,
  5385. otherwise it will be skipped. More than one dot may appear.
  5386. To switch off syntax highlighting for the current file, use: >
  5387. :set syntax=OFF
  5388. < To switch syntax highlighting on according to the current value of the
  5389. 'filetype' option: >
  5390. :set syntax=ON
  5391. < What actually happens when setting the 'syntax' option is that the
  5392. Syntax autocommand event is triggered with the value as argument.
  5393. This option is not copied to another buffer, independent of the 's' or
  5394. 'S' flag in 'cpoptions'.
  5395. Only normal file name characters can be used, "/\*?[|<>" are illegal.
  5396. *'tabline'* *'tal'*
  5397. 'tabline' 'tal' string (default empty)
  5398. global
  5399. When nonempty, this option determines the content of the tab pages
  5400. line at the top of the Vim window. When empty Vim will use a default
  5401. tab pages line. See |setting-tabline| for more info.
  5402. The tab pages line only appears as specified with the 'showtabline'
  5403. option and only when there is no GUI tab line. When 'e' is in
  5404. 'guioptions' and the GUI supports a tab line 'guitablabel' is used
  5405. instead. Note that the two tab pages lines are very different.
  5406. The value is evaluated like with 'statusline'. You can use
  5407. |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
  5408. the text to be displayed. Use "%1T" for the first label, "%2T" for
  5409. the second one, etc. Use "%X" items for closing labels.
  5410. This option cannot be set in a modeline when 'modelineexpr' is off.
  5411. Keep in mind that only one of the tab pages is the current one, others
  5412. are invisible and you can't jump to their windows.
  5413. *'tabpagemax'* *'tpm'*
  5414. 'tabpagemax' 'tpm' number (default 50)
  5415. global
  5416. Maximum number of tab pages to be opened by the |-p| command line
  5417. argument or the ":tab all" command. |tabpage|
  5418. *'tabstop'* *'ts'*
  5419. 'tabstop' 'ts' number (default 8)
  5420. local to buffer
  5421. Number of spaces that a <Tab> in the file counts for. Also see
  5422. |:retab| command, and 'softtabstop' option.
  5423. Note: Setting 'tabstop' to any other value than 8 can make your file
  5424. appear wrong in many places (e.g., when printing it).
  5425. There are four main ways to use tabs in Vim:
  5426. 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
  5427. (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim
  5428. will use a mix of tabs and spaces, but typing <Tab> and <BS> will
  5429. behave like a tab appears every 4 (or 3) characters.
  5430. 2. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use
  5431. 'expandtab'. This way you will always insert spaces. The
  5432. formatting will never be messed up when 'tabstop' is changed.
  5433. 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a
  5434. |modeline| to set these values when editing the file again. Only
  5435. works when using Vim to edit the file.
  5436. 4. Always set 'tabstop' and 'shiftwidth' to the same value, and
  5437. 'noexpandtab'. This should then work (for initial indents only)
  5438. for any tabstop setting that people use. It might be nice to have
  5439. tabs after the first non-blank inserted as spaces if you do this
  5440. though. Otherwise aligned comments will be wrong when 'tabstop' is
  5441. changed.
  5442. *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'*
  5443. 'tagbsearch' 'tbs' boolean (default on)
  5444. global
  5445. When searching for a tag (e.g., for the |:ta| command), Vim can either
  5446. use a binary search or a linear search in a tags file. Binary
  5447. searching makes searching for a tag a LOT faster, but a linear search
  5448. will find more tags if the tags file wasn't properly sorted.
  5449. Vim normally assumes that your tags files are sorted, or indicate that
  5450. they are not sorted. Only when this is not the case does the
  5451. 'tagbsearch' option need to be switched off.
  5452. When 'tagbsearch' is on, binary searching is first used in the tags
  5453. files. In certain situations, Vim will do a linear search instead for
  5454. certain files, or retry all files with a linear search. When
  5455. 'tagbsearch' is off, only a linear search is done.
  5456. Linear searching is done anyway, for one file, when Vim finds a line
  5457. at the start of the file indicating that it's not sorted: >
  5458. !_TAG_FILE_SORTED 0 /some comment/
  5459. < [The whitespace before and after the '0' must be a single <Tab>]
  5460. When a binary search was done and no match was found in any of the
  5461. files listed in 'tags', and case is ignored or a pattern is used
  5462. instead of a normal tag name, a retry is done with a linear search.
  5463. Tags in unsorted tags files, and matches with different case will only
  5464. be found in the retry.
  5465. If a tag file indicates that it is case-fold sorted, the second,
  5466. linear search can be avoided when case is ignored. Use a value of '2'
  5467. in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
  5468. sorted with the -f switch to "sort" in most unices, as in the command:
  5469. "sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher
  5470. (at least 5.5) the --sort=foldcase switch can be used for this as
  5471. well. Note that case must be folded to uppercase for this to work.
  5472. By default, tag searches are case-sensitive. Case is ignored when
  5473. 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
  5474. "ignore".
  5475. Also when 'tagcase' is "followscs" and 'smartcase' is set, or
  5476. 'tagcase' is "smart", and the pattern contains only lowercase
  5477. characters.
  5478. When 'tagbsearch' is off, tags searching is slower when a full match
  5479. exists, but faster when no full match exists. Tags in unsorted tags
  5480. files may only be found with 'tagbsearch' off.
  5481. When the tags file is not sorted, or sorted in a wrong way (not on
  5482. ASCII byte value), 'tagbsearch' should be off, or the line given above
  5483. must be included in the tags file.
  5484. This option doesn't affect commands that find all matching tags (e.g.,
  5485. command-line completion and ":help").
  5486. *'tagcase'* *'tc'*
  5487. 'tagcase' 'tc' string (default "followic")
  5488. global or local to buffer |global-local|
  5489. This option specifies how case is handled when searching the tags
  5490. file:
  5491. followic Follow the 'ignorecase' option
  5492. followscs Follow the 'smartcase' and 'ignorecase' options
  5493. ignore Ignore case
  5494. match Match case
  5495. smart Ignore case unless an upper case letter is used
  5496. *'taglength'* *'tl'*
  5497. 'taglength' 'tl' number (default 0)
  5498. global
  5499. If non-zero, tags are significant up to this number of characters.
  5500. *'tagrelative'* *'tr'* *'notagrelative'* *'notr'*
  5501. 'tagrelative' 'tr' boolean (Vim default: on, Vi default: off)
  5502. global
  5503. If on and using a tags file in another directory, file names in that
  5504. tags file are relative to the directory where the tags file is.
  5505. *'tags'* *'tag'* *E433*
  5506. 'tags' 'tag' string (default "./tags;,tags")
  5507. global or local to buffer |global-local|
  5508. Filenames for the tag command, separated by spaces or commas. To
  5509. include a space or comma in a file name, precede it with a backslash
  5510. (see |option-backslash| about including spaces and backslashes).
  5511. When a file name starts with "./", the '.' is replaced with the path
  5512. of the current file. But only when the 'd' flag is not included in
  5513. 'cpoptions'. Environment variables are expanded |:set_env|. Also see
  5514. |tags-option|.
  5515. "*", "**" and other wildcards can be used to search for tags files in
  5516. a directory tree. See |file-searching|. E.g., "/lib/**/tags" will
  5517. find all files named "tags" below "/lib". The filename itself cannot
  5518. contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find
  5519. files called "tags?".
  5520. The |tagfiles()| function can be used to get a list of the file names
  5521. actually used.
  5522. The use of |:set+=| and |:set-=| is preferred when adding or removing
  5523. file names from the list. This avoids problems when a future version
  5524. uses another default.
  5525. *'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
  5526. 'tagstack' 'tgst' boolean (default on)
  5527. global
  5528. When on, the |tagstack| is used normally. When off, a ":tag" or
  5529. ":tselect" command with an argument will not push the tag onto the
  5530. tagstack. A following ":tag" without an argument, a ":pop" command or
  5531. any other command that uses the tagstack will use the unmodified
  5532. tagstack, but does change the pointer to the active entry.
  5533. Resetting this option is useful when using a ":tag" command in a
  5534. mapping which should not change the tagstack.
  5535. *'termbidi'* *'tbidi'*
  5536. *'notermbidi'* *'notbidi'*
  5537. 'termbidi' 'tbidi' boolean (default off)
  5538. global
  5539. The terminal is in charge of Bi-directionality of text (as specified
  5540. by Unicode). The terminal is also expected to do the required shaping
  5541. that some languages (such as Arabic) require.
  5542. Setting this option implies that 'rightleft' will not be set when
  5543. 'arabic' is set and the value of 'arabicshape' will be ignored.
  5544. Note that setting 'termbidi' has the immediate effect that
  5545. 'arabicshape' is ignored, but 'rightleft' isn't changed automatically.
  5546. For further details see |arabic.txt|.
  5547. *'termguicolors'* *'tgc'*
  5548. 'termguicolors' 'tgc' boolean (default off)
  5549. global
  5550. Enables 24-bit RGB color in the |TUI|. Uses "gui" |:highlight|
  5551. attributes instead of "cterm" attributes. |highlight-guifg|
  5552. Requires an ISO-8613-3 compatible terminal.
  5553. *'terse'* *'noterse'*
  5554. 'terse' boolean (default off)
  5555. global
  5556. When set: Add 's' flag to 'shortmess' option (this makes the message
  5557. for a search that hits the start or end of the file not being
  5558. displayed). When reset: Remove 's' flag from 'shortmess' option.
  5559. *'textwidth'* *'tw'*
  5560. 'textwidth' 'tw' number (default 0)
  5561. local to buffer
  5562. Maximum width of text that is being inserted. A longer line will be
  5563. broken after white space to get this width. A zero value disables
  5564. this.
  5565. 'textwidth' is set to 0 when the 'paste' option is set and restored
  5566. when 'paste' is reset.
  5567. When 'textwidth' is zero, 'wrapmargin' may be used. See also
  5568. 'formatoptions' and |ins-textwidth|.
  5569. When 'formatexpr' is set it will be used to break the line.
  5570. *'thesaurus'* *'tsr'*
  5571. 'thesaurus' 'tsr' string (default "")
  5572. global or local to buffer |global-local|
  5573. List of file names, separated by commas, that are used to lookup words
  5574. for thesaurus completion commands |i_CTRL-X_CTRL-T|. Each line in
  5575. the file should contain words with similar meaning, separated by
  5576. non-keyword characters (white space is preferred). Maximum line
  5577. length is 510 bytes.
  5578. To include a comma in a file name precede it with a backslash. Spaces
  5579. after a comma are ignored, otherwise spaces are included in the file
  5580. name. See |option-backslash| about using backslashes.
  5581. The use of |:set+=| and |:set-=| is preferred when adding or removing
  5582. directories from the list. This avoids problems when a future version
  5583. uses another default.
  5584. Backticks cannot be used in this option for security reasons.
  5585. *'tildeop'* *'top'* *'notildeop'* *'notop'*
  5586. 'tildeop' 'top' boolean (default off)
  5587. global
  5588. When on: The tilde command "~" behaves like an operator.
  5589. *'timeout'* *'to'* *'notimeout'* *'noto'*
  5590. 'timeout' 'to' boolean (default on)
  5591. global
  5592. This option and 'timeoutlen' determine the behavior when part of a
  5593. mapped key sequence has been received. For example, if <c-f> is
  5594. pressed and 'timeout' is set, Nvim will wait 'timeoutlen' milliseconds
  5595. for any key that can follow <c-f> in a mapping.
  5596. *'ttimeout'* *'nottimeout'*
  5597. 'ttimeout' boolean (default on)
  5598. global
  5599. This option and 'ttimeoutlen' determine the behavior when part of a
  5600. key code sequence has been received by the |TUI|.
  5601. For example if <Esc> (the \x1b byte) is received and 'ttimeout' is
  5602. set, Nvim waits 'ttimeoutlen' milliseconds for the terminal to
  5603. complete a key code sequence. If no input arrives before the timeout,
  5604. a single <Esc> is assumed. Many TUI cursor key codes start with <Esc>.
  5605. On very slow systems this may fail, causing cursor keys not to work
  5606. sometimes. If you discover this problem you can ":set ttimeout=9999".
  5607. Nvim will wait for the next character to arrive after an <Esc>.
  5608. *'timeoutlen'* *'tm'*
  5609. 'timeoutlen' 'tm' number (default 1000)
  5610. global
  5611. Time in milliseconds to wait for a mapped sequence to complete.
  5612. *'ttimeoutlen'* *'ttm'*
  5613. 'ttimeoutlen' 'ttm' number (default 50)
  5614. global
  5615. Time in milliseconds to wait for a key code sequence to complete. Also
  5616. used for CTRL-\ CTRL-N and CTRL-\ CTRL-G when part of a command has
  5617. been typed.
  5618. *'title'* *'notitle'*
  5619. 'title' boolean (default off)
  5620. global
  5621. When on, the title of the window will be set to the value of
  5622. 'titlestring' (if it is not empty), or to:
  5623. filename [+=-] (path) - NVIM
  5624. Where:
  5625. filename the name of the file being edited
  5626. - indicates the file cannot be modified, 'ma' off
  5627. + indicates the file was modified
  5628. = indicates the file is read-only
  5629. =+ indicates the file is read-only and modified
  5630. (path) is the path of the file being edited
  5631. - NVIM the server name |v:servername| or "NVIM"
  5632. *'titlelen'*
  5633. 'titlelen' number (default 85)
  5634. global
  5635. Gives the percentage of 'columns' to use for the length of the window
  5636. title. When the title is longer, only the end of the path name is
  5637. shown. A '<' character before the path name is used to indicate this.
  5638. Using a percentage makes this adapt to the width of the window. But
  5639. it won't work perfectly, because the actual number of characters
  5640. available also depends on the font used and other things in the title
  5641. bar. When 'titlelen' is zero the full path is used. Otherwise,
  5642. values from 1 to 30000 percent can be used.
  5643. 'titlelen' is also used for the 'titlestring' option.
  5644. *'titleold'*
  5645. 'titleold' string (default "")
  5646. global
  5647. If not empty, this option will be used to set the window title when
  5648. exiting. Only if 'title' is enabled.
  5649. This option cannot be set from a |modeline| or in the |sandbox|, for
  5650. security reasons.
  5651. *'titlestring'*
  5652. 'titlestring' string (default "")
  5653. global
  5654. When this option is not empty, it will be used for the title of the
  5655. window. This happens only when the 'title' option is on.
  5656. When this option contains printf-style '%' items, they will be
  5657. expanded according to the rules used for 'statusline'.
  5658. This option cannot be set in a modeline when 'modelineexpr' is off.
  5659. Example: >
  5660. :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p")
  5661. :set title titlestring=%<%F%=%l/%L-%P titlelen=70
  5662. < The value of 'titlelen' is used to align items in the middle or right
  5663. of the available space.
  5664. Some people prefer to have the file name first: >
  5665. :set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)
  5666. < Note the use of "%{ }" and an expression to get the path of the file,
  5667. without the file name. The "%( %)" constructs are used to add a
  5668. separating space only when needed.
  5669. NOTE: Use of special characters in 'titlestring' may cause the display
  5670. to be garbled (e.g., when it contains a CR or NL character).
  5671. *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
  5672. 'ttyfast' 'tf' Removed. |vim-differences|
  5673. *'undodir'* *'udir'* *E5003*
  5674. 'undodir' 'udir' string (default "$XDG_DATA_HOME/nvim/undo")
  5675. global
  5676. List of directory names for undo files, separated with commas.
  5677. See |'backupdir'| for details of the format.
  5678. "." means using the directory of the file. The undo file name for
  5679. "file.txt" is ".file.txt.un~".
  5680. For other directories the file name is the full path of the edited
  5681. file, with path separators replaced with "%".
  5682. When writing: The first directory that exists is used. "." always
  5683. works, no directories after "." will be used for writing. If none of
  5684. the directories exist Neovim will attempt to create last directory in
  5685. the list.
  5686. When reading all entries are tried to find an undo file. The first
  5687. undo file that exists is used. When it cannot be read an error is
  5688. given, no further entry is used.
  5689. See |undo-persistence|.
  5690. This option cannot be set from a |modeline| or in the |sandbox|, for
  5691. security reasons.
  5692. *'undofile'* *'noundofile'* *'udf'* *'noudf'*
  5693. 'undofile' 'udf' boolean (default off)
  5694. local to buffer
  5695. When on, Vim automatically saves undo history to an undo file when
  5696. writing a buffer to a file, and restores undo history from the same
  5697. file on buffer read.
  5698. The directory where the undo file is stored is specified by 'undodir'.
  5699. For more information about this feature see |undo-persistence|.
  5700. The undo file is not read when 'undoreload' causes the buffer from
  5701. before a reload to be saved for undo.
  5702. When 'undofile' is turned off the undo file is NOT deleted.
  5703. *'undolevels'* *'ul'*
  5704. 'undolevels' 'ul' number (default 1000)
  5705. global or local to buffer |global-local|
  5706. Maximum number of changes that can be undone. Since undo information
  5707. is kept in memory, higher numbers will cause more memory to be used
  5708. (nevertheless, a single change can use an unlimited amount of memory).
  5709. Set to 0 for Vi compatibility: One level of undo and "u" undoes
  5710. itself: >
  5711. set ul=0
  5712. < But you can also get Vi compatibility by including the 'u' flag in
  5713. 'cpoptions', and still be able to use CTRL-R to repeat undo.
  5714. Also see |undo-two-ways|.
  5715. Set to -1 for no undo at all. You might want to do this only for the
  5716. current buffer: >
  5717. setlocal ul=-1
  5718. < This helps when you run out of memory for a single change.
  5719. The local value is set to -123456 when the global value is to be used.
  5720. Also see |clear-undo|.
  5721. *'undoreload'* *'ur'*
  5722. 'undoreload' 'ur' number (default 10000)
  5723. global
  5724. Save the whole buffer for undo when reloading it. This applies to the
  5725. ":e!" command and reloading for when the buffer changed outside of
  5726. Vim. |FileChangedShell|
  5727. The save only happens when this option is negative or when the number
  5728. of lines is smaller than the value of this option.
  5729. Set this option to zero to disable undo for a reload.
  5730. When saving undo for a reload, any undo file is not read.
  5731. Note that this causes the whole buffer to be stored in memory. Set
  5732. this option to a lower value if you run out of memory.
  5733. *'updatecount'* *'uc'*
  5734. 'updatecount' 'uc' number (default: 200)
  5735. global
  5736. After typing this many characters the swap file will be written to
  5737. disk. When zero, no swap file will be created at all (see chapter on
  5738. recovery |crash-recovery|). 'updatecount' is set to zero by starting
  5739. Vim with the "-n" option, see |startup|. When editing in readonly
  5740. mode this option will be initialized to 10000.
  5741. The swapfile can be disabled per buffer with |'swapfile'|.
  5742. When 'updatecount' is set from zero to non-zero, swap files are
  5743. created for all buffers that have 'swapfile' set. When 'updatecount'
  5744. is set to zero, existing swap files are not deleted.
  5745. This option has no meaning in buffers where |'buftype'| is "nofile"
  5746. or "nowrite".
  5747. *'updatetime'* *'ut'*
  5748. 'updatetime' 'ut' number (default 4000)
  5749. global
  5750. If this many milliseconds nothing is typed the swap file will be
  5751. written to disk (see |crash-recovery|). Also used for the
  5752. |CursorHold| autocommand event.
  5753. *'verbose'* *'vbs'*
  5754. 'verbose' 'vbs' number (default 0)
  5755. global
  5756. When bigger than zero, Vim will give messages about what it is doing.
  5757. Currently, these messages are given:
  5758. >= 1 When the shada file is read or written.
  5759. >= 2 When a file is ":source"'ed.
  5760. >= 3 UI info, terminal capabilities
  5761. >= 5 Every searched tags file and include file.
  5762. >= 8 Files for which a group of autocommands is executed.
  5763. >= 9 Every executed autocommand.
  5764. >= 12 Every executed function.
  5765. >= 13 When an exception is thrown, caught, finished, or discarded.
  5766. >= 14 Anything pending in a ":finally" clause.
  5767. >= 15 Every executed Ex command (truncated at 200 characters).
  5768. This option can also be set with the "-V" argument. See |-V|.
  5769. This option is also set by the |:verbose| command.
  5770. When the 'verbosefile' option is set then the verbose messages are not
  5771. displayed.
  5772. *'verbosefile'* *'vfile'*
  5773. 'verbosefile' 'vfile' string (default empty)
  5774. global
  5775. When not empty all messages are written in a file with this name.
  5776. When the file exists messages are appended.
  5777. Writing to the file ends when Vim exits or when 'verbosefile' is made
  5778. empty. Writes are buffered, thus may not show up for some time.
  5779. Setting 'verbosefile' to a new value is like making it empty first.
  5780. The difference with |:redir| is that verbose messages are not
  5781. displayed when 'verbosefile' is set.
  5782. *'viewdir'* *'vdir'*
  5783. 'viewdir' 'vdir' string (default: "$XDG_DATA_HOME/nvim/view")
  5784. global
  5785. Name of the directory where to store files for |:mkview|.
  5786. This option cannot be set from a |modeline| or in the |sandbox|, for
  5787. security reasons.
  5788. *'viewoptions'* *'vop'*
  5789. 'viewoptions' 'vop' string (default: "folds,options,cursor,curdir")
  5790. global
  5791. Changes the effect of the |:mkview| command. It is a comma separated
  5792. list of words. Each word enables saving and restoring something:
  5793. word save and restore ~
  5794. cursor cursor position in file and in window
  5795. curdir local current directory, if set with |:lcd|
  5796. folds manually created folds, opened/closed folds and local
  5797. fold options
  5798. options options and mappings local to a window or buffer (not
  5799. global values for local options)
  5800. localoptions same as "options"
  5801. slash backslashes in file names replaced with forward
  5802. slashes
  5803. unix with Unix end-of-line format (single <NL>), even when
  5804. on Windows or DOS
  5805. "slash" and "unix" are useful on Windows when sharing view files
  5806. with Unix. The Unix version of Vim cannot source dos format scripts,
  5807. but the Windows version of Vim can source unix format scripts.
  5808. *'virtualedit'* *'ve'*
  5809. 'virtualedit' 've' string (default "")
  5810. global
  5811. A comma separated list of these words:
  5812. block Allow virtual editing in Visual block mode.
  5813. insert Allow virtual editing in Insert mode.
  5814. all Allow virtual editing in all modes.
  5815. onemore Allow the cursor to move just past the end of the line
  5816. Virtual editing means that the cursor can be positioned where there is
  5817. no actual character. This can be halfway into a tab or beyond the end
  5818. of the line. Useful for selecting a rectangle in Visual mode and
  5819. editing a table.
  5820. "onemore" is not the same, it will only allow moving the cursor just
  5821. after the last character of the line. This makes some commands more
  5822. consistent. Previously the cursor was always past the end of the line
  5823. if the line was empty. But it is far from Vi compatible. It may also
  5824. break some plugins or Vim scripts. For example because |l| can move
  5825. the cursor after the last character. Use with care!
  5826. Using the `$` command will move to the last character in the line, not
  5827. past it. This may actually move the cursor to the left!
  5828. The `g$` command will move to the end of the screen line.
  5829. It doesn't make sense to combine "all" with "onemore", but you will
  5830. not get a warning for it.
  5831. *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
  5832. 'visualbell' 'vb' boolean (default off)
  5833. global
  5834. Use visual bell instead of beeping. Also see 'errorbells'.
  5835. *'warn'* *'nowarn'*
  5836. 'warn' boolean (default on)
  5837. global
  5838. Give a warning message when a shell command is used while the buffer
  5839. has been changed.
  5840. *'whichwrap'* *'ww'*
  5841. 'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "")
  5842. global
  5843. Allow specified keys that move the cursor left/right to move to the
  5844. previous/next line when the cursor is on the first/last character in
  5845. the line. Concatenate characters to allow this for these keys:
  5846. char key mode ~
  5847. b <BS> Normal and Visual
  5848. s <Space> Normal and Visual
  5849. h "h" Normal and Visual (not recommended)
  5850. l "l" Normal and Visual (not recommended)
  5851. < <Left> Normal and Visual
  5852. > <Right> Normal and Visual
  5853. ~ "~" Normal
  5854. [ <Left> Insert and Replace
  5855. ] <Right> Insert and Replace
  5856. For example: >
  5857. :set ww=<,>,[,]
  5858. < allows wrap only when cursor keys are used.
  5859. When the movement keys are used in combination with a delete or change
  5860. operator, the <EOL> also counts for a character. This makes "3h"
  5861. different from "3dh" when the cursor crosses the end of a line. This
  5862. is also true for "x" and "X", because they do the same as "dl" and
  5863. "dh". If you use this, you may also want to use the mapping
  5864. ":map <BS> X" to make backspace delete the character in front of the
  5865. cursor.
  5866. When 'l' is included and it is used after an operator at the end of a
  5867. line then it will not move to the next line. This makes "dl", "cl",
  5868. "yl" etc. work normally.
  5869. *'wildchar'* *'wc'*
  5870. 'wildchar' 'wc' number (Vim default: <Tab>, Vi default: CTRL-E)
  5871. global
  5872. Character you have to type to start wildcard expansion in the
  5873. command-line, as specified with 'wildmode'.
  5874. More info here: |cmdline-completion|.
  5875. The character is not recognized when used inside a macro. See
  5876. 'wildcharm' for that.
  5877. Although 'wc' is a number option, you can set it to a special key: >
  5878. :set wc=<Esc>
  5879. <
  5880. *'wildcharm'* *'wcm'*
  5881. 'wildcharm' 'wcm' number (default: none (0))
  5882. global
  5883. 'wildcharm' works exactly like 'wildchar', except that it is
  5884. recognized when used inside a macro. You can find "spare" command-line
  5885. keys suitable for this option by looking at |ex-edit-index|. Normally
  5886. you'll never actually type 'wildcharm', just use it in mappings that
  5887. automatically invoke completion mode, e.g.: >
  5888. :set wcm=<C-Z>
  5889. :cnoremap ss so $vim/sessions/*.vim<C-Z>
  5890. < Then after typing :ss you can use CTRL-P & CTRL-N.
  5891. *'wildignore'* *'wig'*
  5892. 'wildignore' 'wig' string (default "")
  5893. global
  5894. A list of file patterns. A file that matches with one of these
  5895. patterns is ignored when expanding |wildcards|, completing file or
  5896. directory names, and influences the result of |expand()|, |glob()| and
  5897. |globpath()| unless a flag is passed to disable this.
  5898. The pattern is used like with |:autocmd|, see |autocmd-pattern|.
  5899. Also see 'suffixes'.
  5900. Example: >
  5901. :set wildignore=*.o,*.obj
  5902. < The use of |:set+=| and |:set-=| is preferred when adding or removing
  5903. a pattern from the list. This avoids problems when a future version
  5904. uses another default.
  5905. *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
  5906. 'wildignorecase' 'wic' boolean (default off)
  5907. global
  5908. When set case is ignored when completing file names and directories.
  5909. Has no effect when 'fileignorecase' is set.
  5910. Does not apply when the shell is used to expand wildcards, which
  5911. happens when there are special characters.
  5912. *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
  5913. 'wildmenu' 'wmnu' boolean (default on)
  5914. global
  5915. When 'wildmenu' is on, command-line completion operates in an enhanced
  5916. mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
  5917. the possible matches are shown just above the command line, with the
  5918. first match highlighted (overwriting the status line, if there is
  5919. one). Keys that show the previous/next match, such as <Tab> or
  5920. CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
  5921. When 'wildmode' is used, "wildmenu" mode is used where "full" is
  5922. specified. "longest" and "list" do not start "wildmenu" mode.
  5923. You can check the current mode with |wildmenumode()|.
  5924. If there are more matches than can fit in the line, a ">" is shown on
  5925. the right and/or a "<" is shown on the left. The status line scrolls
  5926. as needed.
  5927. The "wildmenu" mode is abandoned when a key is hit that is not used
  5928. for selecting a completion.
  5929. While the "wildmenu" is active the following keys have special
  5930. meanings:
  5931. <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
  5932. <Down> - in filename/menu name completion: move into a
  5933. subdirectory or submenu.
  5934. <CR> - in menu completion, when the cursor is just after a
  5935. dot: move into a submenu.
  5936. <Up> - in filename/menu name completion: move up into
  5937. parent directory or parent menu.
  5938. This makes the menus accessible from the console |console-menus|.
  5939. If you prefer the <Left> and <Right> keys to move the cursor instead
  5940. of selecting a different match, use this: >
  5941. :cnoremap <Left> <Space><BS><Left>
  5942. :cnoremap <Right> <Space><BS><Right>
  5943. <
  5944. The "WildMenu" highlighting is used for displaying the current match
  5945. |hl-WildMenu|.
  5946. *'wildmode'* *'wim'*
  5947. 'wildmode' 'wim' string (default: "full")
  5948. global
  5949. Completion mode that is used for the character specified with
  5950. 'wildchar'. It is a comma separated list of up to four parts. Each
  5951. part specifies what to do for each consecutive use of 'wildchar'. The
  5952. first part specifies the behavior for the first use of 'wildchar',
  5953. The second part for the second use, etc.
  5954. These are the possible values for each part:
  5955. "" Complete only the first match.
  5956. "full" Complete the next full match. After the last match,
  5957. the original string is used and then the first match
  5958. again.
  5959. "longest" Complete till longest common string. If this doesn't
  5960. result in a longer string, use the next part.
  5961. "longest:full" Like "longest", but also start 'wildmenu' if it is
  5962. enabled.
  5963. "list" When more than one match, list all matches.
  5964. "list:full" When more than one match, list all matches and
  5965. complete first match.
  5966. "list:longest" When more than one match, list all matches and
  5967. complete till longest common string.
  5968. When there is only a single match, it is fully completed in all cases.
  5969. Examples: >
  5970. :set wildmode=full
  5971. < Complete first full match, next match, etc. (the default) >
  5972. :set wildmode=longest,full
  5973. < Complete longest common string, then each full match >
  5974. :set wildmode=list:full
  5975. < List all matches and complete each full match >
  5976. :set wildmode=list,full
  5977. < List all matches without completing, then each full match >
  5978. :set wildmode=longest,list
  5979. < Complete longest common string, then list alternatives.
  5980. More info here: |cmdline-completion|.
  5981. *'wildoptions'* *'wop'*
  5982. 'wildoptions' 'wop' string (default "")
  5983. global
  5984. A list of words that change how command line completion is done.
  5985. tagfile When using CTRL-D to list matching tags, the kind of
  5986. tag and the file of the tag is listed. Only one match
  5987. is displayed per line. Often used tag kinds are:
  5988. d #define
  5989. f function
  5990. pum Display the completion matches using the popupmenu
  5991. in the same style as the |ins-completion-menu|.
  5992. Also see |cmdline-completion|.
  5993. *'winaltkeys'* *'wak'*
  5994. 'winaltkeys' 'wak' string (default "menu")
  5995. global
  5996. {only used in Win32}
  5997. Some GUI versions allow the access to menu entries by using the ALT
  5998. key in combination with a character that appears underlined in the
  5999. menu. This conflicts with the use of the ALT key for mappings and
  6000. entering special characters. This option tells what to do:
  6001. no Don't use ALT keys for menus. ALT key combinations can be
  6002. mapped, but there is no automatic handling.
  6003. yes ALT key handling is done by the windowing system. ALT key
  6004. combinations cannot be mapped.
  6005. menu Using ALT in combination with a character that is a menu
  6006. shortcut key, will be handled by the windowing system. Other
  6007. keys can be mapped.
  6008. If the menu is disabled by excluding 'm' from 'guioptions', the ALT
  6009. key is never used for the menu.
  6010. This option is not used for <F10>; on Win32.
  6011. *'winblend'* *'winbl'*
  6012. 'winblend' 'winbl' number (default 0)
  6013. local to window
  6014. Enables pseudo-transparency for a floating window. Valid values are in
  6015. the range of 0 for fully opaque window (disabled) to 100 for fully
  6016. transparent background. Values between 0-30 are typically most useful.
  6017. UI-dependent. Works best with RGB colors. 'termguicolors'
  6018. *'window'* *'wi'*
  6019. 'window' 'wi' number (default screen height - 1)
  6020. global
  6021. Window height. Do not confuse this with the height of the Vim window,
  6022. use 'lines' for that.
  6023. Used for |CTRL-F| and |CTRL-B| when there is only one window and the
  6024. value is smaller than 'lines' minus one. The screen will scroll
  6025. 'window' minus two lines, with a minimum of one.
  6026. When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
  6027. in a much smarter way, taking care of wrapping lines.
  6028. When resizing the Vim window, the value is smaller than 1 or more than
  6029. or equal to 'lines' it will be set to 'lines' minus 1.
  6030. *'winheight'* *'wh'* *E591*
  6031. 'winheight' 'wh' number (default 1)
  6032. global
  6033. Minimal number of lines for the current window. This is not a hard
  6034. minimum, Vim will use fewer lines if there is not enough room. If the
  6035. focus goes to a window that is smaller, its size is increased, at the
  6036. cost of the height of other windows.
  6037. Set 'winheight' to a small number for normal editing.
  6038. Set it to 999 to make the current window fill most of the screen.
  6039. Other windows will be only 'winminheight' high. This has the drawback
  6040. that ":all" will create only two windows. To avoid "vim -o 1 2 3 4"
  6041. to create only two windows, set the option after startup is done,
  6042. using the |VimEnter| event: >
  6043. au VimEnter * set winheight=999
  6044. < Minimum value is 1.
  6045. The height is not adjusted after one of the commands that change the
  6046. height of the current window.
  6047. 'winheight' applies to the current window. Use 'winminheight' to set
  6048. the minimal height for other windows.
  6049. *'winhighlight'* *'winhl'*
  6050. 'winhighlight' 'winhl' string (default empty)
  6051. local to window
  6052. Window-local highlights. Comma-delimited list of highlight
  6053. |group-name| pairs "{hl-builtin}:{hl},..." where each {hl-builtin} is
  6054. a built-in |highlight-groups| item to be overridden by {hl} group in
  6055. the window. Only built-in |highlight-groups| are supported, not
  6056. syntax highlighting (use |:ownsyntax| for that).
  6057. Highlights of vertical separators are determined by the window to the
  6058. left of the separator. The 'tabline' highlight of a tabpage is
  6059. decided by the last-focused window of the tabpage. Highlights of
  6060. the popupmenu are determined by the current window. Highlights in the
  6061. message area cannot be overridden.
  6062. Example: show a different color for non-current windows: >
  6063. set winhighlight=Normal:MyNormal,NormalNC:MyNormalNC
  6064. <
  6065. *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
  6066. 'winfixheight' 'wfh' boolean (default off)
  6067. local to window
  6068. Keep the window height when windows are opened or closed and
  6069. 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the
  6070. |preview-window| and |quickfix-window|.
  6071. The height may be changed anyway when running out of room.
  6072. *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
  6073. 'winfixwidth' 'wfw' boolean (default off)
  6074. local to window
  6075. Keep the window width when windows are opened or closed and
  6076. 'equalalways' is set. Also for |CTRL-W_=|.
  6077. The width may be changed anyway when running out of room.
  6078. *'winminheight'* *'wmh'*
  6079. 'winminheight' 'wmh' number (default 1)
  6080. global
  6081. The minimal height of a window, when it's not the current window.
  6082. This is a hard minimum, windows will never become smaller.
  6083. When set to zero, windows may be "squashed" to zero lines (i.e. just a
  6084. status bar) if necessary. They will return to at least one line when
  6085. they become active (since the cursor has to have somewhere to go.)
  6086. Use 'winheight' to set the minimal height of the current window.
  6087. This option is only checked when making a window smaller. Don't use a
  6088. large number, it will cause errors when opening more than a few
  6089. windows. A value of 0 to 3 is reasonable.
  6090. *'winminwidth'* *'wmw'*
  6091. 'winminwidth' 'wmw' number (default 1)
  6092. global
  6093. The minimal width of a window, when it's not the current window.
  6094. This is a hard minimum, windows will never become smaller.
  6095. When set to zero, windows may be "squashed" to zero columns (i.e. just
  6096. a vertical separator) if necessary. They will return to at least one
  6097. line when they become active (since the cursor has to have somewhere
  6098. to go.)
  6099. Use 'winwidth' to set the minimal width of the current window.
  6100. This option is only checked when making a window smaller. Don't use a
  6101. large number, it will cause errors when opening more than a few
  6102. windows. A value of 0 to 12 is reasonable.
  6103. *'winwidth'* *'wiw'* *E592*
  6104. 'winwidth' 'wiw' number (default 20)
  6105. global
  6106. Minimal number of columns for the current window. This is not a hard
  6107. minimum, Vim will use fewer columns if there is not enough room. If
  6108. the current window is smaller, its size is increased, at the cost of
  6109. the width of other windows. Set it to 999 to make the current window
  6110. always fill the screen. Set it to a small number for normal editing.
  6111. The width is not adjusted after one of the commands to change the
  6112. width of the current window.
  6113. 'winwidth' applies to the current window. Use 'winminwidth' to set
  6114. the minimal width for other windows.
  6115. *'wrap'* *'nowrap'*
  6116. 'wrap' boolean (default on)
  6117. local to window
  6118. This option changes how text is displayed. It doesn't change the text
  6119. in the buffer, see 'textwidth' for that.
  6120. When on, lines longer than the width of the window will wrap and
  6121. displaying continues on the next line. When off lines will not wrap
  6122. and only part of long lines will be displayed. When the cursor is
  6123. moved to a part that is not shown, the screen will scroll
  6124. horizontally.
  6125. The line will be broken in the middle of a word if necessary. See
  6126. 'linebreak' to get the break at a word boundary.
  6127. To make scrolling horizontally a bit more useful, try this: >
  6128. :set sidescroll=5
  6129. :set listchars+=precedes:<,extends:>
  6130. < See 'sidescroll', 'listchars' and |wrap-off|.
  6131. This option can't be set from a |modeline| when the 'diff' option is
  6132. on.
  6133. *'wrapmargin'* *'wm'*
  6134. 'wrapmargin' 'wm' number (default 0)
  6135. local to buffer
  6136. Number of characters from the right window border where wrapping
  6137. starts. When typing text beyond this limit, an <EOL> will be inserted
  6138. and inserting continues on the next line.
  6139. Options that add a margin, such as 'number' and 'foldcolumn', cause
  6140. the text width to be further reduced. This is Vi compatible.
  6141. When 'textwidth' is non-zero, this option is not used.
  6142. See also 'formatoptions' and |ins-textwidth|.
  6143. *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
  6144. 'wrapscan' 'ws' boolean (default on) *E384* *E385*
  6145. global
  6146. Searches wrap around the end of the file. Also applies to |]s| and
  6147. |[s|, searching for spelling mistakes.
  6148. *'write'* *'nowrite'*
  6149. 'write' boolean (default on)
  6150. global
  6151. Allows writing files. When not set, writing a file is not allowed.
  6152. Can be used for a view-only mode, where modifications to the text are
  6153. still allowed. Can be reset with the |-m| or |-M| command line
  6154. argument. Filtering text is still possible, even though this requires
  6155. writing a temporary file.
  6156. *'writeany'* *'wa'* *'nowriteany'* *'nowa'*
  6157. 'writeany' 'wa' boolean (default off)
  6158. global
  6159. Allows writing to any file with no need for "!" override.
  6160. *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'*
  6161. 'writebackup' 'wb' boolean (default on with |+writebackup| feature, off
  6162. otherwise)
  6163. global
  6164. Make a backup before overwriting a file. The backup is removed after
  6165. the file was successfully written, unless the 'backup' option is
  6166. also on.
  6167. WARNING: Switching this option off means that when Vim fails to write
  6168. your buffer correctly and then, for whatever reason, Vim exits, you
  6169. lose both the original file and what you were writing. Only reset
  6170. this option if your file system is almost full and it makes the write
  6171. fail (and make sure not to exit Vim until the write was successful).
  6172. See |backup-table| for another explanation.
  6173. When the 'backupskip' pattern matches, a backup is not made anyway.
  6174. *'writedelay'* *'wd'*
  6175. 'writedelay' 'wd' number (default 0)
  6176. global
  6177. The number of milliseconds to wait for each character sent to the
  6178. screen. When positive, characters are sent to the UI one by one.
  6179. When negative, all redrawn characters cause a delay, even if the
  6180. character already was displayed by the UI. For debugging purposes.
  6181. vim:tw=78:ts=8:noet:ft=help:norl: