blob: ec2b8756bf18792e4d8fb385739863e1684a8b39 [file] [log] [blame]
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01001*options.txt* For Vim version 9.0. Last change: 2023 Jun 02
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Options *options*
8
91. Setting options |set-option|
102. Automatically setting options |auto-setting|
113. Options summary |option-summary|
12
Bram Moolenaar2ec618c2016-10-01 14:47:05 +020013For an overview of options see quickref.txt |option-list|.
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
15Vim has a number of internal variables and switches which can be set to
16achieve special effects. These options come in three forms:
17 boolean can only be on or off *boolean* *toggle*
18 number has a numeric value
19 string has a string value
20
21==============================================================================
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000221. Setting options *set-option* *E764*
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
24 *:se* *:set*
Bram Moolenaar6b915c02020-01-18 15:53:19 +010025:se[t][!] Show all options that differ from their default value.
26 When [!] is present every option is on a separate
27 line.
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
Bram Moolenaar6b915c02020-01-18 15:53:19 +010029:se[t][!] all Show all but terminal options.
30 When [!] is present every option is on a separate
31 line.
Bram Moolenaar071d4272004-06-13 20:20:40 +000032
33:se[t] termcap Show all terminal options. Note that in the GUI the
34 key codes are not shown, because they are generated
35 internally and can't be changed. Changing the terminal
36 codes in the GUI is not useful either...
Bram Moolenaarf1dcd142022-12-31 15:30:45 +000037 The options have the form t_AB, see
38 |terminal-options|.
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
Bram Moolenaar47003982021-12-05 21:54:04 +000040:se[t]! termcap Idem, but don't use multiple columns.
41
Bram Moolenaar071d4272004-06-13 20:20:40 +000042 *E518* *E519*
43:se[t] {option}? Show value of {option}.
44
45:se[t] {option} Toggle option: set, switch it on.
46 Number option: show value.
47 String option: show value.
48
49:se[t] no{option} Toggle option: Reset, switch it off.
50
Bram Moolenaar00a927d2010-05-14 23:24:24 +020051 *:set-!* *:set-inv*
Bram Moolenaar071d4272004-06-13 20:20:40 +000052:se[t] {option}! or
Bram Moolenaar6c60f472019-04-28 16:00:35 +020053:se[t] inv{option} Toggle option: Invert value.
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
55 *:set-default* *:set-&* *:set-&vi* *:set-&vim*
56:se[t] {option}& Reset option to its default value. May depend on the
Bram Moolenaar6c60f472019-04-28 16:00:35 +020057 current value of 'compatible'.
58:se[t] {option}&vi Reset option to its Vi default value.
59:se[t] {option}&vim Reset option to its Vim default value.
Bram Moolenaar071d4272004-06-13 20:20:40 +000060
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +010061:se[t] all& Set all options to their default value. The values of
Bram Moolenaar88774fd2015-08-25 19:52:04 +020062 these options are not changed:
63 all terminal options, starting with t_
64 'columns'
65 'cryptmethod'
66 'encoding'
67 'key'
68 'lines'
69 'term'
70 'ttymouse'
71 'ttytype'
72 Warning: This may have a lot of side effects.
Bram Moolenaar071d4272004-06-13 20:20:40 +000073
74 *:set-args* *E487* *E521*
75:se[t] {option}={value} or
76:se[t] {option}:{value}
77 Set string or number option to {value}.
78 For numeric options the value can be given in decimal,
Bram Moolenaar3848e002016-03-19 18:42:29 +010079 hex (preceded with 0x) or octal (preceded with '0').
Bram Moolenaar071d4272004-06-13 20:20:40 +000080 The old value can be inserted by typing 'wildchar' (by
81 default this is a <Tab> or CTRL-E if 'compatible' is
82 set). See |cmdline-completion|.
83 White space between {option} and '=' is allowed and
84 will be ignored. White space between '=' and {value}
85 is not allowed.
86 See |option-backslash| for using white space and
87 backslashes in {value}.
88
89:se[t] {option}+={value} *:set+=*
90 Add the {value} to a number option, or append the
91 {value} to a string option. When the option is a
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +010092 comma-separated list, a comma is added, unless the
Bram Moolenaar071d4272004-06-13 20:20:40 +000093 value was empty.
94 If the option is a list of flags, superfluous flags
Bram Moolenaara5792f52005-11-23 21:25:05 +000095 are removed. When adding a flag that was already
96 present the option value doesn't change.
Bram Moolenaar899dddf2006-03-26 21:06:50 +000097 Also see |:set-args| above.
Bram Moolenaar071d4272004-06-13 20:20:40 +000098
99:se[t] {option}^={value} *:set^=*
100 Multiply the {value} to a number option, or prepend
101 the {value} to a string option. When the option is a
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100102 comma-separated list, a comma is added, unless the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103 value was empty.
104 Also see |:set-args| above.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105
106:se[t] {option}-={value} *:set-=*
107 Subtract the {value} from a number option, or remove
108 the {value} from a string option, if it is there.
109 If the {value} is not found in a string option, there
110 is no error or warning. When the option is a comma
111 separated list, a comma is deleted, unless the option
112 becomes empty.
113 When the option is a list of flags, {value} must be
114 exactly as they appear in the option. Remove flags
115 one by one to avoid problems.
116 Also see |:set-args| above.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117
118The {option} arguments to ":set" may be repeated. For example: >
119 :set ai nosi sw=3 ts=3
120If you make an error in one of the arguments, an error message will be given
121and the following arguments will be ignored.
122
123 *:set-verbose*
124When 'verbose' is non-zero, displaying an option value will also tell where it
125was last set. Example: >
126 :verbose set shiftwidth cindent?
Bram Moolenaar95bafa22018-10-02 13:26:25 +0200127< shiftwidth=4 ~
128 Last set from modeline line 1 ~
129 cindent ~
130 Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
Bram Moolenaar446cb832008-06-24 21:56:24 +0000131This is only done when specific option values are requested, not for ":verbose
132set all" or ":verbose set" without an argument.
133When the option was set by hand there is no "Last set" message.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134When the option was set while executing a function, user command or
135autocommand, the script in which it was defined is reported.
136Note that an option may also have been set as a side effect of setting
137'compatible'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000138A few special texts:
Bram Moolenaar95bafa22018-10-02 13:26:25 +0200139 Last set from modeline line 1 ~
Bram Moolenaar446cb832008-06-24 21:56:24 +0000140 Option was set in a |modeline|.
141 Last set from --cmd argument ~
142 Option was set with command line argument |--cmd| or +.
143 Last set from -c argument ~
144 Option was set with command line argument |-c|, +, |-S| or
145 |-q|.
146 Last set from environment variable ~
147 Option was set from an environment variable, $VIMINIT,
148 $GVIMINIT or $EXINIT.
149 Last set from error handler ~
150 Option was cleared when evaluating it resulted in an error.
151
Bram Moolenaardb84e452010-08-15 13:50:43 +0200152{not available when compiled without the |+eval| feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000153
154 *:set-termcap* *E522*
Bram Moolenaar1d2ba7f2006-02-14 22:29:30 +0000155For {option} the form "t_xx" may be used to set a terminal option. This will
Bram Moolenaar071d4272004-06-13 20:20:40 +0000156override the value from the termcap. You can then use it in a mapping. If
157the "xx" part contains special characters, use the <t_xx> form: >
158 :set <t_#4>=^[Ot
159This can also be used to translate a special code for a normal key. For
160example, if Alt-b produces <Esc>b, use this: >
161 :set <M-b>=^[b
162(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
163The advantage over a mapping is that it works in all situations.
164
Bram Moolenaar0b2f94d2011-03-22 14:35:05 +0100165You can define any key codes, e.g.: >
166 :set t_xy=^[foo;
167There is no warning for using a name that isn't recognized. You can map these
168codes as you like: >
169 :map <t_xy> something
170< *E846*
171When a key code is not set, it's like it does not exist. Trying to get its
172value will result in an error: >
173 :set t_kb=
174 :set t_kb
Bram Moolenaar6f4754b2022-01-23 12:07:04 +0000175< E846: Key code not set: t_kb ~
Bram Moolenaar0b2f94d2011-03-22 14:35:05 +0100176
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000177The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
178security reasons.
179
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180The listing from ":set" looks different from Vi. Long string options are put
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000181at the end of the list. The number of options is quite large. The output of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182"set all" probably does not fit on the screen, causing Vim to give the
183|more-prompt|.
184
185 *option-backslash*
186To include white space in a string option value it has to be preceded with a
187backslash. To include a backslash you have to use two. Effectively this
188means that the number of backslashes in an option value is halved (rounded
189down).
190A few examples: >
191 :set tags=tags\ /usr/tags results in "tags /usr/tags"
192 :set tags=tags\\,file results in "tags\,file"
193 :set tags=tags\\\ file results in "tags\ file"
194
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000195The "|" character separates a ":set" command from a following command. To
196include the "|" in the option value, use "\|" instead. This example sets the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197'titlestring' option to "hi|there": >
198 :set titlestring=hi\|there
199This sets the 'titlestring' option to "hi" and 'iconstring' to "there": >
200 :set titlestring=hi|set iconstring=there
201
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200202Similarly, in legacy script the double quote character starts a comment. To
203include the '"' in the option value, use '\"' instead. This example sets the
204'titlestring' option to 'hi "there"': >
Bram Moolenaar7df351e2006-01-23 22:30:28 +0000205 :set titlestring=hi\ \"there\"
206
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200207In |Vim9| script it's simpler, comments start with a '#' character, and only
208when preceded by white space. A backslash is needed less often: >
209 vim9script
210 set titlestring=hi\ "there"
211 set titlestring=hi#there#
212 set titlestring=hi\ \#there#
213
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100214For Win32 backslashes in file names are mostly not removed. More precise: For
215options that expect a file name (those where environment variables are
216expanded) a backslash before a normal file name character is not removed. But
217a backslash before a special character (space, backslash, comma, etc.) is used
218like explained above.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000219There is one special situation, when the value starts with "\\": >
220 :set dir=\\machine\path results in "\\machine\path"
221 :set dir=\\\\machine\\path results in "\\machine\path"
222 :set dir=\\path\\file results in "\\path\file" (wrong!)
223For the first one the start is kept, but for the second one the backslashes
224are halved. This makes sure it works both when you expect backslashes to be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000225halved and when you expect the backslashes to be kept. The third gives a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000226result which is probably not what you want. Avoid it.
227
228 *add-option-flags* *remove-option-flags*
229 *E539* *E550* *E551* *E552*
230Some options are a list of flags. When you want to add a flag to such an
231option, without changing the existing ones, you can do it like this: >
232 :set guioptions+=a
233Remove a flag from an option like this: >
234 :set guioptions-=a
235This removes the 'a' flag from 'guioptions'.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000236Note that you should add or remove one flag at a time. If 'guioptions' has
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237the value "ab", using "set guioptions-=ba" won't work, because the string "ba"
238doesn't appear.
239
240 *:set_env* *expand-env* *expand-environment-var*
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000241Environment variables in specific string options will be expanded. If the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000242environment variable exists the '$' and the following environment variable
243name is replaced with its value. If it does not exist the '$' and the name
244are not modified. Any non-id character (not a letter, digit or '_') may
245follow the environment variable name. That character and what follows is
246appended to the value of the environment variable. Examples: >
247 :set term=$TERM.new
248 :set path=/usr/$INCLUDE,$HOME/include,.
249When adding or removing a string from an option with ":set opt-=val" or ":set
250opt+=val" the expansion is done before the adding or removing.
251
252
253Handling of local options *local-options*
254
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +0200255Note: The following also applies to |global-local| options.
256
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257Some of the options only apply to a window or buffer. Each window or buffer
Bram Moolenaar51628222016-12-01 23:03:28 +0100258has its own copy of this option, thus each can have its own value. This
Bram Moolenaar071d4272004-06-13 20:20:40 +0000259allows you to set 'list' in one window but not in another. And set
260'shiftwidth' to 3 in one buffer and 4 in another.
261
262The following explains what happens to these local options in specific
263situations. You don't really need to know all of this, since Vim mostly uses
264the option values you would expect. Unfortunately, doing what the user
265expects is a bit complicated...
266
267When splitting a window, the local options are copied to the new window. Thus
268right after the split the contents of the two windows look the same.
269
270When editing a new buffer, its local option values must be initialized. Since
271the local options of the current buffer might be specifically for that buffer,
272these are not used. Instead, for each buffer-local option there also is a
273global value, which is used for new buffers. With ":set" both the local and
274global value is changed. With "setlocal" only the local value is changed,
275thus this value is not used when editing a new buffer.
276
Bram Moolenaar95ec9d62016-08-12 18:29:59 +0200277When editing a buffer that has been edited before, the options from the window
278that was last closed are used again. If this buffer has been edited in this
279window, the values from back then are used. Otherwise the values from the
280last closed window where the buffer was edited last are used.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281
282It's possible to set a local window option specifically for a type of buffer.
283When you edit another buffer in the same window, you don't want to keep
284using these local window options. Therefore Vim keeps a global value of the
285local window options, which is used when editing another buffer. Each window
286has its own copy of these values. Thus these are local to the window, but
287global to all buffers in the window. With this you can do: >
288 :e one
289 :set list
290 :e two
291Now the 'list' option will also be set in "two", since with the ":set list"
292command you have also set the global value. >
293 :set nolist
294 :e one
295 :setlocal list
296 :e two
297Now the 'list' option is not set, because ":set nolist" resets the global
298value, ":setlocal list" only changes the local value and ":e two" gets the
299global value. Note that if you do this next: >
300 :e one
Bram Moolenaar531da592013-05-06 05:58:55 +0200301You will get back the 'list' value as it was the last time you edited "one".
302The options local to a window are remembered for each buffer. This also
303happens when the buffer is not loaded, but they are lost when the buffer is
304wiped out |:bwipe|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +0200306Special local window options *special-local-window-option*
307
308The following local window options won't be copied over when new windows are
309created, thus they behave slightly differently:
310
311 Option Reason ~
312 'previewwindow' there can only be a single one
313 'scroll' specific to existing window
314 'winfixheight' specific to existing window
315 'winfixwidth' specific to existing window
316
317Special local buffer options *special-local-buffer-option*
318
319The following local buffer options won't be copied over when new buffers are
320created, thus they behave slightly differently:
321
322 Option Reason ~
323 'filetype' explicitly set by autocommands
324 'syntax' explicitly set by autocommands
325 'bufhidden' denote |special-buffers|
326 'buftype' denote |special-buffers|
327 'readonly' will be detected automatically
328 'modified' will be detected automatically
329
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330 *:setl* *:setlocal*
Bram Moolenaar6b915c02020-01-18 15:53:19 +0100331:setl[ocal][!] ... Like ":set" but set only the value local to the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000332 current buffer or window. Not all options have a
333 local value. If the option does not have a local
334 value the global value is set.
Bram Moolenaarc3301872010-07-25 20:53:06 +0200335 With the "all" argument: display local values for all
336 local options.
337 Without argument: Display local values for all local
338 options which are different from the default.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000339 When displaying a specific local option, show the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000340 local value. For a global/local boolean option, when
341 the global value is being used, "--" is displayed
342 before the option name.
343 For a global option the global value is
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344 shown (but that might change in the future).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345
Bram Moolenaar899dddf2006-03-26 21:06:50 +0000346:setl[ocal] {option}< Set the local value of {option} to its global value by
347 copying the value.
Bram Moolenaar899dddf2006-03-26 21:06:50 +0000348
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100349:se[t] {option}< For |global-local| options: Remove the local value of
350 {option}, so that the global value will be used.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000351
352 *:setg* *:setglobal*
Bram Moolenaar6b915c02020-01-18 15:53:19 +0100353:setg[lobal][!] ... Like ":set" but set only the global value for a local
Bram Moolenaar071d4272004-06-13 20:20:40 +0000354 option without changing the local value.
355 When displaying an option, the global value is shown.
Bram Moolenaarc3301872010-07-25 20:53:06 +0200356 With the "all" argument: display global values for all
357 local options.
358 Without argument: display global values for all local
359 options which are different from the default.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360
361For buffer-local and window-local options:
362 Command global value local value ~
363 :set option=value set set
364 :setlocal option=value - set
365:setglobal option=value set -
366 :set option? - display
367 :setlocal option? - display
368:setglobal option? display -
369
370
371Global options with a local value *global-local*
372
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000373Options are global when you mostly use one value for all buffers and windows.
374For some global options it's useful to sometimes have a different local value.
375You can set the local value with ":setlocal". That buffer or window will then
376use the local value, while other buffers and windows continue using the global
377value.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000378
379For example, you have two windows, both on C source code. They use the global
380'makeprg' option. If you do this in one of the two windows: >
381 :set makeprg=gmake
382then the other window will switch to the same value. There is no need to set
383the 'makeprg' option in the other C source window too.
384However, if you start editing a Perl file in a new window, you want to use
Bram Moolenaar02467872007-05-06 13:22:01 +0000385another 'makeprg' for it, without changing the value used for the C source
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000386files. You use this command: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000387 :setlocal makeprg=perlmake
388You can switch back to using the global value by making the local value empty: >
389 :setlocal makeprg=
Bram Moolenaar314dd792019-02-03 15:27:20 +0100390This only works for a string option. For a number or boolean option you need
391to use the "<" flag, like this: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392 :setlocal autoread<
Bram Moolenaar314dd792019-02-03 15:27:20 +0100393Note that for non-boolean and non-number options using "<" copies the global
394value to the local value, it doesn't switch back to using the global value
395(that matters when the global value changes later). You can also use: >
Bram Moolenaar899dddf2006-03-26 21:06:50 +0000396 :set path<
397This will make the local value of 'path' empty, so that the global value is
398used. Thus it does the same as: >
399 :setlocal path=
Bram Moolenaar2f0936c2022-01-08 21:51:59 +0000400Note: In the future more global options can be made |global-local|. Using
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401":setlocal" on a global option might work differently then.
402
Yegappan Lakshmanan777175b2021-11-18 22:08:57 +0000403 *option-value-function*
404Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
Yegappan Lakshmanan8658c752021-12-03 11:09:29 +0000405'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
Yegappan Lakshmanan64095532021-12-06 11:03:55 +0000406a function name or a function reference or a lambda function. When using a
407lambda it will be converted to the name, e.g. "<lambda>123". Examples:
Yegappan Lakshmanan777175b2021-11-18 22:08:57 +0000408>
409 set opfunc=MyOpFunc
Yegappan Lakshmanan19916a82021-11-24 16:32:55 +0000410 set opfunc=function('MyOpFunc')
411 set opfunc=funcref('MyOpFunc')
Yegappan Lakshmanan05e59e32021-12-01 10:30:07 +0000412 set opfunc={a\ ->\ MyOpFunc(a)}
Bram Moolenaar1fca5f32022-02-18 17:50:47 +0000413
414Set to a script-local function: >
415 set opfunc=s:MyLocalFunc
416 set opfunc=<SID>MyLocalFunc
417In |Vim9| script the "s:" and "<SID>" can be omitted if the function exists in
418the script: >
419 set opfunc=MyLocalFunc
420
421Set using a funcref variable: >
Yegappan Lakshmanan05e59e32021-12-01 10:30:07 +0000422 let Fn = function('MyTagFunc')
Bram Moolenaarfa3b7232021-12-24 13:18:38 +0000423 let &tagfunc = Fn
Bram Moolenaar1fca5f32022-02-18 17:50:47 +0000424
425Set using a lambda expression: >
Yegappan Lakshmanan64095532021-12-06 11:03:55 +0000426 let &tagfunc = {t -> MyTagFunc(t)}
Bram Moolenaar1fca5f32022-02-18 17:50:47 +0000427
428Set using a variable with lambda expression: >
Yegappan Lakshmanan05e59e32021-12-01 10:30:07 +0000429 let L = {a, b, c -> MyTagFunc(a, b , c)}
Yegappan Lakshmanan64095532021-12-06 11:03:55 +0000430 let &tagfunc = L
Bram Moolenaar7b1463b2021-12-11 17:24:39 +0000431
432In Vim9 script, in a compiled function, you can use a lambda, but a
433closured does not work, because the function will be called without the
434context of where it was defined.
435
Yegappan Lakshmanan777175b2021-11-18 22:08:57 +0000436
Bram Moolenaar071d4272004-06-13 20:20:40 +0000437Setting the filetype
438
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +0200439:setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000440 Set the 'filetype' option to {filetype}, but only if
441 not done yet in a sequence of (nested) autocommands.
442 This is short for: >
443 :if !did_filetype()
444 : setlocal filetype={filetype}
445 :endif
446< This command is used in a filetype.vim file to avoid
447 setting the 'filetype' option twice, causing different
448 settings and syntax files to be loaded.
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +0200449
450 When the optional FALLBACK argument is present, a
451 later :setfiletype command will override the
Bram Moolenaar26967612019-03-17 17:13:16 +0100452 'filetype'. This is to be used for filetype
453 detections that are just a guess. |did_filetype()|
454 will return false after this command.
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +0200455
Bram Moolenaard58e9292011-02-09 17:07:58 +0100456 *option-window* *optwin*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457:bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options*
458:opt[ions] Open a window for viewing and setting all options.
459 Options are grouped by function.
460 Offers short help for each option. Hit <CR> on the
461 short help to open a help window with more help for
462 the option.
463 Modify the value of the option and hit <CR> on the
464 "set" line to set the new value. For window and
465 buffer specific options, the last accessed window is
466 used to set the option value in, unless this is a help
467 window, in which case the window below help window is
468 used (skipping the option-window).
Bram Moolenaarb5b75622018-03-09 22:22:21 +0100469 {not available when compiled without the |+eval|
470 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471
472 *$HOME*
473Using "~" is like using "$HOME", but it is only recognized at the start of an
474option and after a space or comma.
475
476On Unix systems "~user" can be used too. It is replaced by the home directory
477of user "user". Example: >
478 :set path=~mool/include,/usr/include,.
479
480On Unix systems the form "${HOME}" can be used too. The name between {} can
481contain non-id characters then. Note that if you want to use this for the
482"gf" command, you need to add the '{' and '}' characters to 'isfname'.
483
484NOTE: expanding environment variables and "~/" is only done with the ":set"
485command, not when assigning a value to an option with ":let".
486
Bram Moolenaarc572da52017-08-27 16:52:01 +0200487 *$HOME-windows*
488On MS-Windows, if $HOME is not defined as an environment variable, then
489at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH.
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200490If $HOMEDRIVE is not set then $USERPROFILE is used.
491
492This expanded value is not exported to the environment, this matters when
493running an external command: >
494 :echo system('set | findstr ^HOME=')
495and >
496 :echo luaeval('os.getenv("HOME")')
497should echo nothing (an empty string) despite exists('$HOME') being true.
498When setting $HOME to a non-empty string it will be exported to the
499subprocesses.
Bram Moolenaarc572da52017-08-27 16:52:01 +0200500
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501
502Note the maximum length of an expanded option is limited. How much depends on
503the system, mostly it is something like 256 or 1024 characters.
504
505 *:fix* *:fixdel*
506:fix[del] Set the value of 't_kD':
507 't_kb' is 't_kD' becomes ~
508 CTRL-? CTRL-H
509 not CTRL-? CTRL-?
510
Bram Moolenaar82be4842021-01-11 19:40:15 +0100511 (CTRL-? is 0o177 octal, 0x7f hex)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512
513 If your delete key terminal code is wrong, but the
514 code for backspace is alright, you can put this in
515 your .vimrc: >
516 :fixdel
517< This works no matter what the actual code for
518 backspace is.
519
520 If the backspace key terminal code is wrong you can
521 use this: >
522 :if &term == "termname"
523 : set t_kb=^V<BS>
524 : fixdel
525 :endif
526< Where "^V" is CTRL-V and "<BS>" is the backspace key
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000527 (don't type four characters!). Replace "termname"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000528 with your terminal name.
529
530 If your <Delete> key sends a strange key sequence (not
531 CTRL-? or CTRL-H) you cannot use ":fixdel". Then use: >
532 :if &term == "termname"
533 : set t_kD=^V<Delete>
534 :endif
535< Where "^V" is CTRL-V and "<Delete>" is the delete key
536 (don't type eight characters!). Replace "termname"
537 with your terminal name.
538
539 *Linux-backspace*
540 Note about Linux: By default the backspace key
541 produces CTRL-?, which is wrong. You can fix it by
542 putting this line in your rc.local: >
543 echo "keycode 14 = BackSpace" | loadkeys
544<
545 *NetBSD-backspace*
546 Note about NetBSD: If your backspace doesn't produce
547 the right code, try this: >
548 xmodmap -e "keycode 22 = BackSpace"
549< If this works, add this in your .Xmodmap file: >
550 keysym 22 = BackSpace
551< You need to restart for this to take effect.
552
553==============================================================================
5542. Automatically setting options *auto-setting*
555
556Besides changing options with the ":set" command, there are three alternatives
557to set options automatically for one or more files:
558
5591. When starting Vim initializations are read from various places. See
560 |initialization|. Most of them are performed for all editing sessions,
561 and some of them depend on the directory where Vim is started.
562 You can create an initialization file with |:mkvimrc|, |:mkview| and
563 |:mksession|.
5642. If you start editing a new file, the automatic commands are executed.
565 This can be used to set options for files matching a particular pattern and
566 many other things. See |autocommand|.
5673. If you start editing a new file, and the 'modeline' option is on, a
568 number of lines at the beginning and end of the file are checked for
569 modelines. This is explained here.
570
571 *modeline* *vim:* *vi:* *ex:* *E520*
572There are two forms of modelines. The first form:
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100573 [text{white}]{vi:|vim:|ex:}[white]{options}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000574
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100575[text{white}] empty or any text followed by at least one blank
576 character (<Space> or <Tab>); "ex:" always requires at
577 least one blank character
Bram Moolenaar14b69452013-06-29 23:05:20 +0200578{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
Bram Moolenaar22dbc772013-06-28 18:44:48 +0200579[white] optional white space
580{options} a list of option settings, separated with white space
581 or ':', where each part between ':' is the argument
582 for a ":set" command (can be empty)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000583
Bram Moolenaar14b69452013-06-29 23:05:20 +0200584Examples:
Bram Moolenaar97b2ad32006-03-18 21:40:56 +0000585 vi:noai:sw=3 ts=6 ~
Bram Moolenaar14b69452013-06-29 23:05:20 +0200586 vim: tw=77 ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587
588The second form (this is compatible with some versions of Vi):
589
Bram Moolenaarade0d392020-01-21 22:33:58 +0100590 [text{white}]{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000591
Bram Moolenaarade0d392020-01-21 22:33:58 +0100592[text{white}] empty or any text followed by at least one blank
593 character (<Space> or <Tab>); "ex:" always requires at
594 least one blank character
Bram Moolenaar22dbc772013-06-28 18:44:48 +0200595{vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:"
596[white] optional white space
Bram Moolenaar14b69452013-06-29 23:05:20 +0200597se[t] the string "set " or "se " (note the space); When
598 "Vim" is used it must be "set".
Bram Moolenaar22dbc772013-06-28 18:44:48 +0200599{options} a list of options, separated with white space, which
600 is the argument for a ":set" command
601: a colon
602[text] any text or empty
Bram Moolenaar071d4272004-06-13 20:20:40 +0000603
Bram Moolenaar14b69452013-06-29 23:05:20 +0200604Examples:
Bram Moolenaar97b2ad32006-03-18 21:40:56 +0000605 /* vim: set ai tw=75: */ ~
Bram Moolenaar14b69452013-06-29 23:05:20 +0200606 /* Vim: set ai tw=75: */ ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000607
Bram Moolenaar22dbc772013-06-28 18:44:48 +0200608The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the
609chance that a normal word like "lex:" is caught. There is one exception:
610"vi:" and "vim:" can also be at the start of the line (for compatibility with
611version 3.0). Using "ex:" at the start of the line will be ignored (this
612could be short for "example:").
Bram Moolenaar071d4272004-06-13 20:20:40 +0000613
Hu Jialun9dcd3492021-08-28 20:42:50 +0200614If the modeline is disabled within a modeline, subsequent modelines will be
615ignored. This is to allow turning off modeline on a per-file basis. This is
616useful when a line looks like a modeline but isn't. For example, it would be
617good to start a YAML file containing strings like "vim:" with
618 # vim: nomodeline ~
619so as to avoid modeline misdetection. Following options on the same line
620after modeline deactivation, if any, are still evaluated (but you would
621normally not have any).
622
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623 *modeline-local*
624The options are set like with ":setlocal": The new value only applies to the
Bram Moolenaar843ee412004-06-30 16:16:41 +0000625buffer and window that contain the file. Although it's possible to set global
626options from a modeline, this is unusual. If you have two windows open and
627the files in it set the same global option to a different value, the result
628depends on which one was opened last.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000629
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000630When editing a file that was already loaded, only the window-local options
631from the modeline are used. Thus if you manually changed a buffer-local
632option after opening the file, it won't be changed if you edit the same buffer
633in another window. But window-local options will be set.
634
Bram Moolenaar071d4272004-06-13 20:20:40 +0000635 *modeline-version*
636If the modeline is only to be used for some versions of Vim, the version
Bram Moolenaar22dbc772013-06-28 18:44:48 +0200637number can be specified where "vim:" or "Vim:" is used:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000638 vim{vers}: version {vers} or later
639 vim<{vers}: version before {vers}
640 vim={vers}: version {vers}
641 vim>{vers}: version after {vers}
Bram Moolenaar2b8388b2015-02-28 13:11:45 +0100642{vers} is 700 for Vim 7.0 (hundred times the major version plus minor).
643For example, to use a modeline only for Vim 7.0:
644 /* vim700: set foldmethod=marker */ ~
645To use a modeline for Vim after version 7.2:
646 /* vim>702: set cole=2: */ ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647There can be no blanks between "vim" and the ":".
648
649
650The number of lines that are checked can be set with the 'modelines' option.
651If 'modeline' is off or 'modelines' is 0 no lines are checked.
652
653Note that for the first form all of the rest of the line is used, thus a line
Bram Moolenaar97b2ad32006-03-18 21:40:56 +0000654like:
655 /* vi:ts=4: */ ~
656will give an error message for the trailing "*/". This line is OK:
657 /* vi:set ts=4: */ ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658
659If an error is detected the rest of the line is skipped.
660
661If you want to include a ':' in a set command precede it with a '\'. The
Bram Moolenaar97b2ad32006-03-18 21:40:56 +0000662backslash in front of the ':' will be removed. Example:
Bram Moolenaar95a9dd12019-12-19 22:12:03 +0100663 /* vi:set fillchars=stl\:^,vert\:\|: */ ~
664This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash
665before the ':' is removed. Thus to include "\:" you have to specify "\\:".
Bram Moolenaar110289e2019-05-23 15:38:06 +0200666 *E992*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000667No other commands than "set" are supported, for security reasons (somebody
Bram Moolenaar8243a792007-05-01 17:05:03 +0000668might create a Trojan horse text file with modelines). And not all options
Bram Moolenaar110289e2019-05-23 15:38:06 +0200669can be set. For some options a flag is set, so that when the value is used
670the |sandbox| is effective. Some options can only be set from the modeline
671when 'modelineexpr' is set (the default is off).
672
673Still, there is always a small risk that a modeline causes trouble. E.g.,
674when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly.
675So disable modelines before editing untrusted text. The mail ftplugin does
676this, for example.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000677
678Hint: If you would like to do something else than setting an option, you could
679define an autocommand that checks the file for a specific string. For
680example: >
681 au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif
682And define a function SetVar() that does something with the line containing
683"VAR".
684
685==============================================================================
6863. Options summary *option-summary*
687
688In the list below all the options are mentioned with their full name and with
689an abbreviation if there is one. Both forms may be used.
690
691In this document when a boolean option is "set" that means that ":set option"
692is entered. When an option is "reset", ":set nooption" is used.
693
694For some options there are two default values: The "Vim default", which is
695used when 'compatible' is not set, and the "Vi default", which is used when
696'compatible' is set.
697
698Most options are the same in all windows and buffers. There are a few that
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000699are specific to how the text is presented in a window. These can be set to a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700different value in each window. For example the 'list' option can be set in
701one window and reset in another for the same text, giving both types of view
702at the same time. There are a few options that are specific to a certain
703file. These can have a different value for each file or buffer. For example
704the 'textwidth' option can be 78 for a normal text file and 0 for a C
705program.
706
707 global one option for all buffers and windows
708 local to window each window has its own copy of this option
709 local to buffer each buffer has its own copy of this option
710
711When creating a new window the option values from the currently active window
712are used as a default value for the window-specific options. For the
713buffer-specific options this depends on the 's' and 'S' flags in the
714'cpoptions' option. If 's' is included (which is the default) the values for
715buffer options are copied from the currently active buffer when a buffer is
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000716first entered. If 'S' is present the options are copied each time the buffer
717is entered, this is almost like having global options. If 's' and 'S' are not
Bram Moolenaar071d4272004-06-13 20:20:40 +0000718present, the options are copied from the currently active buffer when the
719buffer is created.
720
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000721Hidden options *hidden-options*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000722
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000723Not all options are supported in all versions. This depends on the supported
724features and sometimes on the system. A remark about this is in curly braces
725below. When an option is not supported it may still be set without getting an
726error, this is called a hidden option. You can't get the value of a hidden
727option though, it is not stored.
728
729To test if option "foo" can be used with ":set" use something like this: >
730 if exists('&foo')
731This also returns true for a hidden option. To test if option "foo" is really
732supported use something like this: >
733 if exists('+foo')
734<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000735 *E355*
736A jump table for the options with a short description can be found at |Q_op|.
737
738 *'aleph'* *'al'* *aleph* *Aleph*
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100739'aleph' 'al' number (default 128 for MS-Windows, 224 otherwise)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000740 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000741 {only available when compiled with the |+rightleft|
742 feature}
743 The ASCII code for the first letter of the Hebrew alphabet. The
744 routine that maps the keyboard in Hebrew mode, both in Insert mode
745 (when hkmap is set) and on the command-line (when hitting CTRL-_)
746 outputs the Hebrew characters in the range [aleph..aleph+26].
747 aleph=128 applies to PC code, and aleph=224 applies to ISO 8859-8.
748 See |rileft.txt|.
749
750 *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'*
751'allowrevins' 'ari' boolean (default off)
752 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000753 {only available when compiled with the |+rightleft|
754 feature}
755 Allow CTRL-_ in Insert and Command-line mode. This is default off, to
756 avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get
757 into reverse Insert mode, and don't know how to get out. See
758 'revins'.
759 NOTE: This option is reset when 'compatible' is set.
760
761 *'altkeymap'* *'akm'* *'noaltkeymap'* *'noakm'*
762'altkeymap' 'akm' boolean (default off)
763 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000764 {only available when compiled with the |+farsi|
765 feature}
Bram Moolenaar14184a32019-02-16 15:10:30 +0100766 This option was for using Farsi, which has been removed. See
767 |farsi.txt|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768
769 *'ambiwidth'* *'ambw'*
770'ambiwidth' 'ambw' string (default: "single")
771 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000772 Only effective when 'encoding' is "utf-8" or another Unicode encoding.
773 Tells Vim what to do with characters with East Asian Width Class
774 Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
775 letters, Cyrillic letters).
776
777 There are currently two possible values:
Bram Moolenaar582fd852005-03-28 20:58:01 +0000778 "single": Use the same width as characters in US-ASCII. This is
Bram Moolenaar071d4272004-06-13 20:20:40 +0000779 expected by most users.
780 "double": Use twice the width of ASCII characters.
Bram Moolenaar5c3bd0a2010-08-04 20:55:44 +0200781 *E834* *E835*
782 The value "double" cannot be used if 'listchars' or 'fillchars'
Bram Moolenaar079ba762021-10-23 12:08:41 +0100783 contains a character that would be double width. These errors may
784 also be given when calling setcellwidths().
Bram Moolenaar08aac3c2020-08-28 21:04:24 +0200785
786 The values are overruled for characters specified with
787 |setcellwidths()|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000788
789 There are a number of CJK fonts for which the width of glyphs for
790 those characters are solely based on how many octets they take in
791 legacy/traditional CJK encodings. In those encodings, Euro,
792 Registered sign, Greek/Cyrillic letters are represented by two octets,
Bram Moolenaar582fd852005-03-28 20:58:01 +0000793 therefore those fonts have "wide" glyphs for them. This is also
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794 true of some line drawing characters used to make tables in text
Bram Moolenaar582fd852005-03-28 20:58:01 +0000795 file. Therefore, when a CJK font is used for GUI Vim or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000796 Vim is running inside a terminal (emulators) that uses a CJK font
797 (or Vim is run inside an xterm invoked with "-cjkwidth" option.),
798 this option should be set to "double" to match the width perceived
799 by Vim with the width of glyphs in the font. Perhaps it also has
Bram Moolenaar8024f932020-01-14 19:29:13 +0100800 to be set to "double" under CJK MS-Windows when the system locale is
801 set to one of CJK locales. See Unicode Standard Annex #11
802 (http://www.unicode.org/reports/tr11).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803
Bram Moolenaarac7bd632013-03-19 11:35:58 +0100804 Vim may set this option automatically at startup time when Vim is
805 compiled with the |+termresponse| feature and if |t_u7| is set to the
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200806 escape sequence to request cursor position report. The response can
807 be found in |v:termu7resp|.
Bram Moolenaarac7bd632013-03-19 11:35:58 +0100808
Bram Moolenaar071d4272004-06-13 20:20:40 +0000809 *'antialias'* *'anti'* *'noantialias'* *'noanti'*
810'antialias' 'anti' boolean (default: off)
811 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000812 {only available when compiled with GUI enabled
Bram Moolenaar3d1cde82020-08-15 18:55:18 +0200813 on macOS}
814 This option only has an effect in the GUI version of Vim on macOS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000815 v10.2 or later. When on, Vim will use smooth ("antialiased") fonts,
816 which can be easier to read at certain sizes on certain displays.
817 Setting this option can sometimes cause problems if 'guifont' is set
818 to its default (empty string).
Bram Moolenaar036986f2017-03-16 17:41:02 +0100819 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000820
821 *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
822'autochdir' 'acd' boolean (default off)
823 global
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200824 {only available when compiled with it, use
825 exists("+autochdir") to check}
Bram Moolenaard8c00872005-07-22 21:52:15 +0000826 When on, Vim will change the current working directory whenever you
827 open a file, switch buffers, delete a buffer or open/close a window.
828 It will change to the directory containing the file which was opened
Bram Moolenaare8008642022-08-19 17:15:35 +0100829 or selected. When a buffer has no name it also has no directory, thus
830 the current directory won't change when navigating to it.
Bram Moolenaar910f66f2006-04-05 20:41:53 +0000831 Note: When this option is on some plugins may not work.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000832
Bram Moolenaar8b9abfd2021-03-29 20:49:05 +0200833 *'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
834'autoshelldir' 'asd' boolean (default off)
835 global
836 When on, Vim will change the current working directory whenever you
837 change the directory of the shell running in a terminal window. You
838 need proper setting-up, so whenever the shell's pwd changes an OSC 7
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +0100839 escape sequence will be emitted. For example, on Linux, you can
840 source /etc/profile.d/vte.sh in your shell profile if you use bash or
841 zsh. For bash this should work (put it in a bash init file): >
842 if [[ -n "$VIM_TERMINAL" ]]; then
843 PROMPT_COMMAND='_vim_sync_PWD'
844 function _vim_sync_PWD() {
Bram Moolenaare1f3fd12022-08-15 18:51:32 +0100845 printf '\033]7;file://%s\033\\' "$PWD"
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +0100846 }
847 fi
848<
849 Or, in a zsh init file: >
850 if [[ -n "$VIM_TERMINAL" ]]; then
851 autoload -Uz add-zsh-hook
852 add-zsh-hook -Uz chpwd _vim_sync_PWD
853 function _vim_sync_PWD() {
Bram Moolenaare1f3fd12022-08-15 18:51:32 +0100854 printf '\033]7;file://%s\033\\' "$PWD"
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +0100855 }
856 fi
857<
858 In a fish init file: >
859 if test -n "$VIM_TERMINAL"
860 function _vim_sync_PWD --on-variable=PWD
Bram Moolenaare1f3fd12022-08-15 18:51:32 +0100861 printf '\033]7;file://%s\033\\' "$PWD"
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +0100862 end
863 end
864<
865 You can find an alternative method at |terminal-autoshelldir|.
Bram Moolenaara2baa732022-02-04 16:09:54 +0000866 When the parsing of the OSC sequence fails you get *E1179* .
Bram Moolenaar8b9abfd2021-03-29 20:49:05 +0200867
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868 *'arabic'* *'arab'* *'noarabic'* *'noarab'*
869'arabic' 'arab' boolean (default off)
870 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +0000871 {only available when compiled with the |+arabic|
872 feature}
873 This option can be set to start editing Arabic text.
874 Setting this option will:
875 - Set the 'rightleft' option, unless 'termbidi' is set.
876 - Set the 'arabicshape' option, unless 'termbidi' is set.
877 - Set the 'keymap' option to "arabic"; in Insert mode CTRL-^ toggles
878 between typing English and Arabic key mapping.
879 - Set the 'delcombine' option
880 Note that 'encoding' must be "utf-8" for working with Arabic text.
881
882 Resetting this option will:
883 - Reset the 'rightleft' option.
884 - Disable the use of 'keymap' (without changing its value).
885 Note that 'arabicshape' and 'delcombine' are not reset (it is a global
Bram Moolenaarc8734422012-06-01 22:38:45 +0200886 option).
Bram Moolenaar036986f2017-03-16 17:41:02 +0100887 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000888 Also see |arabic.txt|.
889
890 *'arabicshape'* *'arshape'*
891 *'noarabicshape'* *'noarshape'*
892'arabicshape' 'arshape' boolean (default on)
893 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000894 {only available when compiled with the |+arabic|
895 feature}
896 When on and 'termbidi' is off, the required visual character
897 corrections that need to take place for displaying the Arabic language
Bram Moolenaar3a0d8092012-10-21 03:02:54 +0200898 take effect. Shaping, in essence, gets enabled; the term is a broad
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899 one which encompasses:
900 a) the changing/morphing of characters based on their location
901 within a word (initial, medial, final and stand-alone).
902 b) the enabling of the ability to compose characters
903 c) the enabling of the required combining of some characters
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100904 When disabled the display shows each character's true stand-alone
905 form.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906 Arabic is a complex language which requires other settings, for
907 further details see |arabic.txt|.
Bram Moolenaar036986f2017-03-16 17:41:02 +0100908 NOTE: This option is set when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000909
910 *'autoindent'* *'ai'* *'noautoindent'* *'noai'*
911'autoindent' 'ai' boolean (default off)
912 local to buffer
913 Copy indent from current line when starting a new line (typing <CR>
914 in Insert mode or when using the "o" or "O" command). If you do not
915 type anything on the new line except <BS> or CTRL-D and then type
Bram Moolenaar02467872007-05-06 13:22:01 +0000916 <Esc>, CTRL-O or <CR>, the indent is deleted again. Moving the cursor
917 to another line has the same effect, unless the 'I' flag is included
918 in 'cpoptions'.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000919 When autoindent is on, formatting (with the "gq" command or when you
920 reach 'textwidth' in Insert mode) uses the indentation of the first
921 line.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000922 When 'smartindent' or 'cindent' is on the indent is changed in
923 a different way.
Bram Moolenaarca635012015-09-25 20:34:21 +0200924 The 'autoindent' option is reset when the 'paste' option is set and
925 restored when 'paste' is reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000926
927 *'autoread'* *'ar'* *'noautoread'* *'noar'*
928'autoread' 'ar' boolean (default off)
929 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930 When a file has been detected to have been changed outside of Vim and
931 it has not been changed inside of Vim, automatically read it again.
Bram Moolenaarfd358112018-07-07 23:21:31 +0200932 When the file has been deleted this is not done, so you have the text
933 from before it was deleted. When it appears again then it is read.
934 |timestamp|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935 If this option has a local value, use this command to switch back to
936 using the global value: >
937 :set autoread<
938<
939 *'autowrite'* *'aw'* *'noautowrite'* *'noaw'*
940'autowrite' 'aw' boolean (default off)
941 global
942 Write the contents of the file, if it has been modified, on each
Bram Moolenaar47003982021-12-05 21:54:04 +0000943 `:next`, `:rewind`, `:last`, `:first`, `:previous`, `:stop`,
Bram Moolenaar2f0936c2022-01-08 21:51:59 +0000944 `:suspend`, `:tag`, `:!`, `:make`, CTRL-] and CTRL-^ command; and when
945 a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command takes one
Bram Moolenaar47003982021-12-05 21:54:04 +0000946 to another file.
947 A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is
Bram Moolenaar2f0936c2022-01-08 21:51:59 +0000948 set to "hide" and `:next` is used.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949 Note that for some commands the 'autowrite' option is not used, see
950 'autowriteall' for that.
Bram Moolenaar93a1df22018-09-10 11:51:50 +0200951 Some buffers will not be written, specifically when 'buftype' is
Bram Moolenaar20aac6c2018-09-02 21:07:30 +0200952 "nowrite", "nofile", "terminal" or "prompt".
Bram Moolenaarb7398fe2023-05-14 18:50:25 +0100953 USE WITH CARE: If you make temporary changes to a buffer that you
954 don't want to be saved this option may cause it to be saved anyway.
955 Renaming the buffer with ":file {name}" may help avoid this.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000956
957 *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
958'autowriteall' 'awa' boolean (default off)
959 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000960 Like 'autowrite', but also used for commands ":edit", ":enew", ":quit",
961 ":qall", ":exit", ":xit", ":recover" and closing the Vim window.
962 Setting this option also implies that Vim behaves like 'autowrite' has
963 been set.
964
965 *'background'* *'bg'*
Bram Moolenaar446beb42011-05-10 17:18:44 +0200966'background' 'bg' string (default "dark" or "light", see below)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000967 global
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968 When set to "dark", Vim will try to use colors that look good on a
969 dark background. When set to "light", Vim will try to use colors that
970 look good on a light background. Any other value is illegal.
971 Vim tries to set the default value according to the terminal used.
972 This will not always be correct.
973 Setting this option does not change the background color, it tells Vim
974 what the background color looks like. For changing the background
975 color, see |:hi-normal|.
976
977 When 'background' is set Vim will adjust the default color groups for
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000978 the new value. But the colors used for syntax highlighting will not
Bram Moolenaar446cb832008-06-24 21:56:24 +0000979 change. *g:colors_name*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100980 When a color scheme is loaded (the "g:colors_name" variable is set)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000981 setting 'background' will cause the color scheme to be reloaded. If
982 the color scheme adjusts to the value of 'background' this will work.
983 However, if the color scheme sets 'background' itself the effect may
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100984 be undone. First delete the "g:colors_name" variable when needed.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985
986 When setting 'background' to the default value with: >
987 :set background&
988< Vim will guess the value. In the GUI this should work correctly,
989 in other cases Vim might not be able to guess the right value.
Bram Moolenaar2e693a82019-10-16 22:35:02 +0200990 If the GUI supports a dark theme, you can use the "d" flag in
Bram Moolenaar50bf7ce2019-09-15 13:17:00 +0200991 'guioptions', see 'go-d'.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000992
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200993 When the |t_RB| option is set, Vim will use it to request the background
Bram Moolenaarb4d6c3e2017-05-27 16:45:17 +0200994 color from the terminal. If the returned RGB value is dark/light and
995 'background' is not dark/light, 'background' will be set and the
996 screen is redrawn. This may have side effects, make t_BG empty in
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200997 your .vimrc if you suspect this problem. The response to |t_RB| can
Bram Moolenaar01164a62017-11-02 22:58:42 +0100998 be found in |v:termrbgresp|.
Bram Moolenaarb4d6c3e2017-05-27 16:45:17 +0200999
Bram Moolenaar071d4272004-06-13 20:20:40 +00001000 When starting the GUI, the default value for 'background' will be
1001 "light". When the value is not set in the .gvimrc, and Vim detects
1002 that the background is actually quite dark, 'background' is set to
1003 "dark". But this happens only AFTER the .gvimrc file has been read
1004 (because the window needs to be opened to find the actual background
1005 color). To get around this, force the GUI window to be opened by
1006 putting a ":gui" command in the .gvimrc file, before where the value
1007 of 'background' is used (e.g., before ":syntax on").
Bram Moolenaar446beb42011-05-10 17:18:44 +02001008
Bram Moolenaar6f345a12019-12-17 21:27:18 +01001009 For MS-Windows the default is "dark".
Bram Moolenaar446beb42011-05-10 17:18:44 +02001010 For other systems "dark" is used when 'term' is "linux",
1011 "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
1012 background. Otherwise the default is "light".
1013
Bram Moolenaarc572da52017-08-27 16:52:01 +02001014 The |:terminal| command and the |term_start()| function use the
1015 'background' value to decide whether the terminal window will start
1016 with a white or black background.
1017
Bram Moolenaar071d4272004-06-13 20:20:40 +00001018 Normally this option would be set in the .vimrc file. Possibly
1019 depending on the terminal name. Example: >
1020 :if &term == "pcterm"
1021 : set background=dark
1022 :endif
1023< When this option is set, the default settings for the highlight groups
1024 will change. To use other settings, place ":highlight" commands AFTER
1025 the setting of the 'background' option.
1026 This option is also used in the "$VIMRUNTIME/syntax/syntax.vim" file
1027 to select the colors for syntax highlighting. After changing this
1028 option, you must load syntax.vim again to see the result. This can be
1029 done with ":syntax on".
1030
1031 *'backspace'* *'bs'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02001032'backspace' 'bs' string (default "", set to "indent,eol,start"
1033 in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001034 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001035 Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
1036 mode. This is a list of items, separated by commas. Each item allows
1037 a way to backspace over something:
1038 value effect ~
1039 indent allow backspacing over autoindent
1040 eol allow backspacing over line breaks (join lines)
1041 start allow backspacing over the start of insert; CTRL-W and CTRL-U
1042 stop once at the start of insert.
Bram Moolenaaraa0489e2020-04-17 19:41:21 +02001043 nostop like start, except CTRL-W and CTRL-U do not stop at the start of
1044 insert.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001045
Bram Moolenaar46eea442022-03-30 10:51:39 +01001046 When the value is empty, Vi compatible backspacing is used, none of
1047 the ways mentioned for the items above are possible.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001048
1049 For backwards compatibility with version 5.4 and earlier:
1050 value effect ~
1051 0 same as ":set backspace=" (Vi compatible)
1052 1 same as ":set backspace=indent,eol"
1053 2 same as ":set backspace=indent,eol,start"
Bram Moolenaaraa0489e2020-04-17 19:41:21 +02001054 3 same as ":set backspace=indent,eol,nostop"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001055
1056 See |:fixdel| if your <BS> or <Del> key does not do what you want.
1057 NOTE: This option is set to "" when 'compatible' is set.
1058
1059 *'backup'* *'bk'* *'nobackup'* *'nobk'*
1060'backup' 'bk' boolean (default off)
1061 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001062 Make a backup before overwriting a file. Leave it around after the
1063 file has been successfully written. If you do not want to keep the
1064 backup file, but you do want a backup while the file is being
1065 written, reset this option and set the 'writebackup' option (this is
1066 the default). If you do not want a backup file at all reset both
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00001067 options (use this if your file system is almost full). See the
Bram Moolenaar071d4272004-06-13 20:20:40 +00001068 |backup-table| for more explanations.
1069 When the 'backupskip' pattern matches, a backup is not made anyway.
1070 When 'patchmode' is set, the backup may be renamed to become the
1071 oldest version of a file.
1072 NOTE: This option is reset when 'compatible' is set.
1073
1074 *'backupcopy'* *'bkc'*
1075'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto")
Bram Moolenaarb8ee25a2014-09-23 15:45:08 +02001076 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001077 When writing a file and a backup is made, this option tells how it's
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001078 done. This is a comma-separated list of words.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001079
1080 The main values are:
1081 "yes" make a copy of the file and overwrite the original one
1082 "no" rename the file and write a new one
1083 "auto" one of the previous, what works best
1084
1085 Extra values that can be combined with the ones above are:
1086 "breaksymlink" always break symlinks when writing
1087 "breakhardlink" always break hardlinks when writing
1088
1089 Making a copy and overwriting the original file:
1090 - Takes extra time to copy the file.
1091 + When the file has special attributes, is a (hard/symbolic) link or
1092 has a resource fork, all this is preserved.
1093 - When the file is a link the backup will have the name of the link,
1094 not of the real file.
1095
1096 Renaming the file and writing a new one:
1097 + It's fast.
1098 - Sometimes not all attributes of the file can be copied to the new
1099 file.
1100 - When the file is a link the new file will not be a link.
1101
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001102 The "auto" value is the middle way: When Vim sees that renaming the
1103 file is possible without side effects (the attributes can be passed on
1104 and the file is not a link) that is used. When problems are expected,
1105 a copy will be made.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001106
1107 The "breaksymlink" and "breakhardlink" values can be used in
1108 combination with any of "yes", "no" and "auto". When included, they
1109 force Vim to always break either symbolic or hard links by doing
1110 exactly what the "no" option does, renaming the original file to
1111 become the backup and writing a new file in its place. This can be
1112 useful for example in source trees where all the files are symbolic or
1113 hard links and any changes should stay in the local source tree, not
1114 be propagated back to the original source.
1115 *crontab*
1116 One situation where "no" and "auto" will cause problems: A program
1117 that opens a file, invokes Vim to edit that file, and then tests if
1118 the open file was changed (through the file descriptor) will check the
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00001119 backup file instead of the newly created file. "crontab -e" is an
Bram Moolenaar071d4272004-06-13 20:20:40 +00001120 example.
1121
1122 When a copy is made, the original file is truncated and then filled
1123 with the new text. This means that protection bits, owner and
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001124 symbolic links of the original file are unmodified. The backup file,
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00001125 however, is a new file, owned by the user who edited the file. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00001126 group of the backup is set to the group of the original file. If this
1127 fails, the protection bits for the group are made the same as for
1128 others.
1129
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001130 When the file is renamed, this is the other way around: The backup has
Bram Moolenaar071d4272004-06-13 20:20:40 +00001131 the same attributes of the original file, and the newly written file
1132 is owned by the current user. When the file was a (hard/symbolic)
1133 link, the new file will not! That's why the "auto" value doesn't
1134 rename when the file is a link. The owner and group of the newly
1135 written file will be set to the same ones as the original file, but
1136 the system may refuse to do this. In that case the "auto" value will
1137 again not rename the file.
1138
Bram Moolenaar036986f2017-03-16 17:41:02 +01001139 NOTE: This option is set to the Vi default value when 'compatible' is
1140 set and to the Vim default value when 'compatible' is reset.
1141
Bram Moolenaar071d4272004-06-13 20:20:40 +00001142 *'backupdir'* *'bdir'*
1143'backupdir' 'bdir' string (default for Amiga: ".,t:",
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01001144 for Win32: ".,$TEMP,c:/tmp,c:/temp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001145 for Unix: ".,~/tmp,~/")
1146 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001147 List of directories for the backup file, separated with commas.
1148 - The backup file will be created in the first directory in the list
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001149 where this is possible. The directory must exist, Vim will not
1150 create it for you.
Bram Moolenaar3848e002016-03-19 18:42:29 +01001151 - Empty means that no backup file will be created ('patchmode' is
Bram Moolenaar071d4272004-06-13 20:20:40 +00001152 impossible!). Writing may fail because of this.
1153 - A directory "." means to put the backup file in the same directory
1154 as the edited file.
Bram Moolenaar8024f932020-01-14 19:29:13 +01001155 - A directory starting with "./" (or ".\" for MS-Windows) means to put
1156 the backup file relative to where the edited file is. The leading
1157 "." is replaced with the path name of the edited file.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001158 ("." inside a directory name has no special meaning).
1159 - Spaces after the comma are ignored, other spaces are considered part
1160 of the directory name. To have a space at the start of a directory
1161 name, precede it with a backslash.
1162 - To include a comma in a directory name precede it with a backslash.
1163 - A directory name may end in an '/'.
Bram Moolenaarb782ba42018-08-07 21:39:28 +02001164 - For Unix and Win32, if a directory ends in two path separators "//",
Bram Moolenaarf0d58ef2018-11-16 16:13:44 +01001165 the backup file name will be built from the complete path to the
1166 file with all path separators changed to percent '%' signs. This
1167 will ensure file name uniqueness in the backup directory.
Bram Moolenaarb782ba42018-08-07 21:39:28 +02001168 On Win32, it is also possible to end with "\\". However, When a
1169 separating comma is following, you must use "//", since "\\" will
1170 include the comma in the file name. Therefore it is recommended to
1171 use '//', instead of '\\'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001172 - Environment variables are expanded |:set_env|.
1173 - Careful with '\' characters, type one before a space, type two to
1174 get one in the option (see |option-backslash|), for example: >
1175 :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
1176< - For backwards compatibility with Vim version 3.0 a '>' at the start
1177 of the option is removed.
1178 See also 'backup' and 'writebackup' options.
1179 If you want to hide your backup files on Unix, consider this value: >
1180 :set backupdir=./.backup,~/.backup,.,/tmp
1181< You must create a ".backup" directory in each directory and in your
1182 home directory for this to work properly.
1183 The use of |:set+=| and |:set-=| is preferred when adding or removing
1184 directories from the list. This avoids problems when a future version
1185 uses another default.
1186 This option cannot be set from a |modeline| or in the |sandbox|, for
1187 security reasons.
1188
1189 *'backupext'* *'bex'* *E589*
1190'backupext' 'bex' string (default "~", for VMS: "_")
1191 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001192 String which is appended to a file name to make the name of the
1193 backup file. The default is quite unusual, because this avoids
1194 accidentally overwriting existing files with a backup file. You might
1195 prefer using ".bak", but make sure that you don't have files with
1196 ".bak" that you want to keep.
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001197 Only normal file name characters can be used; "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001199 If you like to keep a lot of backups, you could use a BufWritePre
1200 autocommand to change 'backupext' just before writing the file to
1201 include a timestamp. >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00001202 :au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~'
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001203< Use 'backupdir' to put the backup in a different directory.
1204
Bram Moolenaar071d4272004-06-13 20:20:40 +00001205 *'backupskip'* *'bsk'*
Bram Moolenaarb8e22a02018-04-12 21:37:34 +02001206'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*"
1207 Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*"
1208 Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001210 A list of file patterns. When one of the patterns matches with the
1211 name of the file which is written, no backup file is created. Both
1212 the specified file name and the full path name of the file are used.
1213 The pattern is used like with |:autocmd|, see |autocmd-patterns|.
1214 Watch out for special characters, see |option-backslash|.
1215 When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the
Bram Moolenaar582fd852005-03-28 20:58:01 +00001216 default value. "/tmp/*" is only used for Unix.
Bram Moolenaar02467872007-05-06 13:22:01 +00001217
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +02001218 WARNING: Not having a backup file means that when Vim fails to write
1219 your buffer correctly and then, for whatever reason, Vim exits, you
1220 lose both the original file and what you were writing. Only disable
1221 backups if you don't care about losing the file.
1222
Bram Moolenaar02467872007-05-06 13:22:01 +00001223 Note that environment variables are not expanded. If you want to use
1224 $HOME you must expand it explicitly, e.g.: >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00001225 :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*'
Bram Moolenaar02467872007-05-06 13:22:01 +00001226
1227< Note that the default also makes sure that "crontab -e" works (when a
Bram Moolenaara5792f52005-11-23 21:25:05 +00001228 backup would be made by renaming the original file crontab won't see
1229 the newly created file). Also see 'backupcopy' and |crontab|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230
1231 *'balloondelay'* *'bdlay'*
1232'balloondelay' 'bdlay' number (default: 600)
1233 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001234 {only available when compiled with the |+balloon_eval|
1235 feature}
1236 Delay in milliseconds before a balloon may pop up. See |balloon-eval|.
1237
1238 *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
1239'ballooneval' 'beval' boolean (default off)
1240 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001241 {only available when compiled with the |+balloon_eval|
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001242 feature}
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001243 Switch on the |balloon-eval| functionality for the GUI.
1244
1245 *'balloonevalterm'* *'bevalterm'* *'noballoonevalterm'*
1246 *'nobevalterm'*
1247'balloonevalterm' 'bevalterm' boolean (default off)
1248 global
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001249 {only available when compiled with the
1250 |+balloon_eval_term| feature}
1251 Switch on the |balloon-eval| functionality for the terminal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001252
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001253 *'balloonexpr'* *'bexpr'*
1254'balloonexpr' 'bexpr' string (default "")
Bram Moolenaar9b2200a2006-03-20 21:55:45 +00001255 global or local to buffer |global-local|
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001256 {only available when compiled with the |+balloon_eval|
1257 feature}
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00001258 Expression for text to show in evaluation balloon. It is only used
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001259 when 'ballooneval' or 'balloonevalterm' is on. These variables can be
1260 used:
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001261
1262 v:beval_bufnr number of the buffer in which balloon is going to show
1263 v:beval_winnr number of the window
Bram Moolenaar82af8712016-06-04 20:20:29 +02001264 v:beval_winid ID of the window
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001265 v:beval_lnum line number
1266 v:beval_col column number (byte index)
1267 v:beval_text word under or after the mouse pointer
1268
Bram Moolenaar54775062019-07-31 21:07:14 +02001269 Instead of showing a balloon, which is limited to plain text, consider
1270 using a popup window, see |popup_beval_example|. A popup window can
1271 use highlighting and show a border.
1272
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001273 The evaluation of the expression must not have side effects!
1274 Example: >
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001275 function MyBalloonExpr()
Bram Moolenaarc51cf032022-02-26 12:25:45 +00001276 return 'Cursor is at line ' .. v:beval_lnum ..
1277 \ ', column ' .. v:beval_col ..
1278 \ ' of file ' .. bufname(v:beval_bufnr) ..
1279 \ ' on word "' .. v:beval_text .. '"'
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001280 endfunction
1281 set bexpr=MyBalloonExpr()
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00001282 set ballooneval balloonevalterm
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001283<
Bram Moolenaar396e8292019-07-13 23:04:31 +02001284 Also see |balloon_show()|, it can be used if the content of the balloon
1285 is to be fetched asynchronously. In that case evaluating
1286 'balloonexpr' should result in an empty string. If you get a balloon
1287 with only "0" you probably didn't return anything from your function.
Bram Moolenaar214641f2017-03-05 17:04:09 +01001288
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00001289 NOTE: The balloon is displayed only if the cursor is on a text
1290 character. If the result of evaluating 'balloonexpr' is not empty,
1291 Vim does not try to send a message to an external debugger (Netbeans
1292 or Sun Workshop).
1293
Yegappan Lakshmanan8bb65f22021-12-26 10:51:39 +00001294 If the expression starts with s: or |<SID>|, then it is replaced with
1295 the script ID (|local-function|). Example: >
1296 set bexpr=s:MyBalloonExpr()
1297 set bexpr=<SID>SomeBalloonExpr()
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00001298< Otherwise, the expression is evaluated in the context of the script
1299 where the option was set, thus script-local items are available.
1300
Bram Moolenaar30b65812012-07-12 22:01:11 +02001301 The expression will be evaluated in the |sandbox| when set from a
1302 modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02001303 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00001304
1305 It is not allowed to change text or jump to another window while
Bram Moolenaar396e8292019-07-13 23:04:31 +02001306 evaluating 'balloonexpr', see |textlock|.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00001307
Bram Moolenaar87e25fd2005-07-27 21:13:01 +00001308 To check whether line breaks in the balloon text work use this check: >
Bram Moolenaar45360022005-07-21 21:08:21 +00001309 if has("balloon_multiline")
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001310< When they are supported "\n" characters will start a new line. If the
1311 expression evaluates to a |List| this is equal to using each List item
1312 as a string and putting "\n" in between them.
Bram Moolenaar036986f2017-03-16 17:41:02 +01001313 NOTE: This option is set to "" when 'compatible' is set.
Bram Moolenaar362e1a32006-03-06 23:29:24 +00001314
Bram Moolenaar165bc692015-07-21 17:53:25 +02001315 *'belloff'* *'bo'*
1316'belloff' 'bo' string (default "")
1317 global
Bram Moolenaar165bc692015-07-21 17:53:25 +02001318 Specifies for which events the bell will not be rung. It is a comma
1319 separated list of items. For each item that is present, the bell
1320 will be silenced. This is most useful to specify specific events in
1321 insert mode to be silenced.
LemonBoy77771d32022-04-13 11:47:25 +01001322 You can also make it flash by using 'visualbell'.
Bram Moolenaar165bc692015-07-21 17:53:25 +02001323
1324 item meaning when present ~
1325 all All events.
1326 backspace When hitting <BS> or <Del> and deleting results in an
1327 error.
1328 cursor Fail to move around using the cursor keys or
1329 <PageUp>/<PageDown> in |Insert-mode|.
1330 complete Error occurred when using |i_CTRL-X_CTRL-K| or
1331 |i_CTRL-X_CTRL-T|.
1332 copy Cannot copy char from insert mode using |i_CTRL-Y| or
1333 |i_CTRL-E|.
1334 ctrlg Unknown Char after <C-G> in Insert mode.
1335 error Other Error occurred (e.g. try to join last line)
1336 (mostly used in |Normal-mode| or |Cmdline-mode|).
1337 esc hitting <Esc> in |Normal-mode|.
1338 ex In |Visual-mode|, hitting |Q| results in an error.
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01001339 hangul Ignored.
Bram Moolenaar165bc692015-07-21 17:53:25 +02001340 insertmode Pressing <Esc> in 'insertmode'.
1341 lang Calling the beep module for Lua/Mzscheme/TCL.
1342 mess No output available for |g<|.
1343 showmatch Error occurred for 'showmatch' function.
1344 operator Empty region error |cpo-E|.
1345 register Unknown register after <C-R> in |Insert-mode|.
1346 shell Bell from shell output |:!|.
1347 spell Error happened on spell suggest.
LemonBoy77771d32022-04-13 11:47:25 +01001348 term Bell from |:terminal| output.
Bram Moolenaar165bc692015-07-21 17:53:25 +02001349 wildmode More matches in |cmdline-completion| available
1350 (depends on the 'wildmode' setting).
1351
Bram Moolenaar036986f2017-03-16 17:41:02 +01001352 This is most useful to fine tune when in Insert mode the bell should
1353 be rung. For Normal mode and Ex commands, the bell is often rung to
Bram Moolenaar165bc692015-07-21 17:53:25 +02001354 indicate that an error occurred. It can be silenced by adding the
1355 "error" keyword.
1356
Bram Moolenaar071d4272004-06-13 20:20:40 +00001357 *'binary'* *'bin'* *'nobinary'* *'nobin'*
1358'binary' 'bin' boolean (default off)
1359 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001360 This option should be set before editing a binary file. You can also
1361 use the |-b| Vim argument. When this option is switched on a few
1362 options will be changed (also when it already was on):
1363 'textwidth' will be set to 0
1364 'wrapmargin' will be set to 0
1365 'modeline' will be off
1366 'expandtab' will be off
1367 Also, 'fileformat' and 'fileformats' options will not be used, the
1368 file is read and written like 'fileformat' was "unix" (a single <NL>
1369 separates lines).
1370 The 'fileencoding' and 'fileencodings' options will not be used, the
1371 file is read without conversion.
1372 NOTE: When you start editing a(nother) file while the 'bin' option is
1373 on, settings from autocommands may change the settings again (e.g.,
1374 'textwidth'), causing trouble when editing. You might want to set
1375 'bin' again when the file has been loaded.
1376 The previous values of these options are remembered and restored when
1377 'bin' is switched from on to off. Each buffer has its own set of
1378 saved option values.
1379 To edit a file with 'binary' set you can use the |++bin| argument.
1380 This avoids you have to do ":set bin", which would have effect for all
1381 files you edit.
1382 When writing a file the <EOL> for the last line is only written if
1383 there was one in the original file (normally Vim appends an <EOL> to
1384 the last line if there is none; this would make the file longer). See
1385 the 'endofline' option.
1386
1387 *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'*
1388'bioskey' 'biosk' boolean (default on)
1389 global
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001390 {only for MS-DOS}
Bram Moolenaarf3913272016-02-25 00:00:01 +01001391 This was for MS-DOS and is no longer supported.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001392
1393 *'bomb'* *'nobomb'*
1394'bomb' boolean (default off)
1395 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001396 When writing a file and the following conditions are met, a BOM (Byte
1397 Order Mark) is prepended to the file:
1398 - this option is on
1399 - the 'binary' option is off
1400 - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big
1401 endian variants.
1402 Some applications use the BOM to recognize the encoding of the file.
1403 Often used for UCS-2 files on MS-Windows. For other applications it
1404 causes trouble, for example: "cat file1 file2" makes the BOM of file2
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001405 appear halfway the resulting file. Gcc doesn't accept a BOM.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001406 When Vim reads a file and 'fileencodings' starts with "ucs-bom", a
1407 check for the presence of the BOM is done and 'bomb' set accordingly.
1408 Unless 'binary' is set, it is removed from the first line, so that you
1409 don't see it when editing. When you don't change the options, the BOM
1410 will be restored when writing the file.
1411
1412 *'breakat'* *'brk'*
1413'breakat' 'brk' string (default " ^I!@*-+;:,./?")
1414 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02001415 {not available when compiled without the |+linebreak|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001416 feature}
1417 This option lets you choose which characters might cause a line
Bram Moolenaarac6e65f2005-08-29 22:25:38 +00001418 break if 'linebreak' is on. Only works for ASCII and also for 8-bit
1419 characters when 'encoding' is an 8-bit encoding.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001420
Bram Moolenaar7c1c6db2016-04-03 22:08:05 +02001421 *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001422'breakindent' 'bri' boolean (default off)
1423 local to window
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001424 {not available when compiled without the |+linebreak|
1425 feature}
1426 Every wrapped line will continue visually indented (same amount of
1427 space as the beginning of that line), thus preserving horizontal blocks
1428 of text.
Bram Moolenaar036986f2017-03-16 17:41:02 +01001429 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001430
1431 *'breakindentopt'* *'briopt'*
1432'breakindentopt' 'briopt' string (default empty)
1433 local to window
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001434 {not available when compiled without the |+linebreak|
1435 feature}
1436 Settings for 'breakindent'. It can consist of the following optional
Bram Moolenaar86b17e92014-07-02 20:00:47 +02001437 items and must be separated by a comma:
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001438 min:{n} Minimum text width that will be kept after
1439 applying 'breakindent', even if the resulting
1440 text should normally be narrower. This prevents
1441 text indented almost to the right window border
1442 occupying lot of vertical space when broken.
Christian Brabandtc53b4672022-01-15 10:01:05 +00001443 (default: 20)
Bram Moolenaar86b17e92014-07-02 20:00:47 +02001444 shift:{n} After applying 'breakindent', the wrapped line's
1445 beginning will be shifted by the given number of
1446 characters. It permits dynamic French paragraph
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001447 indentation (negative) or emphasizing the line
1448 continuation (positive).
Christian Brabandte7d6dbc2022-05-06 12:21:04 +01001449 (default: 0)
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01001450 sbr Display the 'showbreak' value before applying the
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001451 additional indent.
Christian Brabandte7d6dbc2022-05-06 12:21:04 +01001452 (default: off)
Maxim Kimf674b352021-07-22 11:46:59 +02001453 list:{n} Adds an additional indent for lines that match a
Christian Brabandt4a0b85a2021-07-14 20:00:27 +02001454 numbered or bulleted list (using the
1455 'formatlistpat' setting).
Maxim Kimf674b352021-07-22 11:46:59 +02001456 list:-1 Uses the length of a match with 'formatlistpat'
1457 for indentation.
Christian Brabandte7d6dbc2022-05-06 12:21:04 +01001458 (default: 0)
1459 column:{n} Indent at column {n}. Will overrule the other
1460 sub-options. Note: an additional indent may be
1461 added for the 'showbreak' setting.
1462 (default: off)
Bram Moolenaar946e27a2014-06-25 18:50:27 +02001463
Bram Moolenaar071d4272004-06-13 20:20:40 +00001464 *'browsedir'* *'bsdir'*
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001465'browsedir' 'bsdir' string (default: "last")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001466 global
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001467 {only for Motif, GTK, Mac and Win32 GUI}
Bram Moolenaar071d4272004-06-13 20:20:40 +00001468 Which directory to use for the file browser:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001469 last Use same directory as with last file browser, where a
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02001470 file was opened or saved.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001471 buffer Use the directory of the related buffer.
1472 current Use the current directory.
1473 {path} Use the specified directory
1474
1475 *'bufhidden'* *'bh'*
1476'bufhidden' 'bh' string (default: "")
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02001477 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001478 This option specifies what happens when a buffer is no longer
1479 displayed in a window:
1480 <empty> follow the global 'hidden' option
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001481 hide hide the buffer (don't unload it), even if 'hidden' is
1482 not set
1483 unload unload the buffer, even if 'hidden' is set; the
Bram Moolenaar8a3b8052022-06-26 12:21:15 +01001484 |:hide| command will also unload the buffer
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001485 delete delete the buffer from the buffer list, even if
1486 'hidden' is set; the |:hide| command will also delete
1487 the buffer, making it behave like |:bdelete|
1488 wipe wipe the buffer from the buffer list, even if
1489 'hidden' is set; the |:hide| command will also wipe
1490 out the buffer, making it behave like |:bwipeout|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001491
Bram Moolenaara14de3d2005-01-07 21:48:26 +00001492 CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01001493 are lost without a warning. Also, these values may break autocommands
1494 that switch between buffers temporarily.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001495 This option is used together with 'buftype' and 'swapfile' to specify
1496 special kinds of buffers. See |special-buffers|.
1497
1498 *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85*
1499'buflisted' 'bl' boolean (default: on)
1500 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001501 When this option is set, the buffer shows up in the buffer list. If
1502 it is reset it is not used for ":bnext", "ls", the Buffers menu, etc.
1503 This option is reset by Vim for buffers that are only used to remember
1504 a file name or marks. Vim sets it when starting to edit a buffer.
1505 But not when moving to a buffer with ":buffer".
1506
1507 *'buftype'* *'bt'* *E382*
1508'buftype' 'bt' string (default: "")
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02001509 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001510 The value of this option specifies the type of a buffer:
1511 <empty> normal buffer
1512 nofile buffer which is not related to a file and will not be
1513 written
1514 nowrite buffer which will not be written
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001515 acwrite buffer which will always be written with BufWriteCmd
Bram Moolenaarb5b75622018-03-09 22:22:21 +01001516 autocommands.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001517 quickfix quickfix buffer, contains list of errors |:cwindow|
Bram Moolenaar280f1262006-01-30 00:14:18 +00001518 or list of locations |:lwindow|
Bram Moolenaar071d4272004-06-13 20:20:40 +00001519 help help buffer (you are not supposed to set this
1520 manually)
Bram Moolenaar1f2903c2017-07-23 19:51:01 +02001521 terminal buffer for a |terminal| (you are not supposed to set
1522 this manually)
Bram Moolenaarf2732452018-06-03 14:47:35 +02001523 prompt buffer where only the last line can be edited, meant
1524 to be used by a plugin, see |prompt-buffer|
1525 {only when compiled with the |+channel| feature}
Bram Moolenaar4d784b22019-05-25 19:51:39 +02001526 popup buffer used in a popup window, see |popup|.
1527 {only when compiled with the |+textprop| feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00001528
1529 This option is used together with 'bufhidden' and 'swapfile' to
1530 specify special kinds of buffers. See |special-buffers|.
Bram Moolenaarebdf3c92020-02-15 21:41:42 +01001531 Also see |win_gettype()|, which returns the type of the window.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001532
1533 Be careful with changing this option, it can have many side effects!
Bram Moolenaar113cb512021-11-07 20:27:04 +00001534 One such effect is that Vim will not check the timestamp of the file,
1535 if the file is changed by another program this will not be noticed.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001536
Bram Moolenaar280f1262006-01-30 00:14:18 +00001537 A "quickfix" buffer is only used for the error list and the location
1538 list. This value is set by the |:cwindow| and |:lwindow| commands and
1539 you are not supposed to change it.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001540
1541 "nofile" and "nowrite" buffers are similar:
1542 both: The buffer is not to be written to disk, ":w" doesn't
1543 work (":w filename" does work though).
1544 both: The buffer is never considered to be |'modified'|.
1545 There is no warning when the changes will be lost, for
1546 example when you quit Vim.
1547 both: A swap file is only created when using too much memory
1548 (when 'swapfile' has been reset there is never a swap
1549 file).
1550 nofile only: The buffer name is fixed, it is not handled like a
1551 file name. It is not modified in response to a |:cd|
1552 command.
Bram Moolenaar2b8388b2015-02-28 13:11:45 +01001553 both: When using ":e bufname" and already editing "bufname"
1554 the buffer is made empty and autocommands are
1555 triggered as usual for |:edit|.
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001556 *E676*
1557 "acwrite" implies that the buffer name is not related to a file, like
1558 "nofile", but it will be written. Thus, in contrast to "nofile" and
1559 "nowrite", ":w" does work and a modified buffer can't be abandoned
1560 without saving. For writing there must be matching |BufWriteCmd|,
1561 |FileWriteCmd| or |FileAppendCmd| autocommands.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001562
1563 *'casemap'* *'cmp'*
1564'casemap' 'cmp' string (default: "internal,keepascii")
1565 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001566 Specifies details about changing the case of letters. It may contain
1567 these words, separated by a comma:
1568 internal Use internal case mapping functions, the current
1569 locale does not change the case mapping. This only
Bram Moolenaar6f16eb82005-08-23 21:02:42 +00001570 matters when 'encoding' is a Unicode encoding,
1571 "latin1" or "iso-8859-15". When "internal" is
1572 omitted, the towupper() and towlower() system library
1573 functions are used when available.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001574 keepascii For the ASCII characters (0x00 to 0x7f) use the US
1575 case mapping, the current locale is not effective.
1576 This probably only matters for Turkish.
1577
Bram Moolenaar938ae282023-02-20 20:44:55 +00001578 *'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'*
Bram Moolenaar7b1463b2021-12-11 17:24:39 +00001579'cdhome' 'cdh' boolean (default: off)
1580 global
1581 When on, |:cd|, |:tcd| and |:lcd| without an argument changes the
1582 current working directory to the |$HOME| directory like in Unix.
1583 When off, those commands just print the current directory name.
1584 On Unix this option has no effect.
1585 NOTE: This option is reset when 'compatible' is set.
1586
Bram Moolenaar071d4272004-06-13 20:20:40 +00001587 *'cdpath'* *'cd'* *E344* *E346*
1588'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
1589 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001590 This is a list of directories which will be searched when using the
Bram Moolenaar00aa0692019-04-27 20:37:57 +02001591 |:cd|, |:tcd| and |:lcd| commands, provided that the directory being
1592 searched for has a relative path, not an absolute part starting with
1593 "/", "./" or "../", the 'cdpath' option is not used then.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001594 The 'cdpath' option's value has the same form and semantics as
1595 |'path'|. Also see |file-searching|.
1596 The default value is taken from $CDPATH, with a "," prepended to look
1597 in the current directory first.
1598 If the default value taken from $CDPATH is not what you want, include
1599 a modified version of the following command in your vimrc file to
1600 override it: >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00001601 :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
Bram Moolenaar071d4272004-06-13 20:20:40 +00001602< This option cannot be set from a |modeline| or in the |sandbox|, for
1603 security reasons.
1604 (parts of 'cdpath' can be passed to the shell to expand file names).
1605
1606 *'cedit'*
1607'cedit' string (Vi default: "", Vim default: CTRL-F)
1608 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001609 The key used in Command-line Mode to open the command-line window.
1610 The default is CTRL-F when 'compatible' is off.
1611 Only non-printable keys are allowed.
1612 The key can be specified as a single character, but it is difficult to
1613 type. The preferred way is to use the <> notation. Examples: >
Bram Moolenaare18dbe82016-07-02 21:42:23 +02001614 :exe "set cedit=\<C-Y>"
1615 :exe "set cedit=\<Esc>"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001616< |Nvi| also has this option, but it only uses the first character.
1617 See |cmdwin|.
Bram Moolenaar036986f2017-03-16 17:41:02 +01001618 NOTE: This option is set to the Vim default value when 'compatible'
1619 is reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001620
1621 *'charconvert'* *'ccv'* *E202* *E214* *E513*
1622'charconvert' 'ccv' string (default "")
1623 global
Bram Moolenaar4c92e752019-02-17 21:18:32 +01001624 {only available when compiled with the |+eval| feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00001625 An expression that is used for character encoding conversion. It is
1626 evaluated when a file that is to be read or has been written has a
1627 different encoding from what is desired.
1628 'charconvert' is not used when the internal iconv() function is
1629 supported and is able to do the conversion. Using iconv() is
1630 preferred, because it is much faster.
1631 'charconvert' is not used when reading stdin |--|, because there is no
1632 file to convert from. You will have to save the text in a file first.
Bram Moolenaarf10911e2022-01-29 22:20:48 +00001633 The expression must return zero, false or an empty string for success,
1634 non-zero or true for failure.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001635 The possible encoding names encountered are in 'encoding'.
1636 Additionally, names given in 'fileencodings' and 'fileencoding' are
1637 used.
1638 Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8"
1639 is done internally by Vim, 'charconvert' is not used for this.
1640 'charconvert' is also used to convert the viminfo file, if the 'c'
1641 flag is present in 'viminfo'. Also used for Unicode conversion.
1642 Example: >
1643 set charconvert=CharConvert()
1644 fun CharConvert()
1645 system("recode "
Bram Moolenaarc51cf032022-02-26 12:25:45 +00001646 \ .. v:charconvert_from .. ".." .. v:charconvert_to
1647 \ .. " <" .. v:fname_in .. " >" .. v:fname_out)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001648 return v:shell_error
1649 endfun
1650< The related Vim variables are:
1651 v:charconvert_from name of the current encoding
1652 v:charconvert_to name of the desired encoding
1653 v:fname_in name of the input file
1654 v:fname_out name of the output file
1655 Note that v:fname_in and v:fname_out will never be the same.
1656 Note that v:charconvert_from and v:charconvert_to may be different
1657 from 'encoding'. Vim internally uses UTF-8 instead of UCS-2 or UCS-4.
Bram Moolenaarf10911e2022-01-29 22:20:48 +00001658
Bram Moolenaara4e0b972022-10-01 19:43:52 +01001659 The advantage of using a function call without arguments is that it is
1660 faster, see |expr-option-function|.
1661
Bram Moolenaar071d4272004-06-13 20:20:40 +00001662 Encryption is not done by Vim when using 'charconvert'. If you want
1663 to encrypt the file after conversion, 'charconvert' should take care
1664 of this.
Bram Moolenaarf10911e2022-01-29 22:20:48 +00001665
1666 If the 'charconvert' expression starts with s: or |<SID>|, then it is
1667 replaced with the script ID (|local-function|). Example: >
1668 set charconvert=s:MyConvert()
1669 set charconvert=<SID>SomeConvert()
1670< Otherwise the expression is evaluated in the context of the script
1671 where the option was set, thus script-local items are available.
1672
Bram Moolenaar071d4272004-06-13 20:20:40 +00001673 This option cannot be set from a |modeline| or in the |sandbox|, for
1674 security reasons.
1675
1676 *'cindent'* *'cin'* *'nocindent'* *'nocin'*
1677'cindent' 'cin' boolean (default off)
1678 local to buffer
Bram Moolenaar446cb832008-06-24 21:56:24 +00001679 Enables automatic C program indenting. See 'cinkeys' to set the keys
Bram Moolenaar071d4272004-06-13 20:20:40 +00001680 that trigger reindenting in insert mode and 'cinoptions' to set your
1681 preferred indent style.
1682 If 'indentexpr' is not empty, it overrules 'cindent'.
1683 If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty,
1684 the "=" operator indents using this algorithm rather than calling an
1685 external program.
1686 See |C-indenting|.
1687 When you don't like the way 'cindent' works, try the 'smartindent'
1688 option or 'indentexpr'.
1689 This option is not used when 'paste' is set.
1690 NOTE: This option is reset when 'compatible' is set.
1691
1692 *'cinkeys'* *'cink'*
Bram Moolenaarce655742019-01-31 14:12:57 +01001693'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001694 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001695 A list of keys that, when typed in Insert mode, cause reindenting of
1696 the current line. Only used if 'cindent' is on and 'indentexpr' is
1697 empty.
1698 For the format of this option see |cinkeys-format|.
1699 See |C-indenting|.
1700
1701 *'cinoptions'* *'cino'*
1702'cinoptions' 'cino' string (default "")
1703 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001704 The 'cinoptions' affect the way 'cindent' reindents lines in a C
1705 program. See |cinoptions-values| for the values of this option, and
1706 |C-indenting| for info on C indenting in general.
1707
1708
1709 *'cinwords'* *'cinw'*
1710'cinwords' 'cinw' string (default "if,else,while,do,for,switch")
1711 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001712 These keywords start an extra indent in the next line when
1713 'smartindent' or 'cindent' is set. For 'cindent' this is only done at
1714 an appropriate place (inside {}).
1715 Note that 'ignorecase' isn't used for 'cinwords'. If case doesn't
1716 matter, include the keyword both the uppercase and lowercase:
1717 "if,If,IF".
1718
Tom Praschan3506cf32022-04-07 12:39:08 +01001719 *'cinscopedecls'* *'cinsd'*
1720'cinscopedecls' 'cinsd' string (default "public,protected,private")
1721 local to buffer
Tom Praschan3506cf32022-04-07 12:39:08 +01001722 Keywords that are interpreted as a C++ scope declaration by |cino-g|.
1723 Useful e.g. for working with the Qt framework that defines additional
1724 scope declarations "signals", "public slots" and "private slots": >
1725 set cinscopedecls+=signals,public\ slots,private\ slots
1726
1727< *'clipboard'* *'cb'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001728'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
1729 for X-windows, "" otherwise)
1730 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001731 {only in GUI versions or when the |+xterm_clipboard|
1732 feature is included}
Tom Praschan3506cf32022-04-07 12:39:08 +01001733 This option is a list of comma-separated names.
Bram Moolenaar942db232021-02-13 18:14:48 +01001734 Note: if one of the items is "exclude:", then you can't add an item
Bram Moolenaar5ed11532022-07-06 13:18:11 +01001735 after that. Therefore do not append an item with += but use ^= to
Bram Moolenaar942db232021-02-13 18:14:48 +01001736 prepend, e.g.: >
1737 set clipboard^=unnamed
Bram Moolenaar9fbdbb82022-09-27 17:30:34 +01001738< When using the GUI see |'go-A'|.
1739 These names are recognized:
Bram Moolenaar071d4272004-06-13 20:20:40 +00001740
Bram Moolenaarc0885aa2012-07-10 16:49:23 +02001741 *clipboard-unnamed*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001742 unnamed When included, Vim will use the clipboard register '*'
1743 for all yank, delete, change and put operations which
1744 would normally go to the unnamed register. When a
1745 register is explicitly specified, it will always be
1746 used regardless of whether "unnamed" is in 'clipboard'
1747 or not. The clipboard register can always be
1748 explicitly accessed using the "* notation. Also see
1749 |gui-clipboard|.
1750
Bram Moolenaar30b65812012-07-12 22:01:11 +02001751 *clipboard-unnamedplus*
Bram Moolenaar00154502013-02-13 16:15:55 +01001752 unnamedplus A variant of the "unnamed" flag which uses the
1753 clipboard register '+' (|quoteplus|) instead of
1754 register '*' for all yank, delete, change and put
1755 operations which would normally go to the unnamed
1756 register. When "unnamed" is also included to the
1757 option, yank operations (but not delete, change or
1758 put) will additionally copy the text into register
1759 '*'.
Bram Moolenaar81af9252010-12-10 20:35:50 +01001760 Only available with the |+X11| feature.
Bram Moolenaarbf9680e2010-12-02 21:43:16 +01001761 Availability can be checked with: >
1762 if has('unnamedplus')
1763<
Bram Moolenaar30b65812012-07-12 22:01:11 +02001764 *clipboard-autoselect*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001765 autoselect Works like the 'a' flag in 'guioptions': If present,
1766 then whenever Visual mode is started, or the Visual
1767 area extended, Vim tries to become the owner of the
1768 windowing system's global selection or put the
1769 selected text on the clipboard used by the selection
Bram Moolenaarba3ff532018-11-04 14:45:49 +01001770 register "*. See |'go-a'| and |quotestar| for details.
1771 When the GUI is active, the 'a' flag in 'guioptions'
1772 is used, when the GUI is not active, this "autoselect"
1773 flag is used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001774 Also applies to the modeless selection.
1775
Bram Moolenaarc0885aa2012-07-10 16:49:23 +02001776 *clipboard-autoselectplus*
1777 autoselectplus Like "autoselect" but using the + register instead of
1778 the * register. Compare to the 'P' flag in
1779 'guioptions'.
1780
1781 *clipboard-autoselectml*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001782 autoselectml Like "autoselect", but for the modeless selection
1783 only. Compare to the 'A' flag in 'guioptions'.
1784
Bram Moolenaarc0885aa2012-07-10 16:49:23 +02001785 *clipboard-html*
Bram Moolenaar3a6eaa52009-06-16 13:23:06 +00001786 html When the clipboard contains HTML, use this when
1787 pasting. When putting text on the clipboard, mark it
1788 as HTML. This works to copy rendered HTML from
1789 Firefox, paste it as raw HTML in Vim, select the HTML
1790 in Vim and paste it in a rich edit box in Firefox.
Bram Moolenaar20a825a2010-05-31 21:27:30 +02001791 You probably want to add this only temporarily,
1792 possibly use BufEnter autocommands.
Bram Moolenaar3a6eaa52009-06-16 13:23:06 +00001793 Only supported for GTK version 2 and later.
Bram Moolenaar3a6eaa52009-06-16 13:23:06 +00001794
Bram Moolenaarc0885aa2012-07-10 16:49:23 +02001795 *clipboard-exclude*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001796 exclude:{pattern}
1797 Defines a pattern that is matched against the name of
1798 the terminal 'term'. If there is a match, no
1799 connection will be made to the X server. This is
1800 useful in this situation:
1801 - Running Vim in a console.
1802 - $DISPLAY is set to start applications on another
1803 display.
1804 - You do not want to connect to the X server in the
1805 console, but do want this in a terminal emulator.
1806 To never connect to the X server use: >
1807 exclude:.*
1808< This has the same effect as using the |-X| argument.
1809 Note that when there is no connection to the X server
1810 the window title won't be restored and the clipboard
1811 cannot be accessed.
1812 The value of 'magic' is ignored, {pattern} is
1813 interpreted as if 'magic' was on.
1814 The rest of the option value will be used for
1815 {pattern}, this must be the last entry.
1816
1817 *'cmdheight'* *'ch'*
1818'cmdheight' 'ch' number (default 1)
Shougo Matsushitaf39cfb72022-07-30 16:54:05 +01001819 global or local to tab page
Bram Moolenaara2a89732022-08-31 14:46:18 +01001820 Number of screen lines to use for the command-line. A larger value
1821 helps avoiding |hit-enter| prompts.
Bram Moolenaarc6fe9192006-04-09 21:54:49 +00001822 The value of this option is stored with the tab page, so that each tab
1823 page can have a different value.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001824
1825 *'cmdwinheight'* *'cwh'*
1826'cmdwinheight' 'cwh' number (default 7)
1827 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001828 Number of screen lines to use for the command-line window. |cmdwin|
1829
Bram Moolenaar483c5d82010-10-20 18:45:33 +02001830 *'colorcolumn'* *'cc'*
1831'colorcolumn' 'cc' string (default "")
1832 local to window
Bram Moolenaar483c5d82010-10-20 18:45:33 +02001833 {not available when compiled without the |+syntax|
1834 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001835 'colorcolumn' is a comma-separated list of screen columns that are
Bram Moolenaar483c5d82010-10-20 18:45:33 +02001836 highlighted with ColorColumn |hl-ColorColumn|. Useful to align
1837 text. Will make screen redrawing slower.
1838 The screen column can be an absolute number, or a number preceded with
1839 '+' or '-', which is added to or subtracted from 'textwidth'. >
1840
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01001841 :set cc=+1 " highlight column after 'textwidth'
Bram Moolenaar483c5d82010-10-20 18:45:33 +02001842 :set cc=+1,+2,+3 " highlight three columns after 'textwidth'
1843 :hi ColorColumn ctermbg=lightgrey guibg=lightgrey
1844<
1845 When 'textwidth' is zero then the items with '-' and '+' are not used.
1846 A maximum of 256 columns are highlighted.
1847
Bram Moolenaar071d4272004-06-13 20:20:40 +00001848 *'columns'* *'co'* *E594*
1849'columns' 'co' number (default 80 or terminal width)
1850 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001851 Number of columns of the screen. Normally this is set by the terminal
Bram Moolenaar7c626922005-02-07 22:01:03 +00001852 initialization and does not have to be set by hand. Also see
1853 |posix-screen-size|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001854 When Vim is running in the GUI or in a resizable window, setting this
1855 option will cause the window size to be changed. When you only want
1856 to use the size for the GUI, put the command in your |gvimrc| file.
1857 When you set this option and Vim is unable to change the physical
Bram Moolenaar02467872007-05-06 13:22:01 +00001858 number of columns of the display, the display may be messed up. For
1859 the GUI it is always possible and Vim limits the number of columns to
1860 what fits on the screen. You can use this command to get the widest
1861 window possible: >
1862 :set columns=9999
1863< Minimum value is 12, maximum value is 10000.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001864
1865 *'comments'* *'com'* *E524* *E525*
1866'comments' 'com' string (default
1867 "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
1868 local to buffer
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01001869 A comma-separated list of strings that can start a comment line. See
Bram Moolenaar071d4272004-06-13 20:20:40 +00001870 |format-comments|. See |option-backslash| about using backslashes to
1871 insert a space.
1872
1873 *'commentstring'* *'cms'* *E537*
1874'commentstring' 'cms' string (default "/*%s*/")
1875 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00001876 {not available when compiled without the |+folding|
1877 feature}
1878 A template for a comment. The "%s" in the value is replaced with the
1879 comment text. Currently only used to add markers for folding, see
1880 |fold-marker|.
1881
1882 *'compatible'* *'cp'* *'nocompatible'* *'nocp'*
Bram Moolenaar910f66f2006-04-05 20:41:53 +00001883'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc|
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02001884 file is found, reset in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001885 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00001886 This option has the effect of making Vim either more Vi-compatible, or
1887 make Vim behave in a more useful way.
Bram Moolenaar214641f2017-03-05 17:04:09 +01001888
Bram Moolenaar071d4272004-06-13 20:20:40 +00001889 This is a special kind of option, because when it's set or reset,
Bram Moolenaar214641f2017-03-05 17:04:09 +01001890 other options are also changed as a side effect.
1891 NOTE: Setting or resetting this option can have a lot of unexpected
1892 effects: Mappings are interpreted in another way, undo behaves
1893 differently, etc. If you set this option in your vimrc file, you
1894 should probably put it at the very start.
1895
Bram Moolenaar071d4272004-06-13 20:20:40 +00001896 By default this option is on and the Vi defaults are used for the
1897 options. This default was chosen for those people who want to use Vim
1898 just like Vi, and don't even (want to) know about the 'compatible'
1899 option.
Bram Moolenaar910f66f2006-04-05 20:41:53 +00001900 When a |vimrc| or |gvimrc| file is found while Vim is starting up,
Bram Moolenaard042c562005-06-30 22:04:15 +00001901 this option is switched off, and all options that have not been
1902 modified will be set to the Vim defaults. Effectively, this means
Bram Moolenaar910f66f2006-04-05 20:41:53 +00001903 that when a |vimrc| or |gvimrc| file exists, Vim will use the Vim
Bram Moolenaard042c562005-06-30 22:04:15 +00001904 defaults, otherwise it will use the Vi defaults. (Note: This doesn't
Bram Moolenaar02467872007-05-06 13:22:01 +00001905 happen for the system-wide vimrc or gvimrc file, nor for a file given
1906 with the |-u| argument). Also see |compatible-default| and
1907 |posix-compliance|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001908 You can also set this option with the "-C" argument, and reset it with
1909 "-N". See |-C| and |-N|.
Bram Moolenaar214641f2017-03-05 17:04:09 +01001910 See 'cpoptions' for more fine tuning of Vi compatibility.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001911
Bram Moolenaar214641f2017-03-05 17:04:09 +01001912 When this option is set, numerous other options are set to make Vim as
1913 Vi-compatible as possible. When this option is unset, various options
1914 are set to make Vim more useful. The table below lists all the
1915 options affected.
1916 The {?} column indicates when the options are affected:
1917 + Means that the option is set to the value given in {set value} when
1918 'compatible' is set.
1919 & Means that the option is set to the value given in {set value} when
1920 'compatible' is set AND is set to its Vim default value when
1921 'compatible' is unset.
1922 - Means the option is NOT changed when setting 'compatible' but IS
1923 set to its Vim default when 'compatible' is unset.
1924 The {effect} column summarises the change when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001925
Bram Moolenaar036986f2017-03-16 17:41:02 +01001926 option ? set value effect ~
Bram Moolenaar214641f2017-03-05 17:04:09 +01001927
1928 'allowrevins' + off no CTRL-_ command
1929 'antialias' + off don't use antialiased fonts
Bram Moolenaarbe4e0162023-02-02 13:59:48 +00001930 'arabic' + off reset arabic-related options
Bram Moolenaar214641f2017-03-05 17:04:09 +01001931 'arabicshape' + on correct character shapes
1932 'backspace' + "" normal backspace
1933 'backup' + off no backup file
1934 'backupcopy' & Unix: "yes" backup file is a copy
1935 else: "auto" copy or rename backup file
1936 'balloonexpr' + "" text to show in evaluation balloon
1937 'breakindent' + off don't indent when wrapping lines
1938 'cedit' - {unchanged} {set vim default only on resetting 'cp'}
Bram Moolenaar7b1463b2021-12-11 17:24:39 +00001939 'cdhome' + off ":cd" don't chdir to home on non-Unix
Bram Moolenaar214641f2017-03-05 17:04:09 +01001940 'cindent' + off no C code indentation
1941 'compatible' - {unchanged} {set vim default only on resetting 'cp'}
1942 'copyindent' + off don't copy indent structure
1943 'cpoptions' & (all flags) Vi-compatible flags
1944 'cscopepathcomp'+ 0 don't show directories in tags list
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01001945 'cscoperelative'+ off don't use basename of path as prefix
Bram Moolenaar214641f2017-03-05 17:04:09 +01001946 'cscopetag' + off don't use cscope for ":tag"
Bram Moolenaar036986f2017-03-16 17:41:02 +01001947 'cscopetagorder'+ 0 see |cscopetagorder|
Bram Moolenaar214641f2017-03-05 17:04:09 +01001948 'cscopeverbose' + off see |cscopeverbose|
1949 'delcombine' + off unicode: delete whole char combination
1950 'digraph' + off no digraphs
1951 'esckeys' & off no <Esc>-keys in Insert mode
1952 'expandtab' + off tabs not expanded to spaces
1953 'fileformats' & "" no automatic file format detection,
Bram Moolenaar6f345a12019-12-17 21:27:18 +01001954 "dos,unix" except for MS-Windows
Bram Moolenaar214641f2017-03-05 17:04:09 +01001955 'formatexpr' + "" use 'formatprg' for auto-formatting
1956 'formatoptions' & "vt" Vi compatible formatting
1957 'gdefault' + off no default 'g' flag for ":s"
1958 'history' & 0 no commandline history
1959 'hkmap' + off no Hebrew keyboard mapping
1960 'hkmapp' + off no phonetic Hebrew keyboard mapping
1961 'hlsearch' + off no highlighting of search matches
1962 'incsearch' + off no incremental searching
1963 'indentexpr' + "" no indenting by expression
1964 'insertmode' + off do not start in Insert mode
1965 'iskeyword' & "@,48-57,_" keywords contain alphanumeric
Bram Moolenaar071d4272004-06-13 20:20:40 +00001966 characters and '_'
Bram Moolenaar214641f2017-03-05 17:04:09 +01001967 'joinspaces' + on insert 2 spaces after period
1968 'modeline' & off no modelines
1969 'more' & off no pauses in listings
1970 'mzquantum' - {unchanged} {set vim default only on resetting 'cp'}
1971 'numberwidth' & 8 min number of columns for line number
1972 'preserveindent'+ off don't preserve current indent structure
1973 when changing it
1974 'revins' + off no reverse insert
1975 'ruler' + off no ruler
1976 'scrolljump' + 1 no jump scroll
1977 'scrolloff' + 0 no scroll offset
1978 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'}
1979 'shiftround' + off indent not rounded to shiftwidth
Bram Moolenaar9dfa3132019-05-04 21:08:40 +02001980 'shortmess' & "S" no shortening of messages
Bram Moolenaar214641f2017-03-05 17:04:09 +01001981 'showcmd' & off command characters not shown
1982 'showmode' & off current mode not shown
1983 'sidescrolloff' + 0 cursor moves to edge of screen in scroll
1984 'smartcase' + off no automatic ignore case switch
1985 'smartindent' + off no smart indentation
1986 'smarttab' + off no smart tab size
1987 'softtabstop' + 0 tabs are always 'tabstop' positions
1988 'startofline' + on goto startofline with some commands
1989 'tagcase' & "followic" 'ignorecase' when searching tags file
1990 'tagrelative' & off tag file names are not relative
1991 'termguicolors' + off don't use highlight-(guifg|guibg)
1992 'textauto' & off no automatic textmode detection
1993 'textwidth' + 0 no automatic line wrap
1994 'tildeop' + off tilde is not an operator
1995 'ttimeout' + off no terminal timeout
1996 'undofile' + off don't use an undo file
Bram Moolenaar036986f2017-03-16 17:41:02 +01001997 'viminfo' - {unchanged} {set Vim default only on resetting 'cp'}
Bram Moolenaar214641f2017-03-05 17:04:09 +01001998 'virtualedit' + "" cursor can only be placed on characters
1999 'whichwrap' & "" left-right movements don't wrap
2000 'wildchar' & CTRL-E only when the current value is <Tab>
Bram Moolenaar071d4272004-06-13 20:20:40 +00002001 use CTRL-E for cmdline completion
Bram Moolenaar214641f2017-03-05 17:04:09 +01002002 'writebackup' + on or off depends on the |+writebackup| feature
Bram Moolenaar071d4272004-06-13 20:20:40 +00002003
2004 *'complete'* *'cpt'* *E535*
2005'complete' 'cpt' string (default: ".,w,b,u,t,i")
2006 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00002007 This option specifies how keyword completion |ins-completion| works
2008 when CTRL-P or CTRL-N are used. It is also used for whole-line
2009 completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01002010 and the places to scan. It is a comma-separated list of flags:
Bram Moolenaar3848e002016-03-19 18:42:29 +01002011 . scan the current buffer ('wrapscan' is ignored)
Bram Moolenaar071d4272004-06-13 20:20:40 +00002012 w scan buffers from other windows
2013 b scan other loaded buffers that are in the buffer list
2014 u scan the unloaded buffers that are in the buffer list
2015 U scan the buffers that are not in the buffer list
2016 k scan the files given with the 'dictionary' option
Bram Moolenaar0b238792006-03-02 22:49:12 +00002017 kspell use the currently active spell checking |spell|
Bram Moolenaar071d4272004-06-13 20:20:40 +00002018 k{dict} scan the file {dict}. Several "k" flags can be given,
2019 patterns are valid too. For example: >
2020 :set cpt=k/usr/dict/*,k~/spanish
2021< s scan the files given with the 'thesaurus' option
2022 s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns
2023 are valid too.
2024 i scan current and included files
2025 d scan current and included files for defined name or macro
2026 |i_CTRL-X_CTRL-D|
2027 ] tag completion
2028 t same as "]"
2029
2030 Unloaded buffers are not loaded, thus their autocmds |:autocmd| are
2031 not executed, this may lead to unexpected completions from some files
2032 (gzipped files for example). Unloaded buffers are not scanned for
2033 whole-line completion.
2034
2035 The default is ".,w,b,u,t,i", which means to scan:
2036 1. the current buffer
2037 2. buffers in other windows
2038 3. other loaded buffers
2039 4. unloaded buffers
2040 5. tags
2041 6. included files
2042
2043 As you can see, CTRL-N and CTRL-P can be used to do any 'iskeyword'-
Bram Moolenaar582fd852005-03-28 20:58:01 +00002044 based expansion (e.g., dictionary |i_CTRL-X_CTRL-K|, included patterns
2045 |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions).
Bram Moolenaar071d4272004-06-13 20:20:40 +00002046
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00002047 *'completefunc'* *'cfu'*
2048'completefunc' 'cfu' string (default: empty)
2049 local to buffer
Bram Moolenaardb84e452010-08-15 13:50:43 +02002050 {not available when compiled without the |+eval|
Bram Moolenaare2c453d2019-08-21 14:37:09 +02002051 feature}
Bram Moolenaarc7486e02005-12-29 22:48:26 +00002052 This option specifies a function to be used for Insert mode completion
2053 with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
Bram Moolenaar280f1262006-01-30 00:14:18 +00002054 See |complete-functions| for an explanation of how the function is
Yegappan Lakshmanan8658c752021-12-03 11:09:29 +00002055 invoked and what it should return. The value can be the name of a
2056 function, a |lambda| or a |Funcref|. See |option-value-function| for
2057 more information.
Bram Moolenaar166af9b2010-11-16 20:34:40 +01002058 This option cannot be set from a |modeline| or in the |sandbox|, for
2059 security reasons.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002060
Bram Moolenaarac3150d2019-07-28 16:36:39 +02002061 *'completeslash'* *'csl'*
2062'completeslash' 'csl' string (default: "")
2063 local to buffer
Bram Moolenaar2e693a82019-10-16 22:35:02 +02002064 {only for MS-Windows}
Bram Moolenaarac3150d2019-07-28 16:36:39 +02002065 When this option is set it overrules 'shellslash' for completion:
2066 - When this option is set to "slash", a forward slash is used for path
2067 completion in insert mode. This is useful when editing HTML tag, or
Bram Moolenaar6f345a12019-12-17 21:27:18 +01002068 Makefile with 'noshellslash' on MS-Windows.
Bram Moolenaarac3150d2019-07-28 16:36:39 +02002069 - When this option is set to "backslash", backslash is used. This is
Bram Moolenaar6f345a12019-12-17 21:27:18 +01002070 useful when editing a batch file with 'shellslash' set on MS-Windows.
Bram Moolenaarac3150d2019-07-28 16:36:39 +02002071 - When this option is empty, same character is used as for
2072 'shellslash'.
2073 For Insert mode completion the buffer-local value is used. For
2074 command line completion the global value is used.
2075
Bram Moolenaar1c7715d2005-10-03 22:02:18 +00002076 *'completeopt'* *'cot'*
Bram Moolenaar96d2c5b2006-03-11 21:27:59 +00002077'completeopt' 'cot' string (default: "menu,preview")
Bram Moolenaar1c7715d2005-10-03 22:02:18 +00002078 global
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01002079 A comma-separated list of options for Insert mode completion
Bram Moolenaarc7453f52006-02-10 23:20:28 +00002080 |ins-completion|. The supported values are:
Bram Moolenaar1c7715d2005-10-03 22:02:18 +00002081
2082 menu Use a popup menu to show the possible completions. The
2083 menu is only shown when there is more than one match and
2084 sufficient colors are available. |ins-completion-menu|
2085
Bram Moolenaar65c923a2006-03-03 22:56:30 +00002086 menuone Use the popup menu also when there is only one match.
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00002087 Useful when there is additional information about the
Bram Moolenaar65c923a2006-03-03 22:56:30 +00002088 match, e.g., what file it comes from.
2089
Bram Moolenaarc1e37902006-04-18 21:55:01 +00002090 longest Only insert the longest common text of the matches. If
2091 the menu is displayed you can use CTRL-L to add more
2092 characters. Whether case is ignored depends on the kind
2093 of completion. For buffer text the 'ignorecase' option is
2094 used.
Bram Moolenaarc7453f52006-02-10 23:20:28 +00002095
Bram Moolenaar96d2c5b2006-03-11 21:27:59 +00002096 preview Show extra information about the currently selected
Bram Moolenaar02467872007-05-06 13:22:01 +00002097 completion in the preview window. Only works in
2098 combination with "menu" or "menuone".
2099
Bram Moolenaar576a4a62019-08-18 15:25:17 +02002100 popup Show extra information about the currently selected
2101 completion in a popup window. Only works in combination
2102 with "menu" or "menuone". Overrides "preview".
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02002103 See |'completepopup'| for specifying properties.
Bram Moolenaar2e693a82019-10-16 22:35:02 +02002104 {only works when compiled with the |+textprop| feature}
Bram Moolenaar576a4a62019-08-18 15:25:17 +02002105
Bram Moolenaardca7abe2019-10-20 18:17:57 +02002106 popuphidden
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01002107 Just like "popup" but initially hide the popup. Use a
Bram Moolenaardca7abe2019-10-20 18:17:57 +02002108 |CompleteChanged| autocommand to fetch the info and call
2109 |popup_show()| once the popup has been filled.
2110 See the example at |complete-popuphidden|.
2111 {only works when compiled with the |+textprop| feature}
2112
Bram Moolenaarb6be1e22015-07-10 18:18:40 +02002113 noinsert Do not insert any text for a match until the user selects
2114 a match from the menu. Only works in combination with
2115 "menu" or "menuone". No effect if "longest" is present.
2116
2117 noselect Do not select a match in the menu, force the user to
2118 select one from the menu. Only works in combination with
2119 "menu" or "menuone".
2120
Bram Moolenaar96d2c5b2006-03-11 21:27:59 +00002121
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02002122 *'completepopup'* *'cpp'*
2123'completepopup' 'cpp' string (default empty)
2124 global
2125 {not available when compiled without the |+textprop|
2126 or |+quickfix| feature}
2127 When 'completeopt' contains "popup" then this option is used for the
Bram Moolenaar447bfba2020-07-18 16:07:16 +02002128 properties of the info popup when it is created. If an info popup
2129 window already exists it is closed, so that the option value is
2130 applied when it is created again.
2131 You can also use |popup_findinfo()| and then set properties for an
2132 existing info popup with |popup_setoptions()|. See |complete-popup|.
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02002133
2134
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002135 *'concealcursor'* *'cocu'*
2136'concealcursor' 'cocu' string (default: "")
2137 local to window
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002138 {not available when compiled without the |+conceal|
2139 feature}
2140 Sets the modes in which text in the cursor line can also be concealed.
2141 When the current mode is listed then concealing happens just like in
2142 other lines.
2143 n Normal mode
2144 v Visual mode
2145 i Insert mode
Bram Moolenaarca8c9862010-07-24 15:00:38 +02002146 c Command line editing, for 'incsearch'
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002147
Bram Moolenaare6dc5732010-07-24 23:52:26 +02002148 'v' applies to all lines in the Visual area, not only the cursor.
Bram Moolenaarca8c9862010-07-24 15:00:38 +02002149 A useful value is "nc". This is used in help files. So long as you
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002150 are moving around text is concealed, but when starting to insert text
2151 or selecting a Visual area the concealed text is displayed, so that
2152 you can see what you are doing.
Bram Moolenaarf70e3d62010-07-24 13:15:07 +02002153 Keep in mind that the cursor position is not always where it's
2154 displayed. E.g., when moving vertically it may change column.
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002155
2156
Bram Moolenaar95bafa22018-10-02 13:26:25 +02002157 *'conceallevel'* *'cole'*
2158'conceallevel' 'cole' number (default 0)
Bram Moolenaar860cae12010-06-05 23:22:07 +02002159 local to window
Bram Moolenaar860cae12010-06-05 23:22:07 +02002160 {not available when compiled without the |+conceal|
2161 feature}
Bram Moolenaar6df6f472010-07-18 18:04:50 +02002162 Determine how text with the "conceal" syntax attribute |:syn-conceal|
2163 is shown:
Bram Moolenaar860cae12010-06-05 23:22:07 +02002164
Bram Moolenaar6df6f472010-07-18 18:04:50 +02002165 Value Effect ~
Bram Moolenaar860cae12010-06-05 23:22:07 +02002166 0 Text is shown normally
Bram Moolenaar477db062010-07-28 18:17:41 +02002167 1 Each block of concealed text is replaced with one
2168 character. If the syntax item does not have a custom
2169 replacement character defined (see |:syn-cchar|) the
2170 character defined in 'listchars' is used (default is a
2171 space).
2172 It is highlighted with the "Conceal" highlight group.
Bram Moolenaar860cae12010-06-05 23:22:07 +02002173 2 Concealed text is completely hidden unless it has a
2174 custom replacement character defined (see
Bram Moolenaar477db062010-07-28 18:17:41 +02002175 |:syn-cchar|).
Bram Moolenaara7781e02010-07-19 20:13:22 +02002176 3 Concealed text is completely hidden.
Bram Moolenaar860cae12010-06-05 23:22:07 +02002177
Bram Moolenaara7781e02010-07-19 20:13:22 +02002178 Note: in the cursor line concealed text is not hidden, so that you can
Bram Moolenaarf5963f72010-07-23 22:10:27 +02002179 edit and copy the text. This can be changed with the 'concealcursor'
2180 option.
Bram Moolenaar860cae12010-06-05 23:22:07 +02002181
Bram Moolenaar071d4272004-06-13 20:20:40 +00002182 *'confirm'* *'cf'* *'noconfirm'* *'nocf'*
2183'confirm' 'cf' boolean (default off)
2184 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002185 When 'confirm' is on, certain operations that would normally
2186 fail because of unsaved changes to a buffer, e.g. ":q" and ":e",
2187 instead raise a |dialog| asking if you wish to save the current
2188 file(s). You can still use a ! to unconditionally |abandon| a buffer.
2189 If 'confirm' is off you can still activate confirmation for one
2190 command only (this is most useful in mappings) with the |:confirm|
2191 command.
2192 Also see the |confirm()| function and the 'v' flag in 'guioptions'.
2193
2194 *'conskey'* *'consk'* *'noconskey'* *'noconsk'*
2195'conskey' 'consk' boolean (default off)
2196 global
Bram Moolenaarf3913272016-02-25 00:00:01 +01002197 This was for MS-DOS and is no longer supported.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002198
2199 *'copyindent'* *'ci'* *'nocopyindent'* *'noci'*
2200'copyindent' 'ci' boolean (default off)
2201 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00002202 Copy the structure of the existing lines indent when autoindenting a
2203 new line. Normally the new indent is reconstructed by a series of
2204 tabs followed by spaces as required (unless |'expandtab'| is enabled,
2205 in which case only spaces are used). Enabling this option makes the
2206 new line copy whatever characters were used for indenting on the
Bram Moolenaar446cb832008-06-24 21:56:24 +00002207 existing line. 'expandtab' has no effect on these characters, a Tab
2208 remains a Tab. If the new indent is greater than on the existing
Bram Moolenaar071d4272004-06-13 20:20:40 +00002209 line, the remaining space is filled in the normal manner.
Bram Moolenaar036986f2017-03-16 17:41:02 +01002210 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002211 Also see 'preserveindent'.
2212
Bram Moolenaare0fa3742016-02-20 15:47:01 +01002213 *'cpoptions'* *'cpo'* *cpo*
Bram Moolenaar071d4272004-06-13 20:20:40 +00002214'cpoptions' 'cpo' string (Vim default: "aABceFs",
2215 Vi default: all flags)
2216 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002217 A sequence of single character flags. When a character is present
Bram Moolenaar7cba6c02013-09-05 22:13:31 +02002218 this indicates Vi-compatible behavior. This is used for things where
2219 not being Vi-compatible is mostly or sometimes preferred.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002220 'cpoptions' stands for "compatible-options".
2221 Commas can be added for readability.
2222 To avoid problems with flags that are added in the future, use the
2223 "+=" and "-=" feature of ":set" |add-option-flags|.
Bram Moolenaar71eb3ad2021-12-26 12:07:30 +00002224
Bram Moolenaar071d4272004-06-13 20:20:40 +00002225 NOTE: This option is set to the Vi default value when 'compatible' is
2226 set and to the Vim default value when 'compatible' is reset.
Bram Moolenaar71eb3ad2021-12-26 12:07:30 +00002227
2228 NOTE: In a |Vim9| script, when `vim9script` is encountered, the value
2229 is saved, 'cpoptions' is set to the Vim default, and the saved value
2230 is restored at the end of the script. Changes to the value of
2231 'cpoptions' will be applied to the saved value, but keep in mind that
2232 removing a flag that is not present when 'cpoptions' is changed has no
2233 effect. In the |.vimrc| file the value is not restored, thus using
2234 `vim9script` in the |.vimrc| file results in using the Vim default.
2235
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002236 NOTE: This option is set to the POSIX default value at startup when
2237 the Vi default value would be used and the $VIM_POSIX environment
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002238 variable exists |posix|. This means Vim tries to behave like the
2239 POSIX specification.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002240
2241 contains behavior ~
2242 *cpo-a*
2243 a When included, a ":read" command with a file name
2244 argument will set the alternate file name for the
2245 current window.
2246 *cpo-A*
2247 A When included, a ":write" command with a file name
2248 argument will set the alternate file name for the
2249 current window.
2250 *cpo-b*
2251 b "\|" in a ":map" command is recognized as the end of
2252 the map command. The '\' is included in the mapping,
2253 the text after the '|' is interpreted as the next
2254 command. Use a CTRL-V instead of a backslash to
2255 include the '|' in the mapping. Applies to all
2256 mapping, abbreviation, menu and autocmd commands.
2257 See also |map_bar|.
2258 *cpo-B*
2259 B A backslash has no special meaning in mappings,
Bram Moolenaara9604e62018-07-21 05:56:22 +02002260 abbreviations, user commands and the "to" part of the
2261 menu commands. Remove this flag to be able to use a
2262 backslash like a CTRL-V. For example, the command
2263 ":map X \<Esc>" results in X being mapped to:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002264 'B' included: "\^[" (^[ is a real <Esc>)
2265 'B' excluded: "<Esc>" (5 characters)
2266 ('<' excluded in both cases)
2267 *cpo-c*
2268 c Searching continues at the end of any match at the
2269 cursor position, but not further than the start of the
2270 next line. When not present searching continues
2271 one character from the cursor position. With 'c'
2272 "abababababab" only gets three matches when repeating
2273 "/abab", without 'c' there are five matches.
2274 *cpo-C*
2275 C Do not concatenate sourced lines that start with a
2276 backslash. See |line-continuation|.
2277 *cpo-d*
2278 d Using "./" in the 'tags' option doesn't mean to use
2279 the tags file relative to the current file, but the
2280 tags file in the current directory.
2281 *cpo-D*
2282 D Can't use CTRL-K to enter a digraph after Normal mode
2283 commands with a character argument, like |r|, |f| and
2284 |t|.
2285 *cpo-e*
2286 e When executing a register with ":@r", always add a
2287 <CR> to the last line, also when the register is not
2288 linewise. If this flag is not present, the register
2289 is not linewise and the last line does not end in a
2290 <CR>, then the last line is put on the command-line
2291 and can be edited before hitting <CR>.
2292 *cpo-E*
2293 E It is an error when using "y", "d", "c", "g~", "gu" or
2294 "gU" on an Empty region. The operators only work when
Bram Moolenaar15142e22018-04-30 22:19:58 +02002295 at least one character is to be operated on. Example:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002296 This makes "y0" fail in the first column.
2297 *cpo-f*
2298 f When included, a ":read" command with a file name
2299 argument will set the file name for the current buffer,
2300 if the current buffer doesn't have a file name yet.
2301 *cpo-F*
2302 F When included, a ":write" command with a file name
2303 argument will set the file name for the current
2304 buffer, if the current buffer doesn't have a file name
Bram Moolenaarb3480382005-12-11 21:33:32 +00002305 yet. Also see |cpo-P|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002306 *cpo-g*
2307 g Goto line 1 when using ":edit" without argument.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002308 *cpo-H*
2309 H When using "I" on a line with only blanks, insert
2310 before the last blank. Without this flag insert after
2311 the last blank.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002312 *cpo-i*
2313 i When included, interrupting the reading of a file will
2314 leave it modified.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002315 *cpo-I*
2316 I When moving the cursor up or down just after inserting
2317 indent for 'autoindent', do not delete the indent.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002318 *cpo-j*
2319 j When joining lines, only add two spaces after a '.',
2320 not after '!' or '?'. Also see 'joinspaces'.
2321 *cpo-J*
2322 J A |sentence| has to be followed by two spaces after
Bram Moolenaar582fd852005-03-28 20:58:01 +00002323 the '.', '!' or '?'. A <Tab> is not recognized as
Bram Moolenaar071d4272004-06-13 20:20:40 +00002324 white space.
2325 *cpo-k*
2326 k Disable the recognition of raw key codes in
2327 mappings, abbreviations, and the "to" part of menu
2328 commands. For example, if <Key> sends ^[OA (where ^[
2329 is <Esc>), the command ":map X ^[OA" results in X
2330 being mapped to:
2331 'k' included: "^[OA" (3 characters)
2332 'k' excluded: "<Key>" (one key code)
2333 Also see the '<' flag below.
2334 *cpo-K*
2335 K Don't wait for a key code to complete when it is
2336 halfway a mapping. This breaks mapping <F1><F1> when
2337 only part of the second <F1> has been read. It
2338 enables cancelling the mapping by typing <F1><Esc>.
2339 *cpo-l*
2340 l Backslash in a [] range in a search pattern is taken
Bram Moolenaar26a60b42005-02-22 08:49:11 +00002341 literally, only "\]", "\^", "\-" and "\\" are special.
2342 See |/[]|
Bram Moolenaar071d4272004-06-13 20:20:40 +00002343 'l' included: "/[ \t]" finds <Space>, '\' and 't'
2344 'l' excluded: "/[ \t]" finds <Space> and <Tab>
Bram Moolenaar26a60b42005-02-22 08:49:11 +00002345 Also see |cpo-\|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002346 *cpo-L*
2347 L When the 'list' option is set, 'wrapmargin',
2348 'textwidth', 'softtabstop' and Virtual Replace mode
2349 (see |gR|) count a <Tab> as two characters, instead of
2350 the normal behavior of a <Tab>.
2351 *cpo-m*
2352 m When included, a showmatch will always wait half a
2353 second. When not included, a showmatch will wait half
2354 a second or until a character is typed. |'showmatch'|
2355 *cpo-M*
2356 M When excluded, "%" matching will take backslashes into
2357 account. Thus in "( \( )" and "\( ( \)" the outer
2358 parenthesis match. When included "%" ignores
2359 backslashes, which is Vi compatible.
2360 *cpo-n*
Bram Moolenaar64486672010-05-16 15:46:46 +02002361 n When included, the column used for 'number' and
2362 'relativenumber' will also be used for text of wrapped
2363 lines.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002364 *cpo-o*
2365 o Line offset to search command is not remembered for
2366 next search.
2367 *cpo-O*
2368 O Don't complain if a file is being overwritten, even
2369 when it didn't exist when editing it. This is a
2370 protection against a file unexpectedly created by
2371 someone else. Vi didn't complain about this.
2372 *cpo-p*
2373 p Vi compatible Lisp indenting. When not present, a
2374 slightly better algorithm is used.
Bram Moolenaarb3480382005-12-11 21:33:32 +00002375 *cpo-P*
2376 P When included, a ":write" command that appends to a
2377 file will set the file name for the current buffer, if
2378 the current buffer doesn't have a file name yet and
2379 the 'F' flag is also included |cpo-F|.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002380 *cpo-q*
2381 q When joining multiple lines leave the cursor at the
2382 position where it would be when joining two lines.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002383 *cpo-r*
2384 r Redo ("." command) uses "/" to repeat a search
2385 command, instead of the actually used search string.
2386 *cpo-R*
2387 R Remove marks from filtered lines. Without this flag
2388 marks are kept like |:keepmarks| was used.
2389 *cpo-s*
2390 s Set buffer options when entering the buffer for the
2391 first time. This is like it is in Vim version 3.0.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002392 And it is the default. If not present the options are
Bram Moolenaar071d4272004-06-13 20:20:40 +00002393 set when the buffer is created.
2394 *cpo-S*
2395 S Set buffer options always when entering a buffer
2396 (except 'readonly', 'fileformat', 'filetype' and
2397 'syntax'). This is the (most) Vi compatible setting.
2398 The options are set to the values in the current
2399 buffer. When you change an option and go to another
2400 buffer, the value is copied. Effectively makes the
2401 buffer options global to all buffers.
2402
2403 's' 'S' copy buffer options
2404 no no when buffer created
2405 yes no when buffer first entered (default)
2406 X yes each time when buffer entered (vi comp.)
2407 *cpo-t*
2408 t Search pattern for the tag command is remembered for
2409 "n" command. Otherwise Vim only puts the pattern in
2410 the history for search pattern, but doesn't change the
2411 last used search pattern.
2412 *cpo-u*
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002413 u Undo is Vi compatible. See |undo-two-ways|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002414 *cpo-v*
2415 v Backspaced characters remain visible on the screen in
2416 Insert mode. Without this flag the characters are
2417 erased from the screen right away. With this flag the
2418 screen newly typed text overwrites backspaced
2419 characters.
2420 *cpo-w*
2421 w When using "cw" on a blank character, only change one
2422 character and not all blanks until the start of the
2423 next word.
2424 *cpo-W*
2425 W Don't overwrite a readonly file. When omitted, ":w!"
2426 overwrites a readonly file, if possible.
2427 *cpo-x*
2428 x <Esc> on the command-line executes the command-line.
2429 The default in Vim is to abandon the command-line,
2430 because <Esc> normally aborts a command. |c_<Esc>|
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002431 *cpo-X*
2432 X When using a count with "R" the replaced text is
2433 deleted only once. Also when repeating "R" with "."
2434 and a count.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002435 *cpo-y*
Bram Moolenaard09091d2019-01-17 16:07:22 +01002436 y A yank command can be redone with ".". Think twice if
2437 you really want to use this, it may break some
2438 plugins, since most people expect "." to only repeat a
2439 change.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002440 *cpo-Z*
2441 Z When using "w!" while the 'readonly' option is set,
2442 don't reset 'readonly'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002443 *cpo-!*
2444 ! When redoing a filter command, use the last used
2445 external command, whatever it was. Otherwise the last
2446 used -filter- command is used.
2447 *cpo-$*
2448 $ When making a change to one line, don't redisplay the
2449 line, but put a '$' at the end of the changed text.
2450 The changed text will be overwritten when you type the
2451 new text. The line is redisplayed if you type any
2452 command that moves the cursor from the insertion
2453 point.
2454 *cpo-%*
2455 % Vi-compatible matching is done for the "%" command.
2456 Does not recognize "#if", "#endif", etc.
2457 Does not recognize "/*" and "*/".
2458 Parens inside single and double quotes are also
2459 counted, causing a string that contains a paren to
2460 disturb the matching. For example, in a line like
2461 "if (strcmp("foo(", s))" the first paren does not
2462 match the last one. When this flag is not included,
2463 parens inside single and double quotes are treated
2464 specially. When matching a paren outside of quotes,
2465 everything inside quotes is ignored. When matching a
2466 paren inside quotes, it will find the matching one (if
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002467 there is one). This works very well for C programs.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00002468 This flag is also used for other features, such as
2469 C-indenting.
Bram Moolenaar7c626922005-02-07 22:01:03 +00002470 *cpo--*
2471 - When included, a vertical movement command fails when
Bram Moolenaar8ada17c2006-01-19 22:16:24 +00002472 it would go above the first line or below the last
2473 line. Without it the cursor moves to the first or
2474 last line, unless it already was in that line.
Bram Moolenaar7c626922005-02-07 22:01:03 +00002475 Applies to the commands "-", "k", CTRL-P, "+", "j",
Bram Moolenaar8ada17c2006-01-19 22:16:24 +00002476 CTRL-N, CTRL-J and ":1234".
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00002477 *cpo-+*
2478 + When included, a ":write file" command will reset the
2479 'modified' flag of the buffer, even though the buffer
2480 itself may still be different from its file.
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00002481 *cpo-star*
Bram Moolenaar071d4272004-06-13 20:20:40 +00002482 * Use ":*" in the same way as ":@". When not included,
2483 ":*" is an alias for ":'<,'>", select the Visual area.
2484 *cpo-<*
2485 < Disable the recognition of special key codes in |<>|
2486 form in mappings, abbreviations, and the "to" part of
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002487 menu commands. For example, the command
Bram Moolenaar071d4272004-06-13 20:20:40 +00002488 ":map X <Tab>" results in X being mapped to:
2489 '<' included: "<Tab>" (5 characters)
2490 '<' excluded: "^I" (^I is a real <Tab>)
2491 Also see the 'k' flag above.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002492 *cpo->*
2493 > When appending to a register, put a line break before
2494 the appended text.
Bram Moolenaar8b3e0332011-06-26 05:36:34 +02002495 *cpo-;*
2496 ; When using |,| or |;| to repeat the last |t| search
2497 and the cursor is right in front of the searched
2498 character, the cursor won't move. When not included,
2499 the cursor would skip over it and jump to the
Bram Moolenaarc8734422012-06-01 22:38:45 +02002500 following occurrence.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002501
2502 POSIX flags. These are not included in the Vi default value, except
2503 when $VIM_POSIX was set on startup. |posix|
2504
2505 contains behavior ~
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00002506 *cpo-#*
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002507 # A count before "D", "o" and "O" has no effect.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002508 *cpo-&*
2509 & When ":preserve" was used keep the swap file when
2510 exiting normally while this buffer is still loaded.
2511 This flag is tested when exiting.
Bram Moolenaar26a60b42005-02-22 08:49:11 +00002512 *cpo-\*
2513 \ Backslash in a [] range in a search pattern is taken
2514 literally, only "\]" is special See |/[]|
Bram Moolenaar90915b52005-08-21 22:17:52 +00002515 '\' included: "/[ \-]" finds <Space>, '\' and '-'
2516 '\' excluded: "/[ \-]" finds <Space> and '-'
2517 Also see |cpo-l|.
Bram Moolenaar26a60b42005-02-22 08:49:11 +00002518 *cpo-/*
2519 / When "%" is used as the replacement string in a |:s|
2520 command, use the previous replacement string. |:s%|
2521 *cpo-{*
2522 { The |{| and |}| commands also stop at a "{" character
2523 at the start of a line.
2524 *cpo-.*
2525 . The ":chdir" and ":cd" commands fail if the current
2526 buffer is modified, unless ! is used. Vim doesn't
2527 need this, since it remembers the full path of an
2528 opened file.
2529 *cpo-bar*
2530 | The value of the $LINES and $COLUMNS environment
2531 variables overrule the terminal size values obtained
2532 with system specific functions.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00002533
Bram Moolenaar071d4272004-06-13 20:20:40 +00002534
Bram Moolenaar40e6a712010-05-16 22:32:54 +02002535 *'cryptmethod'* *'cm'*
Bram Moolenaara86187b2018-12-16 18:20:00 +01002536'cryptmethod' 'cm' string (default "blowfish2")
Bram Moolenaar49771f42010-07-20 17:32:38 +02002537 global or local to buffer |global-local|
Bram Moolenaar40e6a712010-05-16 22:32:54 +02002538 Method used for encryption when the buffer is written to a file:
Bram Moolenaar0bbabe82010-05-17 20:32:55 +02002539 *pkzip*
Bram Moolenaar49771f42010-07-20 17:32:38 +02002540 zip PkZip compatible method. A weak kind of encryption.
Bram Moolenaarf50a2532010-05-21 15:36:08 +02002541 Backwards compatible with Vim 7.2 and older.
Christian Brabandtaae58342023-04-23 17:50:22 +01002542 Only use if you need to be backwards compatible.
Bram Moolenaar0bbabe82010-05-17 20:32:55 +02002543 *blowfish*
Bram Moolenaar8f4ac012014-08-10 13:38:34 +02002544 blowfish Blowfish method. Medium strong encryption but it has
2545 an implementation flaw. Requires Vim 7.3 or later,
2546 files can NOT be read by Vim 7.2 and older. This adds
2547 a "seed" to the file, every time you write the file
2548 the encrypted bytes will be different.
Christian Brabandtaae58342023-04-23 17:50:22 +01002549 Obsolete, please do no longer use.
Bram Moolenaar8f4ac012014-08-10 13:38:34 +02002550 *blowfish2*
2551 blowfish2 Blowfish method. Medium strong encryption. Requires
Bram Moolenaar5e9b2fa2016-02-01 22:37:05 +01002552 Vim 7.4.401 or later, files can NOT be read by Vim 7.3
Bram Moolenaar8f4ac012014-08-10 13:38:34 +02002553 and older. This adds a "seed" to the file, every time
2554 you write the file the encrypted bytes will be
2555 different. The whole undo file is encrypted, not just
2556 the pieces of text.
Bram Moolenaara2baa732022-02-04 16:09:54 +00002557 *E1193* *E1194* *E1195* *E1196* *E1230*
Christian Brabandtf573c6e2021-06-20 14:02:16 +02002558 *E1197* *E1198* *E1199* *E1200* *E1201*
2559 xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
2560 Code. Medium strong till strong encryption.
2561 Encryption is provided by the libsodium library, it
Bram Moolenaar22863042021-10-16 15:23:36 +01002562 requires Vim to be built with |+sodium|.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02002563 It adds a seed and a message authentication code (MAC)
2564 to the file. This needs at least a Vim 8.2.3022 to
2565 read the encrypted file.
2566 Encryption of swap files is not supported, therefore
2567 no swap file will be used when xchacha20 encryption is
2568 enabled.
2569 Encryption of undo files is not yet supported,
2570 therefore no undo file will currently be written.
Christian Brabandtaae58342023-04-23 17:50:22 +01002571 CAREFUL: Files written with this method might have to
2572 be read back with the same version of Vim if the
2573 binary format changes later.
2574 Obsolete, please do no longer use.
2575 xchacha20v2 Same algorithm as with "xchacha20" that correctly
2576 stores the key derivation parameters together with the
2577 encrypted file. Should work better in case the
2578 parameters in the libsodium library ever change.
2579 STILL EXPERIMENTAL: Files written with this method
Christian Brabandtf573c6e2021-06-20 14:02:16 +02002580 might have to be read back with the same version of
2581 Vim if the binary format changes later.
Bram Moolenaarf50a2532010-05-21 15:36:08 +02002582
Christian Brabandtaae58342023-04-23 17:50:22 +01002583 You should use "blowfish2", also to re-encrypt older files. The
2584 "xchacha20" method provides better encryption, but it does not work
2585 with all versions of Vim.
Bram Moolenaar4f3f6682016-03-26 23:01:59 +01002586
Bram Moolenaar40e6a712010-05-16 22:32:54 +02002587 When reading an encrypted file 'cryptmethod' will be set automatically
Bram Moolenaarf50a2532010-05-21 15:36:08 +02002588 to the detected method of the file being read. Thus if you write it
2589 without changing 'cryptmethod' the same method will be used.
2590 Changing 'cryptmethod' does not mark the file as modified, you have to
Bram Moolenaar49771f42010-07-20 17:32:38 +02002591 explicitly write it, you don't get a warning unless there are other
2592 modifications. Also see |:X|.
2593
2594 When setting the global value to an empty string, it will end up with
Bram Moolenaara86187b2018-12-16 18:20:00 +01002595 the value "blowfish2". When setting the local value to an empty
2596 string the buffer will use the global value.
Bram Moolenaar49771f42010-07-20 17:32:38 +02002597
Bram Moolenaarf50a2532010-05-21 15:36:08 +02002598 When a new encryption method is added in a later version of Vim, and
2599 the current version does not recognize it, you will get *E821* .
Bram Moolenaar49771f42010-07-20 17:32:38 +02002600 You need to edit this file with the later version of Vim.
Bram Moolenaar40e6a712010-05-16 22:32:54 +02002601
2602
Bram Moolenaar071d4272004-06-13 20:20:40 +00002603 *'cscopepathcomp'* *'cspc'*
2604'cscopepathcomp' 'cspc' number (default 0)
2605 global
2606 {not available when compiled without the |+cscope|
2607 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002608 Determines how many components of the path to show in a list of tags.
2609 See |cscopepathcomp|.
Bram Moolenaar036986f2017-03-16 17:41:02 +01002610 NOTE: This option is set to 0 when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002611
2612 *'cscopeprg'* *'csprg'*
2613'cscopeprg' 'csprg' string (default "cscope")
2614 global
2615 {not available when compiled without the |+cscope|
2616 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002617 Specifies the command to execute cscope. See |cscopeprg|.
2618 This option cannot be set from a |modeline| or in the |sandbox|, for
2619 security reasons.
2620
2621 *'cscopequickfix'* *'csqf'*
2622'cscopequickfix' 'csqf' string (default "")
2623 global
2624 {not available when compiled without the |+cscope|
2625 or |+quickfix| features}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002626 Specifies whether to use quickfix window to show cscope results.
2627 See |cscopequickfix|.
2628
Bram Moolenaarec7944a2013-06-12 21:29:15 +02002629 *'cscoperelative'* *'csre'* *'nocscoperelative'* *'nocsre'*
Bram Moolenaar2f982e42011-06-12 20:42:22 +02002630'cscoperelative' 'csre' boolean (default off)
2631 global
2632 {not available when compiled without the |+cscope|
2633 feature}
Bram Moolenaar2f982e42011-06-12 20:42:22 +02002634 In the absence of a prefix (-P) for cscope. setting this option enables
2635 to use the basename of cscope.out path as the prefix.
2636 See |cscoperelative|.
Bram Moolenaar036986f2017-03-16 17:41:02 +01002637 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar2f982e42011-06-12 20:42:22 +02002638
Bram Moolenaar071d4272004-06-13 20:20:40 +00002639 *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
2640'cscopetag' 'cst' boolean (default off)
2641 global
2642 {not available when compiled without the |+cscope|
2643 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002644 Use cscope for tag commands. See |cscope-options|.
2645 NOTE: This option is reset when 'compatible' is set.
2646
2647 *'cscopetagorder'* *'csto'*
2648'cscopetagorder' 'csto' number (default 0)
2649 global
2650 {not available when compiled without the |+cscope|
2651 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002652 Determines the order in which ":cstag" performs a search. See
2653 |cscopetagorder|.
2654 NOTE: This option is set to 0 when 'compatible' is set.
2655
2656 *'cscopeverbose'* *'csverb'*
2657 *'nocscopeverbose'* *'nocsverb'*
2658'cscopeverbose' 'csverb' boolean (default off)
2659 global
2660 {not available when compiled without the |+cscope|
2661 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00002662 Give messages when adding a cscope database. See |cscopeverbose|.
2663 NOTE: This option is reset when 'compatible' is set.
2664
Bram Moolenaar860cae12010-06-05 23:22:07 +02002665 *'cursorbind'* *'crb'* *'nocursorbind'* *'nocrb'*
2666'cursorbind' 'crb' boolean (default off)
2667 local to window
Bram Moolenaar860cae12010-06-05 23:22:07 +02002668 When this option is set, as the cursor in the current
2669 window moves other cursorbound windows (windows that also have
2670 this option set) move their cursors to the corresponding line and
2671 column. This option is useful for viewing the
2672 differences between two versions of a file (see 'diff'); in diff mode,
2673 inserted and deleted lines (though not characters within a line) are
Bram Moolenaar1a384422010-07-14 19:53:30 +02002674 taken into account.
Bram Moolenaar860cae12010-06-05 23:22:07 +02002675
Bram Moolenaar600dddc2006-03-12 22:05:10 +00002676
2677 *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
2678'cursorcolumn' 'cuc' boolean (default off)
2679 local to window
Bram Moolenaardb84e452010-08-15 13:50:43 +02002680 {not available when compiled without the |+syntax|
Bram Moolenaar600dddc2006-03-12 22:05:10 +00002681 feature}
2682 Highlight the screen column of the cursor with CursorColumn
2683 |hl-CursorColumn|. Useful to align text. Will make screen redrawing
2684 slower.
Bram Moolenaar4c3f5362006-04-11 21:38:50 +00002685 If you only want the highlighting in the current window you can use
2686 these autocommands: >
2687 au WinLeave * set nocursorline nocursorcolumn
2688 au WinEnter * set cursorline cursorcolumn
2689<
Bram Moolenaar600dddc2006-03-12 22:05:10 +00002690
2691 *'cursorline'* *'cul'* *'nocursorline'* *'nocul'*
2692'cursorline' 'cul' boolean (default off)
2693 local to window
Bram Moolenaardb84e452010-08-15 13:50:43 +02002694 {not available when compiled without the |+syntax|
Bram Moolenaar600dddc2006-03-12 22:05:10 +00002695 feature}
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002696 Highlight the text line of the cursor with CursorLine |hl-CursorLine|.
2697 Useful to easily spot the cursor. Will make screen redrawing slower.
Bram Moolenaare2f98b92006-03-29 21:18:24 +00002698 When Visual mode is active the highlighting isn't used to make it
Bram Moolenaar779b74b2006-04-10 14:55:34 +00002699 easier to see the selected text.
Bram Moolenaar600dddc2006-03-12 22:05:10 +00002700
2701
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002702 *'cursorlineopt'* *'culopt'*
Bram Moolenaar017ba072019-09-14 21:01:23 +02002703'cursorlineopt' 'culopt' string (default: "number,line")
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002704 local to window
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002705 {not available when compiled without the |+syntax|
2706 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01002707 Comma-separated list of settings for how 'cursorline' is displayed.
Bram Moolenaar017ba072019-09-14 21:01:23 +02002708 Valid values:
2709 "line" Highlight the text line of the cursor with
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002710 CursorLine |hl-CursorLine|.
Bram Moolenaar017ba072019-09-14 21:01:23 +02002711 "screenline" Highlight only the screen line of the cursor with
2712 CursorLine |hl-CursorLine|.
2713 "number" Highlight the line number of the cursor with
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002714 CursorLineNr |hl-CursorLineNr|.
Bram Moolenaar017ba072019-09-14 21:01:23 +02002715
2716 Special value:
2717 "both" Alias for the values "line,number".
2718
2719 "line" and "screenline" cannot be used together.
Bram Moolenaar410e98a2019-09-09 22:05:49 +02002720
2721
Bram Moolenaar071d4272004-06-13 20:20:40 +00002722 *'debug'*
2723'debug' string (default "")
2724 global
Bram Moolenaar57657d82006-04-21 22:12:41 +00002725 These values can be used:
2726 msg Error messages that would otherwise be omitted will be given
2727 anyway.
2728 throw Error messages that would otherwise be omitted will be given
2729 anyway and also throw an exception and set |v:errmsg|.
2730 beep A message will be given when otherwise only a beep would be
2731 produced.
Bram Moolenaar26a60b42005-02-22 08:49:11 +00002732 The values can be combined, separated by a comma.
Bram Moolenaar57657d82006-04-21 22:12:41 +00002733 "msg" and "throw" are useful for debugging 'foldexpr', 'formatexpr' or
2734 'indentexpr'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002735
2736 *'define'* *'def'*
2737'define' 'def' string (default "^\s*#\s*define")
2738 global or local to buffer |global-local|
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002739 Pattern to be used to find a macro definition. It is a search
Bram Moolenaar071d4272004-06-13 20:20:40 +00002740 pattern, just like for the "/" command. This option is used for the
2741 commands like "[i" and "[d" |include-search|. The 'isident' option is
2742 used to recognize the defined name after the match:
2743 {match with 'define'}{non-ID chars}{defined name}{non-ID char}
2744 See |option-backslash| about inserting backslashes to include a space
2745 or backslash.
2746 The default value is for C programs. For C++ this value would be
2747 useful, to include const type declarations: >
2748 ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
Bram Moolenaar63b74a82019-03-24 15:09:13 +01002749< You can also use "\ze" just before the name and continue the pattern
2750 to check what is following. E.g. for Javascript, if a function is
2751 defined with "func_name = function(args)": >
2752 ^\s*\ze\i\+\s*=\s*function(
2753< If the function is defined with "func_name : function() {...": >
2754 ^\s*\ze\i\+\s*[:]\s*(*function\s*(
Bram Moolenaar071d4272004-06-13 20:20:40 +00002755< When using the ":set" command, you need to double the backslashes!
Bram Moolenaar63b74a82019-03-24 15:09:13 +01002756 To avoid that use `:let` with a single quote string: >
2757 let &l:define = '^\s*\ze\k\+\s*=\s*function('
Bram Moolenaar911ead12019-04-21 00:03:35 +02002758<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002759
2760 *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
2761'delcombine' 'deco' boolean (default off)
2762 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002763 If editing Unicode and this option is set, backspace and Normal mode
2764 "x" delete each combining character on its own. When it is off (the
2765 default) the character along with its combining characters are
2766 deleted.
Bram Moolenaar4f4d51a2020-10-11 13:57:40 +02002767 Note: When 'delcombine' is set "xx" may work differently from "2x"!
Bram Moolenaar071d4272004-06-13 20:20:40 +00002768
2769 This is useful for Arabic, Hebrew and many other languages where one
2770 may have combining characters overtop of base characters, and want
2771 to remove only the combining ones.
Bram Moolenaar036986f2017-03-16 17:41:02 +01002772 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002773
2774 *'dictionary'* *'dict'*
2775'dictionary' 'dict' string (default "")
2776 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00002777 List of file names, separated by commas, that are used to lookup words
2778 for keyword completion commands |i_CTRL-X_CTRL-K|. Each file should
2779 contain a list of words. This can be one word per line, or several
2780 words per line, separated by non-keyword characters (white space is
2781 preferred). Maximum line length is 510 bytes.
Bram Moolenaar259f26a2018-05-15 22:25:40 +02002782
2783 When this option is empty or an entry "spell" is present, and spell
2784 checking is enabled, words in the word lists for the currently active
2785 'spelllang' are used. See |spell|.
2786
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002787 To include a comma in a file name precede it with a backslash. Spaces
Bram Moolenaar071d4272004-06-13 20:20:40 +00002788 after a comma are ignored, otherwise spaces are included in the file
2789 name. See |option-backslash| about using backslashes.
Bram Moolenaard8b02732005-01-14 21:48:43 +00002790 This has nothing to do with the |Dictionary| variable type.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002791 Where to find a list of words?
2792 - On FreeBSD, there is the file "/usr/share/dict/words".
2793 - In the Simtel archive, look in the "msdos/linguist" directory.
2794 - In "miscfiles" of the GNU collection.
2795 The use of |:set+=| and |:set-=| is preferred when adding or removing
2796 directories from the list. This avoids problems when a future version
2797 uses another default.
2798 Backticks cannot be used in this option for security reasons.
2799
2800 *'diff'* *'nodiff'*
2801'diff' boolean (default off)
2802 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00002803 {not available when compiled without the |+diff|
2804 feature}
2805 Join the current window in the group of windows that shows differences
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002806 between files. See |vimdiff|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002807
2808 *'dex'* *'diffexpr'*
2809'diffexpr' 'dex' string (default "")
2810 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002811 {not available when compiled without the |+diff|
2812 feature}
Bram Moolenaare828b762018-09-10 17:51:58 +02002813 Expression which is evaluated to obtain a diff file (either ed-style
2814 or unified-style) from two versions of a file. See |diff-diffexpr|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002815 This option cannot be set from a |modeline| or in the |sandbox|, for
2816 security reasons.
2817
2818 *'dip'* *'diffopt'*
Bram Moolenaarc8234772019-11-10 21:00:27 +01002819'diffopt' 'dip' string (default "internal,filler,closeoff")
Bram Moolenaar071d4272004-06-13 20:20:40 +00002820 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002821 {not available when compiled without the |+diff|
2822 feature}
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00002823 Option settings for diff mode. It can consist of the following items.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002824 All are optional. Items must be separated by a comma.
2825
2826 filler Show filler lines, to keep the text
2827 synchronized with a window that has inserted
2828 lines at the same position. Mostly useful
2829 when windows are side-by-side and 'scrollbind'
2830 is set.
2831
2832 context:{n} Use a context of {n} lines between a change
2833 and a fold that contains unchanged lines.
2834 When omitted a context of six lines is used.
Bram Moolenaarf6b40102019-02-22 15:24:03 +01002835 When using zero the context is actually one,
2836 since folds require a line in between, also
2837 for a deleted line.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002838 See |fold-diff|.
2839
Bram Moolenaar95bafa22018-10-02 13:26:25 +02002840 iblank Ignore changes where lines are all blank. Adds
2841 the "-B" flag to the "diff" command if
2842 'diffexpr' is empty. Check the documentation
2843 of the "diff" command for what this does
2844 exactly.
2845 NOTE: the diff windows will get out of sync,
2846 because no differences between blank lines are
2847 taken into account.
2848
Bram Moolenaar071d4272004-06-13 20:20:40 +00002849 icase Ignore changes in case of text. "a" and "A"
2850 are considered the same. Adds the "-i" flag
2851 to the "diff" command if 'diffexpr' is empty.
2852
2853 iwhite Ignore changes in amount of white space. Adds
2854 the "-b" flag to the "diff" command if
2855 'diffexpr' is empty. Check the documentation
2856 of the "diff" command for what this does
2857 exactly. It should ignore adding trailing
2858 white space, but not leading white space.
2859
Bram Moolenaar95bafa22018-10-02 13:26:25 +02002860 iwhiteall Ignore all white space changes. Adds
2861 the "-w" flag to the "diff" command if
2862 'diffexpr' is empty. Check the documentation
2863 of the "diff" command for what this does
2864 exactly.
2865
2866 iwhiteeol Ignore white space changes at end of line.
2867 Adds the "-Z" flag to the "diff" command if
2868 'diffexpr' is empty. Check the documentation
2869 of the "diff" command for what this does
2870 exactly.
2871
Bram Moolenaar7d47b6e2006-03-15 22:59:18 +00002872 horizontal Start diff mode with horizontal splits (unless
2873 explicitly specified otherwise).
2874
2875 vertical Start diff mode with vertical splits (unless
2876 explicitly specified otherwise).
2877
Bram Moolenaarc8234772019-11-10 21:00:27 +01002878 closeoff When a window is closed where 'diff' is set
2879 and there is only one window remaining in the
2880 same tab page with 'diff' set, execute
2881 `:diffoff` in that window. This undoes a
2882 `:diffsplit` command.
2883
Bram Moolenaar97ce4192017-12-01 20:35:58 +01002884 hiddenoff Do not use diff mode for a buffer when it
2885 becomes hidden.
2886
Bram Moolenaar7d47b6e2006-03-15 22:59:18 +00002887 foldcolumn:{n} Set the 'foldcolumn' option to {n} when
2888 starting diff mode. Without this 2 is used.
2889
Bram Moolenaar4223d432021-02-10 13:18:17 +01002890 followwrap Follow the 'wrap' option and leave as it is.
2891
Bram Moolenaare828b762018-09-10 17:51:58 +02002892 internal Use the internal diff library. This is
2893 ignored when 'diffexpr' is set. *E960*
2894 When running out of memory when writing a
2895 buffer this item will be ignored for diffs
2896 involving that buffer. Set the 'verbose'
2897 option to see when this happens.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002898
Bram Moolenaare828b762018-09-10 17:51:58 +02002899 indent-heuristic
Bram Moolenaarf0d58ef2018-11-16 16:13:44 +01002900 Use the indent heuristic for the internal
2901 diff library.
Bram Moolenaare828b762018-09-10 17:51:58 +02002902
2903 algorithm:{text} Use the specified diff algorithm with the
Bram Moolenaarf0d58ef2018-11-16 16:13:44 +01002904 internal diff engine. Currently supported
Bram Moolenaare828b762018-09-10 17:51:58 +02002905 algorithms are:
2906 myers the default algorithm
2907 minimal spend extra time to generate the
2908 smallest possible diff
2909 patience patience diff algorithm
2910 histogram histogram diff algorithm
2911
2912 Examples: >
2913 :set diffopt=internal,filler,context:4
Bram Moolenaar071d4272004-06-13 20:20:40 +00002914 :set diffopt=
Bram Moolenaare828b762018-09-10 17:51:58 +02002915 :set diffopt=internal,filler,foldcolumn:3
2916 :set diffopt-=internal " do NOT use the internal diff parser
Bram Moolenaar071d4272004-06-13 20:20:40 +00002917<
2918 *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
2919'digraph' 'dg' boolean (default off)
2920 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00002921 {not available when compiled without the |+digraphs|
2922 feature}
2923 Enable the entering of digraphs in Insert mode with {char1} <BS>
2924 {char2}. See |digraphs|.
2925 NOTE: This option is reset when 'compatible' is set.
2926
2927 *'directory'* *'dir'*
2928'directory' 'dir' string (default for Amiga: ".,t:",
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01002929 for Win32: ".,$TEMP,c:\tmp,c:\temp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002930 for Unix: ".,~/tmp,/var/tmp,/tmp")
2931 global
2932 List of directory names for the swap file, separated with commas.
Bram Moolenaare7b1ea02020-08-07 19:54:59 +02002933 Recommended value: ".,~/vimswap//" - this will put the swap file next
2934 to the edited file if possible, and in your personal swap directory
2935 otherwise. Make sure "~/vimswap//" is only readable for you.
2936
2937 Possible items:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002938 - The swap file will be created in the first directory where this is
2939 possible.
2940 - Empty means that no swap file will be used (recovery is
Bram Moolenaar00e192b2019-10-19 17:01:28 +02002941 impossible!) and no |E303| error will be given.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002942 - A directory "." means to put the swap file in the same directory as
2943 the edited file. On Unix, a dot is prepended to the file name, so
2944 it doesn't show in a directory listing. On MS-Windows the "hidden"
2945 attribute is set and a dot prepended if possible.
Bram Moolenaar8024f932020-01-14 19:29:13 +01002946 - A directory starting with "./" (or ".\" for MS-Windows) means to put
2947 the swap file relative to where the edited file is. The leading "."
2948 is replaced with the path name of the edited file.
Bram Moolenaarb782ba42018-08-07 21:39:28 +02002949 - For Unix and Win32, if a directory ends in two path separators "//",
2950 the swap file name will be built from the complete path to the file
Bram Moolenaar207f0092020-08-30 17:20:20 +02002951 with all path separators replaced by percent '%' signs (including
2952 the colon following the drive letter on Win32). This will ensure
2953 file name uniqueness in the preserve directory.
Bram Moolenaarb782ba42018-08-07 21:39:28 +02002954 On Win32, it is also possible to end with "\\". However, When a
2955 separating comma is following, you must use "//", since "\\" will
2956 include the comma in the file name. Therefore it is recommended to
2957 use '//', instead of '\\'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002958 - Spaces after the comma are ignored, other spaces are considered part
2959 of the directory name. To have a space at the start of a directory
2960 name, precede it with a backslash.
2961 - To include a comma in a directory name precede it with a backslash.
2962 - A directory name may end in an ':' or '/'.
2963 - Environment variables are expanded |:set_env|.
2964 - Careful with '\' characters, type one before a space, type two to
2965 get one in the option (see |option-backslash|), for example: >
2966 :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
2967< - For backwards compatibility with Vim version 3.0 a '>' at the start
2968 of the option is removed.
2969 Using "." first in the list is recommended. This means that editing
2970 the same file twice will result in a warning. Using "/tmp" on Unix is
2971 discouraged: When the system crashes you lose the swap file.
2972 "/var/tmp" is often not cleared when rebooting, thus is a better
Bram Moolenaare7b1ea02020-08-07 19:54:59 +02002973 choice than "/tmp". But others on the computer may be able to see the
2974 files, and it can contain a lot of files, your swap files get lost in
2975 the crowd. That is why a "tmp" directory in your home directory is
2976 tried first.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002977 The use of |:set+=| and |:set-=| is preferred when adding or removing
2978 directories from the list. This avoids problems when a future version
2979 uses another default.
2980 This option cannot be set from a |modeline| or in the |sandbox|, for
2981 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002982
2983 *'display'* *'dy'*
Bram Moolenaarbc8801c2016-08-02 21:04:33 +02002984'display' 'dy' string (default "", set to "truncate" in
2985 |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00002986 global
Bram Moolenaarf269eab2022-10-03 18:04:35 +01002987 Change the way text is displayed. This is a comma-separated list of
Bram Moolenaar071d4272004-06-13 20:20:40 +00002988 flags:
2989 lastline When included, as much as possible of the last line
Bram Moolenaarad9c2a02016-07-27 23:26:04 +02002990 in a window will be displayed. "@@@" is put in the
2991 last columns of the last screen line to indicate the
2992 rest of the line is not displayed.
2993 truncate Like "lastline", but "@@@" is displayed in the first
2994 column of the last screen line. Overrules "lastline".
Bram Moolenaar071d4272004-06-13 20:20:40 +00002995 uhex Show unprintable characters hexadecimal as <xx>
2996 instead of using ^C and ~C.
2997
Bram Moolenaard0796902016-09-16 20:02:31 +02002998 When neither "lastline" nor "truncate" is included, a last line that
Bram Moolenaarad9c2a02016-07-27 23:26:04 +02002999 doesn't fit is replaced with "@" lines.
3000
Bram Moolenaar4ba5f1d2022-10-04 14:36:29 +01003001 The "@" character can be changed by setting the "lastline" item in
3002 'fillchars'. The character is highlighted with |hl-NonText|.
3003
Bram Moolenaar071d4272004-06-13 20:20:40 +00003004 *'eadirection'* *'ead'*
3005'eadirection' 'ead' string (default "both")
3006 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003007 Tells when the 'equalalways' option applies:
3008 ver vertically, width of windows is not affected
3009 hor horizontally, height of windows is not affected
3010 both width and height of windows is affected
3011
3012 *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
3013'edcompatible' 'ed' boolean (default off)
3014 global
3015 Makes the 'g' and 'c' flags of the ":substitute" command to be
3016 toggled each time the flag is given. See |complex-change|. See
3017 also 'gdefault' option.
Bram Moolenaarb4d6c3e2017-05-27 16:45:17 +02003018 Switching this option on may break plugins!
Bram Moolenaar4072ba52020-12-23 13:56:35 +01003019 This option is not used in |Vim9| script.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003020
Bram Moolenaar03413f42016-04-12 21:07:15 +02003021 *'emoji'* *'emo'* *'noemoji'* *'noemo'*
Bram Moolenaar3848e002016-03-19 18:42:29 +01003022'emoji' 'emo' boolean (default: on)
3023 global
Bram Moolenaar3848e002016-03-19 18:42:29 +01003024 When on all Unicode emoji characters are considered to be full width.
Bram Moolenaar1d59aa12020-09-19 18:50:13 +02003025 This excludes "text emoji" characters, which are normally displayed as
3026 single width. Unfortunately there is no good specification for this
3027 and it has been determined on trial-and-error basis. Use the
3028 |setcellwidths()| function to change the behavior.
Bram Moolenaar3848e002016-03-19 18:42:29 +01003029
Bram Moolenaar071d4272004-06-13 20:20:40 +00003030 *'encoding'* *'enc'* *E543*
K.Takataf883d902021-05-30 18:04:19 +02003031'encoding' 'enc' string (default for MS-Windows: "utf-8",
3032 otherwise: value from $LANG or "latin1")
Bram Moolenaar071d4272004-06-13 20:20:40 +00003033 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003034 Sets the character encoding used inside Vim. It applies to text in
3035 the buffers, registers, Strings in expressions, text stored in the
3036 viminfo file, etc. It sets the kind of characters which Vim can work
3037 with. See |encoding-names| for the possible values.
3038
3039 NOTE: Changing this option will not change the encoding of the
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00003040 existing text in Vim. It may cause non-ASCII text to become invalid.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003041 It should normally be kept at its default value, or set when Vim
Bram Moolenaar02467872007-05-06 13:22:01 +00003042 starts up. See |multibyte|. To reload the menus see |:menutrans|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003043
Bram Moolenaar865242e2010-07-14 21:12:05 +02003044 This option cannot be set from a |modeline|. It would most likely
3045 corrupt the text.
3046
Bram Moolenaar3df01732017-02-17 22:47:16 +01003047 NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding'
3048 to "utf-8". Although care has been taken to allow different values of
Bram Moolenaar071d4272004-06-13 20:20:40 +00003049 'encoding', "utf-8" is the natural choice for the environment and
3050 avoids unnecessary conversion overhead. "utf-8" has not been made
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003051 the default to prevent different behavior of the GUI and terminal
Bram Moolenaar071d4272004-06-13 20:20:40 +00003052 versions, and to avoid changing the encoding of newly created files
3053 without your knowledge (in case 'fileencodings' is empty).
3054
3055 The character encoding of files can be different from 'encoding'.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003056 This is specified with 'fileencoding'. The conversion is done with
Bram Moolenaar071d4272004-06-13 20:20:40 +00003057 iconv() or as specified with 'charconvert'.
3058
Bram Moolenaar207f0092020-08-30 17:20:20 +02003059 If you need to know whether 'encoding' is a multibyte encoding, you
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003060 can use: >
3061 if has("multi_byte_encoding")
3062<
Bram Moolenaar071d4272004-06-13 20:20:40 +00003063 Normally 'encoding' will be equal to your current locale. This will
3064 be the default if Vim recognizes your environment settings. If
3065 'encoding' is not set to the current locale, 'termencoding' must be
3066 set to convert typed and displayed text. See |encoding-table|.
3067
3068 When you set this option, it fires the |EncodingChanged| autocommand
3069 event so that you can set up fonts if necessary.
3070
3071 When the option is set, the value is converted to lowercase. Thus
3072 you can set it with uppercase values too. Underscores are translated
3073 to '-' signs.
3074 When the encoding is recognized, it is changed to the standard name.
3075 For example "Latin-1" becomes "latin1", "ISO_88592" becomes
3076 "iso-8859-2" and "utf8" becomes "utf-8".
3077
3078 Note: "latin1" is also used when the encoding could not be detected.
3079 This only works when editing files in the same encoding! When the
3080 actual character set is not latin1, make sure 'fileencoding' and
3081 'fileencodings' are empty. When conversion is needed, switch to using
3082 utf-8.
3083
3084 When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8.
3085 You don't notice this while editing, but it does matter for the
3086 |viminfo-file|. And Vim expects the terminal to use utf-8 too. Thus
3087 setting 'encoding' to one of these values instead of utf-8 only has
3088 effect for encoding used for files when 'fileencoding' is empty.
3089
Bram Moolenaar661b1822005-07-28 22:36:45 +00003090 When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
3091 not set yet, the default for 'fileencodings' is changed.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003092
Bram Moolenaar6ebe4f92022-10-28 20:47:54 +01003093 *'endoffile'* *'eof'* *'noendoffile'* *'noeof'*
Bram Moolenaar0aad88f2022-11-12 11:54:26 +00003094'endoffile' 'eof' boolean (default off)
Bram Moolenaar071d4272004-06-13 20:20:40 +00003095 local to buffer
Bram Moolenaar6ebe4f92022-10-28 20:47:54 +01003096 Indicates that a CTRL-Z character was found at the end of the file
3097 when reading it. Normally only happens when 'fileformat' is "dos".
Bram Moolenaar071d4272004-06-13 20:20:40 +00003098 When writing a file and this option is off and the 'binary' option
Bram Moolenaar6ebe4f92022-10-28 20:47:54 +01003099 is on, or 'fixeol' option is off, no CTRL-Z will be written at the
Bram Moolenaarfb0cf232022-10-22 11:25:19 +01003100 end of the file.
K.Takata3af98212022-11-01 20:36:19 +00003101 See |eol-and-eof| for example settings.
Bram Moolenaarfb0cf232022-10-22 11:25:19 +01003102
3103 *'endofline'* *'eol'* *'noendofline'* *'noeol'*
3104'endofline' 'eol' boolean (default on)
3105 local to buffer
3106 When writing a file and this option is off and the 'binary' option
Bram Moolenaar34d72d42015-07-17 14:18:08 +02003107 is on, or 'fixeol' option is off, no <EOL> will be written for the
3108 last line in the file. This option is automatically set or reset when
3109 starting to edit a new file, depending on whether file has an <EOL>
3110 for the last line in the file. Normally you don't have to set or
3111 reset this option.
3112 When 'binary' is off and 'fixeol' is on the value is not used when
3113 writing the file. When 'binary' is on or 'fixeol' is off it is used
3114 to remember the presence of a <EOL> for the last line in the file, so
3115 that when you write the file the situation from the original file can
3116 be kept. But you can change it if you want to.
K.Takata3af98212022-11-01 20:36:19 +00003117 See |eol-and-eof| for example settings.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003118
3119 *'equalalways'* *'ea'* *'noequalalways'* *'noea'*
3120'equalalways' 'ea' boolean (default on)
3121 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003122 When on, all the windows are automatically made the same size after
Bram Moolenaar009b2592004-10-24 19:18:58 +00003123 splitting or closing a window. This also happens the moment the
3124 option is switched on. When off, splitting a window will reduce the
3125 size of the current window and leave the other windows the same. When
3126 closing a window the extra lines are given to the window next to it
3127 (depending on 'splitbelow' and 'splitright').
Bram Moolenaar071d4272004-06-13 20:20:40 +00003128 When mixing vertically and horizontally split windows, a minimal size
3129 is computed and some windows may be larger if there is room. The
3130 'eadirection' option tells in which direction the size is affected.
Bram Moolenaar67f71312007-08-12 14:55:56 +00003131 Changing the height and width of a window can be avoided by setting
3132 'winfixheight' and 'winfixwidth', respectively.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003133 If a window size is specified when creating a new window sizes are
3134 currently not equalized (it's complicated, but may be implemented in
3135 the future).
Bram Moolenaar071d4272004-06-13 20:20:40 +00003136
3137 *'equalprg'* *'ep'*
3138'equalprg' 'ep' string (default "")
3139 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003140 External program to use for "=" command. When this option is empty
Bram Moolenaar446cb832008-06-24 21:56:24 +00003141 the internal formatting functions are used; either 'lisp', 'cindent'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003142 or 'indentexpr'. When Vim was compiled without internal formatting,
3143 the "indent" program is used.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003144 Environment variables are expanded |:set_env|. See |option-backslash|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003145 about including spaces and backslashes.
3146 This option cannot be set from a |modeline| or in the |sandbox|, for
3147 security reasons.
3148
3149 *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'*
3150'errorbells' 'eb' boolean (default off)
3151 global
3152 Ring the bell (beep or screen flash) for error messages. This only
3153 makes a difference for error messages, the bell will be used always
3154 for a lot of errors without a message (e.g., hitting <Esc> in Normal
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003155 mode). See 'visualbell' on how to make the bell behave like a beep,
Bram Moolenaar165bc692015-07-21 17:53:25 +02003156 screen flash or do nothing. See 'belloff' to finetune when to ring the
3157 bell.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003158
3159 *'errorfile'* *'ef'*
3160'errorfile' 'ef' string (Amiga default: "AztecC.Err",
3161 others: "errors.err")
3162 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003163 {not available when compiled without the |+quickfix|
3164 feature}
3165 Name of the errorfile for the QuickFix mode (see |:cf|).
3166 When the "-q" command-line argument is used, 'errorfile' is set to the
3167 following argument. See |-q|.
3168 NOT used for the ":make" command. See 'makeef' for that.
3169 Environment variables are expanded |:set_env|.
3170 See |option-backslash| about including spaces and backslashes.
3171 This option cannot be set from a |modeline| or in the |sandbox|, for
3172 security reasons.
3173
3174 *'errorformat'* *'efm'*
3175'errorformat' 'efm' string (default is very long)
3176 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003177 {not available when compiled without the |+quickfix|
3178 feature}
3179 Scanf-like description of the format for the lines in the error file
3180 (see |errorformat|).
3181
3182 *'esckeys'* *'ek'* *'noesckeys'* *'noek'*
3183'esckeys' 'ek' boolean (Vim default: on, Vi default: off)
3184 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003185 Function keys that start with an <Esc> are recognized in Insert
3186 mode. When this option is off, the cursor and function keys cannot be
3187 used in Insert mode if they start with an <Esc>. The advantage of
3188 this is that the single <Esc> is recognized immediately, instead of
3189 after one second. Instead of resetting this option, you might want to
3190 try changing the values for 'timeoutlen' and 'ttimeoutlen'. Note that
3191 when 'esckeys' is off, you can still map anything, but the cursor keys
3192 won't work by default.
3193 NOTE: This option is set to the Vi default value when 'compatible' is
3194 set and to the Vim default value when 'compatible' is reset.
Bram Moolenaarc8234772019-11-10 21:00:27 +01003195 NOTE: when this option is off then the |modifyOtherKeys| functionality
3196 is disabled while in Insert mode to avoid ending Insert mode with any
3197 key that has a modifier.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003198
3199 *'eventignore'* *'ei'*
3200'eventignore' 'ei' string (default "")
3201 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003202 A list of autocommand event names, which are to be ignored.
Bram Moolenaarf193fff2006-04-27 00:02:13 +00003203 When set to "all" or when "all" is one of the items, all autocommand
3204 events are ignored, autocommands will not be executed.
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01003205 Otherwise this is a comma-separated list of event names. Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00003206 :set ei=WinEnter,WinLeave
3207<
3208 *'expandtab'* *'et'* *'noexpandtab'* *'noet'*
3209'expandtab' 'et' boolean (default off)
3210 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00003211 In Insert mode: Use the appropriate number of spaces to insert a
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003212 <Tab>. Spaces are used in indents with the '>' and '<' commands and
Bram Moolenaar071d4272004-06-13 20:20:40 +00003213 when 'autoindent' is on. To insert a real tab when 'expandtab' is
3214 on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|.
Bram Moolenaarca635012015-09-25 20:34:21 +02003215 This option is reset when the 'paste' option is set and restored when
3216 the 'paste' option is reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003217 NOTE: This option is reset when 'compatible' is set.
3218
3219 *'exrc'* *'ex'* *'noexrc'* *'noex'*
3220'exrc' 'ex' boolean (default off)
3221 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003222 Enables the reading of .vimrc, .exrc and .gvimrc in the current
Bram Moolenaar36f44c22016-08-28 18:17:20 +02003223 directory.
3224
3225 Setting this option is a potential security leak. E.g., consider
3226 unpacking a package or fetching files from github, a .vimrc in there
3227 might be a trojan horse. BETTER NOT SET THIS OPTION!
3228 Instead, define an autocommand in your .vimrc to set options for a
3229 matching directory.
3230
3231 If you do switch this option on you should also consider setting the
3232 'secure' option (see |initialization|).
3233 Also see |.vimrc| and |gui-init|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003234 This option cannot be set from a |modeline| or in the |sandbox|, for
3235 security reasons.
3236
3237 *'fileencoding'* *'fenc'* *E213*
3238'fileencoding' 'fenc' string (default: "")
3239 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00003240 Sets the character encoding for the file of this buffer.
Bram Moolenaar865242e2010-07-14 21:12:05 +02003241
Bram Moolenaar071d4272004-06-13 20:20:40 +00003242 When 'fileencoding' is different from 'encoding', conversion will be
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003243 done when writing the file. For reading see below.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003244 When 'fileencoding' is empty, the same value as 'encoding' will be
3245 used (no conversion when reading or writing a file).
Bram Moolenaar214641f2017-03-05 17:04:09 +01003246 No error will be given when the value is set, only when it is used,
3247 only when writing a file.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003248 Conversion will also be done when 'encoding' and 'fileencoding' are
3249 both a Unicode encoding and 'fileencoding' is not utf-8. That's
3250 because internally Unicode is always stored as utf-8.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003251 WARNING: Conversion can cause loss of information! When
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003252 'encoding' is "utf-8" or another Unicode encoding, conversion
3253 is most likely done in a way that the reverse conversion
3254 results in the same text. When 'encoding' is not "utf-8" some
3255 characters may be lost!
Bram Moolenaar865242e2010-07-14 21:12:05 +02003256
Bram Moolenaar071d4272004-06-13 20:20:40 +00003257 See 'encoding' for the possible values. Additionally, values may be
3258 specified that can be handled by the converter, see
3259 |mbyte-conversion|.
Bram Moolenaar865242e2010-07-14 21:12:05 +02003260
Bram Moolenaar071d4272004-06-13 20:20:40 +00003261 When reading a file 'fileencoding' will be set from 'fileencodings'.
3262 To read a file in a certain encoding it won't work by setting
Bram Moolenaar02467872007-05-06 13:22:01 +00003263 'fileencoding', use the |++enc| argument. One exception: when
3264 'fileencodings' is empty the value of 'fileencoding' is used.
Bram Moolenaara23ccb82006-02-27 00:08:02 +00003265 For a new file the global value of 'fileencoding' is used.
Bram Moolenaar865242e2010-07-14 21:12:05 +02003266
Bram Moolenaar071d4272004-06-13 20:20:40 +00003267 Prepending "8bit-" and "2byte-" has no meaning here, they are ignored.
3268 When the option is set, the value is converted to lowercase. Thus
3269 you can set it with uppercase values too. '_' characters are
3270 replaced with '-'. If a name is recognized from the list for
3271 'encoding', it is replaced by the standard name. For example
3272 "ISO8859-2" becomes "iso-8859-2".
Bram Moolenaar865242e2010-07-14 21:12:05 +02003273
Bram Moolenaar071d4272004-06-13 20:20:40 +00003274 When this option is set, after starting to edit a file, the 'modified'
3275 option is set, because the file would be different when written.
Bram Moolenaar865242e2010-07-14 21:12:05 +02003276
3277 Keep in mind that changing 'fenc' from a modeline happens
3278 AFTER the text has been read, thus it applies to when the file will be
3279 written. If you do set 'fenc' in a modeline, you might want to set
3280 'nomodified' to avoid not being able to ":q".
3281
Bram Moolenaar071d4272004-06-13 20:20:40 +00003282 This option can not be changed when 'modifiable' is off.
3283
3284 *'fe'*
3285 NOTE: Before version 6.0 this option specified the encoding for the
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003286 whole of Vim, this was a mistake. Now use 'encoding' instead. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00003287 old short name was 'fe', which is no longer used.
3288
3289 *'fileencodings'* *'fencs'*
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00003290'fileencodings' 'fencs' string (default: "ucs-bom",
3291 "ucs-bom,utf-8,default,latin1" when
3292 'encoding' is set to a Unicode value)
Bram Moolenaar071d4272004-06-13 20:20:40 +00003293 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003294 This is a list of character encodings considered when starting to edit
3295 an existing file. When a file is read, Vim tries to use the first
3296 mentioned character encoding. If an error is detected, the next one
3297 in the list is tried. When an encoding is found that works,
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003298 'fileencoding' is set to it. If all fail, 'fileencoding' is set to
Bram Moolenaar071d4272004-06-13 20:20:40 +00003299 an empty string, which means the value of 'encoding' is used.
3300 WARNING: Conversion can cause loss of information! When
3301 'encoding' is "utf-8" (or one of the other Unicode variants)
3302 conversion is most likely done in a way that the reverse
3303 conversion results in the same text. When 'encoding' is not
Bram Moolenaarc6d8db72005-12-13 20:04:55 +00003304 "utf-8" some non-ASCII characters may be lost! You can use
3305 the |++bad| argument to specify what is done with characters
3306 that can't be converted.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003307 For an empty file or a file with only ASCII characters most encodings
3308 will work and the first entry of 'fileencodings' will be used (except
3309 "ucs-bom", which requires the BOM to be present). If you prefer
3310 another encoding use an BufReadPost autocommand event to test if your
3311 preferred encoding is to be used. Example: >
3312 au BufReadPost * if search('\S', 'w') == 0 |
3313 \ set fenc=iso-2022-jp | endif
3314< This sets 'fileencoding' to "iso-2022-jp" if the file does not contain
3315 non-blank characters.
Bram Moolenaarc6d8db72005-12-13 20:04:55 +00003316 When the |++enc| argument is used then the value of 'fileencodings' is
3317 not used.
Bram Moolenaara23ccb82006-02-27 00:08:02 +00003318 Note that 'fileencodings' is not used for a new file, the global value
3319 of 'fileencoding' is used instead. You can set it with: >
3320 :setglobal fenc=iso-8859-2
3321< This means that a non-existing file may get a different encoding than
3322 an empty file.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003323 The special value "ucs-bom" can be used to check for a Unicode BOM
3324 (Byte Order Mark) at the start of the file. It must not be preceded
3325 by "utf-8" or another Unicode encoding for this to work properly.
3326 An entry for an 8-bit encoding (e.g., "latin1") should be the last,
3327 because Vim cannot detect an error, thus the encoding is always
3328 accepted.
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00003329 The special value "default" can be used for the encoding from the
K.Takataef8706f2021-05-31 18:40:49 +02003330 environment. On MS-Windows this is the system encoding. Otherwise
3331 this is the default value for 'encoding'. It is useful when
3332 'encoding' is set to "utf-8" and your environment uses a non-latin1
3333 encoding, such as Russian.
Bram Moolenaarca003e12006-03-17 23:19:38 +00003334 When 'encoding' is "utf-8" and a file contains an illegal byte
3335 sequence it won't be recognized as UTF-8. You can use the |8g8|
3336 command to find the illegal byte sequence.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003337 WRONG VALUES: WHAT'S WRONG:
3338 latin1,utf-8 "latin1" will always be used
3339 utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8
3340 file
3341 cp1250,latin1 "cp1250" will always be used
3342 If 'fileencodings' is empty, 'fileencoding' is not modified.
3343 See 'fileencoding' for the possible values.
3344 Setting this option does not have an effect until the next time a file
3345 is read.
3346
3347 *'fileformat'* *'ff'*
Bram Moolenaar00590742019-02-15 21:06:09 +01003348'fileformat' 'ff' string (MS-Windows default: "dos",
3349 Unix, macOS default: "unix")
Bram Moolenaar071d4272004-06-13 20:20:40 +00003350 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00003351 This gives the <EOL> of the current buffer, which is used for
3352 reading/writing the buffer from/to a file:
Bram Moolenaar4072ba52020-12-23 13:56:35 +01003353 dos <CR><NL>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003354 unix <NL>
3355 mac <CR>
3356 When "dos" is used, CTRL-Z at the end of a file is ignored.
3357 See |file-formats| and |file-read|.
3358 For the character encoding of the file see 'fileencoding'.
3359 When 'binary' is set, the value of 'fileformat' is ignored, file I/O
Bram Moolenaarbf884932013-04-05 22:26:15 +02003360 works like it was set to "unix".
Bram Moolenaar071d4272004-06-13 20:20:40 +00003361 This option is set automatically when starting to edit a file and
3362 'fileformats' is not empty and 'binary' is off.
3363 When this option is set, after starting to edit a file, the 'modified'
3364 option is set, because the file would be different when written.
3365 This option can not be changed when 'modifiable' is off.
3366 For backwards compatibility: When this option is set to "dos",
3367 'textmode' is set, otherwise 'textmode' is reset.
3368
3369 *'fileformats'* *'ffs'*
3370'fileformats' 'ffs' string (default:
Bram Moolenaar00590742019-02-15 21:06:09 +01003371 Vim+Vi MS-Windows: "dos,unix",
3372 Vim Unix, macOS: "unix,dos",
Bram Moolenaar071d4272004-06-13 20:20:40 +00003373 Vi Cygwin: "unix,dos",
3374 Vi others: "")
3375 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003376 This gives the end-of-line (<EOL>) formats that will be tried when
3377 starting to edit a new buffer and when reading a file into an existing
3378 buffer:
3379 - When empty, the format defined with 'fileformat' will be used
3380 always. It is not set automatically.
3381 - When set to one name, that format will be used whenever a new buffer
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003382 is opened. 'fileformat' is set accordingly for that buffer. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00003383 'fileformats' name will be used when a file is read into an existing
3384 buffer, no matter what 'fileformat' for that buffer is set to.
3385 - When more than one name is present, separated by commas, automatic
3386 <EOL> detection will be done when reading a file. When starting to
3387 edit a file, a check is done for the <EOL>:
3388 1. If all lines end in <CR><NL>, and 'fileformats' includes "dos",
3389 'fileformat' is set to "dos".
3390 2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003391 is set to "unix". Note that when a <NL> is found without a
Bram Moolenaar071d4272004-06-13 20:20:40 +00003392 preceding <CR>, "unix" is preferred over "dos".
Bram Moolenaar2b8388b2015-02-28 13:11:45 +01003393 3. If 'fileformat' has not yet been set, and if a <CR> is found, and
3394 if 'fileformats' includes "mac", 'fileformat' is set to "mac".
Bram Moolenaar00659062010-09-21 22:34:02 +02003395 This means that "mac" is only chosen when:
3396 "unix" is not present or no <NL> is found in the file, and
3397 "dos" is not present or no <CR><NL> is found in the file.
3398 Except: if "unix" was chosen, but there is a <CR> before
3399 the first <NL>, and there appear to be more <CR>s than <NL>s in
Bram Moolenaar166af9b2010-11-16 20:34:40 +01003400 the first few lines, "mac" is used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003401 4. If 'fileformat' is still not set, the first name from
3402 'fileformats' is used.
3403 When reading a file into an existing buffer, the same is done, but
3404 this happens like 'fileformat' has been set appropriately for that
3405 file only, the option is not changed.
3406 When 'binary' is set, the value of 'fileformats' is not used.
3407
Bram Moolenaar4f3f6682016-03-26 23:01:59 +01003408 When Vim starts up with an empty buffer the first item is used. You
3409 can overrule this by setting 'fileformat' in your .vimrc.
Bram Moolenaar81af9252010-12-10 20:35:50 +01003410
Bram Moolenaar071d4272004-06-13 20:20:40 +00003411 For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
3412 are ":source"ed and for vimrc files, automatic <EOL> detection may be
3413 done:
3414 - When 'fileformats' is empty, there is no automatic detection. Dos
3415 format will be used.
3416 - When 'fileformats' is set to one or more names, automatic detection
3417 is done. This is based on the first <NL> in the file: If there is a
3418 <CR> in front of it, Dos format is used, otherwise Unix format is
3419 used.
3420 Also see |file-formats|.
3421 For backwards compatibility: When this option is set to an empty
3422 string or one format (no comma is included), 'textauto' is reset,
3423 otherwise 'textauto' is set.
3424 NOTE: This option is set to the Vi default value when 'compatible' is
3425 set and to the Vim default value when 'compatible' is reset.
3426
Bram Moolenaarbf884932013-04-05 22:26:15 +02003427 *'fileignorecase'* *'fic'* *'nofileignorecase'* *'nofic'*
3428'fileignorecase' 'fic' boolean (default on for systems where case in file
3429 names is normally ignored)
Bram Moolenaar71afbfe2013-03-19 16:49:16 +01003430 global
Bram Moolenaar71afbfe2013-03-19 16:49:16 +01003431 When set case is ignored when using file names and directories.
3432 See 'wildignorecase' for only ignoring case when doing completion.
3433
Bram Moolenaar071d4272004-06-13 20:20:40 +00003434 *'filetype'* *'ft'*
3435'filetype' 'ft' string (default: "")
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02003436 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003437 When this option is set, the FileType autocommand event is triggered.
3438 All autocommands that match with the value of this option will be
3439 executed. Thus the value of 'filetype' is used in place of the file
3440 name.
3441 Otherwise this option does not always reflect the current file type.
3442 This option is normally set when the file type is detected. To enable
3443 this use the ":filetype on" command. |:filetype|
3444 Setting this option to a different value is most useful in a modeline,
3445 for a file for which the file type is not automatically recognized.
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00003446 Example, for in an IDL file:
3447 /* vim: set filetype=idl : */ ~
3448 |FileType| |filetypes|
3449 When a dot appears in the value then this separates two filetype
3450 names. Example:
3451 /* vim: set filetype=c.doxygen : */ ~
3452 This will use the "c" filetype first, then the "doxygen" filetype.
3453 This works both for filetype plugins and for syntax files. More than
3454 one dot may appear.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003455 This option is not copied to another buffer, independent of the 's' or
3456 'S' flag in 'cpoptions'.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00003457 Only normal file name characters can be used, "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003458
3459 *'fillchars'* *'fcs'*
Bram Moolenaara98f8a22021-02-13 18:24:23 +01003460'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
Bram Moolenaar96ba25a2022-07-04 17:34:33 +01003461 global or local to window |global-local|
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02003462 {not available when compiled without the |+folding|
3463 feature}
Bram Moolenaar96ba25a2022-07-04 17:34:33 +01003464 Characters to fill the statuslines, vertical separators and special
3465 lines in the window.
3466 It is a comma-separated list of items. Each item has a name, a colon
3467 and the value of that item:
Bram Moolenaar071d4272004-06-13 20:20:40 +00003468
Bram Moolenaar96ba25a2022-07-04 17:34:33 +01003469 item name default Used for ~
3470 stl ' ' or '^' statusline of the current window
3471 stlnc ' ' or '=' statusline of the non-current windows
3472 vert '|' vertical separators |:vsplit|
3473 fold '-' filling 'foldtext'
3474 foldopen '-' mark the beginning of a fold
3475 foldclose '+' show a closed fold
3476 foldsep '|' open fold middle character
3477 diff '-' deleted lines of the 'diff' option
3478 eob '~' empty lines below the end of a buffer
Bram Moolenaar4ba5f1d2022-10-04 14:36:29 +01003479 lastline '@' 'display' contains lastline/truncate
Bram Moolenaar071d4272004-06-13 20:20:40 +00003480
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003481 Any one that is omitted will fall back to the default. For "stl" and
Bram Moolenaar38a55632016-02-15 22:07:32 +01003482 "stlnc" the space will be used when there is highlighting, '^' or '='
Bram Moolenaar071d4272004-06-13 20:20:40 +00003483 otherwise.
3484
3485 Example: >
Bram Moolenaar38a55632016-02-15 22:07:32 +01003486 :set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
Bram Moolenaar071d4272004-06-13 20:20:40 +00003487< This is similar to the default, except that these characters will also
3488 be used when there is highlighting.
3489
Bram Moolenaar8cc5b552022-06-23 13:04:20 +01003490 For the "stl", "stlnc", "foldopen", "foldclose" and "foldsep" items
3491 single-byte and multibyte characters are supported. But double-width
3492 characters are not supported.
Bram Moolenaar910f66f2006-04-05 20:41:53 +00003493
Bram Moolenaar071d4272004-06-13 20:20:40 +00003494 The highlighting used for these items:
Bram Moolenaar96ba25a2022-07-04 17:34:33 +01003495 item name highlight group ~
3496 stl StatusLine |hl-StatusLine|
3497 stlnc StatusLineNC |hl-StatusLineNC|
3498 vert VertSplit |hl-VertSplit|
3499 fold Folded |hl-Folded|
3500 diff DiffDelete |hl-DiffDelete|
3501 eob EndOfBuffer |hl-EndOfBuffer|
Bram Moolenaar4ba5f1d2022-10-04 14:36:29 +01003502 lastline NonText |hl-NonText|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003503
Bram Moolenaar34d72d42015-07-17 14:18:08 +02003504 *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
3505'fixendofline' 'fixeol' boolean (default on)
3506 local to buffer
Bram Moolenaar34d72d42015-07-17 14:18:08 +02003507 When writing a file and this option is on, <EOL> at the end of file
Bram Moolenaarfb0cf232022-10-22 11:25:19 +01003508 will be restored if missing. Turn this option off if you want to
Bram Moolenaar34d72d42015-07-17 14:18:08 +02003509 preserve the situation from the original file.
3510 When the 'binary' option is set the value of this option doesn't
3511 matter.
3512 See the 'endofline' option.
K.Takata3af98212022-11-01 20:36:19 +00003513 See |eol-and-eof| for example settings.
Bram Moolenaar34d72d42015-07-17 14:18:08 +02003514
Bram Moolenaar071d4272004-06-13 20:20:40 +00003515 *'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
Bram Moolenaar98a29d02021-01-18 19:55:44 +01003516'fkmap' 'fk' boolean (default off)
Bram Moolenaar071d4272004-06-13 20:20:40 +00003517 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003518 {only available when compiled with the |+rightleft|
3519 feature}
Bram Moolenaar14184a32019-02-16 15:10:30 +01003520 This option was for using Farsi, which has been removed. See
3521 |farsi.txt|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003522
3523 *'foldclose'* *'fcl'*
3524'foldclose' 'fcl' string (default "")
3525 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003526 {not available when compiled without the |+folding|
3527 feature}
3528 When set to "all", a fold is closed when the cursor isn't in it and
3529 its level is higher than 'foldlevel'. Useful if you want folds to
3530 automatically close when moving out of them.
3531
3532 *'foldcolumn'* *'fdc'*
3533'foldcolumn' 'fdc' number (default 0)
3534 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003535 {not available when compiled without the |+folding|
3536 feature}
3537 When non-zero, a column with the specified width is shown at the side
3538 of the window which indicates open and closed folds. The maximum
3539 value is 12.
3540 See |folding|.
3541
3542 *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'*
3543'foldenable' 'fen' boolean (default on)
3544 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003545 {not available when compiled without the |+folding|
3546 feature}
3547 When off, all folds are open. This option can be used to quickly
3548 switch between showing all text unfolded and viewing the text with
3549 folds (including manually opened or closed folds). It can be toggled
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003550 with the |zi| command. The 'foldcolumn' will remain blank when
Bram Moolenaar071d4272004-06-13 20:20:40 +00003551 'foldenable' is off.
3552 This option is set by commands that create a new fold or close a fold.
3553 See |folding|.
3554
3555 *'foldexpr'* *'fde'*
3556'foldexpr' 'fde' string (default: "0")
3557 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003558 {not available when compiled without the |+folding|
Bram Moolenaardb84e452010-08-15 13:50:43 +02003559 or |+eval| features}
Bram Moolenaar071d4272004-06-13 20:20:40 +00003560 The expression used for when 'foldmethod' is "expr". It is evaluated
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00003561 for each line to obtain its fold level. The context is set to the
3562 script where 'foldexpr' was set, script-local items can be accessed.
3563 See |fold-expr| for the usage.
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00003564
Bram Moolenaar30b65812012-07-12 22:01:11 +02003565 The expression will be evaluated in the |sandbox| if set from a
3566 modeline, see |sandbox-option|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003567 This option can't be set from a |modeline| when the 'diff' option is
Bram Moolenaar110289e2019-05-23 15:38:06 +02003568 on or the 'modelineexpr' option is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00003569
3570 It is not allowed to change text or jump to another window while
3571 evaluating 'foldexpr' |textlock|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003572
3573 *'foldignore'* *'fdi'*
3574'foldignore' 'fdi' string (default: "#")
3575 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003576 {not available when compiled without the |+folding|
3577 feature}
3578 Used only when 'foldmethod' is "indent". Lines starting with
3579 characters in 'foldignore' will get their fold level from surrounding
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003580 lines. White space is skipped before checking for this character.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003581 The default "#" works well for C programs. See |fold-indent|.
3582
3583 *'foldlevel'* *'fdl'*
3584'foldlevel' 'fdl' number (default: 0)
3585 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003586 {not available when compiled without the |+folding|
3587 feature}
3588 Sets the fold level: Folds with a higher level will be closed.
3589 Setting this option to zero will close all folds. Higher numbers will
3590 close fewer folds.
3591 This option is set by commands like |zm|, |zM| and |zR|.
3592 See |fold-foldlevel|.
3593
3594 *'foldlevelstart'* *'fdls'*
3595'foldlevelstart' 'fdls' number (default: -1)
3596 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003597 {not available when compiled without the |+folding|
3598 feature}
3599 Sets 'foldlevel' when starting to edit another buffer in a window.
3600 Useful to always start editing with all folds closed (value zero),
3601 some folds closed (one) or no folds closed (99).
3602 This is done before reading any modeline, thus a setting in a modeline
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003603 overrules this option. Starting to edit a file for |diff-mode| also
Bram Moolenaar071d4272004-06-13 20:20:40 +00003604 ignores this option and closes all folds.
3605 It is also done before BufReadPre autocommands, to allow an autocmd to
3606 overrule the 'foldlevel' value for specific files.
3607 When the value is negative, it is not used.
3608
3609 *'foldmarker'* *'fmr'* *E536*
3610'foldmarker' 'fmr' string (default: "{{{,}}}")
3611 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003612 {not available when compiled without the |+folding|
3613 feature}
3614 The start and end marker used when 'foldmethod' is "marker". There
3615 must be one comma, which separates the start and end marker. The
3616 marker is a literal string (a regular expression would be too slow).
3617 See |fold-marker|.
3618
3619 *'foldmethod'* *'fdm'*
3620'foldmethod' 'fdm' string (default: "manual")
3621 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003622 {not available when compiled without the |+folding|
3623 feature}
3624 The kind of folding used for the current window. Possible values:
3625 |fold-manual| manual Folds are created manually.
3626 |fold-indent| indent Lines with equal indent form a fold.
3627 |fold-expr| expr 'foldexpr' gives the fold level of a line.
3628 |fold-marker| marker Markers are used to specify folds.
3629 |fold-syntax| syntax Syntax highlighting items specify folds.
3630 |fold-diff| diff Fold text that is not changed.
3631
3632 *'foldminlines'* *'fml'*
3633'foldminlines' 'fml' number (default: 1)
3634 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003635 {not available when compiled without the |+folding|
3636 feature}
Bram Moolenaar00654022011-02-25 14:42:19 +01003637 Sets the number of screen lines above which a fold can be displayed
3638 closed. Also for manually closed folds. With the default value of
3639 one a fold can only be closed if it takes up two or more screen lines.
3640 Set to zero to be able to close folds of just one screen line.
Bram Moolenaar446beb42011-05-10 17:18:44 +02003641 Note that this only has an effect on what is displayed. After using
Bram Moolenaar071d4272004-06-13 20:20:40 +00003642 "zc" to close a fold, which is displayed open because it's smaller
3643 than 'foldminlines', a following "zc" may close a containing fold.
3644
3645 *'foldnestmax'* *'fdn'*
3646'foldnestmax' 'fdn' number (default: 20)
3647 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003648 {not available when compiled without the |+folding|
3649 feature}
3650 Sets the maximum nesting of folds for the "indent" and "syntax"
3651 methods. This avoids that too many folds will be created. Using more
3652 than 20 doesn't work, because the internal limit is 20.
3653
3654 *'foldopen'* *'fdo'*
3655'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix,
3656 search,tag,undo")
3657 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003658 {not available when compiled without the |+folding|
3659 feature}
3660 Specifies for which type of commands folds will be opened, if the
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01003661 command moves the cursor into a closed fold. It is a comma-separated
Bram Moolenaar071d4272004-06-13 20:20:40 +00003662 list of items.
Bram Moolenaar05365702010-10-27 18:34:44 +02003663 NOTE: When the command is part of a mapping this option is not used.
3664 Add the |zv| command to the mapping to get the same effect.
3665 (rationale: the mapping may want to control opening folds itself)
3666
Bram Moolenaar071d4272004-06-13 20:20:40 +00003667 item commands ~
3668 all any
3669 block "(", "{", "[[", "[{", etc.
3670 hor horizontal movements: "l", "w", "fx", etc.
3671 insert any command in Insert mode
3672 jump far jumps: "G", "gg", etc.
3673 mark jumping to a mark: "'m", CTRL-O, etc.
3674 percent "%"
3675 quickfix ":cn", ":crew", ":make", etc.
3676 search search for a pattern: "/", "n", "*", "gd", etc.
3677 (not for a search pattern in a ":" command)
Bram Moolenaar910f66f2006-04-05 20:41:53 +00003678 Also for |[s| and |]s|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003679 tag jumping to a tag: ":ta", CTRL-T, etc.
3680 undo undo or redo: "u" and CTRL-R
Bram Moolenaar071d4272004-06-13 20:20:40 +00003681 When a movement command is used for an operator (e.g., "dl" or "y%")
3682 this option is not used. This means the operator will include the
3683 whole closed fold.
3684 Note that vertical movements are not here, because it would make it
3685 very difficult to move onto a closed fold.
3686 In insert mode the folds containing the cursor will always be open
3687 when text is inserted.
3688 To close folds you can re-apply 'foldlevel' with the |zx| command or
3689 set the 'foldclose' option to "all".
3690
3691 *'foldtext'* *'fdt'*
3692'foldtext' 'fdt' string (default: "foldtext()")
3693 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00003694 {not available when compiled without the |+folding|
3695 feature}
3696 An expression which is used to specify the text displayed for a closed
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00003697 fold. The context is set to the script where 'foldexpr' was set,
3698 script-local items can be accessed. See |fold-foldtext| for the
3699 usage.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003700
Bram Moolenaar30b65812012-07-12 22:01:11 +02003701 The expression will be evaluated in the |sandbox| if set from a
3702 modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02003703 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00003704
3705 It is not allowed to change text or jump to another window while
3706 evaluating 'foldtext' |textlock|.
3707
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003708 *'formatexpr'* *'fex'*
3709'formatexpr' 'fex' string (default "")
3710 local to buffer
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003711 {not available when compiled without the |+eval|
3712 feature}
3713 Expression which is evaluated to format a range of lines for the |gq|
3714 operator or automatic formatting (see 'formatoptions'). When this
3715 option is empty 'formatprg' is used.
3716
3717 The |v:lnum| variable holds the first line to be formatted.
3718 The |v:count| variable holds the number of lines to be formatted.
3719 The |v:char| variable holds the character that is going to be
3720 inserted if the expression is being evaluated due to
3721 automatic formatting. This can be empty. Don't insert
3722 it yet!
3723
3724 Example: >
3725 :set formatexpr=mylang#Format()
3726< This will invoke the mylang#Format() function in the
3727 autoload/mylang.vim file in 'runtimepath'. |autoload|
3728
Bram Moolenaara4e0b972022-10-01 19:43:52 +01003729 The advantage of using a function call without arguments is that it is
3730 faster, see |expr-option-function|.
3731
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003732 The expression is also evaluated when 'textwidth' is set and adding
3733 text beyond that limit. This happens under the same conditions as
3734 when internal formatting is used. Make sure the cursor is kept in the
3735 same spot relative to the text then! The |mode()| function will
3736 return "i" or "R" in this situation.
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01003737
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003738 When the expression evaluates to non-zero Vim will fall back to using
3739 the internal format mechanism.
3740
Yegappan Lakshmanan8bb65f22021-12-26 10:51:39 +00003741 If the expression starts with s: or |<SID>|, then it is replaced with
3742 the script ID (|local-function|). Example: >
3743 set formatexpr=s:MyFormatExpr()
3744 set formatexpr=<SID>SomeFormatExpr()
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00003745< Otherwise, the expression is evaluated in the context of the script
3746 where the option was set, thus script-local items are available.
3747
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003748 The expression will be evaluated in the |sandbox| when set from a
3749 modeline, see |sandbox-option|. That stops the option from working,
3750 since changing the buffer text is not allowed.
Bram Moolenaar110289e2019-05-23 15:38:06 +02003751 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaar036986f2017-03-16 17:41:02 +01003752 NOTE: This option is set to "" when 'compatible' is set.
Bram Moolenaarc95a3022016-06-12 23:01:46 +02003753
Bram Moolenaar86b68352004-12-27 21:59:20 +00003754 *'formatlistpat'* *'flp'*
3755'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*")
3756 local to buffer
Bram Moolenaar86b68352004-12-27 21:59:20 +00003757 A pattern that is used to recognize a list header. This is used for
3758 the "n" flag in 'formatoptions'.
3759 The pattern must match exactly the text that will be the indent for
Bram Moolenaar677ee682005-01-27 14:41:15 +00003760 the line below it. You can use |/\ze| to mark the end of the match
Bram Moolenaar86b68352004-12-27 21:59:20 +00003761 while still checking more characters. There must be a character
3762 following the pattern, when it matches the whole line it is handled
3763 like there is no match.
3764 The default recognizes a number, followed by an optional punctuation
3765 character and white space.
3766
Bram Moolenaar6c60f472019-04-28 16:00:35 +02003767 *'formatoptions'* *'fo'*
3768'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
3769 local to buffer
3770 This is a sequence of letters which describes how automatic
3771 formatting is to be done. See |fo-table|. When the 'paste' option is
3772 on, no formatting is done (like 'formatoptions' is empty). Commas can
3773 be inserted for readability.
3774 To avoid problems with flags that are added in the future, use the
3775 "+=" and "-=" feature of ":set" |add-option-flags|.
3776 NOTE: This option is set to the Vi default value when 'compatible' is
3777 set and to the Vim default value when 'compatible' is reset.
3778
Bram Moolenaar071d4272004-06-13 20:20:40 +00003779 *'formatprg'* *'fp'*
3780'formatprg' 'fp' string (default "")
Bram Moolenaar9be7c042017-01-14 14:28:30 +01003781 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00003782 The name of an external program that will be used to format the lines
Bram Moolenaar1d2ba7f2006-02-14 22:29:30 +00003783 selected with the |gq| operator. The program must take the input on
Bram Moolenaar071d4272004-06-13 20:20:40 +00003784 stdin and produce the output on stdout. The Unix program "fmt" is
Bram Moolenaara5792f52005-11-23 21:25:05 +00003785 such a program.
Bram Moolenaar1d2ba7f2006-02-14 22:29:30 +00003786 If the 'formatexpr' option is not empty it will be used instead.
3787 Otherwise, if 'formatprg' option is an empty string, the internal
3788 format function will be used |C-indenting|.
Bram Moolenaara5792f52005-11-23 21:25:05 +00003789 Environment variables are expanded |:set_env|. See |option-backslash|
3790 about including spaces and backslashes.
Bram Moolenaar30b65812012-07-12 22:01:11 +02003791 This option cannot be set from a |modeline| or in the |sandbox|, for
3792 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003793
Bram Moolenaard94464e2015-11-02 15:28:18 +01003794 *'fsync'* *'fs'* *'nofsync'* *'nofs'*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00003795'fsync' 'fs' boolean (default on)
3796 global
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00003797 When on, the library function fsync() will be called after writing a
3798 file. This will flush a file to disk, ensuring that it is safely
3799 written even on filesystems which do metadata-only journaling. This
3800 will force the harddrive to spin up on Linux systems running in laptop
3801 mode, so it may be undesirable in some situations. Be warned that
3802 turning this off increases the chances of data loss after a crash. On
3803 systems without an fsync() implementation, this variable is always
3804 off.
3805 Also see 'swapsync' for controlling fsync() on swap files.
Bram Moolenaar340dd0f2021-10-14 17:52:23 +01003806 'fsync' also applies to |writefile()| (unless a flag is used to
3807 overrule it) and when writing undo files (see |undo-persistence|).
Bram Moolenaar110289e2019-05-23 15:38:06 +02003808 This option cannot be set from a |modeline| or in the |sandbox|, for
3809 security reasons.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00003810
Bram Moolenaar071d4272004-06-13 20:20:40 +00003811 *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
3812'gdefault' 'gd' boolean (default off)
3813 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003814 When on, the ":substitute" flag 'g' is default on. This means that
3815 all matches in a line are substituted instead of one. When a 'g' flag
3816 is given to a ":substitute" command, this will toggle the substitution
3817 of all or one match. See |complex-change|.
3818
3819 command 'gdefault' on 'gdefault' off ~
3820 :s/// subst. all subst. one
3821 :s///g subst. one subst. all
3822 :s///gg subst. all subst. one
3823
3824 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar21020352017-06-13 17:21:04 +02003825 DEPRECATED: Setting this option may break plugins that are not aware
3826 of this option. Also, many users get confused that adding the /g flag
3827 has the opposite effect of that it normally does.
Bram Moolenaar4072ba52020-12-23 13:56:35 +01003828 This option is not used in |Vim9| script.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003829
3830 *'grepformat'* *'gfm'*
Bram Moolenaar6e932462014-09-09 18:48:09 +02003831'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
Bram Moolenaar071d4272004-06-13 20:20:40 +00003832 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003833 Format to recognize for the ":grep" command output.
3834 This is a scanf-like string that uses the same format as the
3835 'errorformat' option: see |errorformat|.
3836
3837 *'grepprg'* *'gp'*
3838'grepprg' 'gp' string (default "grep -n ",
3839 Unix: "grep -n $* /dev/null",
3840 Win32: "findstr /n" or "grep -n",
3841 VMS: "SEARCH/NUMBERS ")
3842 global or local to buffer |global-local|
Bram Moolenaar582fd852005-03-28 20:58:01 +00003843 Program to use for the |:grep| command. This option may contain '%'
Bram Moolenaar071d4272004-06-13 20:20:40 +00003844 and '#' characters, which are expanded like when used in a command-
3845 line. The placeholder "$*" is allowed to specify where the arguments
3846 will be included. Environment variables are expanded |:set_env|. See
3847 |option-backslash| about including spaces and backslashes.
3848 When your "grep" accepts the "-H" argument, use this to make ":grep"
3849 also work well with a single file: >
3850 :set grepprg=grep\ -nH
Bram Moolenaar7c626922005-02-07 22:01:03 +00003851< Special value: When 'grepprg' is set to "internal" the |:grep| command
Bram Moolenaara6557602006-02-04 22:43:20 +00003852 works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like
3853 |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|.
Bram Moolenaar86b68352004-12-27 21:59:20 +00003854 See also the section |:make_makeprg|, since most of the comments there
Bram Moolenaar071d4272004-06-13 20:20:40 +00003855 apply equally to 'grepprg'.
3856 For Win32, the default is "findstr /n" if "findstr.exe" can be found,
3857 otherwise it's "grep -n".
3858 This option cannot be set from a |modeline| or in the |sandbox|, for
3859 security reasons.
3860
3861 *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*
3862'guicursor' 'gcr' string (default "n-v-c:block-Cursor/lCursor,
3863 ve:ver35-Cursor,
3864 o:hor50-Cursor,
3865 i-ci:ver25-Cursor/lCursor,
3866 r-cr:hor20-Cursor/lCursor,
3867 sm:block-Cursor
3868 -blinkwait175-blinkoff150-blinkon175",
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01003869 for Win32 console:
Bram Moolenaar071d4272004-06-13 20:20:40 +00003870 "n-v-c:block,o:hor50,i-ci:hor15,
3871 r-cr:hor30,sm:block")
3872 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003873 {only available when compiled with GUI enabled, and
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01003874 for Win32 console}
Bram Moolenaar071d4272004-06-13 20:20:40 +00003875 This option tells Vim what the cursor should look like in different
Bram Moolenaar8024f932020-01-14 19:29:13 +01003876 modes. It fully works in the GUI. In a Win32 console, only the
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01003877 height of the cursor can be changed. This can be done by specifying a
3878 block cursor, or a percentage for a vertical or horizontal cursor.
Bram Moolenaar1e7813a2015-03-31 18:31:03 +02003879 For a console the 't_SI', 't_SR', and 't_EI' escape sequences are
3880 used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003881
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01003882 The option is a comma-separated list of parts. Each part consist of a
Bram Moolenaar071d4272004-06-13 20:20:40 +00003883 mode-list and an argument-list:
3884 mode-list:argument-list,mode-list:argument-list,..
3885 The mode-list is a dash separated list of these modes:
3886 n Normal mode
3887 v Visual mode
3888 ve Visual mode with 'selection' "exclusive" (same as 'v',
3889 if not specified)
3890 o Operator-pending mode
3891 i Insert mode
3892 r Replace mode
3893 c Command-line Normal (append) mode
3894 ci Command-line Insert mode
3895 cr Command-line Replace mode
3896 sm showmatch in Insert mode
3897 a all modes
3898 The argument-list is a dash separated list of these arguments:
3899 hor{N} horizontal bar, {N} percent of the character height
3900 ver{N} vertical bar, {N} percent of the character width
3901 block block cursor, fills the whole character
3902 [only one of the above three should be present]
3903 blinkwait{N} *cursor-blinking*
3904 blinkon{N}
3905 blinkoff{N}
3906 blink times for cursor: blinkwait is the delay before
3907 the cursor starts blinking, blinkon is the time that
3908 the cursor is shown and blinkoff is the time that the
3909 cursor is not shown. The times are in msec. When one
3910 of the numbers is zero, there is no blinking. The
3911 default is: "blinkwait700-blinkon400-blinkoff250".
3912 These numbers are used for a missing entry. This
3913 means that blinking is enabled by default. To switch
3914 blinking off you can use "blinkon0". The cursor only
3915 blinks when Vim is waiting for input, not while
3916 executing a command.
3917 To make the cursor blink in an xterm, see
3918 |xterm-blink|.
3919 {group-name}
3920 a highlight group name, that sets the color and font
3921 for the cursor
3922 {group-name}/{group-name}
3923 Two highlight group names, the first is used when
3924 no language mappings are used, the other when they
3925 are. |language-mapping|
3926
3927 Examples of parts:
3928 n-c-v:block-nCursor in Normal, Command-line and Visual mode, use a
3929 block cursor with colors from the "nCursor"
3930 highlight group
3931 i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150
3932 In Insert and Command-line Insert mode, use a
3933 30% vertical bar cursor with colors from the
3934 "iCursor" highlight group. Blink a bit
3935 faster.
3936
3937 The 'a' mode is different. It will set the given argument-list for
3938 all modes. It does not reset anything to defaults. This can be used
3939 to do a common setting for all modes. For example, to switch off
3940 blinking: "a:blinkon0"
3941
3942 Examples of cursor highlighting: >
3943 :highlight Cursor gui=reverse guifg=NONE guibg=NONE
3944 :highlight Cursor gui=NONE guifg=bg guibg=fg
3945<
3946 *'guifont'* *'gfn'*
Bram Moolenaar251e1912011-06-19 05:09:16 +02003947 *E235* *E596*
Bram Moolenaar071d4272004-06-13 20:20:40 +00003948'guifont' 'gfn' string (default "")
3949 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003950 {only available when compiled with GUI enabled}
3951 This is a list of fonts which will be used for the GUI version of Vim.
Bram Moolenaarf720d0a2019-04-28 14:02:47 +02003952 In its simplest form the value is just one font name.
3953 See |gui-font| for the details.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003954
3955 *'guifontset'* *'gfs'*
3956 *E250* *E252* *E234* *E597* *E598*
3957'guifontset' 'gfs' string (default "")
3958 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003959 {only available when compiled with GUI enabled and
3960 with the |+xfontset| feature}
Bram Moolenaar3df01732017-02-17 22:47:16 +01003961 {not available in the GTK+ GUI}
Bram Moolenaar071d4272004-06-13 20:20:40 +00003962 When not empty, specifies two (or more) fonts to be used. The first
3963 one for normal English, the second one for your special language. See
3964 |xfontset|.
Bram Moolenaarf720d0a2019-04-28 14:02:47 +02003965
Bram Moolenaar071d4272004-06-13 20:20:40 +00003966 *'guifontwide'* *'gfw'* *E231* *E533* *E534*
3967'guifontwide' 'gfw' string (default "")
3968 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00003969 {only available when compiled with GUI enabled}
3970 When not empty, specifies a comma-separated list of fonts to be used
3971 for double-width characters. The first font that can be loaded is
Bram Moolenaarf720d0a2019-04-28 14:02:47 +02003972 used. See |gui-fontwide|.
Bram Moolenaar0f272122013-01-23 18:37:40 +01003973
Bram Moolenaar071d4272004-06-13 20:20:40 +00003974 *'guiheadroom'* *'ghr'*
3975'guiheadroom' 'ghr' number (default 50)
3976 global
Bram Moolenaar110289e2019-05-23 15:38:06 +02003977 {only for GTK and X11 GUI}
Bram Moolenaar071d4272004-06-13 20:20:40 +00003978 The number of pixels subtracted from the screen height when fitting
3979 the GUI window on the screen. Set this before the GUI is started,
3980 e.g., in your |gvimrc| file. When zero, the whole screen height will
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00003981 be used by the window. When positive, the specified number of pixel
Bram Moolenaar071d4272004-06-13 20:20:40 +00003982 lines will be left for window decorations and other items on the
3983 screen. Set it to a negative value to allow windows taller than the
3984 screen.
3985
Dusan Popovic4eeedc02021-10-16 20:52:05 +01003986 *'guiligatures'* *'gli'* *E1243*
3987'guiligatures' 'gli' string (default "")
3988 global
3989 {only for GTK GUI}
3990 List of ASCII characters that, when combined together, can create more
3991 complex shapes. Each character must be a printable ASCII character
3992 with a value in the 32-127 range.
3993 Example: >
3994 :set guiligatures=!\"#$%&()*+-./:<=>?@[]^_{\|~
3995< Changing this option updates screen output immediately. Set it to an
3996 empty string to disable ligatures.
3997
Bram Moolenaar071d4272004-06-13 20:20:40 +00003998 *'guioptions'* *'go'*
Bram Moolenaar2c64ca12018-10-19 16:22:31 +02003999'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
4000 "t" is removed in |defaults.vim|),
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004001 "aegimrLtT" (GTK and Motif),
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02004002 )
Bram Moolenaar071d4272004-06-13 20:20:40 +00004003 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004004 {only available when compiled with GUI enabled}
Bram Moolenaared203462004-06-16 11:19:22 +00004005 This option only has an effect in the GUI version of Vim. It is a
Bram Moolenaar071d4272004-06-13 20:20:40 +00004006 sequence of letters which describes what components and options of the
4007 GUI should be used.
4008 To avoid problems with flags that are added in the future, use the
4009 "+=" and "-=" feature of ":set" |add-option-flags|.
4010
Bram Moolenaar13568252018-03-16 20:46:58 +01004011 Valid characters are as follows:
4012 *'go-!'*
4013 '!' External commands are executed in a terminal window. Without
4014 this flag the MS-Windows GUI will open a console window to
4015 execute the command. The Unix GUI will simulate a dumb
4016 terminal to list the command output.
4017 The terminal window will be positioned at the bottom, and grow
4018 upwards as needed.
Bram Moolenaarba3ff532018-11-04 14:45:49 +01004019 *'go-a'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004020 'a' Autoselect: If present, then whenever VISUAL mode is started,
4021 or the Visual area extended, Vim tries to become the owner of
4022 the windowing system's global selection. This means that the
4023 Visually highlighted text is available for pasting into other
4024 applications as well as into Vim itself. When the Visual mode
4025 ends, possibly due to an operation on the text, or when an
4026 application wants to paste the selection, the highlighted text
4027 is automatically yanked into the "* selection register.
4028 Thus the selection is still available for pasting into other
4029 applications after the VISUAL mode has ended.
4030 If not present, then Vim won't become the owner of the
4031 windowing system's global selection unless explicitly told to
4032 by a yank or delete operation for the "* register.
4033 The same applies to the modeless selection.
Bram Moolenaarc0885aa2012-07-10 16:49:23 +02004034 *'go-P'*
4035 'P' Like autoselect but using the "+ register instead of the "*
Bram Moolenaar3848e002016-03-19 18:42:29 +01004036 register.
Bram Moolenaar02467872007-05-06 13:22:01 +00004037 *'go-A'*
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004038 'A' Autoselect for the modeless selection. Like 'a', but only
Bram Moolenaar071d4272004-06-13 20:20:40 +00004039 applies to the modeless selection.
4040
4041 'guioptions' autoselect Visual autoselect modeless ~
4042 "" - -
4043 "a" yes yes
4044 "A" - yes
4045 "aA" yes yes
4046
Bram Moolenaar9fbdbb82022-09-27 17:30:34 +01004047 When using a terminal see the 'clipboard' option.
4048
Bram Moolenaar02467872007-05-06 13:22:01 +00004049 *'go-c'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004050 'c' Use console dialogs instead of popup dialogs for simple
4051 choices.
Bram Moolenaar50bf7ce2019-09-15 13:17:00 +02004052 *'go-d'*
4053 'd' Use dark theme variant if available. Currently only works for
4054 GTK+ GUI.
Bram Moolenaar02467872007-05-06 13:22:01 +00004055 *'go-e'*
Bram Moolenaare224ffa2006-03-01 00:01:28 +00004056 'e' Add tab pages when indicated with 'showtabline'.
Bram Moolenaar5c8837f2006-02-25 21:52:33 +00004057 'guitablabel' can be used to change the text in the labels.
4058 When 'e' is missing a non-GUI tab pages line may be used.
Bram Moolenaard68071d2006-05-02 22:08:30 +00004059 The GUI tabs are only supported on some systems, currently
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004060 GTK, Motif, Mac OS/X, Haiku, and MS-Windows.
Bram Moolenaar02467872007-05-06 13:22:01 +00004061 *'go-f'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004062 'f' Foreground: Don't use fork() to detach the GUI from the shell
4063 where it was started. Use this for programs that wait for the
4064 editor to finish (e.g., an e-mail program). Alternatively you
4065 can use "gvim -f" or ":gui -f" to start the GUI in the
4066 foreground. |gui-fork|
4067 Note: Set this option in the vimrc file. The forking may have
Bram Moolenaar910f66f2006-04-05 20:41:53 +00004068 happened already when the |gvimrc| file is read.
Bram Moolenaar02467872007-05-06 13:22:01 +00004069 *'go-i'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004070 'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
4071 corner of the window. It's black&white on non-GTK, because of
4072 limitations of X11. For a color icon, see |X11-icon|.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004073 *'go-m'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004074 'm' Menu bar is present.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004075 *'go-M'*
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004076 'M' The system menu "$VIMRUNTIME/menu.vim" is not sourced. Note
Bram Moolenaar071d4272004-06-13 20:20:40 +00004077 that this flag must be added in the .vimrc file, before
Bram Moolenaar910f66f2006-04-05 20:41:53 +00004078 switching on syntax or filetype recognition (when the |gvimrc|
Bram Moolenaar071d4272004-06-13 20:20:40 +00004079 file is sourced the system menu has already been loaded; the
Bram Moolenaar01164a62017-11-02 22:58:42 +01004080 `:syntax on` and `:filetype on` commands load the menu too).
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004081 *'go-g'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004082 'g' Grey menu items: Make menu items that are not active grey. If
4083 'g' is not included inactive menu items are not shown at all.
Bram Moolenaar02467872007-05-06 13:22:01 +00004084 *'go-t'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004085 't' Include tearoff menu items. Currently only works for Win32,
4086 GTK+, and Motif 1.2 GUI.
Bram Moolenaar02467872007-05-06 13:22:01 +00004087 *'go-T'*
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004088 'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
4089 Photon GUIs.
Bram Moolenaar02467872007-05-06 13:22:01 +00004090 *'go-r'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004091 'r' Right-hand scrollbar is always present.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004092 *'go-R'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004093 'R' Right-hand scrollbar is present when there is a vertically
4094 split window.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004095 *'go-l'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004096 'l' Left-hand scrollbar is always present.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004097 *'go-L'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004098 'L' Left-hand scrollbar is present when there is a vertically
4099 split window.
Bram Moolenaar02467872007-05-06 13:22:01 +00004100 *'go-b'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004101 'b' Bottom (horizontal) scrollbar is present. Its size depends on
4102 the longest visible line, or on the cursor line if the 'h'
4103 flag is included. |gui-horiz-scroll|
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004104 *'go-h'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004105 'h' Limit horizontal scrollbar size to the length of the cursor
4106 line. Reduces computations. |gui-horiz-scroll|
4107
4108 And yes, you may even have scrollbars on the left AND the right if
4109 you really want to :-). See |gui-scrollbars| for more information.
4110
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004111 *'go-v'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004112 'v' Use a vertical button layout for dialogs. When not included,
4113 a horizontal layout is preferred, but when it doesn't fit a
Bram Moolenaardad44732021-03-31 20:07:33 +02004114 vertical layout is used anyway. Not supported in GTK 3.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004115 *'go-p'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004116 'p' Use Pointer callbacks for X11 GUI. This is required for some
4117 window managers. If the cursor is not blinking or hollow at
4118 the right moment, try adding this flag. This must be done
Bram Moolenaar910f66f2006-04-05 20:41:53 +00004119 before starting the GUI. Set it in your |gvimrc|. Adding or
Bram Moolenaar071d4272004-06-13 20:20:40 +00004120 removing it after the GUI has started has no effect.
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02004121 *'go-F'*
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004122 'F' Add a footer. Only for Motif. See |gui-footer|.
Bram Moolenaar8ac44152017-11-09 18:33:29 +01004123 *'go-k'*
4124 'k' Keep the GUI window size when adding/removing a scrollbar, or
4125 toolbar, tabline, etc. Instead, the behavior is similar to
4126 when the window is maximized and will adjust 'lines' and
4127 'columns' to fit to the window. Without the 'k' flag Vim will
Bram Moolenaar51b0f372017-11-18 18:52:04 +01004128 try to keep 'lines' and 'columns' the same when adding and
Bram Moolenaar8ac44152017-11-09 18:33:29 +01004129 removing GUI components.
Bram Moolenaar02467872007-05-06 13:22:01 +00004130
Bram Moolenaar071d4272004-06-13 20:20:40 +00004131 *'guipty'* *'noguipty'*
4132'guipty' boolean (default on)
4133 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004134 {only available when compiled with GUI enabled}
4135 Only in the GUI: If on, an attempt is made to open a pseudo-tty for
4136 I/O to/from shell commands. See |gui-pty|.
4137
Bram Moolenaar5c8837f2006-02-25 21:52:33 +00004138 *'guitablabel'* *'gtl'*
4139'guitablabel' 'gtl' string (default empty)
4140 global
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02004141 {only available when compiled with GUI enabled}
Bram Moolenaar944697a2022-02-20 19:48:20 +00004142 When non-empty describes the text to use in a label of the GUI tab
Bram Moolenaard68071d2006-05-02 22:08:30 +00004143 pages line. When empty and when the result is empty Vim will use a
4144 default label. See |setting-guitablabel| for more info.
Bram Moolenaar5c8837f2006-02-25 21:52:33 +00004145
Bram Moolenaara23ccb82006-02-27 00:08:02 +00004146 The format of this option is like that of 'statusline'.
Bram Moolenaar57657d82006-04-21 22:12:41 +00004147 'guitabtooltip' is used for the tooltip, see below.
Bram Moolenaar51628222016-12-01 23:03:28 +01004148 The expression will be evaluated in the |sandbox| when set from a
4149 modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004150 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaara23ccb82006-02-27 00:08:02 +00004151
Bram Moolenaar5c8837f2006-02-25 21:52:33 +00004152 Only used when the GUI tab pages line is displayed. 'e' must be
4153 present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
4154 used.
4155
Bram Moolenaar57657d82006-04-21 22:12:41 +00004156 *'guitabtooltip'* *'gtt'*
4157'guitabtooltip' 'gtt' string (default empty)
4158 global
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02004159 {only available when compiled with GUI enabled}
Bram Moolenaar944697a2022-02-20 19:48:20 +00004160 When non-empty describes the text to use in a tooltip for the GUI tab
Bram Moolenaar57657d82006-04-21 22:12:41 +00004161 pages line. When empty Vim will use a default tooltip.
4162 This option is otherwise just like 'guitablabel' above.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01004163 You can include a line break. Simplest method is to use |:let|: >
4164 :let &guitabtooltip = "line one\nline two"
4165<
Bram Moolenaar57657d82006-04-21 22:12:41 +00004166
Bram Moolenaar071d4272004-06-13 20:20:40 +00004167 *'helpfile'* *'hf'*
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01004168'helpfile' 'hf' string (default (MS-Windows) "$VIMRUNTIME\doc\help.txt"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004169 (others) "$VIMRUNTIME/doc/help.txt")
4170 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004171 Name of the main help file. All distributed help files should be
4172 placed together in one directory. Additionally, all "doc" directories
4173 in 'runtimepath' will be used.
4174 Environment variables are expanded |:set_env|. For example:
4175 "$VIMRUNTIME/doc/help.txt". If $VIMRUNTIME is not set, $VIM is also
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004176 tried. Also see |$VIMRUNTIME| and |option-backslash| about including
Bram Moolenaar071d4272004-06-13 20:20:40 +00004177 spaces and backslashes.
4178 This option cannot be set from a |modeline| or in the |sandbox|, for
4179 security reasons.
4180
4181 *'helpheight'* *'hh'*
4182'helpheight' 'hh' number (default 20)
4183 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004184 Minimal initial height of the help window when it is opened with the
4185 ":help" command. The initial height of the help window is half of the
4186 current window, or (when the 'ea' option is on) the same as other
4187 windows. When the height is less than 'helpheight', the height is
4188 set to 'helpheight'. Set to zero to disable.
4189
4190 *'helplang'* *'hlg'*
4191'helplang' 'hlg' string (default: messages language or empty)
4192 global
4193 {only available when compiled with the |+multi_lang|
4194 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004195 Comma-separated list of languages. Vim will use the first language
Bram Moolenaar071d4272004-06-13 20:20:40 +00004196 for which the desired help can be found. The English help will always
4197 be used as a last resort. You can add "en" to prefer English over
4198 another language, but that will only find tags that exist in that
4199 language and not in the English help.
4200 Example: >
4201 :set helplang=de,it
4202< This will first search German, then Italian and finally English help
4203 files.
4204 When using |CTRL-]| and ":help!" in a non-English help file Vim will
4205 try to find the tag in the current language before using this option.
4206 See |help-translated|.
4207
4208 *'hidden'* *'hid'* *'nohidden'* *'nohid'*
4209'hidden' 'hid' boolean (default off)
4210 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004211 When off a buffer is unloaded when it is |abandon|ed. When on a
4212 buffer becomes hidden when it is |abandon|ed. If the buffer is still
4213 displayed in another window, it does not become hidden, of course.
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004214
Bram Moolenaar071d4272004-06-13 20:20:40 +00004215 The commands that move through the buffer list sometimes make a buffer
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004216 hidden even if the 'hidden' option is off when these three are true:
4217 - the buffer is modified
4218 - 'autowrite' is off or writing is not possible
4219 - the '!' flag was used
4220 Also see |windows.txt|.
4221
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00004222 To only make one buffer hidden use the 'bufhidden' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004223 This option is set for one command with ":hide {command}" |:hide|.
4224 WARNING: It's easy to forget that you have changes in hidden buffers.
4225 Think twice when using ":q!" or ":qa!".
4226
4227 *'highlight'* *'hl'*
4228'highlight' 'hl' string (default (as a single string):
Bram Moolenaar58b85342016-08-14 19:54:54 +02004229 "8:SpecialKey,~:EndOfBuffer,@:NonText,
4230 d:Directory,e:ErrorMsg,i:IncSearch,
4231 l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
Bram Moolenaarefae76a2019-10-27 22:54:58 +01004232 a:LineNrAbove,b:LineNrBelow,
Bram Moolenaar58b85342016-08-14 19:54:54 +02004233 N:CursorLineNr,r:Question,s:StatusLine,
4234 S:StatusLineNC,c:VertSplit,t:Title,
Bram Moolenaar9d87a372018-12-18 21:41:50 +01004235 v:Visual,V:VisualNOS,w:WarningMsg,
4236 W:WildMenu,f:Folded,F:FoldColumn,
4237 A:DiffAdd,C:DiffChange,D:DiffDelete,
4238 T:DiffText,>:SignColumn,-:Conceal,
Bram Moolenaarc8c88492018-12-27 23:59:26 +01004239 B:SpellBad,P:SpellCap,R:SpellRare,
Bram Moolenaar9d87a372018-12-18 21:41:50 +01004240 L:SpellLocal,+:Pmenu,=:PmenuSel,
Gianmaria Bajo6a7c7742023-03-10 16:35:53 +00004241 [:PmenuKind,]:PmenuKindSel,
4242 {:PmenuExtra,}:PmenuExtraSel,
Bram Moolenaar21020352017-06-13 17:21:04 +02004243 x:PmenuSbar,X:PmenuThumb,*:TabLine,
4244 #:TabLineSel,_:TabLineFill,!:CursorColumn,
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02004245 .:CursorLine,o:ColorColumn,q:QuickFixLine,
Bram Moolenaarc572da52017-08-27 16:52:01 +02004246 z:StatusLineTerm,Z:StatusLineTermNC")
Bram Moolenaar071d4272004-06-13 20:20:40 +00004247 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004248 This option can be used to set highlighting mode for various
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004249 occasions. It is a comma-separated list of character pairs. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00004250 first character in a pair gives the occasion, the second the mode to
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004251 use for that occasion. The occasions are:
Bram Moolenaar071d4272004-06-13 20:20:40 +00004252 |hl-SpecialKey| 8 Meta and special keys listed with ":map"
Bram Moolenaar58b85342016-08-14 19:54:54 +02004253 |hl-EndOfBuffer| ~ lines after the last line in the buffer
4254 |hl-NonText| @ '@' at the end of the window and
Bram Moolenaar071d4272004-06-13 20:20:40 +00004255 characters from 'showbreak'
4256 |hl-Directory| d directories in CTRL-D listing and other special
4257 things in listings
4258 |hl-ErrorMsg| e error messages
4259 h (obsolete, ignored)
4260 |hl-IncSearch| i 'incsearch' highlighting
LemonBoya4399382022-04-09 21:04:08 +01004261 |hl-CurSearch| y current instance of last search pattern
Bram Moolenaar071d4272004-06-13 20:20:40 +00004262 |hl-Search| l last search pattern highlighting (see 'hlsearch')
4263 |hl-MoreMsg| m |more-prompt|
4264 |hl-ModeMsg| M Mode (e.g., "-- INSERT --")
Bram Moolenaar64486672010-05-16 15:46:46 +02004265 |hl-LineNr| n line number for ":number" and ":#" commands, and
4266 when 'number' or 'relativenumber' option is set.
Bram Moolenaarefae76a2019-10-27 22:54:58 +01004267 |hl-LineNrAbove| a line number above the cursor for when the
4268 'relativenumber' option is set.
4269 |hl-LineNrBelow| b line number below the cursor for when the
4270 'relativenumber' option is set.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +01004271 |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
4272 set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004273 |hl-Question| r |hit-enter| prompt and yes/no questions
4274 |hl-StatusLine| s status line of current window |status-line|
Bram Moolenaarb0d45e72017-11-05 18:19:24 +01004275 |hl-StatusLineNC| S status lines of not-current windows
Bram Moolenaar071d4272004-06-13 20:20:40 +00004276 |hl-Title| t Titles for output from ":set all", ":autocmd" etc.
4277 |hl-VertSplit| c column used to separate vertically split windows
4278 |hl-Visual| v Visual mode
4279 |hl-VisualNOS| V Visual mode when Vim does is "Not Owning the
4280 Selection" Only X11 Gui's |gui-x11| and
4281 |xterm-clipboard|.
4282 |hl-WarningMsg| w warning messages
4283 |hl-WildMenu| W wildcard matches displayed for 'wildmenu'
4284 |hl-Folded| f line used for closed folds
4285 |hl-FoldColumn| F 'foldcolumn'
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00004286 |hl-DiffAdd| A added line in diff mode
4287 |hl-DiffChange| C changed line in diff mode
4288 |hl-DiffDelete| D deleted line in diff mode
4289 |hl-DiffText| T inserted text in diff mode
Bram Moolenaar071d4272004-06-13 20:20:40 +00004290 |hl-SignColumn| > column used for |signs|
Bram Moolenaar9d87a372018-12-18 21:41:50 +01004291 |hl-Conceal| - the placeholders used for concealed characters
4292 (see 'conceallevel')
Bram Moolenaar217ad922005-03-20 22:37:15 +00004293 |hl-SpellBad| B misspelled word |spell|
Bram Moolenaar9855d6b2010-07-18 14:34:51 +02004294 |hl-SpellCap| P word that should start with capital |spell|
Bram Moolenaar217ad922005-03-20 22:37:15 +00004295 |hl-SpellRare| R rare word |spell|
4296 |hl-SpellLocal| L word from other region |spell|
Bram Moolenaar9d87a372018-12-18 21:41:50 +01004297 |hl-Pmenu| + popup menu normal line
4298 |hl-PmenuSel| = popup menu selected line
Gianmaria Bajo6a7c7742023-03-10 16:35:53 +00004299 |hl-PmenuKind| [ popup menu "kind" normal line
4300 |hl-PmenuKindSel| ] popup menu "kind" selected line
4301 |hl-PmenuExtra| { popup menu "kind" normal line
4302 |hl-PmenuExtraSel| } popup menu "kind" selected line
Bram Moolenaar9d87a372018-12-18 21:41:50 +01004303 |hl-PmenuSbar| x popup menu scrollbar
4304 |hl-PmenuThumb| X popup menu scrollbar thumb
Bram Moolenaar071d4272004-06-13 20:20:40 +00004305
4306 The display modes are:
4307 r reverse (termcap entry "mr" and "me")
4308 i italic (termcap entry "ZH" and "ZR")
4309 b bold (termcap entry "md" and "me")
4310 s standout (termcap entry "so" and "se")
4311 u underline (termcap entry "us" and "ue")
Bram Moolenaar84f54632022-06-29 18:39:11 +01004312 c undercurl (termcap entry "Us" and "Ce")
4313 2 double underline (termcap entry "Ds" and "Ce")
4314 d dotted underline (termcap entry "ds" and "Ce")
4315 = dashed underline (termcap entry "Ds" and "Ce")
Bram Moolenaarcf4b00c2017-09-02 18:33:56 +02004316 t strikethrough (termcap entry "Ts" and "Te")
Bram Moolenaar071d4272004-06-13 20:20:40 +00004317 n no highlighting
4318 - no highlighting
4319 : use a highlight group
4320 The default is used for occasions that are not included.
4321 If you want to change what the display modes do, see |dos-colors|
4322 for an example.
4323 When using the ':' display mode, this must be followed by the name of
4324 a highlight group. A highlight group can be used to define any type
4325 of highlighting, including using color. See |:highlight| on how to
4326 define one. The default uses a different group for each occasion.
4327 See |highlight-default| for the default highlight groups.
4328
Bram Moolenaar071d4272004-06-13 20:20:40 +00004329 *'history'* *'hi'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02004330'history' 'hi' number (Vim default: 50, Vi default: 0,
4331 set to 200 in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00004332 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004333 A history of ":" commands, and a history of previous search patterns
Bram Moolenaar78159bb2014-06-25 11:48:54 +02004334 is remembered. This option decides how many entries may be stored in
Bram Moolenaar071d4272004-06-13 20:20:40 +00004335 each of these histories (see |cmdline-editing|).
Bram Moolenaar78159bb2014-06-25 11:48:54 +02004336 The maximum value is 10000.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004337 NOTE: This option is set to the Vi default value when 'compatible' is
4338 set and to the Vim default value when 'compatible' is reset.
4339
4340 *'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
4341'hkmap' 'hk' boolean (default off)
4342 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004343 {only available when compiled with the |+rightleft|
4344 feature}
4345 When on, the keyboard is mapped for the Hebrew character set.
4346 Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
4347 toggle this option. See |rileft.txt|.
4348 NOTE: This option is reset when 'compatible' is set.
4349
4350 *'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
4351'hkmapp' 'hkp' boolean (default off)
4352 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004353 {only available when compiled with the |+rightleft|
4354 feature}
4355 When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
4356 This is useful if you have a non-Hebrew keyboard.
4357 See |rileft.txt|.
4358 NOTE: This option is reset when 'compatible' is set.
4359
Bram Moolenaar036986f2017-03-16 17:41:02 +01004360 *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
4361'hlsearch' 'hls' boolean (default off)
4362 global
Bram Moolenaar036986f2017-03-16 17:41:02 +01004363 {not available when compiled without the
4364 |+extra_search| feature}
4365 When there is a previous search pattern, highlight all its matches.
4366 The type of highlighting used can be set with the 'l' occasion in the
4367 'highlight' option. This uses the "Search" highlight group by
4368 default. Note that only the matching text is highlighted, any offsets
Bram Moolenaarcfa8f9a2022-06-03 21:59:47 +01004369 are not applied. If the "CurSearch" highlight group is set then the
4370 current match is highlighted with that.
Bram Moolenaar036986f2017-03-16 17:41:02 +01004371 See also: 'incsearch' and |:match|.
4372 When you get bored looking at the highlighted matches, you can turn it
4373 off with |:nohlsearch|. This does not change the option value, as
4374 soon as you use a search command, the highlighting comes back.
4375 'redrawtime' specifies the maximum time spent on finding matches.
4376 When the search pattern can match an end-of-line, Vim will try to
4377 highlight all of the matched text. However, this depends on where the
4378 search starts. This will be the first line in the window or the first
4379 line below a closed fold. A match in a previous line which is not
4380 drawn may not continue in a newly drawn line.
4381 You can specify whether the highlight status is restored on startup
4382 with the 'h' flag in 'viminfo' |viminfo-h|.
4383 NOTE: This option is reset when 'compatible' is set.
4384
Bram Moolenaar071d4272004-06-13 20:20:40 +00004385 *'icon'* *'noicon'*
4386'icon' boolean (default off, on when title can be restored)
4387 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004388 When on, the icon text of the window will be set to the value of
4389 'iconstring' (if it is not empty), or to the name of the file
4390 currently being edited. Only the last part of the name is used.
4391 Overridden by the 'iconstring' option.
4392 Only works if the terminal supports setting window icons (currently
4393 only X11 GUI and terminals with a non-empty 't_IS' option - these are
4394 Unix xterm and iris-ansi by default, where 't_IS' is taken from the
4395 builtin termcap).
4396 When Vim was compiled with HAVE_X11 defined, the original icon will be
Bram Moolenaar582fd852005-03-28 20:58:01 +00004397 restored if possible |X11|. See |X11-icon| for changing the icon on
Bram Moolenaar071d4272004-06-13 20:20:40 +00004398 X11.
Bram Moolenaar3a991dd2014-10-02 01:41:41 +02004399 For MS-Windows the icon can be changed, see |windows-icon|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004400
4401 *'iconstring'*
4402'iconstring' string (default "")
4403 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004404 When this option is not empty, it will be used for the icon text of
4405 the window. This happens only when the 'icon' option is on.
4406 Only works if the terminal supports setting window icon text
4407 (currently only X11 GUI and terminals with a non-empty 't_IS' option).
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02004408 Does not work for MS-Windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004409 When Vim was compiled with HAVE_X11 defined, the original icon will be
4410 restored if possible |X11|.
4411 When this option contains printf-style '%' items, they will be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004412 expanded according to the rules used for 'statusline'. See
Bram Moolenaar071d4272004-06-13 20:20:40 +00004413 'titlestring' for example settings.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004414 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004415 {not available when compiled without the |+statusline| feature}
4416
4417 *'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
4418'ignorecase' 'ic' boolean (default off)
4419 global
4420 Ignore case in search patterns. Also used when searching in the tags
4421 file.
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01004422 Also see 'smartcase' and 'tagcase'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004423 Can be overruled by using "\c" or "\C" in the pattern, see
4424 |/ignorecase|.
4425
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004426 *'imactivatefunc'* *'imaf'*
4427'imactivatefunc' 'imaf' string (default "")
4428 global
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004429 This option specifies a function that will be called to
Yegappan Lakshmanan7645da52021-12-04 14:02:30 +00004430 activate or deactivate the Input Method. The value can be the name of
4431 a function, a |lambda| or a |Funcref|. See |option-value-function| for
4432 more information.
Bram Moolenaaref8c6172020-07-01 15:12:44 +02004433 It is not used in the MS-Windows GUI version.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004434 The expression will be evaluated in the |sandbox| when set from a
4435 modeline, see |sandbox-option|.
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004436
4437 Example: >
4438 function ImActivateFunc(active)
4439 if a:active
4440 ... do something
4441 else
4442 ... do something
4443 endif
4444 " return value is not used
4445 endfunction
4446 set imactivatefunc=ImActivateFunc
4447<
Bram Moolenaar071d4272004-06-13 20:20:40 +00004448 *'imactivatekey'* *'imak'*
4449'imactivatekey' 'imak' string (default "")
4450 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004451 {only available when compiled with |+xim| and
Bram Moolenaar67c53842010-05-22 18:28:27 +02004452 |+GUI_GTK|} *E599*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004453 Specifies the key that your Input Method in X-Windows uses for
4454 activation. When this is specified correctly, vim can fully control
4455 IM with 'imcmdline', 'iminsert' and 'imsearch'.
4456 You can't use this option to change the activation key, the option
4457 tells Vim what the key is.
4458 Format:
4459 [MODIFIER_FLAG-]KEY_STRING
4460
4461 These characters can be used for MODIFIER_FLAG (case is ignored):
4462 S Shift key
4463 L Lock key
4464 C Control key
4465 1 Mod1 key
4466 2 Mod2 key
4467 3 Mod3 key
4468 4 Mod4 key
4469 5 Mod5 key
4470 Combinations are allowed, for example "S-C-space" or "SC-space" are
4471 both shift+ctrl+space.
4472 See <X11/keysymdef.h> and XStringToKeysym for KEY_STRING.
4473
4474 Example: >
4475 :set imactivatekey=S-space
4476< "S-space" means shift+space. This is the activation key for kinput2 +
4477 canna (Japanese), and ami (Korean).
4478
4479 *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
4480'imcmdline' 'imc' boolean (default off)
4481 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004482 When set the Input Method is always on when starting to edit a command
4483 line, unless entering a search pattern (see 'imsearch' for that).
4484 Setting this option is useful when your input method allows entering
4485 English characters directly, e.g., when it's used to type accented
4486 characters with dead keys.
4487
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01004488 *'imdisable'* *'imd'* *'noimdisable'* *'noimd'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00004489'imdisable' 'imd' boolean (default off, on for some systems (SGI))
4490 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004491 When set the Input Method is never used. This is useful to disable
4492 the IM when it doesn't work properly.
4493 Currently this option is on by default for SGI/IRIX machines. This
4494 may change in later releases.
4495
4496 *'iminsert'* *'imi'*
Bram Moolenaar4cf56bb2017-09-16 15:50:32 +02004497'iminsert' 'imi' number (default 0)
Bram Moolenaar071d4272004-06-13 20:20:40 +00004498 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004499 Specifies whether :lmap or an Input Method (IM) is to be used in
4500 Insert mode. Valid values:
4501 0 :lmap is off and IM is off
4502 1 :lmap is ON and IM is off
4503 2 :lmap is off and IM is ON
Bram Moolenaar071d4272004-06-13 20:20:40 +00004504 To always reset the option to zero when leaving Insert mode with <Esc>
4505 this can be used: >
4506 :inoremap <ESC> <ESC>:set iminsert=0<CR>
4507< This makes :lmap and IM turn off automatically when leaving Insert
4508 mode.
4509 Note that this option changes when using CTRL-^ in Insert mode
4510 |i_CTRL-^|.
4511 The value is set to 1 when setting 'keymap' to a valid keymap name.
4512 It is also used for the argument of commands like "r" and "f".
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004513 The value 0 may not work correctly with Motif with some XIM
Bram Moolenaar071d4272004-06-13 20:20:40 +00004514 methods. Use 'imdisable' to disable XIM then.
4515
Bram Moolenaar6315a9a2017-11-25 15:20:02 +01004516 You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
Bram Moolenaard473c8c2018-08-11 18:00:22 +02004517 via external command if Vim is not compiled with the |+xim|,
Bram Moolenaar6315a9a2017-11-25 15:20:02 +01004518 |+multi_byte_ime| or |global-ime|.
4519
Bram Moolenaar071d4272004-06-13 20:20:40 +00004520 *'imsearch'* *'ims'*
Bram Moolenaar4cf56bb2017-09-16 15:50:32 +02004521'imsearch' 'ims' number (default -1)
Bram Moolenaar071d4272004-06-13 20:20:40 +00004522 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004523 Specifies whether :lmap or an Input Method (IM) is to be used when
4524 entering a search pattern. Valid values:
4525 -1 the value of 'iminsert' is used, makes it look like
4526 'iminsert' is also used when typing a search pattern
4527 0 :lmap is off and IM is off
4528 1 :lmap is ON and IM is off
4529 2 :lmap is off and IM is ON
4530 Note that this option changes when using CTRL-^ in Command-line mode
4531 |c_CTRL-^|.
4532 The value is set to 1 when it is not -1 and setting the 'keymap'
4533 option to a valid keymap name.
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004534 The value 0 may not work correctly with Motif with some XIM
Bram Moolenaar071d4272004-06-13 20:20:40 +00004535 methods. Use 'imdisable' to disable XIM then.
4536
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004537 *'imstatusfunc'* *'imsf'*
4538'imstatusfunc' 'imsf' string (default "")
4539 global
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004540 This option specifies a function that is called to obtain the status
4541 of Input Method. It must return a positive number when IME is active.
Yegappan Lakshmanan7645da52021-12-04 14:02:30 +00004542 The value can be the name of a function, a |lambda| or a |Funcref|.
4543 See |option-value-function| for more information.
Bram Moolenaaref8c6172020-07-01 15:12:44 +02004544 It is not used in the MS-Windows GUI version.
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004545
4546 Example: >
4547 function ImStatusFunc()
4548 let is_active = ...do something
4549 return is_active ? 1 : 0
4550 endfunction
4551 set imstatusfunc=ImStatusFunc
4552<
4553 NOTE: This function is invoked very often. Keep it fast.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004554 The expression will be evaluated in the |sandbox| when set from a
4555 modeline, see |sandbox-option|.
Bram Moolenaarabab85a2013-06-26 19:18:05 +02004556
Bram Moolenaar5c6dbcb2017-08-30 22:00:20 +02004557 *'imstyle'* *'imst'*
4558'imstyle' 'imst' number (default 1)
4559 global
Bram Moolenaar5c6dbcb2017-08-30 22:00:20 +02004560 {only available when compiled with |+xim| and
4561 |+GUI_GTK|}
Bram Moolenaar37c64c72017-09-19 22:06:03 +02004562 This option specifies the input style of Input Method:
4563 0 use on-the-spot style
4564 1 over-the-spot style
Bram Moolenaar5c6dbcb2017-08-30 22:00:20 +02004565 See: |xim-input-style|
4566
Bram Moolenaar24a98a02017-09-27 22:23:55 +02004567 For a long time on-the-spot style had been used in the GTK version of
4568 vim, however, it is known that it causes troubles when using mappings,
Bram Moolenaar5c6dbcb2017-08-30 22:00:20 +02004569 |single-repeat|, etc. Therefore over-the-spot style becomes the
4570 default now. This should work fine for most people, however if you
4571 have any problem with it, try using on-the-spot style.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004572 The expression will be evaluated in the |sandbox| when set from a
4573 modeline, see |sandbox-option|.
Bram Moolenaar5c6dbcb2017-08-30 22:00:20 +02004574
Bram Moolenaar071d4272004-06-13 20:20:40 +00004575 *'include'* *'inc'*
4576'include' 'inc' string (default "^\s*#\s*include")
4577 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00004578 {not available when compiled without the
4579 |+find_in_path| feature}
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004580 Pattern to be used to find an include command. It is a search
Bram Moolenaar071d4272004-06-13 20:20:40 +00004581 pattern, just like for the "/" command (See |pattern|). The default
4582 value is for C programs. This option is used for the commands "[i",
Bram Moolenaar1e015462005-09-25 22:16:38 +00004583 "]I", "[d", etc.
4584 Normally the 'isfname' option is used to recognize the file name that
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00004585 comes after the matched pattern. But if "\zs" appears in the pattern
4586 then the text matched from "\zs" to the end, or until "\ze" if it
4587 appears, is used as the file name. Use this to include characters
4588 that are not in 'isfname', such as a space. You can then use
4589 'includeexpr' to process the matched text.
Bram Moolenaar1e015462005-09-25 22:16:38 +00004590 See |option-backslash| about including spaces and backslashes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004591
4592 *'includeexpr'* *'inex'*
4593'includeexpr' 'inex' string (default "")
4594 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004595 {not available when compiled without the
Bram Moolenaardb84e452010-08-15 13:50:43 +02004596 |+find_in_path| or |+eval| features}
Bram Moolenaar071d4272004-06-13 20:20:40 +00004597 Expression to be used to transform the string found with the 'include'
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004598 option to a file name. Mostly useful to change "." to "/" for Java: >
Bram Moolenaarb59ae592022-11-23 23:46:31 +00004599 :setlocal includeexpr=substitute(v:fname,'\\.','/','g')
Bram Moolenaar071d4272004-06-13 20:20:40 +00004600< The "v:fname" variable will be set to the file name that was detected.
Bram Moolenaarb59ae592022-11-23 23:46:31 +00004601 Note the double backslash: the `:set` command first halves them, then
4602 one remains it the value, where "\." matches a dot literally. For
4603 simple character replacements `tr()` avoids the need for escaping: >
4604 :setlocal includeexpr=tr(v:fname,'.','/')
4605<
Bram Moolenaar071d4272004-06-13 20:20:40 +00004606 Also used for the |gf| command if an unmodified file name can't be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004607 found. Allows doing "gf" on the name after an 'include' statement.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004608 Also used for |<cfile>|.
4609
Yegappan Lakshmanan8bb65f22021-12-26 10:51:39 +00004610 If the expression starts with s: or |<SID>|, then it is replaced with
4611 the script ID (|local-function|). Example: >
Bram Moolenaarb59ae592022-11-23 23:46:31 +00004612 setlocal includeexpr=s:MyIncludeExpr()
4613 setlocal includeexpr=<SID>SomeIncludeExpr()
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00004614< Otherwise, the expression is evaluated in the context of the script
4615 where the option was set, thus script-local items are available.
4616
Bram Moolenaara4e0b972022-10-01 19:43:52 +01004617 It is more efficient if the value is just a function call without
4618 arguments, see |expr-option-function|.
4619
Bram Moolenaar30b65812012-07-12 22:01:11 +02004620 The expression will be evaluated in the |sandbox| when set from a
4621 modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004622 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00004623
4624 It is not allowed to change text or jump to another window while
4625 evaluating 'includeexpr' |textlock|.
4626
Bram Moolenaar071d4272004-06-13 20:20:40 +00004627 *'incsearch'* *'is'* *'noincsearch'* *'nois'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02004628'incsearch' 'is' boolean (default off, set in |defaults.vim| if the
Bram Moolenaar8a3b8052022-06-26 12:21:15 +01004629 |+reltime| feature is supported)
Bram Moolenaar071d4272004-06-13 20:20:40 +00004630 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004631 {not available when compiled without the
Bram Moolenaardb84e452010-08-15 13:50:43 +02004632 |+extra_search| features}
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004633 While typing a search command, show where the pattern, as it was typed
4634 so far, matches. The matched string is highlighted. If the pattern
4635 is invalid or not found, nothing is shown. The screen will be updated
4636 often, this is only useful on fast terminals.
Bram Moolenaarfc65cab2018-08-28 22:58:02 +02004637 Also applies to the pattern in commands: >
4638 :global
4639 :lvimgrep
4640 :lvimgrepadd
4641 :smagic
4642 :snomagic
4643 :sort
4644 :substitute
4645 :vglobal
4646 :vimgrep
4647 :vimgrepadd
4648< Note that the match will be shown, but the cursor will return to its
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004649 original position when no match is found and when pressing <Esc>. You
4650 still need to finish the search command with <Enter> to move the
4651 cursor to the match.
Bram Moolenaardc083282016-10-11 08:57:33 +02004652 You can use the CTRL-G and CTRL-T keys to move to the next and
4653 previous match. |c_CTRL-G| |c_CTRL-T|
Bram Moolenaar91a4e822008-01-19 14:59:58 +00004654 When compiled with the |+reltime| feature Vim only searches for about
4655 half a second. With a complicated pattern and/or a lot of text the
4656 match may not be found. This is to avoid that Vim hangs while you
4657 are typing the pattern.
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004658 The highlighting can be set with the 'i' flag in 'highlight'.
Bram Moolenaar2f058492017-11-30 20:27:52 +01004659 When 'hlsearch' is on, all matched strings are highlighted too while
4660 typing a search command. See also: 'hlsearch'.
Bram Moolenaard473c8c2018-08-11 18:00:22 +02004661 If you don't want to turn 'hlsearch' on, but want to highlight all
4662 matches while searching, you can turn on and off 'hlsearch' with
4663 autocmd. Example: >
Bram Moolenaar2e51d9a2017-10-29 16:40:30 +01004664 augroup vimrc-incsearch-highlight
4665 autocmd!
Bram Moolenaarf8f8b2e2017-11-02 19:08:48 +01004666 autocmd CmdlineEnter /,\? :set hlsearch
4667 autocmd CmdlineLeave /,\? :set nohlsearch
Bram Moolenaar2e51d9a2017-10-29 16:40:30 +01004668 augroup END
4669<
Bram Moolenaarefd2bf12006-03-16 21:41:35 +00004670 CTRL-L can be used to add one character from after the current match
Bram Moolenaara9dc3752010-07-11 20:46:53 +02004671 to the command line. If 'ignorecase' and 'smartcase' are set and the
4672 command line has no uppercase characters, the added character is
4673 converted to lowercase.
Bram Moolenaarefd2bf12006-03-16 21:41:35 +00004674 CTRL-R CTRL-W can be used to add the word at the end of the current
4675 match, excluding the characters that were already typed.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004676 NOTE: This option is reset when 'compatible' is set.
4677
4678 *'indentexpr'* *'inde'*
4679'indentexpr' 'inde' string (default "")
4680 local to buffer
Bram Moolenaar8e145b82022-05-21 20:17:31 +01004681 {not available when compiled without the |+eval|
4682 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00004683 Expression which is evaluated to obtain the proper indent for a line.
4684 It is used when a new line is created, for the |=| operator and
4685 in Insert mode as specified with the 'indentkeys' option.
4686 When this option is not empty, it overrules the 'cindent' and
Bram Moolenaar20f90cf2011-05-19 12:22:51 +02004687 'smartindent' indenting. When 'lisp' is set, this option is
Bram Moolenaar49846fb2022-10-15 16:05:33 +01004688 is only used when 'lispoptions' contains "expr:1".
Bram Moolenaar071d4272004-06-13 20:20:40 +00004689 When 'paste' is set this option is not used for indenting.
4690 The expression is evaluated with |v:lnum| set to the line number for
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00004691 which the indent is to be computed. The cursor is also in this line
Bram Moolenaar071d4272004-06-13 20:20:40 +00004692 when the expression is evaluated (but it may be moved around).
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00004693
Yegappan Lakshmanan8bb65f22021-12-26 10:51:39 +00004694 If the expression starts with s: or |<SID>|, then it is replaced with
4695 the script ID (|local-function|). Example: >
4696 set indentexpr=s:MyIndentExpr()
4697 set indentexpr=<SID>SomeIndentExpr()
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00004698< Otherwise, the expression is evaluated in the context of the script
4699 where the option was set, thus script-local items are available.
4700
Bram Moolenaara4e0b972022-10-01 19:43:52 +01004701 The advantage of using a function call without arguments is that it is
4702 faster, see |expr-option-function|.
4703
Bram Moolenaar071d4272004-06-13 20:20:40 +00004704 The expression must return the number of spaces worth of indent. It
4705 can return "-1" to keep the current indent (this means 'autoindent' is
4706 used for the indent).
4707 Functions useful for computing the indent are |indent()|, |cindent()|
4708 and |lispindent()|.
4709 The evaluation of the expression must not have side effects! It must
4710 not change the text, jump to another window, etc. Afterwards the
4711 cursor position is always restored, thus the cursor may be moved.
4712 Normally this option would be set to call a function: >
4713 :set indentexpr=GetMyIndent()
4714< Error messages will be suppressed, unless the 'debug' option contains
4715 "msg".
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00004716 See |indent-expression|.
Bram Moolenaar036986f2017-03-16 17:41:02 +01004717 NOTE: This option is set to "" when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004718
Bram Moolenaar30b65812012-07-12 22:01:11 +02004719 The expression will be evaluated in the |sandbox| when set from a
4720 modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02004721 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00004722
4723 It is not allowed to change text or jump to another window while
4724 evaluating 'indentexpr' |textlock|.
4725
4726
Bram Moolenaar071d4272004-06-13 20:20:40 +00004727 *'indentkeys'* *'indk'*
Bram Moolenaarce655742019-01-31 14:12:57 +01004728'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
Bram Moolenaar071d4272004-06-13 20:20:40 +00004729 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004730 A list of keys that, when typed in Insert mode, cause reindenting of
4731 the current line. Only happens if 'indentexpr' isn't empty.
4732 The format is identical to 'cinkeys', see |indentkeys-format|.
4733 See |C-indenting| and |indent-expression|.
4734
4735 *'infercase'* *'inf'* *'noinfercase'* *'noinf'*
4736'infercase' 'inf' boolean (default off)
4737 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004738 When doing keyword completion in insert mode |ins-completion|, and
Bram Moolenaar446cb832008-06-24 21:56:24 +00004739 'ignorecase' is also on, the case of the match is adjusted depending
4740 on the typed text. If the typed text contains a lowercase letter
4741 where the match has an upper case letter, the completed part is made
4742 lowercase. If the typed text has no lowercase letters and the match
4743 has a lowercase letter where the typed text has an uppercase letter,
4744 and there is a letter before it, the completed part is made uppercase.
4745 With 'noinfercase' the match is used as-is.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004746
4747 *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
4748'insertmode' 'im' boolean (default off)
4749 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004750 Makes Vim work in a way that Insert mode is the default mode. Useful
4751 if you want to use Vim as a modeless editor. Used for |evim|.
4752 These Insert mode commands will be useful:
4753 - Use the cursor keys to move around.
Bram Moolenaardc1f1642016-08-16 18:33:43 +02004754 - Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When
Bram Moolenaar071d4272004-06-13 20:20:40 +00004755 this is a mapping, it is executed as if 'insertmode' was off.
4756 Normal mode remains active until the mapping is finished.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004757 - Use CTRL-L to execute a number of Normal mode commands, then use
Bram Moolenaar488c6512005-08-11 20:09:58 +00004758 <Esc> to get back to Insert mode. Note that CTRL-L moves the cursor
4759 left, like <Esc> does when 'insertmode' isn't set. |i_CTRL-L|
Bram Moolenaar071d4272004-06-13 20:20:40 +00004760
4761 These items change when 'insertmode' is set:
4762 - when starting to edit of a file, Vim goes to Insert mode.
4763 - <Esc> in Insert mode is a no-op and beeps.
4764 - <Esc> in Normal mode makes Vim go to Insert mode.
4765 - CTRL-L in Insert mode is a command, it is not inserted.
4766 - CTRL-Z in Insert mode suspends Vim, see |CTRL-Z|. *i_CTRL-Z*
4767 However, when <Esc> is used inside a mapping, it behaves like
4768 'insertmode' was not set. This was done to be able to use the same
4769 mappings with 'insertmode' set or not set.
4770 When executing commands with |:normal| 'insertmode' is not used.
4771
4772 NOTE: This option is reset when 'compatible' is set.
4773
4774 *'isfname'* *'isf'*
Bram Moolenaar6f345a12019-12-17 21:27:18 +01004775'isfname' 'isf' string (default for Win32:
Bram Moolenaar071d4272004-06-13 20:20:40 +00004776 "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
4777 for AMIGA: "@,48-57,/,.,-,_,+,,,$,:"
4778 for VMS: "@,48-57,/,.,-,_,+,,,#,$,%,<,>,[,],:,;,~"
4779 for OS/390: "@,240-249,/,.,-,_,+,,,#,$,%,~,="
4780 otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
4781 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004782 The characters specified by this option are included in file names and
4783 path names. Filenames are used for commands like "gf", "[i" and in
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004784 the tags file. It is also used for "\f" in a |pattern|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004785 Multi-byte characters 256 and above are always included, only the
4786 characters up to 255 are specified with this option.
4787 For UTF-8 the characters 0xa0 to 0xff are included as well.
Bram Moolenaar446cb832008-06-24 21:56:24 +00004788 Think twice before adding white space to this option. Although a
4789 space may appear inside a file name, the effect will be that Vim
4790 doesn't know where a file name starts or ends when doing completion.
4791 It most likely works better without a space in 'isfname'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004792
4793 Note that on systems using a backslash as path separator, Vim tries to
4794 do its best to make it work as you would expect. That is a bit
4795 tricky, since Vi originally used the backslash to escape special
4796 characters. Vim will not remove a backslash in front of a normal file
4797 name character on these systems, but it will on Unix and alikes. The
4798 '&' and '^' are not included by default, because these are special for
4799 cmd.exe.
4800
4801 The format of this option is a list of parts, separated with commas.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004802 Each part can be a single character number or a range. A range is two
4803 character numbers with '-' in between. A character number can be a
Bram Moolenaar071d4272004-06-13 20:20:40 +00004804 decimal number between 0 and 255 or the ASCII character itself (does
4805 not work for digits). Example:
4806 "_,-,128-140,#-43" (include '_' and '-' and the range
4807 128 to 140 and '#' to 43)
4808 If a part starts with '^', the following character number or range
4809 will be excluded from the option. The option is interpreted from left
4810 to right. Put the excluded character after the range where it is
4811 included. To include '^' itself use it as the last character of the
4812 option or the end of a range. Example:
4813 "^a-z,#,^" (exclude 'a' to 'z', include '#' and '^')
4814 If the character is '@', all characters where isalpha() returns TRUE
4815 are included. Normally these are the characters a to z and A to Z,
4816 plus accented characters. To include '@' itself use "@-@". Examples:
4817 "@,^a-z" All alphabetic characters, excluding lower
Bram Moolenaar446cb832008-06-24 21:56:24 +00004818 case ASCII letters.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004819 "a-z,A-Z,@-@" All letters plus the '@' character.
4820 A comma can be included by using it where a character number is
4821 expected. Example:
4822 "48-57,,,_" Digits, comma and underscore.
4823 A comma can be excluded by prepending a '^'. Example:
4824 " -~,^,,9" All characters from space to '~', excluding
4825 comma, plus <Tab>.
4826 See |option-backslash| about including spaces and backslashes.
4827
4828 *'isident'* *'isi'*
Bram Moolenaar6f345a12019-12-17 21:27:18 +01004829'isident' 'isi' string (default for Win32:
Bram Moolenaar071d4272004-06-13 20:20:40 +00004830 "@,48-57,_,128-167,224-235"
4831 otherwise: "@,48-57,_,192-255")
4832 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004833 The characters given by this option are included in identifiers.
4834 Identifiers are used in recognizing environment variables and after a
4835 match of the 'define' option. It is also used for "\i" in a
Bram Moolenaar582fd852005-03-28 20:58:01 +00004836 |pattern|. See 'isfname' for a description of the format of this
Bram Moolenaar95bafa22018-10-02 13:26:25 +02004837 option. For '@' only characters up to 255 are used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004838 Careful: If you change this option, it might break expanding
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004839 environment variables. E.g., when '/' is included and Vim tries to
Bram Moolenaar071d4272004-06-13 20:20:40 +00004840 expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
4841
4842 *'iskeyword'* *'isk'*
Bram Moolenaar6f345a12019-12-17 21:27:18 +01004843'iskeyword' 'isk' string (Vim default for Win32:
Bram Moolenaar071d4272004-06-13 20:20:40 +00004844 "@,48-57,_,128-167,224-235"
4845 otherwise: "@,48-57,_,192-255"
4846 Vi default: "@,48-57,_")
4847 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004848 Keywords are used in searching and recognizing with many commands:
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00004849 "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
Bram Moolenaar95bafa22018-10-02 13:26:25 +02004850 'isfname' for a description of the format of this option. For '@'
Bram Moolenaar4c295022021-05-02 17:19:11 +02004851 characters above 255 check the "word" character class (any character
4852 that is not white space or punctuation).
Bram Moolenaar95bafa22018-10-02 13:26:25 +02004853 For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
Bram Moolenaar071d4272004-06-13 20:20:40 +00004854 For a help file it is set to all non-blank printable characters except
4855 '*', '"' and '|' (so that CTRL-] on a command finds the help for that
4856 command).
4857 When the 'lisp' option is on the '-' character is always included.
Bram Moolenaarb8060fe2016-01-19 22:29:28 +01004858 This option also influences syntax highlighting, unless the syntax
4859 uses |:syn-iskeyword|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004860 NOTE: This option is set to the Vi default value when 'compatible' is
4861 set and to the Vim default value when 'compatible' is reset.
4862
4863 *'isprint'* *'isp'*
Bram Moolenaar3d1cde82020-08-15 18:55:18 +02004864'isprint' 'isp' string (default for Win32 and macOS:
Bram Moolenaar071d4272004-06-13 20:20:40 +00004865 "@,~-255"; otherwise: "@,161-255")
4866 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004867 The characters given by this option are displayed directly on the
4868 screen. It is also used for "\p" in a |pattern|. The characters from
4869 space (ASCII 32) to '~' (ASCII 126) are always displayed directly,
4870 even when they are not included in 'isprint' or excluded. See
4871 'isfname' for a description of the format of this option.
4872
4873 Non-printable characters are displayed with two characters:
4874 0 - 31 "^@" - "^_"
4875 32 - 126 always single characters
4876 127 "^?"
4877 128 - 159 "~@" - "~_"
4878 160 - 254 "| " - "|~"
4879 255 "~?"
4880 When 'encoding' is a Unicode one, illegal bytes from 128 to 255 are
4881 displayed as <xx>, with the hexadecimal value of the byte.
4882 When 'display' contains "uhex" all unprintable characters are
4883 displayed as <xx>.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01004884 The SpecialKey highlighting will be used for unprintable characters.
4885 |hl-SpecialKey|
Bram Moolenaar071d4272004-06-13 20:20:40 +00004886
4887 Multi-byte characters 256 and above are always included, only the
4888 characters up to 255 are specified with this option. When a character
4889 is printable but it is not available in the current font, a
4890 replacement character will be shown.
4891 Unprintable and zero-width Unicode characters are displayed as <xxxx>.
4892 There is no option to specify these characters.
4893
4894 *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'*
4895'joinspaces' 'js' boolean (default on)
4896 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00004897 Insert two spaces after a '.', '?' and '!' with a join command.
4898 When 'cpoptions' includes the 'j' flag, only do this after a '.'.
4899 Otherwise only one space is inserted.
4900 NOTE: This option is set when 'compatible' is set.
4901
4902 *'key'*
4903'key' string (default "")
4904 local to buffer
Bram Moolenaar996343d2010-07-04 22:20:21 +02004905 {only available when compiled with the |+cryptv|
4906 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00004907 The key that is used for encrypting and decrypting the current buffer.
Bram Moolenaar40e6a712010-05-16 22:32:54 +02004908 See |encryption| and 'cryptmethod'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004909 Careful: Do not set the key value by hand, someone might see the typed
4910 key. Use the |:X| command. But you can make 'key' empty: >
4911 :set key=
4912< It is not possible to get the value of this option with ":set key" or
4913 "echo &key". This is to avoid showing it to someone who shouldn't
4914 know. It also means you cannot see it yourself once you have set it,
4915 be careful not to make a typing error!
Bram Moolenaard58e9292011-02-09 17:07:58 +01004916 You can use "&key" in an expression to detect whether encryption is
4917 enabled. When 'key' is set it returns "*****" (five stars).
Bram Moolenaar071d4272004-06-13 20:20:40 +00004918
4919 *'keymap'* *'kmp'* *E544*
4920'keymap' 'kmp' string (default "")
4921 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00004922 {only available when compiled with the |+keymap|
4923 feature}
4924 Name of a keyboard mapping. See |mbyte-keymap|.
4925 Setting this option to a valid keymap name has the side effect of
4926 setting 'iminsert' to one, so that the keymap becomes effective.
4927 'imsearch' is also set to one, unless it was -1
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00004928 Only normal file name characters can be used, "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004929
4930 *'keymodel'* *'km'*
4931'keymodel' 'km' string (default "")
4932 global
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01004933 List of comma-separated words, which enable special things that keys
Bram Moolenaar071d4272004-06-13 20:20:40 +00004934 can do. These values can be used:
4935 startsel Using a shifted special key starts selection (either
4936 Select mode or Visual mode, depending on "key" being
4937 present in 'selectmode').
4938 stopsel Using a not-shifted special key stops selection.
4939 Special keys in this context are the cursor keys, <End>, <Home>,
4940 <PageUp> and <PageDown>.
4941 The 'keymodel' option is set by the |:behave| command.
4942
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004943 *'keyprotocol'* *'kpc'*
4944'keyprotocol' 'kpc' string (default: see below)
4945 global
4946 Specifies what keyboard protocol to use depending on the value of
4947 'term'. The supported keyboard protocols names are:
4948 none whatever the terminal uses
4949 mok2 modifyOtherKeys level 2, as supported by xterm
4950 kitty Kitty keyboard protocol, as supported by Kitty
4951
Bram Moolenaara87749e2022-11-30 10:23:17 +00004952 The option value is a list of comma separated items. Each item has
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004953 a pattern that is matched against the 'term' option, a colon and the
4954 protocol name to be used. To illustrate this, the default value would
4955 be set with: >
4956 set keyprotocol=kitty:kitty,foot:kitty,wezterm:kitty,xterm:mok2
4957
4958< This means that when 'term' contains "kitty, "foot" or "wezterm"
4959 somewhere then the "kitty" protocol is used. When 'term' contains
Bram Moolenaar938ae282023-02-20 20:44:55 +00004960 "xterm" somewhere, then the "mok2" protocol is used.
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004961
4962 The first match is used, thus if you want to have "kitty" use the
4963 kitty protocol, but "badkitty" not, then you should match "badkitty"
4964 first and use the "none" value: >
4965 set keyprotocol=badkitty:none,kitty:kitty
4966<
4967 The option is used after 'term' has been changed. First the termcap
4968 entries are set, possibly using the builtin list, see |builtin-terms|.
4969 Then this option is inspected and if there is a match and a protocol
4970 is specified the following happens:
4971 none Nothing, the regular t_TE and t_TI values remain
4972
4973 mok2 The t_TE value is changed to:
4974 CSI >4;m disables modifyOtherKeys
4975 The t_TI value is changed to:
4976 CSI >4;2m enables modifyOtherKeys
Bram Moolenaara87749e2022-11-30 10:23:17 +00004977 CSI ?4m request the modifyOtherKeys state
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004978
4979 kitty The t_TE value is changed to:
4980 CSI >4;m disables modifyOtherKeys
Bram Moolenaara87749e2022-11-30 10:23:17 +00004981 CSI =0;1u disables the kitty keyboard protocol
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004982 The t_TI value is changed to:
Bram Moolenaara87749e2022-11-30 10:23:17 +00004983 CSI =1;1u enables the kitty keyboard protocol
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004984 CSI ?u request kitty keyboard protocol state
4985 CSI >c request the termresponse
4986
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00004987 If you notice problems, such as characters being displayed that
4988 disappear after `CTRL-L`, you might want to try making this option
4989 empty. Then set the 'term' option to have it take effect: >
4990 set keyprotocol=
4991 let &term = &term
Bram Moolenaarbe4e0162023-02-02 13:59:48 +00004992<
Bram Moolenaar63a2e362022-11-23 20:20:18 +00004993
Bram Moolenaar071d4272004-06-13 20:20:40 +00004994 *'keywordprg'* *'kp'*
4995'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
Bram Moolenaar2ff8b642016-05-24 10:46:45 +02004996 VMS: "help")
Bram Moolenaar071d4272004-06-13 20:20:40 +00004997 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00004998 Program to use for the |K| command. Environment variables are
4999 expanded |:set_env|. ":help" may be used to access the Vim internal
5000 help. (Note that previously setting the global option to the empty
5001 value did this, which is now deprecated.)
Bram Moolenaar2ff8b642016-05-24 10:46:45 +02005002 When the first character is ":", the command is invoked as a Vim
Bram Moolenaarb529cfb2022-07-25 15:42:07 +01005003 Ex command with [count] added as an argument if it is not zero.
Bram Moolenaar2ff8b642016-05-24 10:46:45 +02005004 When "man", "man -s" or an Ex command is used, Vim will automatically
5005 translate a count for the "K" command and pass it as the first
5006 argument. For "man -s" the "-s" is removed when there is no count.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005007 See |option-backslash| about including spaces and backslashes.
5008 Example: >
5009 :set keywordprg=man\ -s
5010< This option cannot be set from a |modeline| or in the |sandbox|, for
5011 security reasons.
5012
5013 *'langmap'* *'lmap'* *E357* *E358*
5014'langmap' 'lmap' string (default "")
5015 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005016 {only available when compiled with the |+langmap|
5017 feature}
5018 This option allows switching your keyboard into a special language
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005019 mode. When you are typing text in Insert mode the characters are
Bram Moolenaarfa735342016-01-03 22:14:44 +01005020 inserted directly. When in Normal mode the 'langmap' option takes
Bram Moolenaar071d4272004-06-13 20:20:40 +00005021 care of translating these special characters to the original meaning
5022 of the key. This means you don't have to change the keyboard mode to
5023 be able to execute Normal mode commands.
5024 This is the opposite of the 'keymap' option, where characters are
5025 mapped in Insert mode.
Bram Moolenaarb17893a2020-03-14 08:19:51 +01005026 Also consider setting 'langremap' to off, to prevent 'langmap' from
5027 applying to characters resulting from a mapping.
Bram Moolenaare968e362014-05-13 20:23:24 +02005028 This option cannot be set from a |modeline| or in the |sandbox|, for
5029 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005030
Bram Moolenaarfd2ac762006-03-01 22:09:21 +00005031 Example (for Greek, in UTF-8): *greek* >
5032 :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
Bram Moolenaar071d4272004-06-13 20:20:40 +00005033< Example (exchanges meaning of z and y for commands): >
5034 :set langmap=zy,yz,ZY,YZ
5035<
5036 The 'langmap' option is a list of parts, separated with commas. Each
5037 part can be in one of two forms:
5038 1. A list of pairs. Each pair is a "from" character immediately
5039 followed by the "to" character. Examples: "aA", "aAbBcC".
5040 2. A list of "from" characters, a semi-colon and a list of "to"
5041 characters. Example: "abc;ABC"
5042 Example: "aA,fgh;FGH,cCdDeE"
5043 Special characters need to be preceded with a backslash. These are
Bram Moolenaar4f4d51a2020-10-11 13:57:40 +02005044 ";", ',', '"', '|' and backslash itself.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005045
5046 This will allow you to activate vim actions without having to switch
5047 back and forth between the languages. Your language characters will
5048 be understood as normal vim English characters (according to the
5049 langmap mappings) in the following cases:
5050 o Normal/Visual mode (commands, buffer/register names, user mappings)
5051 o Insert/Replace Mode: Register names after CTRL-R
5052 o Insert/Replace Mode: Mappings
5053 Characters entered in Command-line mode will NOT be affected by
5054 this option. Note that this option can be changed at any time
5055 allowing to switch between mappings for different languages/encodings.
5056 Use a mapping to avoid having to type it each time!
5057
5058 *'langmenu'* *'lm'*
5059'langmenu' 'lm' string (default "")
5060 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005061 {only available when compiled with the |+menu| and
5062 |+multi_lang| features}
5063 Language to use for menu translation. Tells which file is loaded
5064 from the "lang" directory in 'runtimepath': >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00005065 "lang/menu_" .. &langmenu .. ".vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005066< (without the spaces). For example, to always use the Dutch menus, no
5067 matter what $LANG is set to: >
5068 :set langmenu=nl_NL.ISO_8859-1
5069< When 'langmenu' is empty, |v:lang| is used.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00005070 Only normal file name characters can be used, "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005071 If your $LANG is set to a non-English language but you do want to use
5072 the English menus: >
5073 :set langmenu=none
5074< This option must be set before loading menus, switching on filetype
5075 detection or syntax highlighting. Once the menus are defined setting
5076 this option has no effect. But you could do this: >
5077 :source $VIMRUNTIME/delmenu.vim
5078 :set langmenu=de_DE.ISO_8859-1
5079 :source $VIMRUNTIME/menu.vim
5080< Warning: This deletes all menus that you defined yourself!
5081
Bram Moolenaard94464e2015-11-02 15:28:18 +01005082 *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02005083'langnoremap' 'lnr' boolean (default off, set in |defaults.vim|)
Bram Moolenaar4391cf92014-11-05 17:44:52 +01005084 global
Bram Moolenaar4391cf92014-11-05 17:44:52 +01005085 {only available when compiled with the |+langmap|
5086 feature}
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02005087 This is just like 'langremap' but with the value inverted. It only
5088 exists for backwards compatibility. When setting 'langremap' then
5089 'langnoremap' is set to the inverted value, and the other way around.
5090
5091 *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
Bram Moolenaarb17893a2020-03-14 08:19:51 +01005092'langremap' 'lrm' boolean (default on, set to off in |defaults.vim|)
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02005093 global
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02005094 {only available when compiled with the |+langmap|
5095 feature}
5096 When off, setting 'langmap' does not apply to characters resulting from
Bram Moolenaar4391cf92014-11-05 17:44:52 +01005097 a mapping. This basically means, if you noticed that setting
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02005098 'langmap' disables some of your mappings, try resetting this option.
5099 This option defaults to on for backwards compatibility. Set it off if
Bram Moolenaar4391cf92014-11-05 17:44:52 +01005100 that works for you to avoid mappings to break.
5101
Bram Moolenaar071d4272004-06-13 20:20:40 +00005102 *'laststatus'* *'ls'*
5103'laststatus' 'ls' number (default 1)
5104 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005105 The value of this option influences when the last window will have a
5106 status line:
5107 0: never
5108 1: only if there are at least two windows
5109 2: always
5110 The screen looks nicer with a status line if you have several
5111 windows, but it takes another screen line. |status-line|
5112
5113 *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
5114'lazyredraw' 'lz' boolean (default off)
5115 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005116 When this option is set, the screen will not be redrawn while
5117 executing macros, registers and other commands that have not been
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005118 typed. Also, updating the window title is postponed. To force an
Bram Moolenaar071d4272004-06-13 20:20:40 +00005119 update use |:redraw|.
Bram Moolenaara57b5532022-06-24 11:48:03 +01005120 This may occasionally cause display errors. It is only meant to be set
5121 temporarily when performing an operation where redrawing may cause
Bram Moolenaar8cc5b552022-06-23 13:04:20 +01005122 flickering or cause a slow down.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005123
5124 *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'*
5125'linebreak' 'lbr' boolean (default off)
5126 local to window
Bram Moolenaardb84e452010-08-15 13:50:43 +02005127 {not available when compiled without the |+linebreak|
Bram Moolenaar071d4272004-06-13 20:20:40 +00005128 feature}
Bram Moolenaar946e27a2014-06-25 18:50:27 +02005129 If on, Vim will wrap long lines at a character in 'breakat' rather
Bram Moolenaar071d4272004-06-13 20:20:40 +00005130 than at the last character that fits on the screen. Unlike
5131 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
Bram Moolenaar946e27a2014-06-25 18:50:27 +02005132 it only affects the way the file is displayed, not its contents.
5133 If 'breakindent' is set, line is visually indented. Then, the value
5134 of 'showbreak' is used to put in front of wrapped lines. This option
Bram Moolenaar86b17e92014-07-02 20:00:47 +02005135 is not used when the 'wrap' option is off.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005136 Note that <Tab> characters after an <EOL> are mostly not displayed
5137 with the right amount of white space.
5138
5139 *'lines'* *E593*
5140'lines' number (default 24 or terminal height)
5141 global
5142 Number of lines of the Vim window.
5143 Normally you don't need to set this. It is done automatically by the
Bram Moolenaar7c626922005-02-07 22:01:03 +00005144 terminal initialization code. Also see |posix-screen-size|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005145 When Vim is running in the GUI or in a resizable window, setting this
5146 option will cause the window size to be changed. When you only want
5147 to use the size for the GUI, put the command in your |gvimrc| file.
5148 Vim limits the number of lines to what fits on the screen. You can
5149 use this command to get the tallest window possible: >
5150 :set lines=999
Bram Moolenaarf4d11452005-12-02 00:46:37 +00005151< Minimum value is 2, maximum value is 1000.
Bram Moolenaardc1f1642016-08-16 18:33:43 +02005152 If you get fewer lines than expected, check the 'guiheadroom' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005153 When you set this option and Vim is unable to change the physical
5154 number of lines of the display, the display may be messed up.
5155
5156 *'linespace'* *'lsp'*
5157'linespace' 'lsp' number (default 0, 1 for Win32 GUI)
5158 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005159 {only in the GUI}
5160 Number of pixel lines inserted between characters. Useful if the font
5161 uses the full character cell height, making lines touch each other.
5162 When non-zero there is room for underlining.
Bram Moolenaarbc7aa852005-03-06 23:38:09 +00005163 With some fonts there can be too much room between lines (to have
5164 space for ascents and descents). Then it makes sense to set
5165 'linespace' to a negative value. This may cause display problems
5166 though!
Bram Moolenaar071d4272004-06-13 20:20:40 +00005167
5168 *'lisp'* *'nolisp'*
5169'lisp' boolean (default off)
5170 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00005171 Lisp mode: When <Enter> is typed in insert mode set the indent for
5172 the next line to Lisp standards (well, sort of). Also happens with
5173 "cc" or "S". 'autoindent' must also be on for this to work. The 'p'
5174 flag in 'cpoptions' changes the method of indenting: Vi compatible or
5175 better. Also see 'lispwords'.
5176 The '-' character is included in keyword characters. Redefines the
5177 "=" operator to use this same indentation algorithm rather than
5178 calling an external program if 'equalprg' is empty.
5179 This option is not used when 'paste' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005180
Bram Moolenaar49846fb2022-10-15 16:05:33 +01005181 *'lispoptions'* *'lop'*
5182'lispoptions' 'lop' string (default "")
5183 local to buffer
5184 Comma-separated list of items that influence the Lisp indenting when
5185 enabled with the |'lisp'| option. Currently only one item is
5186 supported:
5187 expr:1 use 'indentexpr' for Lisp indenting when it is set
5188 expr:0 do not use 'indentexpr' for Lisp indenting (default)
5189 Note that when using 'indentexpr' the `=` operator indents all the
5190 lines, otherwise the first line is not indented (Vi-compatible).
5191
Bram Moolenaar071d4272004-06-13 20:20:40 +00005192 *'lispwords'* *'lw'*
5193'lispwords' 'lw' string (default is very long)
Bram Moolenaaraf6c1312014-03-12 18:55:58 +01005194 global or local to buffer |global-local|
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +01005195 Comma-separated list of words that influence the Lisp indenting when
5196 enabled with the |'lisp'| option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005197
5198 *'list'* *'nolist'*
5199'list' boolean (default off)
5200 local to window
Bram Moolenaar113cb512021-11-07 20:27:04 +00005201 List mode: By default show tabs as CTRL-I is displayed, display $
5202 after end of line. Useful to see the difference between tabs and
5203 spaces and for trailing blanks. Further changed by the 'listchars'
5204 option.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01005205
5206 The cursor is displayed at the start of the space a Tab character
5207 occupies, not at the end as usual in Normal mode. To get this cursor
5208 position while displaying Tabs with spaces, use: >
Bram Moolenaardd007ed2013-07-09 15:44:17 +02005209 :set list lcs=tab:\ \
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01005210<
5211 Note that list mode will also affect formatting (set with 'textwidth'
5212 or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for
Bram Moolenaar071d4272004-06-13 20:20:40 +00005213 changing the way tabs are displayed.
5214
5215 *'listchars'* *'lcs'*
5216'listchars' 'lcs' string (default "eol:$")
Bram Moolenaareed9d462021-02-15 20:38:25 +01005217 global or local to window |global-local|
Bram Moolenaarf9d5ca12010-08-01 16:13:51 +02005218 Strings to use in 'list' mode and for the |:list| command. It is a
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01005219 comma-separated list of string settings.
Bram Moolenaar79278362015-04-21 18:33:48 +02005220 *lcs-eol*
Bram Moolenaar071d4272004-06-13 20:20:40 +00005221 eol:c Character to show at the end of each line. When
5222 omitted, there is no extra character at the end of the
5223 line.
Bram Moolenaar79278362015-04-21 18:33:48 +02005224 *lcs-tab*
Bram Moolenaar83a52172019-01-16 22:41:54 +01005225 tab:xy[z] Two or three characters to be used to show a tab.
5226 The third character is optional.
5227
5228 tab:xy The 'x' is always used, then 'y' as many times as will
5229 fit. Thus "tab:>-" displays:
5230 >
5231 >-
5232 >--
5233 etc.
5234
5235 tab:xyz The 'z' is always used, then 'x' is prepended, and
5236 then 'y' is used as many times as will fit. Thus
5237 "tab:<->" displays:
5238 >
5239 <>
5240 <->
5241 <-->
5242 etc.
5243
5244 When "tab:" is omitted, a tab is shown as ^I.
Bram Moolenaar79278362015-04-21 18:33:48 +02005245 *lcs-space*
5246 space:c Character to show for a space. When omitted, spaces
5247 are left blank.
zeertzjqf14b8ba2021-09-10 16:58:30 +02005248 *lcs-multispace*
5249 multispace:c...
Bram Moolenaarbe4e0162023-02-02 13:59:48 +00005250 One or more characters to use cyclically to show for
5251 multiple consecutive spaces. Overrides the "space"
zeertzjqf14b8ba2021-09-10 16:58:30 +02005252 setting, except for single spaces. When omitted, the
5253 "space" setting is used. For example,
5254 `:set listchars=multispace:---+` shows ten consecutive
5255 spaces as:
Bram Moolenaaraca12fd2022-06-07 10:16:15 +01005256 ---+---+-- ~
Bram Moolenaar91478ae2021-02-03 15:58:13 +01005257 *lcs-lead*
5258 lead:c Character to show for leading spaces. When omitted,
zeertzjqf14b8ba2021-09-10 16:58:30 +02005259 leading spaces are blank. Overrides the "space" and
5260 "multispace" settings for leading spaces. You can
5261 combine it with "tab:", for example: >
Bram Moolenaar942db232021-02-13 18:14:48 +01005262 :set listchars+=tab:>-,lead:.
Bram Moolenaaraca12fd2022-06-07 10:16:15 +01005263< *lcs-leadmultispace*
5264 leadmultispace:c...
Bram Moolenaar069a7d52022-06-27 22:16:08 +01005265 Like the |lcs-multispace| value, but for leading
5266 spaces only. Also overrides |lcs-lead| for leading
5267 multiple spaces.
Bram Moolenaar8a3b8052022-06-26 12:21:15 +01005268 `:set listchars=leadmultispace:---+` shows ten
5269 consecutive leading spaces as:
Bram Moolenaaraca12fd2022-06-07 10:16:15 +01005270 ---+---+--XXX ~
5271 Where "XXX" denotes the first non-blank characters in
5272 the line.
5273 *lcs-trail*
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005274 trail:c Character to show for trailing spaces. When omitted,
zeertzjqf14b8ba2021-09-10 16:58:30 +02005275 trailing spaces are blank. Overrides the "space" and
5276 "multispace" settings for trailing spaces.
Bram Moolenaar79278362015-04-21 18:33:48 +02005277 *lcs-extends*
Bram Moolenaar071d4272004-06-13 20:20:40 +00005278 extends:c Character to show in the last column, when 'wrap' is
5279 off and the line continues beyond the right of the
5280 screen.
Bram Moolenaar79278362015-04-21 18:33:48 +02005281 *lcs-precedes*
Bram Moolenaarbffba7f2019-09-20 17:00:17 +02005282 precedes:c Character to show in the first visible column of the
5283 physical line, when there is text preceding the
5284 character visible in the first column.
Bram Moolenaar79278362015-04-21 18:33:48 +02005285 *lcs-conceal*
Bram Moolenaar860cae12010-06-05 23:22:07 +02005286 conceal:c Character to show in place of concealed text, when
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02005287 'conceallevel' is set to 1.
Bram Moolenaar79278362015-04-21 18:33:48 +02005288 *lcs-nbsp*
Bram Moolenaar73284b92015-05-04 17:28:22 +02005289 nbsp:c Character to show for a non-breakable space character
5290 (0xA0 (160 decimal) and U+202F). Left blank when
5291 omitted.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005292
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005293 The characters ':' and ',' should not be used. UTF-8 characters can
Bram Moolenaar071d4272004-06-13 20:20:40 +00005294 be used when 'encoding' is "utf-8", otherwise only printable
Bram Moolenaar910f66f2006-04-05 20:41:53 +00005295 characters are allowed. All characters must be single width.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005296
Bram Moolenaar93ff6722021-10-16 17:51:40 +01005297 Each character can be specified as hex: >
5298 set listchars=eol:\\x24
5299 set listchars=eol:\\u21b5
5300 set listchars=eol:\\U000021b5
5301< Note that a double backslash is used. The number of hex characters
5302 must be exactly 2 for \\x, 4 for \\u and 8 for \\U.
5303
Bram Moolenaar071d4272004-06-13 20:20:40 +00005304 Examples: >
5305 :set lcs=tab:>-,trail:-
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00005306 :set lcs=tab:>-,eol:<,nbsp:%
Bram Moolenaar071d4272004-06-13 20:20:40 +00005307 :set lcs=extends:>,precedes:<
5308< The "NonText" highlighting will be used for "eol", "extends" and
Bram Moolenaar34cc7d82021-09-21 20:09:51 +02005309 "precedes". "SpecialKey" will be used for "tab", "nbsp", "space",
5310 "multispace", "lead" and "trail".
Bram Moolenaar02467872007-05-06 13:22:01 +00005311 |hl-NonText| |hl-SpecialKey|
Bram Moolenaar071d4272004-06-13 20:20:40 +00005312
5313 *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
5314'loadplugins' 'lpl' boolean (default on)
5315 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005316 When on the plugin scripts are loaded when starting up |load-plugins|.
5317 This option can be reset in your |vimrc| file to disable the loading
5318 of plugins.
Bram Moolenaarc4da1132017-07-15 19:39:43 +02005319 Note that using the "-u NONE", "-u DEFAULTS" and "--noplugin" command
5320 line arguments reset this option. See |-u| and |--noplugin|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005321
Bram Moolenaard94464e2015-11-02 15:28:18 +01005322 *'luadll'*
Bram Moolenaar3848e002016-03-19 18:42:29 +01005323'luadll' string (default depends on the build)
Bram Moolenaard94464e2015-11-02 15:28:18 +01005324 global
Bram Moolenaard94464e2015-11-02 15:28:18 +01005325 {only available when compiled with the |+lua/dyn|
5326 feature}
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01005327 Specifies the name of the Lua shared library. The default is
5328 DYNAMIC_LUA_DLL, which was specified at compile time.
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02005329 Environment variables are expanded |:set_env|.
Bram Moolenaard94464e2015-11-02 15:28:18 +01005330 This option cannot be set from a |modeline| or in the |sandbox|, for
5331 security reasons.
5332
Bram Moolenaarf9393ef2006-04-24 19:47:27 +00005333 *'macatsui'* *'nomacatsui'*
5334'macatsui' boolean (default on)
5335 global
Bram Moolenaar3d1cde82020-08-15 18:55:18 +02005336 {not supported}
5337 No longer supported, as the Mac OS X GUI code was removed.
Bram Moolenaar02467872007-05-06 13:22:01 +00005338
Bram Moolenaar071d4272004-06-13 20:20:40 +00005339 *'magic'* *'nomagic'*
5340'magic' boolean (default on)
5341 global
5342 Changes the special characters that can be used in search patterns.
5343 See |pattern|.
Bram Moolenaar64d8e252016-09-06 22:12:34 +02005344 WARNING: Switching this option off most likely breaks plugins! That
5345 is because many patterns assume it's on and will fail when it's off.
5346 Only switch it off when working with old Vi scripts. In any other
5347 situation write patterns that work when 'magic' is on. Include "\M"
5348 when you want to |/\M|.
Bram Moolenaar4072ba52020-12-23 13:56:35 +01005349 In |Vim9| script the value of 'magic' is ignored, patterns behave like
5350 it is always set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005351
5352 *'makeef'* *'mef'*
5353'makeef' 'mef' string (default: "")
5354 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005355 {not available when compiled without the |+quickfix|
5356 feature}
5357 Name of the errorfile for the |:make| command (see |:make_makeprg|)
5358 and the |:grep| command.
5359 When it is empty, an internally generated temp file will be used.
5360 When "##" is included, it is replaced by a number to make the name
5361 unique. This makes sure that the ":make" command doesn't overwrite an
5362 existing file.
5363 NOT used for the ":cf" command. See 'errorfile' for that.
5364 Environment variables are expanded |:set_env|.
5365 See |option-backslash| about including spaces and backslashes.
5366 This option cannot be set from a |modeline| or in the |sandbox|, for
5367 security reasons.
5368
Bram Moolenaar2c7292d2017-03-05 17:43:31 +01005369 *'makeencoding'* *'menc'*
5370'makeencoding' 'menc' string (default "")
5371 global or local to buffer |global-local|
Bram Moolenaar2c7292d2017-03-05 17:43:31 +01005372 Encoding used for reading the output of external commands. When empty,
5373 encoding is not converted.
5374 This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`,
5375 `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`,
5376 and `:laddfile`.
5377
5378 This would be mostly useful when you use MS-Windows and set 'encoding'
5379 to "utf-8". If |+iconv| is enabled and GNU libiconv is used, setting
5380 'makeencoding' to "char" has the same effect as setting to the system
5381 locale encoding. Example: >
5382 :set encoding=utf-8
5383 :set makeencoding=char " system locale is used
5384<
Bram Moolenaar071d4272004-06-13 20:20:40 +00005385 *'makeprg'* *'mp'*
5386'makeprg' 'mp' string (default "make", VMS: "MMS")
5387 global or local to buffer |global-local|
Bram Moolenaar02467872007-05-06 13:22:01 +00005388 Program to use for the ":make" command. See |:make_makeprg|.
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01005389 This option may contain '%' and '#' characters (see |:_%| and |:_#|),
5390 which are expanded to the current and alternate file name. Use |::S|
Bram Moolenaar26df0922014-02-23 23:39:13 +01005391 to escape file names in case they contain special characters.
Bram Moolenaar02467872007-05-06 13:22:01 +00005392 Environment variables are expanded |:set_env|. See |option-backslash|
5393 about including spaces and backslashes.
5394 Note that a '|' must be escaped twice: once for ":set" and once for
5395 the interpretation of a command. When you use a filter called
5396 "myfilter" do it like this: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00005397 :set makeprg=gmake\ \\\|\ myfilter
5398< The placeholder "$*" can be given (even multiple times) to specify
5399 where the arguments will be included, for example: >
5400 :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
5401< This option cannot be set from a |modeline| or in the |sandbox|, for
5402 security reasons.
5403
5404 *'matchpairs'* *'mps'*
5405'matchpairs' 'mps' string (default "(:),{:},[:]")
5406 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00005407 Characters that form pairs. The |%| command jumps from one to the
Bram Moolenaara3e6bc92013-01-30 14:18:00 +01005408 other.
5409 Only character pairs are allowed that are different, thus you cannot
5410 jump between two double quotes.
5411 The characters must be separated by a colon.
Bram Moolenaar02467872007-05-06 13:22:01 +00005412 The pairs must be separated by a comma. Example for including '<' and
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02005413 '>' (for HTML): >
Bram Moolenaar071d4272004-06-13 20:20:40 +00005414 :set mps+=<:>
5415
5416< A more exotic example, to jump between the '=' and ';' in an
5417 assignment, useful for languages like C and Java: >
5418 :au FileType c,cpp,java set mps+==:;
5419
5420< For a more advanced way of using "%", see the matchit.vim plugin in
Bram Moolenaar01164a62017-11-02 22:58:42 +01005421 the $VIMRUNTIME/pack/dist/opt/matchit directory. |add-local-help|
Bram Moolenaar071d4272004-06-13 20:20:40 +00005422
5423 *'matchtime'* *'mat'*
5424'matchtime' 'mat' number (default 5)
5425 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005426 Tenths of a second to show the matching paren, when 'showmatch' is
5427 set. Note that this is not in milliseconds, like other options that
5428 set a time. This is to be compatible with Nvi.
5429
Bram Moolenaar362e1a32006-03-06 23:29:24 +00005430 *'maxcombine'* *'mco'*
5431'maxcombine' 'mco' number (default 2)
5432 global
Bram Moolenaar362e1a32006-03-06 23:29:24 +00005433 The maximum number of combining characters supported for displaying.
5434 Only used when 'encoding' is "utf-8".
5435 The default is OK for most languages. Hebrew may require 4.
5436 Maximum value is 6.
5437 Even when this option is set to 2 you can still edit text with more
5438 combining characters, you just can't see them. Use |g8| or |ga|.
5439 See |mbyte-combining|.
5440
Bram Moolenaar071d4272004-06-13 20:20:40 +00005441 *'maxfuncdepth'* *'mfd'*
5442'maxfuncdepth' 'mfd' number (default 100)
5443 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02005444 {not available when compiled without the |+eval|
Bram Moolenaar02467872007-05-06 13:22:01 +00005445 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00005446 Maximum depth of function calls for user functions. This normally
5447 catches endless recursion. When using a recursive function with
5448 more depth, set 'maxfuncdepth' to a bigger number. But this will use
5449 more memory, there is the danger of failing when memory is exhausted.
Bram Moolenaarbc2eada2017-01-02 21:27:47 +01005450 Increasing this limit above 200 also changes the maximum for Ex
Bram Moolenaar0b0f0992018-05-22 21:41:30 +02005451 command recursion, see |E169|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005452 See also |:function|.
5453
5454 *'maxmapdepth'* *'mmd'* *E223*
5455'maxmapdepth' 'mmd' number (default 1000)
5456 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005457 Maximum number of times a mapping is done without resulting in a
5458 character to be used. This normally catches endless mappings, like
5459 ":map x y" with ":map y x". It still does not catch ":map g wg",
5460 because the 'w' is used before the next mapping is done. See also
5461 |key-mapping|.
5462
5463 *'maxmem'* *'mm'*
5464'maxmem' 'mm' number (default between 256 to 5120 (system
5465 dependent) or half the amount of memory
5466 available)
5467 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005468 Maximum amount of memory (in Kbyte) to use for one buffer. When this
5469 limit is reached allocating extra memory for a buffer will cause
Bram Moolenaarcafafb32018-02-22 21:07:09 +01005470 other memory to be freed.
5471 The maximum usable value is about 2000000. Use this to work without a
5472 limit.
5473 The value is ignored when 'swapfile' is off.
5474 Also see 'maxmemtot'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005475
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00005476 *'maxmempattern'* *'mmp'*
5477'maxmempattern' 'mmp' number (default 1000)
5478 global
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00005479 Maximum amount of memory (in Kbyte) to use for pattern matching.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01005480 The maximum value is about 2000000. Use this to work without a limit.
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00005481 *E363*
Bram Moolenaar02467872007-05-06 13:22:01 +00005482 When Vim runs into the limit it gives an error message and mostly
5483 behaves like CTRL-C was typed.
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00005484 Running into the limit often means that the pattern is very
5485 inefficient or too complex. This may already happen with the pattern
5486 "\(.\)*" on a very long line. ".*" works much better.
Bram Moolenaarfd358112018-07-07 23:21:31 +02005487 Might also happen on redraw, when syntax rules try to match a complex
5488 text structure.
5489 Vim may run out of memory before hitting the 'maxmempattern' limit, in
5490 which case you get an "Out of memory" error instead.
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00005491
Bram Moolenaar071d4272004-06-13 20:20:40 +00005492 *'maxmemtot'* *'mmt'*
5493'maxmemtot' 'mmt' number (default between 2048 and 10240 (system
5494 dependent) or half the amount of memory
5495 available)
5496 global
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01005497 Maximum amount of memory in Kbyte to use for all buffers together.
5498 The maximum usable value is about 2000000 (2 Gbyte). Use this to work
Bram Moolenaarfa735342016-01-03 22:14:44 +01005499 without a limit.
5500 On 64 bit machines higher values might work. But hey, do you really
5501 need more than 2 Gbyte for text editing? Keep in mind that text is
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02005502 stored in the swap file, one can edit files > 2 Gbyte anyway. We do
Bram Moolenaarfa735342016-01-03 22:14:44 +01005503 need the memory to store undo info.
Bram Moolenaarcafafb32018-02-22 21:07:09 +01005504 Buffers with 'swapfile' off still count to the total amount of memory
5505 used.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01005506 Also see 'maxmem'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005507
5508 *'menuitems'* *'mis'*
5509'menuitems' 'mis' number (default 25)
5510 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005511 {not available when compiled without the |+menu|
5512 feature}
5513 Maximum number of items to use in a menu. Used for menus that are
5514 generated from a list of items, e.g., the Buffers menu. Changing this
5515 option has no direct effect, the menu must be refreshed first.
5516
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00005517 *'mkspellmem'* *'msm'*
5518'mkspellmem' 'msm' string (default "460000,2000,500")
5519 global
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00005520 {not available when compiled without the |+syntax|
5521 feature}
5522 Parameters for |:mkspell|. This tunes when to start compressing the
5523 word tree. Compression can be slow when there are many words, but
5524 it's needed to avoid running out of memory. The amount of memory used
5525 per word depends very much on how similar the words are, that's why
5526 this tuning is complicated.
5527
5528 There are three numbers, separated by commas:
5529 {start},{inc},{added}
5530
5531 For most languages the uncompressed word tree fits in memory. {start}
5532 gives the amount of memory in Kbyte that can be used before any
5533 compression is done. It should be a bit smaller than the amount of
5534 memory that is available to Vim.
5535
5536 When going over the {start} limit the {inc} number specifies the
5537 amount of memory in Kbyte that can be allocated before another
5538 compression is done. A low number means compression is done after
5539 less words are added, which is slow. A high number means more memory
5540 will be allocated.
5541
5542 After doing compression, {added} times 1024 words can be added before
5543 the {inc} limit is ignored and compression is done when any extra
5544 amount of memory is needed. A low number means there is a smaller
5545 chance of hitting the {inc} limit, less memory is used but it's
5546 slower.
5547
5548 The languages for which these numbers are important are Italian and
5549 Hungarian. The default works for when you have about 512 Mbyte. If
5550 you have 1 Gbyte you could use: >
5551 :set mkspellmem=900000,3000,800
5552< If you have less than 512 Mbyte |:mkspell| may fail for some
5553 languages, no matter what you set 'mkspellmem' to.
5554
Bram Moolenaar07607392019-05-26 19:20:43 +02005555 This option cannot be set from a |modeline| or in the |sandbox|.
5556
Bram Moolenaar071d4272004-06-13 20:20:40 +00005557 *'modeline'* *'ml'* *'nomodeline'* *'noml'*
Bram Moolenaar8243a792007-05-01 17:05:03 +00005558'modeline' 'ml' boolean (Vim default: on (off for root),
5559 Vi default: off)
Bram Moolenaar071d4272004-06-13 20:20:40 +00005560 local to buffer
Bram Moolenaar110289e2019-05-23 15:38:06 +02005561 If 'modeline' is on 'modelines' gives the number of lines that is
5562 checked for set commands. If 'modeline' is off or 'modelines' is zero
5563 no lines are checked. See |modeline|.
5564
5565 *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'*
5566'modelineexpr' 'mle' boolean (default: off)
5567 global
5568 When on allow some options that are an expression to be set in the
5569 modeline. Check the option for whether it is affected by
5570 'modelineexpr'. Also see |modeline|.
Bram Moolenaar1c6fd1e2019-05-23 22:11:59 +02005571 This option cannot be set from a |modeline| or in the |sandbox|, for
5572 security reasons.
Bram Moolenaar110289e2019-05-23 15:38:06 +02005573
Bram Moolenaar071d4272004-06-13 20:20:40 +00005574 *'modelines'* *'mls'*
5575'modelines' 'mls' number (default 5)
5576 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005577 If 'modeline' is on 'modelines' gives the number of lines that is
5578 checked for set commands. If 'modeline' is off or 'modelines' is zero
5579 no lines are checked. See |modeline|.
5580 NOTE: 'modeline' is set to the Vi default value when 'compatible' is
5581 set and to the Vim default value when 'compatible' is reset.
5582
5583 *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
Bram Moolenaar110289e2019-05-23 15:38:06 +02005584 *E21*
Bram Moolenaar071d4272004-06-13 20:20:40 +00005585'modifiable' 'ma' boolean (default on)
5586 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00005587 When off the buffer contents cannot be changed. The 'fileformat' and
5588 'fileencoding' options also can't be changed.
Bram Moolenaar369b6f52017-01-17 12:22:32 +01005589 Can be reset on startup with the |-M| command line argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005590
5591 *'modified'* *'mod'* *'nomodified'* *'nomod'*
5592'modified' 'mod' boolean (default off)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02005593 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00005594 When on, the buffer is considered to be modified. This option is set
5595 when:
5596 1. A change was made to the text since it was last written. Using the
5597 |undo| command to go back to the original text will reset the
5598 option. But undoing changes that were made before writing the
5599 buffer will set the option again, since the text is different from
5600 when it was written.
5601 2. 'fileformat' or 'fileencoding' is different from its original
5602 value. The original value is set when the buffer is read or
5603 written. A ":set nomodified" command also resets the original
5604 values to the current values and the 'modified' option will be
5605 reset.
Bram Moolenaar4f3f6682016-03-26 23:01:59 +01005606 Similarly for 'eol' and 'bomb'.
Bram Moolenaar5302d9e2011-09-14 17:55:08 +02005607 This option is not set when a change is made to the buffer as the
5608 result of a BufNewFile, BufRead/BufReadPost, BufWritePost,
5609 FileAppendPost or VimLeave autocommand event. See |gzip-example| for
5610 an explanation.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005611 When 'buftype' is "nowrite" or "nofile" this option may be set, but
5612 will be ignored.
Bram Moolenaarb5b75622018-03-09 22:22:21 +01005613 Note that the text may actually be the same, e.g. 'modified' is set
5614 when using "rA" on an "A".
Bram Moolenaar071d4272004-06-13 20:20:40 +00005615
5616 *'more'* *'nomore'*
5617'more' boolean (Vim default: on, Vi default: off)
5618 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005619 When on, listings pause when the whole screen is filled. You will get
5620 the |more-prompt|. When this option is off there are no pauses, the
5621 listing continues until finished.
5622 NOTE: This option is set to the Vi default value when 'compatible' is
5623 set and to the Vim default value when 'compatible' is reset.
5624
Bram Moolenaar98a29d02021-01-18 19:55:44 +01005625 *'mouse'*
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01005626'mouse' string (default "", "a" for GUI and Win32,
Bram Moolenaar5b418992019-10-27 18:50:25 +01005627 set to "a" or "nvi" in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00005628 global
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01005629 Enable the use of the mouse. Works for most terminals (xterm, Win32
5630 |win32-mouse|, QNX pterm, *BSD console with sysmouse and Linux console
5631 with gpm). For using the mouse in the GUI, see |gui-mouse|. The
5632 mouse can be enabled for different modes:
Bram Moolenaar7f2e9d72017-11-11 20:58:53 +01005633 n Normal mode and Terminal modes
Bram Moolenaar071d4272004-06-13 20:20:40 +00005634 v Visual mode
5635 i Insert mode
5636 c Command-line mode
5637 h all previous modes when editing a help file
5638 a all previous modes
5639 r for |hit-enter| and |more-prompt| prompt
Bram Moolenaar95bafa22018-10-02 13:26:25 +02005640 Normally you would enable the mouse in all five modes with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00005641 :set mouse=a
Bram Moolenaar5b418992019-10-27 18:50:25 +01005642< If your terminal can't overrule the mouse events going to the
5643 application, use: >
5644 :set mouse=nvi
Bram Moolenaar65e0d772020-06-14 17:29:55 +02005645< Then you can press ":", select text for the system, and press Esc to go
Bram Moolenaar5b418992019-10-27 18:50:25 +01005646 back to Vim using the mouse events.
5647 In |defaults.vim| "nvi" is used if the 'term' option is not matching
5648 "xterm".
5649
5650 When the mouse is not enabled, the GUI will still use the mouse for
Bram Moolenaar071d4272004-06-13 20:20:40 +00005651 modeless selection. This doesn't move the text cursor.
5652
5653 See |mouse-using|. Also see |'clipboard'|.
5654
5655 Note: When enabling the mouse in a terminal, copy/paste will use the
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005656 "* register if there is access to an X-server. The xterm handling of
Bram Moolenaar071d4272004-06-13 20:20:40 +00005657 the mouse buttons can still be used by keeping the shift key pressed.
5658 Also see the 'clipboard' option.
5659
5660 *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
5661'mousefocus' 'mousef' boolean (default off)
5662 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005663 {only works in the GUI}
5664 The window that the mouse pointer is on is automatically activated.
5665 When changing the window layout or window focus in another way, the
5666 mouse pointer is moved to the window with keyboard focus. Off is the
5667 default because it makes using the pull down menus a little goofy, as
5668 a pointer transit may activate a window unintentionally.
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +01005669 MS-Windows: Also see 'scrollfocus' for what window is scrolled when
Bram Moolenaar1d9215b2020-01-25 13:27:42 +01005670 using the mouse scroll wheel.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005671
5672 *'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
5673'mousehide' 'mh' boolean (default on)
5674 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005675 {only works in the GUI}
5676 When on, the mouse pointer is hidden when characters are typed.
5677 The mouse pointer is restored when the mouse is moved.
5678
5679 *'mousemodel'* *'mousem'*
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01005680'mousemodel' 'mousem' string (default "extend", "popup" for Win32)
Bram Moolenaar071d4272004-06-13 20:20:40 +00005681 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005682 Sets the model to use for the mouse. The name mostly specifies what
5683 the right mouse button is used for:
5684 extend Right mouse button extends a selection. This works
5685 like in an xterm.
5686 popup Right mouse button pops up a menu. The shifted left
5687 mouse button extends a selection. This works like
Bram Moolenaar582fd852005-03-28 20:58:01 +00005688 with Microsoft Windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005689 popup_setpos Like "popup", but the cursor will be moved to the
5690 position where the mouse was clicked, and thus the
5691 selected operation will act upon the clicked object.
5692 If clicking inside a selection, that selection will
Bram Moolenaar582fd852005-03-28 20:58:01 +00005693 be acted upon, i.e. no cursor move. This implies of
Bram Moolenaar071d4272004-06-13 20:20:40 +00005694 course, that right clicking outside a selection will
5695 end Visual mode.
5696 Overview of what button does what for each model:
5697 mouse extend popup(_setpos) ~
5698 left click place cursor place cursor
5699 left drag start selection start selection
5700 shift-left search word extend selection
5701 right click extend selection popup menu (place cursor)
5702 right drag extend selection -
5703 middle click paste paste
5704
5705 In the "popup" model the right mouse button produces a pop-up menu.
5706 You need to define this first, see |popup-menu|.
5707
5708 Note that you can further refine the meaning of buttons with mappings.
5709 See |gui-mouse-mapping|. But mappings are NOT used for modeless
5710 selection (because that's handled in the GUI code directly).
5711
5712 The 'mousemodel' option is set by the |:behave| command.
5713
Bram Moolenaar938ae282023-02-20 20:44:55 +00005714 *'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'*
Ernie Raelc4cb5442022-04-03 15:47:28 +01005715'mousemoveevent' 'mousemev' boolean (default off)
5716 global
5717 {only works in the GUI}
5718 When on, mouse move events are delivered to the input queue and are
5719 available for mapping. The default, off, avoids the mouse movement
5720 overhead except when needed. See |gui-mouse-mapping|.
5721 Warning: Setting this option can make pending mappings to be aborted
5722 when the mouse is moved.
5723 Currently only works in the GUI, may be made to work in a terminal
5724 later.
5725
Bram Moolenaar071d4272004-06-13 20:20:40 +00005726 *'mouseshape'* *'mouses'* *E547*
Bram Moolenaarf6b40102019-02-22 15:24:03 +01005727'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
5728 vs:leftright,vd:lrsizing,m:no,
5729 ml:up-arrow,v:rightup-arrow")
Bram Moolenaar071d4272004-06-13 20:20:40 +00005730 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00005731 {only available when compiled with the |+mouseshape|
5732 feature}
5733 This option tells Vim what the mouse pointer should look like in
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01005734 different modes. The option is a comma-separated list of parts, much
Bram Moolenaar071d4272004-06-13 20:20:40 +00005735 like used for 'guicursor'. Each part consist of a mode/location-list
5736 and an argument-list:
5737 mode-list:shape,mode-list:shape,..
5738 The mode-list is a dash separated list of these modes/locations:
5739 In a normal window: ~
5740 n Normal mode
5741 v Visual mode
5742 ve Visual mode with 'selection' "exclusive" (same as 'v',
5743 if not specified)
5744 o Operator-pending mode
5745 i Insert mode
5746 r Replace mode
5747
5748 Others: ~
5749 c appending to the command-line
5750 ci inserting in the command-line
5751 cr replacing in the command-line
5752 m at the 'Hit ENTER' or 'More' prompts
5753 ml idem, but cursor in the last line
5754 e any mode, pointer below last window
5755 s any mode, pointer on a status line
5756 sd any mode, while dragging a status line
5757 vs any mode, pointer on a vertical separator line
5758 vd any mode, while dragging a vertical separator line
5759 a everywhere
5760
5761 The shape is one of the following:
5762 avail name looks like ~
5763 w x arrow Normal mouse pointer
5764 w x blank no pointer at all (use with care!)
5765 w x beam I-beam
5766 w x updown up-down sizing arrows
5767 w x leftright left-right sizing arrows
5768 w x busy The system's usual busy pointer
5769 w x no The system's usual 'no input' pointer
5770 x udsizing indicates up-down resizing
5771 x lrsizing indicates left-right resizing
5772 x crosshair like a big thin +
5773 x hand1 black hand
5774 x hand2 white hand
5775 x pencil what you write with
5776 x question big ?
5777 x rightup-arrow arrow pointing right-up
5778 w x up-arrow arrow pointing up
5779 x <number> any X11 pointer number (see X11/cursorfont.h)
5780
5781 The "avail" column contains a 'w' if the shape is available for Win32,
5782 x for X11.
5783 Any modes not specified or shapes not available use the normal mouse
5784 pointer.
5785
5786 Example: >
5787 :set mouseshape=s:udsizing,m:no
5788< will make the mouse turn to a sizing arrow over the status lines and
5789 indicate no input when the hit-enter prompt is displayed (since
5790 clicking the mouse has no effect in this state.)
5791
5792 *'mousetime'* *'mouset'*
5793'mousetime' 'mouset' number (default 500)
5794 global
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01005795 Only for GUI, Win32 and Unix with xterm. Defines the maximum
Bram Moolenaar071d4272004-06-13 20:20:40 +00005796 time in msec between two mouse clicks for the second click to be
5797 recognized as a multi click.
5798
Bram Moolenaar0ab35b22017-10-08 17:41:37 +02005799 *'mzschemedll'*
5800'mzschemedll' string (default depends on the build)
5801 global
Bram Moolenaar0ab35b22017-10-08 17:41:37 +02005802 {only available when compiled with the |+mzscheme/dyn|
5803 feature}
5804 Specifies the name of the MzScheme shared library. The default is
5805 DYNAMIC_MZSCH_DLL which was specified at compile time.
5806 Environment variables are expanded |:set_env|.
Bram Moolenaarb0d45e72017-11-05 18:19:24 +01005807 The value must be set in the |vimrc| script or earlier. In the
Bram Moolenaar01164a62017-11-02 22:58:42 +01005808 startup, before the |load-plugins| step.
Bram Moolenaar0ab35b22017-10-08 17:41:37 +02005809 This option cannot be set from a |modeline| or in the |sandbox|, for
5810 security reasons.
5811
5812 *'mzschemegcdll'*
5813'mzschemegcdll' string (default depends on the build)
5814 global
Bram Moolenaar0ab35b22017-10-08 17:41:37 +02005815 {only available when compiled with the |+mzscheme/dyn|
5816 feature}
5817 Specifies the name of the MzScheme GC shared library. The default is
5818 DYNAMIC_MZGC_DLL which was specified at compile time.
5819 The value can be equal to 'mzschemedll' if it includes the GC code.
5820 Environment variables are expanded |:set_env|.
5821 This option cannot be set from a |modeline| or in the |sandbox|, for
5822 security reasons.
5823
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005824 *'mzquantum'* *'mzq'*
5825'mzquantum' 'mzq' number (default 100)
5826 global
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005827 {not available when compiled without the |+mzscheme|
5828 feature}
5829 The number of milliseconds between polls for MzScheme threads.
5830 Negative or zero value means no thread scheduling.
Bram Moolenaar036986f2017-03-16 17:41:02 +01005831 NOTE: This option is set to the Vim default value when 'compatible'
5832 is reset.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005833
Bram Moolenaar071d4272004-06-13 20:20:40 +00005834 *'nrformats'* *'nf'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02005835'nrformats' 'nf' string (default "bin,octal,hex",
5836 set to "bin,hex" in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00005837 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00005838 This defines what bases Vim will consider for numbers when using the
5839 CTRL-A and CTRL-X commands for adding to and subtracting from a number
5840 respectively; see |CTRL-A| for more info on these commands.
Bram Moolenaar4770d092006-01-12 23:22:24 +00005841 alpha If included, single alphabetical characters will be
Bram Moolenaar071d4272004-06-13 20:20:40 +00005842 incremented or decremented. This is useful for a list with a
Bram Moolenaar3848e002016-03-19 18:42:29 +01005843 letter index a), b), etc. *octal-nrformats*
Bram Moolenaar4770d092006-01-12 23:22:24 +00005844 octal If included, numbers that start with a zero will be considered
Bram Moolenaar071d4272004-06-13 20:20:40 +00005845 to be octal. Example: Using CTRL-A on "007" results in "010".
Bram Moolenaar4770d092006-01-12 23:22:24 +00005846 hex If included, numbers starting with "0x" or "0X" will be
Bram Moolenaar071d4272004-06-13 20:20:40 +00005847 considered to be hexadecimal. Example: Using CTRL-X on
5848 "0x100" results in "0x0ff".
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01005849 bin If included, numbers starting with "0b" or "0B" will be
5850 considered to be binary. Example: Using CTRL-X on
5851 "0b1000" subtracts one, resulting in "0b0111".
Bram Moolenaaraaad9952020-05-31 15:08:59 +02005852 unsigned If included, numbers are recognized as unsigned. Thus a
5853 leading dash or negative sign won't be considered as part of
5854 the number. Examples:
5855 Using CTRL-X on "2020" in "9-2020" results in "9-2019"
5856 (without "unsigned" it would become "9-2021").
5857 Using CTRL-A on "2020" in "9-2020" results in "9-2021"
5858 (without "unsigned" it would become "9-2019").
Bram Moolenaaracc22402020-06-07 21:07:18 +02005859 Using CTRL-X on "0" or CTRL-A on "18446744073709551615"
5860 (2^64 - 1) has no effect, overflow is prevented.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005861 Numbers which simply begin with a digit in the range 1-9 are always
5862 considered decimal. This also happens for numbers that are not
5863 recognized as octal or hex.
5864
5865 *'number'* *'nu'* *'nonumber'* *'nonu'*
5866'number' 'nu' boolean (default off)
5867 local to window
5868 Print the line number in front of each line. When the 'n' option is
5869 excluded from 'cpoptions' a wrapped line will not use the column of
5870 line numbers (this is the default when 'compatible' isn't set).
Bram Moolenaar592e0a22004-07-03 16:05:59 +00005871 The 'numberwidth' option can be used to set the room used for the line
5872 number.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005873 When a long, wrapped line doesn't start with the first character, '-'
5874 characters are put before the number.
James McCoya80aad72021-12-22 19:45:28 +00005875 For highlighting see |hl-LineNr|, and |hl-CursorLineNr|, and the
5876 |:sign-define| "numhl" argument.
Bram Moolenaar203d04d2013-06-06 21:36:40 +02005877 *number_relativenumber*
5878 The 'relativenumber' option changes the displayed number to be
5879 relative to the cursor. Together with 'number' there are these
5880 four combinations (cursor in line 3):
5881
Bram Moolenaar3848e002016-03-19 18:42:29 +01005882 'nonu' 'nu' 'nonu' 'nu'
Bram Moolenaar203d04d2013-06-06 21:36:40 +02005883 'nornu' 'nornu' 'rnu' 'rnu'
5884
5885 |apple | 1 apple | 2 apple | 2 apple
5886 |pear | 2 pear | 1 pear | 1 pear
5887 |nobody | 3 nobody | 0 nobody |3 nobody
5888 |there | 4 there | 1 there | 1 there
Bram Moolenaar071d4272004-06-13 20:20:40 +00005889
Bram Moolenaar592e0a22004-07-03 16:05:59 +00005890 *'numberwidth'* *'nuw'*
5891'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
5892 local to window
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005893 {only available when compiled with the |+linebreak|
5894 feature}
Bram Moolenaar592e0a22004-07-03 16:05:59 +00005895 Minimal number of columns to use for the line number. Only relevant
Bram Moolenaar64486672010-05-16 15:46:46 +02005896 when the 'number' or 'relativenumber' option is set or printing lines
5897 with a line number. Since one space is always between the number and
5898 the text, there is one less character for the number itself.
Bram Moolenaar592e0a22004-07-03 16:05:59 +00005899 The value is the minimum width. A bigger width is used when needed to
Bram Moolenaar64486672010-05-16 15:46:46 +02005900 fit the highest line number in the buffer respectively the number of
5901 rows in the window, depending on whether 'number' or 'relativenumber'
5902 is set. Thus with the Vim default of 4 there is room for a line number
5903 up to 999. When the buffer has 1000 lines five columns will be used.
Bram Moolenaarf8a07122019-07-01 22:06:07 +02005904 The minimum value is 1, the maximum value is 20.
Bram Moolenaar036986f2017-03-16 17:41:02 +01005905 NOTE: This option is set to the Vi default value when 'compatible' is
5906 set and to the Vim default value when 'compatible' is reset.
Bram Moolenaar592e0a22004-07-03 16:05:59 +00005907
Bram Moolenaarf75a9632005-09-13 21:20:47 +00005908 *'omnifunc'* *'ofu'*
5909'omnifunc' 'ofu' string (default: empty)
Bram Moolenaare344bea2005-09-01 20:46:49 +00005910 local to buffer
Bram Moolenaardb84e452010-08-15 13:50:43 +02005911 {not available when compiled without the |+eval|
Bram Moolenaare2c453d2019-08-21 14:37:09 +02005912 feature}
Bram Moolenaarc7486e02005-12-29 22:48:26 +00005913 This option specifies a function to be used for Insert mode omni
5914 completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
Bram Moolenaar280f1262006-01-30 00:14:18 +00005915 See |complete-functions| for an explanation of how the function is
Yegappan Lakshmanan8658c752021-12-03 11:09:29 +00005916 invoked and what it should return. The value can be the name of a
5917 function, a |lambda| or a |Funcref|. See |option-value-function| for
5918 more information.
Bram Moolenaar043545e2006-10-10 16:44:07 +00005919 This option is usually set by a filetype plugin:
Bram Moolenaar9c102382006-05-03 21:26:49 +00005920 |:filetype-plugin-on|
Bram Moolenaar30b65812012-07-12 22:01:11 +02005921 This option cannot be set from a |modeline| or in the |sandbox|, for
5922 security reasons.
Bram Moolenaare344bea2005-09-01 20:46:49 +00005923
5924
Bram Moolenaar02467872007-05-06 13:22:01 +00005925 *'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
Bram Moolenaar043545e2006-10-10 16:44:07 +00005926'opendevice' 'odev' boolean (default off)
5927 global
Bram Moolenaar6f4754b2022-01-23 12:07:04 +00005928 {only for MS-Windows} *E796*
Bram Moolenaar043545e2006-10-10 16:44:07 +00005929 Enable reading and writing from devices. This may get Vim stuck on a
5930 device that can be opened but doesn't actually do the I/O. Therefore
5931 it is off by default.
5932 Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also
5933 result in editing a device.
5934
5935
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00005936 *'operatorfunc'* *'opfunc'*
5937'operatorfunc' 'opfunc' string (default: empty)
5938 global
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00005939 This option specifies a function to be called by the |g@| operator.
Yegappan Lakshmanan777175b2021-11-18 22:08:57 +00005940 See |:map-operator| for more info and an example. The value can be
5941 the name of a function, a |lambda| or a |Funcref|. See
5942 |option-value-function| for more information.
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00005943
5944 This option cannot be set from a |modeline| or in the |sandbox|, for
5945 security reasons.
5946
5947
Bram Moolenaar251e1912011-06-19 05:09:16 +02005948 *'osfiletype'* *'oft'*
5949'osfiletype' 'oft' string (default: "")
Bram Moolenaar071d4272004-06-13 20:20:40 +00005950 local to buffer
Bram Moolenaar251e1912011-06-19 05:09:16 +02005951 This option was supported on RISC OS, which has been removed.
5952
Bram Moolenaar071d4272004-06-13 20:20:40 +00005953
Bram Moolenaarf6fee0e2016-02-21 23:02:49 +01005954 *'packpath'* *'pp'*
5955'packpath' 'pp' string (default: see 'runtimepath')
Bram Moolenaarf6fee0e2016-02-21 23:02:49 +01005956 Directories used to find packages. See |packages|.
5957
5958
Bram Moolenaar071d4272004-06-13 20:20:40 +00005959 *'paragraphs'* *'para'*
Bram Moolenaar57e48462008-03-12 16:38:55 +00005960'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
Bram Moolenaar071d4272004-06-13 20:20:40 +00005961 global
5962 Specifies the nroff macros that separate paragraphs. These are pairs
5963 of two letters (see |object-motions|).
5964
5965 *'paste'* *'nopaste'*
5966'paste' boolean (default off)
5967 global
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005968 Put Vim in Paste mode. This is useful if you want to cut or copy
5969 some text from one window and paste it in Vim. This will avoid
Bram Moolenaar071d4272004-06-13 20:20:40 +00005970 unexpected effects.
5971 Setting this option is useful when using Vim in a terminal, where Vim
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00005972 cannot distinguish between typed text and pasted text. In the GUI, Vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00005973 knows about pasting and will mostly do the right thing without 'paste'
5974 being set. The same is true for a terminal where Vim handles the
5975 mouse clicks itself.
Bram Moolenaar2ce06f62005-01-31 19:19:04 +00005976 This option is reset when starting the GUI. Thus if you set it in
5977 your .vimrc it will work in a terminal, but not in the GUI. Setting
5978 'paste' in the GUI has side effects: e.g., the Paste toolbar button
5979 will no longer work in Insert mode, because it uses a mapping.
Bram Moolenaar071d4272004-06-13 20:20:40 +00005980 When the 'paste' option is switched on (also when it was already on):
5981 - mapping in Insert mode and Command-line mode is disabled
5982 - abbreviations are disabled
Bram Moolenaar071d4272004-06-13 20:20:40 +00005983 - 'autoindent' is reset
Bram Moolenaarca635012015-09-25 20:34:21 +02005984 - 'expandtab' is reset
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02005985 - 'hkmap' is reset
Bram Moolenaar071d4272004-06-13 20:20:40 +00005986 - 'revins' is reset
5987 - 'ruler' is reset
5988 - 'showmatch' is reset
Bram Moolenaarca635012015-09-25 20:34:21 +02005989 - 'smarttab' is reset
5990 - 'softtabstop' is set to 0
5991 - 'textwidth' is set to 0
5992 - 'wrapmargin' is set to 0
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02005993 - 'varsofttabstop' is made empty
Bram Moolenaar071d4272004-06-13 20:20:40 +00005994 These options keep their value, but their effect is disabled:
Bram Moolenaar071d4272004-06-13 20:20:40 +00005995 - 'cindent'
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02005996 - 'formatoptions' is used like it is empty
Bram Moolenaarca635012015-09-25 20:34:21 +02005997 - 'indentexpr'
5998 - 'lisp'
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02005999 - 'smartindent'
Bram Moolenaar071d4272004-06-13 20:20:40 +00006000 NOTE: When you start editing another file while the 'paste' option is
6001 on, settings from the modelines or autocommands may change the
6002 settings again, causing trouble when pasting text. You might want to
6003 set the 'paste' option again.
6004 When the 'paste' option is reset the mentioned options are restored to
6005 the value before the moment 'paste' was switched from off to on.
6006 Resetting 'paste' before ever setting it does not have any effect.
6007 Since mapping doesn't work while 'paste' is active, you need to use
6008 the 'pastetoggle' option to toggle the 'paste' option with some key.
6009
6010 *'pastetoggle'* *'pt'*
6011'pastetoggle' 'pt' string (default "")
6012 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006013 When non-empty, specifies the key sequence that toggles the 'paste'
6014 option. This is like specifying a mapping: >
6015 :map {keys} :set invpaste<CR>
6016< Where {keys} is the value of 'pastetoggle'.
6017 The difference is that it will work even when 'paste' is set.
6018 'pastetoggle' works in Insert mode and Normal mode, but not in
6019 Command-line mode.
6020 Mappings are checked first, thus overrule 'pastetoggle'. However,
6021 when 'paste' is on mappings are ignored in Insert mode, thus you can do
6022 this: >
6023 :map <F10> :set paste<CR>
6024 :map <F11> :set nopaste<CR>
6025 :imap <F10> <C-O>:set paste<CR>
6026 :imap <F11> <nop>
6027 :set pastetoggle=<F11>
6028< This will make <F10> start paste mode and <F11> stop paste mode.
6029 Note that typing <F10> in paste mode inserts "<F10>", since in paste
6030 mode everything is inserted literally, except the 'pastetoggle' key
6031 sequence.
Bram Moolenaar446cb832008-06-24 21:56:24 +00006032 When the value has several bytes 'ttimeoutlen' applies.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006033
6034 *'pex'* *'patchexpr'*
6035'patchexpr' 'pex' string (default "")
6036 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006037 {not available when compiled without the |+diff|
6038 feature}
6039 Expression which is evaluated to apply a patch to a file and generate
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006040 the resulting new version of the file. See |diff-patchexpr|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006041
Bram Moolenaardbc28022014-07-26 13:40:44 +02006042 *'patchmode'* *'pm'* *E205* *E206*
Bram Moolenaar071d4272004-06-13 20:20:40 +00006043'patchmode' 'pm' string (default "")
6044 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006045 When non-empty the oldest version of a file is kept. This can be used
6046 to keep the original version of a file if you are changing files in a
6047 source distribution. Only the first time that a file is written a
6048 copy of the original file will be kept. The name of the copy is the
6049 name of the original file with the string in the 'patchmode' option
6050 appended. This option should start with a dot. Use a string like
Bram Moolenaardf980db2017-12-24 13:22:00 +01006051 ".orig" or ".org". 'backupdir' must not be empty for this to work
6052 (Detail: The backup file is renamed to the patchmode file after the
6053 new file has been successfully written, that's why it must be possible
6054 to write a backup file). If there was no file to be backed up, an
6055 empty file is created.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006056 When the 'backupskip' pattern matches, a patchmode file is not made.
6057 Using 'patchmode' for compressed files appends the extension at the
6058 end (e.g., "file.gz.orig"), thus the resulting name isn't always
6059 recognized as a compressed file.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00006060 Only normal file name characters can be used, "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006061
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01006062 *'path'* *'pa'* *E343* *E345* *E347* *E854*
Bram Moolenaar071d4272004-06-13 20:20:40 +00006063'path' 'pa' string (default on Unix: ".,/usr/include,,"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006064 other systems: ".,,")
6065 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006066 This is a list of directories which will be searched when using the
Bram Moolenaarc236c162008-07-13 17:41:49 +00006067 |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands,
6068 provided that the file being searched for has a relative path (not
6069 starting with "/", "./" or "../"). The directories in the 'path'
6070 option may be relative or absolute.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006071 - Use commas to separate directory names: >
6072 :set path=.,/usr/local/include,/usr/include
6073< - Spaces can also be used to separate directory names (for backwards
6074 compatibility with version 3.0). To have a space in a directory
6075 name, precede it with an extra backslash, and escape the space: >
6076 :set path=.,/dir/with\\\ space
6077< - To include a comma in a directory name precede it with an extra
6078 backslash: >
6079 :set path=.,/dir/with\\,comma
6080< - To search relative to the directory of the current file, use: >
6081 :set path=.
6082< - To search in the current directory use an empty string between two
6083 commas: >
6084 :set path=,,
6085< - A directory name may end in a ':' or '/'.
6086 - Environment variables are expanded |:set_env|.
6087 - When using |netrw.vim| URLs can be used. For example, adding
6088 "http://www.vim.org" will make ":find index.html" work.
Bram Moolenaarc236c162008-07-13 17:41:49 +00006089 - Search upwards and downwards in a directory tree using "*", "**" and
6090 ";". See |file-searching| for info and syntax.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006091 - Careful with '\' characters, type two to get one in the option: >
6092 :set path=.,c:\\include
6093< Or just use '/' instead: >
6094 :set path=.,c:/include
6095< Don't forget "." or files won't even be found in the same directory as
6096 the file!
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006097 The maximum length is limited. How much depends on the system, mostly
Bram Moolenaar071d4272004-06-13 20:20:40 +00006098 it is something like 256 or 1024 characters.
6099 You can check if all the include files are found, using the value of
6100 'path', see |:checkpath|.
6101 The use of |:set+=| and |:set-=| is preferred when adding or removing
6102 directories from the list. This avoids problems when a future version
6103 uses another default. To remove the current directory use: >
6104 :set path-=
6105< To add the current directory use: >
6106 :set path+=
6107< To use an environment variable, you probably need to replace the
6108 separator. Here is an example to append $INCL, in which directory
6109 names are separated with a semi-colon: >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00006110 :let &path = &path .. "," .. substitute($INCL, ';', ',', 'g')
Bram Moolenaar071d4272004-06-13 20:20:40 +00006111< Replace the ';' with a ':' or whatever separator is used. Note that
6112 this doesn't work when $INCL contains a comma or white space.
6113
Bram Moolenaar37c64c72017-09-19 22:06:03 +02006114 *'perldll'*
6115'perldll' string (default depends on the build)
6116 global
Bram Moolenaar37c64c72017-09-19 22:06:03 +02006117 {only available when compiled with the |+perl/dyn|
6118 feature}
6119 Specifies the name of the Perl shared library. The default is
6120 DYNAMIC_PERL_DLL, which was specified at compile time.
6121 Environment variables are expanded |:set_env|.
6122 This option cannot be set from a |modeline| or in the |sandbox|, for
6123 security reasons.
6124
Bram Moolenaar071d4272004-06-13 20:20:40 +00006125 *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
6126'preserveindent' 'pi' boolean (default off)
6127 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00006128 When changing the indent of the current line, preserve as much of the
6129 indent structure as possible. Normally the indent is replaced by a
6130 series of tabs followed by spaces as required (unless |'expandtab'| is
6131 enabled, in which case only spaces are used). Enabling this option
6132 means the indent will preserve as many existing characters as possible
6133 for indenting, and only add additional tabs or spaces as required.
Bram Moolenaar446cb832008-06-24 21:56:24 +00006134 'expandtab' does not apply to the preserved white space, a Tab remains
6135 a Tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006136 NOTE: When using ">>" multiple times the resulting indent is a mix of
6137 tabs and spaces. You might not like this.
Bram Moolenaar036986f2017-03-16 17:41:02 +01006138 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006139 Also see 'copyindent'.
6140 Use |:retab| to clean up white space.
6141
6142 *'previewheight'* *'pvh'*
6143'previewheight' 'pvh' number (default 12)
6144 global
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02006145 {not available when compiled without the |+quickfix|
6146 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +00006147 Default height for a preview window. Used for |:ptag| and associated
Bram Moolenaar79648732019-07-18 21:43:07 +02006148 commands. Used for |CTRL-W_}| when no count is given. Not used when
6149 'previewpopup' is set.
6150
6151 *'previewpopup'* *'pvp'*
6152'previewpopup' 'pvp' string (default empty)
6153 global
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02006154 {not available when compiled without the |+textprop|
6155 or |+quickfix| feature}
Bram Moolenaar79648732019-07-18 21:43:07 +02006156 When not empty a popup window is used for commands that would open a
6157 preview window. See |preview-popup|.
Bram Moolenaar576a4a62019-08-18 15:25:17 +02006158 Not used for the insert completion info, add "popup" to
6159 'completeopt' for that.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006160
6161 *'previewwindow'* *'nopreviewwindow'*
6162 *'pvw'* *'nopvw'* *E590*
6163'previewwindow' 'pvw' boolean (default off)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02006164 local to window |special-local-window-option|
Bram Moolenaar62a0cb42019-08-18 16:35:23 +02006165 {not available when compiled without the |+quickfix|
6166 feature}
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006167 Identifies the preview window. Only one window can have this option
Bram Moolenaar071d4272004-06-13 20:20:40 +00006168 set. It's normally not set directly, but by using one of the commands
6169 |:ptag|, |:pedit|, etc.
6170
6171 *'printdevice'* *'pdev'*
6172'printdevice' 'pdev' string (default empty)
6173 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006174 {only available when compiled with the |+printer|
6175 feature}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006176 The name of the printer to be used for |:hardcopy|.
6177 See |pdev-option|.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00006178 This option cannot be set from a |modeline| or in the |sandbox|, for
6179 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006180
Bram Moolenaar8299df92004-07-10 09:47:34 +00006181 *'printencoding'* *'penc'*
Bram Moolenaar95bafa22018-10-02 13:26:25 +02006182'printencoding' 'penc' string (default empty, except for some systems)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006183 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006184 {only available when compiled with the |+printer|
6185 and |+postscript| features}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006186 Sets the character encoding used when printing.
6187 See |penc-option|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006188
6189 *'printexpr'* *'pexpr'*
Bram Moolenaar95bafa22018-10-02 13:26:25 +02006190'printexpr' 'pexpr' string (default: see below)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006191 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006192 {only available when compiled with the |+printer|
6193 and |+postscript| features}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006194 Expression used to print the PostScript produced with |:hardcopy|.
6195 See |pexpr-option|.
Bram Moolenaar51628222016-12-01 23:03:28 +01006196 This option cannot be set from a |modeline| or in the |sandbox|, for
6197 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006198
Bram Moolenaar8299df92004-07-10 09:47:34 +00006199 *'printfont'* *'pfn'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00006200'printfont' 'pfn' string (default "courier")
6201 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006202 {only available when compiled with the |+printer|
6203 feature}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006204 The name of the font that will be used for |:hardcopy|.
6205 See |pfn-option|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006206
6207 *'printheader'* *'pheader'*
6208'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
6209 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006210 {only available when compiled with the |+printer|
6211 feature}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006212 The format of the header produced in |:hardcopy| output.
6213 See |pheader-option|.
6214
6215 *'printmbcharset'* *'pmbcs'*
6216'printmbcharset' 'pmbcs' string (default "")
6217 global
Bram Moolenaar4c92e752019-02-17 21:18:32 +01006218 {only available when compiled with the |+printer|
6219 and |+postscript| features}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006220 The CJK character set to be used for CJK output from |:hardcopy|.
6221 See |pmbcs-option|.
6222
6223 *'printmbfont'* *'pmbfn'*
6224'printmbfont' 'pmbfn' string (default "")
6225 global
Bram Moolenaar4c92e752019-02-17 21:18:32 +01006226 {only available when compiled with the |+printer|
6227 and |+postscript| features}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006228 List of font names to be used for CJK output from |:hardcopy|.
6229 See |pmbfn-option|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006230
6231 *'printoptions'* *'popt'*
6232'printoptions' 'popt' string (default "")
6233 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006234 {only available when compiled with |+printer| feature}
Bram Moolenaar8299df92004-07-10 09:47:34 +00006235 List of items that control the format of the output of |:hardcopy|.
6236 See |popt-option|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006237
Bram Moolenaar26a60b42005-02-22 08:49:11 +00006238 *'prompt'* *'noprompt'*
6239'prompt' boolean (default on)
6240 global
6241 When on a ":" prompt is used in Ex mode.
6242
Bram Moolenaar7d47b6e2006-03-15 22:59:18 +00006243 *'pumheight'* *'ph'*
6244'pumheight' 'ph' number (default 0)
6245 global
Bram Moolenaar06a89a52006-04-29 22:01:03 +00006246 Determines the maximum number of items to show in the popup menu for
6247 Insert mode completion. When zero as much space as available is used.
Bram Moolenaar7d47b6e2006-03-15 22:59:18 +00006248 |ins-completion-menu|.
6249
Bram Moolenaara8f04aa2018-02-10 15:36:55 +01006250 *'pumwidth'* *'pw'*
Bram Moolenaarcafafb32018-02-22 21:07:09 +01006251'pumwidth' 'pw' number (default 15)
Bram Moolenaara8f04aa2018-02-10 15:36:55 +01006252 global
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01006253 Determines the minimum width to use for the popup menu for Insert mode
Bram Moolenaarcafafb32018-02-22 21:07:09 +01006254 completion. |ins-completion-menu|.
Bram Moolenaara8f04aa2018-02-10 15:36:55 +01006255
Bram Moolenaard94464e2015-11-02 15:28:18 +01006256 *'pythondll'*
Bram Moolenaar3848e002016-03-19 18:42:29 +01006257'pythondll' string (default depends on the build)
Bram Moolenaard94464e2015-11-02 15:28:18 +01006258 global
Bram Moolenaard94464e2015-11-02 15:28:18 +01006259 {only available when compiled with the |+python/dyn|
6260 feature}
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01006261 Specifies the name of the Python 2.x shared library. The default is
6262 DYNAMIC_PYTHON_DLL, which was specified at compile time.
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02006263 Environment variables are expanded |:set_env|.
Bram Moolenaard94464e2015-11-02 15:28:18 +01006264 This option cannot be set from a |modeline| or in the |sandbox|, for
6265 security reasons.
Bram Moolenaar7d47b6e2006-03-15 22:59:18 +00006266
Bram Moolenaar94073162018-01-31 21:49:05 +01006267 *'pythonhome'*
6268'pythonhome' string (default "")
6269 global
Bram Moolenaar94073162018-01-31 21:49:05 +01006270 {only available when compiled with the |+python/dyn|
6271 feature}
6272 Specifies the name of the Python 2.x home directory. When 'pythonhome'
6273 and the PYTHONHOME environment variable are not set, PYTHON_HOME,
6274 which was specified at compile time, will be used for the Python 2.x
6275 home directory.
6276 Environment variables are expanded |:set_env|.
6277 This option cannot be set from a |modeline| or in the |sandbox|, for
6278 security reasons.
6279
Bram Moolenaarb4ff5182015-11-10 21:15:48 +01006280 *'pythonthreedll'*
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01006281'pythonthreedll' string (default depends on the build)
Bram Moolenaarb4ff5182015-11-10 21:15:48 +01006282 global
Bram Moolenaarb4ff5182015-11-10 21:15:48 +01006283 {only available when compiled with the |+python3/dyn|
6284 feature}
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01006285 Specifies the name of the Python 3 shared library. The default is
6286 DYNAMIC_PYTHON3_DLL, which was specified at compile time.
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02006287 Environment variables are expanded |:set_env|.
Bram Moolenaarb4ff5182015-11-10 21:15:48 +01006288 This option cannot be set from a |modeline| or in the |sandbox|, for
6289 security reasons.
6290
Bram Moolenaar94073162018-01-31 21:49:05 +01006291 *'pythonthreehome'*
6292'pythonthreehome' string (default "")
6293 global
Bram Moolenaar94073162018-01-31 21:49:05 +01006294 {only available when compiled with the |+python3/dyn|
6295 feature}
6296 Specifies the name of the Python 3 home directory. When
6297 'pythonthreehome' and the PYTHONHOME environment variable are not set,
6298 PYTHON3_HOME, which was specified at compile time, will be used for
6299 the Python 3 home directory.
6300 Environment variables are expanded |:set_env|.
6301 This option cannot be set from a |modeline| or in the |sandbox|, for
6302 security reasons.
6303
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01006304 *'pyxversion'* *'pyx'*
6305'pyxversion' 'pyx' number (default depends on the build)
6306 global
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01006307 {only available when compiled with the |+python| or
6308 the |+python3| feature}
6309 Specifies the python version used for pyx* functions and commands
6310 |python_x|. The default value is as follows:
6311
6312 Compiled with Default ~
6313 |+python| and |+python3| 0
6314 only |+python| 2
6315 only |+python3| 3
6316
6317 Available values are 0, 2 and 3.
6318 If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of
6319 any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3`
6320 sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets
6321 to 2 if Python 2 is available.
6322 See also: |has-pythonx|
6323
6324 If Vim is compiled with only |+python| or |+python3| setting
6325 'pyxversion' has no effect. The pyx* functions and commands are
6326 always the same as the compiled version.
6327
6328 This option cannot be set from a |modeline| or in the |sandbox|, for
6329 security reasons.
6330
Bram Moolenaar858ba062020-05-31 23:11:59 +02006331 *'quickfixtextfunc'* *'qftf'*
6332'quickfixtextfunc' 'qftf' string (default "")
6333 global
6334 {only available when compiled with the |+quickfix|
6335 feature}
6336 This option specifies a function to be used to get the text to display
6337 in the quickfix and location list windows. This can be used to
6338 customize the information displayed in the quickfix or location window
6339 for each entry in the corresponding quickfix or location list. See
6340 |quickfix-window-function| for an explanation of how to write the
Yegappan Lakshmanan777175b2021-11-18 22:08:57 +00006341 function and an example. The value can be the name of a function, a
6342 |lambda| or a |Funcref|. See |option-value-function| for more
6343 information.
Bram Moolenaar858ba062020-05-31 23:11:59 +02006344
6345 This option cannot be set from a |modeline| or in the |sandbox|, for
6346 security reasons.
6347
Bram Moolenaar677ee682005-01-27 14:41:15 +00006348 *'quoteescape'* *'qe'*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00006349'quoteescape' 'qe' string (default "\")
6350 local to buffer
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00006351 The characters that are used to escape quotes in a string. Used for
6352 objects like a', a" and a` |a'|.
6353 When one of the characters in this option is found inside a string,
6354 the following character will be skipped. The default value makes the
6355 text "foo\"bar\\" considered to be one string.
6356
Bram Moolenaar071d4272004-06-13 20:20:40 +00006357 *'readonly'* *'ro'* *'noreadonly'* *'noro'*
6358'readonly' 'ro' boolean (default off)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02006359 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006360 If on, writes fail unless you use a '!'. Protects you from
6361 accidentally overwriting a file. Default on when Vim is started
6362 in read-only mode ("vim -R") or when the executable is called "view".
Bram Moolenaar4399ef42005-02-12 14:29:27 +00006363 When using ":w!" the 'readonly' option is reset for the current
6364 buffer, unless the 'Z' flag is in 'cpoptions'.
Bram Moolenaar6c60f472019-04-28 16:00:35 +02006365 When using the ":view" command the 'readonly' option is set for the
6366 newly edited buffer.
Bram Moolenaar369b6f52017-01-17 12:22:32 +01006367 See 'modifiable' for disallowing changes to the buffer.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006368
Bram Moolenaar91a4e822008-01-19 14:59:58 +00006369 *'redrawtime'* *'rdt'*
6370'redrawtime' 'rdt' number (default 2000)
6371 global
Bram Moolenaar91a4e822008-01-19 14:59:58 +00006372 {only available when compiled with the |+reltime|
6373 feature}
6374 The time in milliseconds for redrawing the display. This applies to
Bram Moolenaar15142e22018-04-30 22:19:58 +02006375 searching for patterns for 'hlsearch', |:match| highlighting and syntax
Bram Moolenaar06f1ed22017-06-18 22:41:03 +02006376 highlighting.
Bram Moolenaar91a4e822008-01-19 14:59:58 +00006377 When redrawing takes more than this many milliseconds no further
Bram Moolenaar06f1ed22017-06-18 22:41:03 +02006378 matches will be highlighted.
6379 For syntax highlighting the time applies per window. When over the
6380 limit syntax highlighting is disabled until |CTRL-L| is used.
6381 This is used to avoid that Vim hangs when using a very complicated
6382 pattern.
Bram Moolenaar91a4e822008-01-19 14:59:58 +00006383
Bram Moolenaar543b7ef2013-06-01 14:50:56 +02006384 *'regexpengine'* *'re'*
Bram Moolenaare6ae6222013-05-21 21:01:10 +02006385'regexpengine' 're' number (default 0)
6386 global
Bram Moolenaare6ae6222013-05-21 21:01:10 +02006387 This selects the default regexp engine. |two-engines|
6388 The possible values are:
6389 0 automatic selection
6390 1 old engine
6391 2 NFA engine
6392 Note that when using the NFA engine and the pattern contains something
6393 that is not supported the pattern will not match. This is only useful
6394 for debugging the regexp engine.
Bram Moolenaarfda37292014-11-05 14:27:36 +01006395 Using automatic selection enables Vim to switch the engine, if the
6396 default engine becomes too costly. E.g., when the NFA engine uses too
6397 many states. This should prevent Vim from hanging on a combination of
6398 a complex pattern with long text.
Bram Moolenaare6ae6222013-05-21 21:01:10 +02006399
Bram Moolenaar64486672010-05-16 15:46:46 +02006400 *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
6401'relativenumber' 'rnu' boolean (default off)
6402 local to window
Bram Moolenaar64486672010-05-16 15:46:46 +02006403 Show the line number relative to the line with the cursor in front of
Bram Moolenaar06b5d512010-05-22 15:37:44 +02006404 each line. Relative line numbers help you use the |count| you can
Bram Moolenaar64486672010-05-16 15:46:46 +02006405 precede some vertical motion commands (e.g. j k + -) with, without
6406 having to calculate it yourself. Especially useful in combination with
6407 other commands (e.g. y d c < > gq gw =).
6408 When the 'n' option is excluded from 'cpoptions' a wrapped
6409 line will not use the column of line numbers (this is the default when
6410 'compatible' isn't set).
6411 The 'numberwidth' option can be used to set the room used for the line
6412 number.
6413 When a long, wrapped line doesn't start with the first character, '-'
6414 characters are put before the number.
Bram Moolenaar61d35bd2012-03-28 20:51:51 +02006415 See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
6416 the number.
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01006417
Bram Moolenaar203d04d2013-06-06 21:36:40 +02006418 The number in front of the cursor line also depends on the value of
6419 'number', see |number_relativenumber| for all combinations of the two
6420 options.
Bram Moolenaar64486672010-05-16 15:46:46 +02006421
Bram Moolenaar071d4272004-06-13 20:20:40 +00006422 *'remap'* *'noremap'*
6423'remap' boolean (default on)
6424 global
6425 Allows for mappings to work recursively. If you do not want this for
6426 a single entry, use the :noremap[!] command.
Bram Moolenaara3227e22006-03-08 21:32:40 +00006427 NOTE: To avoid portability problems with Vim scripts, always keep
6428 this option at the default "on". Only switch it off when working with
6429 old Vi scripts.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006430
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006431 *'renderoptions'* *'rop'*
6432'renderoptions' 'rop' string (default: empty)
6433 global
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006434 {only available when compiled with GUI and DIRECTX on
6435 MS-Windows}
6436 Select a text renderer and set its options. The options depend on the
6437 renderer.
6438
6439 Syntax: >
6440 set rop=type:{renderer}(,{name}:{value})*
6441<
6442 Currently, only one optional renderer is available.
6443
6444 render behavior ~
6445 directx Vim will draw text using DirectX (DirectWrite). It makes
6446 drawn glyphs more beautiful than default GDI.
6447 It requires 'encoding' is "utf-8", and only works on
6448 MS-Windows Vista or newer version.
6449
6450 Options:
6451 name meaning type value ~
6452 gamma gamma float 1.0 - 2.2 (maybe)
6453 contrast enhancedContrast float (unknown)
6454 level clearTypeLevel float (unknown)
6455 geom pixelGeometry int 0 - 2 (see below)
6456 renmode renderingMode int 0 - 6 (see below)
6457 taamode textAntialiasMode int 0 - 3 (see below)
Bram Moolenaara338adc2018-01-31 20:51:47 +01006458 scrlines Scroll Lines int (deprecated)
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006459
Bram Moolenaar92467d32017-12-05 13:22:16 +01006460 See this URL for detail (except for scrlines):
6461 https://msdn.microsoft.com/en-us/library/dd368190.aspx
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006462
6463 For geom: structure of a device pixel.
6464 0 - DWRITE_PIXEL_GEOMETRY_FLAT
6465 1 - DWRITE_PIXEL_GEOMETRY_RGB
6466 2 - DWRITE_PIXEL_GEOMETRY_BGR
6467
6468 See this URL for detail:
Bram Moolenaar92467d32017-12-05 13:22:16 +01006469 https://msdn.microsoft.com/en-us/library/dd368114.aspx
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006470
6471 For renmode: method of rendering glyphs.
6472 0 - DWRITE_RENDERING_MODE_DEFAULT
6473 1 - DWRITE_RENDERING_MODE_ALIASED
6474 2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
6475 3 - DWRITE_RENDERING_MODE_GDI_NATURAL
6476 4 - DWRITE_RENDERING_MODE_NATURAL
6477 5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
6478 6 - DWRITE_RENDERING_MODE_OUTLINE
6479
6480 See this URL for detail:
Bram Moolenaar92467d32017-12-05 13:22:16 +01006481 https://msdn.microsoft.com/en-us/library/dd368118.aspx
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006482
6483 For taamode: antialiasing mode used for drawing text.
6484 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
6485 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
6486 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
6487 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
6488
6489 See this URL for detail:
Bram Moolenaar92467d32017-12-05 13:22:16 +01006490 https://msdn.microsoft.com/en-us/library/dd368170.aspx
6491
Bram Moolenaara338adc2018-01-31 20:51:47 +01006492 For scrlines:
6493 This was used for optimizing scrolling behavior, however this
6494 is now deprecated. If specified, it is simply ignored.
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006495
6496 Example: >
6497 set encoding=utf-8
Bram Moolenaard7ccc4d2017-11-26 14:29:32 +01006498 set gfn=Ricty_Diminished:h12
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006499 set rop=type:directx
6500<
Bram Moolenaard7ccc4d2017-11-26 14:29:32 +01006501 If select a raster font (Courier, Terminal or FixedSys which
6502 have ".fon" extension in file name) to 'guifont', it will be
Bram Moolenaar92467d32017-12-05 13:22:16 +01006503 drawn by GDI as a fallback.
Bram Moolenaard7ccc4d2017-11-26 14:29:32 +01006504
6505 NOTE: It is known that some fonts and options combination
6506 causes trouble on drawing glyphs.
6507
Bram Moolenaar92467d32017-12-05 13:22:16 +01006508 - 'renmode:5' and 'renmode:6' will not work with some
Bram Moolenaard7ccc4d2017-11-26 14:29:32 +01006509 special made fonts (True-Type fonts which includes only
6510 bitmap glyphs).
6511 - 'taamode:3' will not work with some vector fonts.
6512
6513 NOTE: With this option, you can display colored emoji
6514 (emoticon) in Windows 8.1 or later. To display colored emoji,
6515 there are some conditions which you should notice.
6516
6517 - If your font includes non-colored emoji already, it will
6518 be used.
6519 - If your font doesn't have emoji, the system chooses an
6520 alternative symbol font. On Windows 10, "Segoe UI Emoji"
6521 will be used.
6522 - When this alternative font didn't have fixed width glyph,
6523 emoji might be rendered beyond the bounding box of drawing
6524 cell.
Bram Moolenaarb5a7a8b2014-08-06 14:52:30 +02006525
6526 Other render types are currently not supported.
6527
Bram Moolenaar071d4272004-06-13 20:20:40 +00006528 *'report'*
6529'report' number (default 2)
6530 global
6531 Threshold for reporting number of lines changed. When the number of
6532 changed lines is more than 'report' a message will be given for most
6533 ":" commands. If you want it always, set 'report' to 0.
6534 For the ":substitute" command the number of substitutions is used
6535 instead of the number of lines.
6536
6537 *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
6538'restorescreen' 'rs' boolean (default on)
6539 global
Bram Moolenaar8024f932020-01-14 19:29:13 +01006540 {only in MS-Windows console version}
Bram Moolenaar071d4272004-06-13 20:20:40 +00006541 When set, the screen contents is restored when exiting Vim. This also
6542 happens when executing external commands.
6543
6544 For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
6545 options in your .vimrc. To disable restoring:
6546 set t_ti= t_te=
6547 To enable restoring (for an xterm):
6548 set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
6549 (Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
6550
6551 *'revins'* *'ri'* *'norevins'* *'nori'*
6552'revins' 'ri' boolean (default off)
6553 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006554 {only available when compiled with the |+rightleft|
6555 feature}
6556 Inserting characters in Insert mode will work backwards. See "typing
6557 backwards" |ins-reverse|. This option can be toggled with the CTRL-_
6558 command in Insert mode, when 'allowrevins' is set.
Bram Moolenaarca635012015-09-25 20:34:21 +02006559 NOTE: This option is reset when 'compatible' is set.
6560 This option is reset when 'paste' is set and restored when 'paste' is
6561 reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006562
6563 *'rightleft'* *'rl'* *'norightleft'* *'norl'*
6564'rightleft' 'rl' boolean (default off)
6565 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00006566 {only available when compiled with the |+rightleft|
6567 feature}
6568 When on, display orientation becomes right-to-left, i.e., characters
6569 that are stored in the file appear from the right to the left.
6570 Using this option, it is possible to edit files for languages that
6571 are written from the right to the left such as Hebrew and Arabic.
6572 This option is per window, so it is possible to edit mixed files
6573 simultaneously, or to view the same file in both ways (this is
6574 useful whenever you have a mixed text file with both right-to-left
6575 and left-to-right strings so that both sets are displayed properly
6576 in different windows). Also see |rileft.txt|.
6577
Bram Moolenaar607cc1e2010-07-18 18:47:44 +02006578 *'rightleftcmd'* *'rlc'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00006579'rightleftcmd' 'rlc' string (default "search")
6580 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00006581 {only available when compiled with the |+rightleft|
6582 feature}
6583 Each word in this option enables the command line editing to work in
6584 right-to-left mode for a group of commands:
6585
6586 search "/" and "?" commands
6587
6588 This is useful for languages such as Hebrew, Arabic and Farsi.
6589 The 'rightleft' option must be set for 'rightleftcmd' to take effect.
6590
Bram Moolenaard94464e2015-11-02 15:28:18 +01006591 *'rubydll'*
Bram Moolenaar3848e002016-03-19 18:42:29 +01006592'rubydll' string (default: depends on the build)
Bram Moolenaard94464e2015-11-02 15:28:18 +01006593 global
Bram Moolenaard94464e2015-11-02 15:28:18 +01006594 {only available when compiled with the |+ruby/dyn|
6595 feature}
Bram Moolenaar25e4fcd2016-01-09 14:57:47 +01006596 Specifies the name of the Ruby shared library. The default is
6597 DYNAMIC_RUBY_DLL, which was specified at compile time.
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02006598 Environment variables are expanded |:set_env|.
Bram Moolenaard94464e2015-11-02 15:28:18 +01006599 This option cannot be set from a |modeline| or in the |sandbox|, for
6600 security reasons.
6601
Bram Moolenaar071d4272004-06-13 20:20:40 +00006602 *'ruler'* *'ru'* *'noruler'* *'noru'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02006603'ruler' 'ru' boolean (default off, set in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006604 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006605 Show the line and column number of the cursor position, separated by a
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006606 comma. When there is room, the relative position of the displayed
Bram Moolenaar071d4272004-06-13 20:20:40 +00006607 text in the file is shown on the far right:
6608 Top first line is visible
6609 Bot last line is visible
6610 All first and last line are visible
6611 45% relative position in the file
6612 If 'rulerformat' is set, it will determine the contents of the ruler.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006613 Each window has its own ruler. If a window has a status line, the
Bram Moolenaara2a89732022-08-31 14:46:18 +01006614 ruler is shown there. Otherwise it is shown in the last line of the
6615 screen. If the statusline is given by 'statusline' (i.e. not empty),
6616 this option takes precedence over 'ruler' and 'rulerformat'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006617 If the number of characters displayed is different from the number of
Bram Moolenaar207f0092020-08-30 17:20:20 +02006618 bytes in the text (e.g., for a TAB or a multibyte character), both
Bram Moolenaar071d4272004-06-13 20:20:40 +00006619 the text column (byte number) and the screen column are shown,
6620 separated with a dash.
6621 For an empty line "0-1" is shown.
6622 For an empty buffer the line number will also be zero: "0,0-1".
Bram Moolenaarca635012015-09-25 20:34:21 +02006623 This option is reset when 'paste' is set and restored when 'paste' is
6624 reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006625 If you don't want to see the ruler all the time but want to know where
6626 you are, use "g CTRL-G" |g_CTRL-G|.
6627 NOTE: This option is reset when 'compatible' is set.
6628
6629 *'rulerformat'* *'ruf'*
6630'rulerformat' 'ruf' string (default empty)
6631 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006632 {not available when compiled without the |+statusline|
6633 feature}
6634 When this option is not empty, it determines the content of the ruler
6635 string, as displayed for the 'ruler' option.
Bram Moolenaara23ccb82006-02-27 00:08:02 +00006636 The format of this option is like that of 'statusline'.
Bram Moolenaar110289e2019-05-23 15:38:06 +02006637 This option cannot be set in a modeline when 'modelineexpr' is off.
6638
Bram Moolenaar071d4272004-06-13 20:20:40 +00006639 The default ruler width is 17 characters. To make the ruler 15
6640 characters wide, put "%15(" at the start and "%)" at the end.
6641 Example: >
6642 :set rulerformat=%15(%c%V\ %p%%%)
6643<
6644 *'runtimepath'* *'rtp'* *vimfiles*
6645'runtimepath' 'rtp' string (default:
Bram Moolenaar942db232021-02-13 18:14:48 +01006646 Unix: "$HOME/.vim,
Bram Moolenaar071d4272004-06-13 20:20:40 +00006647 $VIM/vimfiles,
6648 $VIMRUNTIME,
6649 $VIM/vimfiles/after,
6650 $HOME/.vim/after"
6651 Amiga: "home:vimfiles,
6652 $VIM/vimfiles,
6653 $VIMRUNTIME,
6654 $VIM/vimfiles/after,
6655 home:vimfiles/after"
Bram Moolenaar942db232021-02-13 18:14:48 +01006656 MS-Windows: "$HOME/vimfiles,
Bram Moolenaar071d4272004-06-13 20:20:40 +00006657 $VIM/vimfiles,
6658 $VIMRUNTIME,
6659 $VIM/vimfiles/after,
6660 $HOME/vimfiles/after"
Bram Moolenaar3d1cde82020-08-15 18:55:18 +02006661 macOS: "$VIM:vimfiles,
Bram Moolenaar071d4272004-06-13 20:20:40 +00006662 $VIMRUNTIME,
6663 $VIM:vimfiles:after"
Bram Moolenaarb3f74062020-02-26 16:16:53 +01006664 Haiku: "$BE_USER_SETTINGS/vim,
6665 $VIM/vimfiles,
6666 $VIMRUNTIME,
6667 $VIM/vimfiles/after,
Bram Moolenaar942db232021-02-13 18:14:48 +01006668 $BE_USER_SETTINGS/vim/after"
6669 VMS: "sys$login:vimfiles,
Bram Moolenaar071d4272004-06-13 20:20:40 +00006670 $VIM/vimfiles,
6671 $VIMRUNTIME,
6672 $VIM/vimfiles/after,
Bram Moolenaar582fd852005-03-28 20:58:01 +00006673 sys$login:vimfiles/after")
Bram Moolenaar071d4272004-06-13 20:20:40 +00006674 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006675 This is a list of directories which will be searched for runtime
6676 files:
6677 filetype.vim filetypes by file name |new-filetype|
6678 scripts.vim filetypes by file contents |new-filetype-scripts|
Bram Moolenaar4399ef42005-02-12 14:29:27 +00006679 autoload/ automatically loaded scripts |autoload-functions|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006680 colors/ color scheme files |:colorscheme|
6681 compiler/ compiler files |:compiler|
6682 doc/ documentation |write-local-help|
6683 ftplugin/ filetype plugins |write-filetype-plugin|
Bram Moolenaar8a7d6542020-01-26 15:56:19 +01006684 import/ files that are found by `:import`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006685 indent/ indent scripts |indent-expression|
6686 keymap/ key mapping files |mbyte-keymap|
6687 lang/ menu translations |:menutrans|
6688 menu.vim GUI menus |menu.vim|
Bram Moolenaar26852122016-05-24 20:02:38 +02006689 pack/ packages |:packadd|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006690 plugin/ plugin scripts |write-plugin|
6691 print/ files for printing |postscript-print-encoding|
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00006692 spell/ spell checking files |spell|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006693 syntax/ syntax files |mysyntaxfile|
6694 tutor/ files for vimtutor |tutor|
6695
6696 And any other file searched for with the |:runtime| command.
6697
6698 The defaults for most systems are setup to search five locations:
6699 1. In your home directory, for your personal preferences.
6700 2. In a system-wide Vim directory, for preferences from the system
6701 administrator.
6702 3. In $VIMRUNTIME, for files distributed with Vim.
6703 *after-directory*
6704 4. In the "after" directory in the system-wide Vim directory. This is
6705 for the system administrator to overrule or add to the distributed
6706 defaults (rarely needed)
6707 5. In the "after" directory in your home directory. This is for
6708 personal preferences to overrule or add to the distributed defaults
6709 or system-wide settings (rarely needed).
6710
Bram Moolenaard0796902016-09-16 20:02:31 +02006711 More entries are added when using |packages|. If it gets very long
6712 then `:set rtp` will be truncated, use `:echo &rtp` to see the full
6713 string.
Bram Moolenaar26852122016-05-24 20:02:38 +02006714
Bram Moolenaar071d4272004-06-13 20:20:40 +00006715 Note that, unlike 'path', no wildcards like "**" are allowed. Normal
6716 wildcards are allowed, but can significantly slow down searching for
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006717 runtime files. For speed, use as few items as possible and avoid
Bram Moolenaar071d4272004-06-13 20:20:40 +00006718 wildcards.
6719 See |:runtime|.
6720 Example: >
6721 :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME
6722< This will use the directory "~/vimruntime" first (containing your
6723 personal Vim runtime files), then "/mygroup/vim" (shared between a
6724 group of people) and finally "$VIMRUNTIME" (the distributed runtime
6725 files).
6726 You probably should always include $VIMRUNTIME somewhere, to use the
6727 distributed runtime files. You can put a directory before $VIMRUNTIME
6728 to find files which replace a distributed runtime files. You can put
6729 a directory after $VIMRUNTIME to find files which add to distributed
6730 runtime files.
Bram Moolenaarb5b75622018-03-09 22:22:21 +01006731 When Vim is started with |--clean| the home directory entries are not
6732 included.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006733 This option cannot be set from a |modeline| or in the |sandbox|, for
6734 security reasons.
6735
6736 *'scroll'* *'scr'*
6737'scroll' 'scr' number (default: half the window height)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02006738 local to window |special-local-window-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006739 Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
6740 set to half the number of lines in the window when the window size
Bram Moolenaar74667062020-12-28 15:41:41 +01006741 changes. This may happen when enabling the |status-line| or
6742 'tabline' option after setting the 'scroll' option.
6743 If you give a count to the CTRL-U or CTRL-D command it will
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006744 be used as the new value for 'scroll'. Reset to half the window
Bram Moolenaar25c9c682019-05-05 18:13:34 +02006745 height with ":set scroll=0".
Bram Moolenaar071d4272004-06-13 20:20:40 +00006746
6747 *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
6748'scrollbind' 'scb' boolean (default off)
6749 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00006750 See also |scroll-binding|. When this option is set, the current
6751 window scrolls as other scrollbind windows (windows that also have
6752 this option set) scroll. This option is useful for viewing the
6753 differences between two versions of a file, see 'diff'.
6754 See |'scrollopt'| for options that determine how this option should be
6755 interpreted.
6756 This option is mostly reset when splitting a window to edit another
6757 file. This means that ":split | edit file" results in two windows
6758 with scroll-binding, but ":split file" does not.
6759
Bram Moolenaarae20f342019-11-05 21:09:23 +01006760 *'scrollfocus'* *'scf'* *'noscrollfocus'* *'noscf'*
6761'scrollfocus' 'scf' boolean (default off)
6762 global
6763 {only for MS-Windows GUI}
6764 When using the scroll wheel and this option is set, the window under
6765 the mouse pointer is scrolled. With this option off the current
6766 window is scrolled.
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +01006767 Systems other than MS-Windows always behave like this option is on.
Bram Moolenaarae20f342019-11-05 21:09:23 +01006768
Bram Moolenaar071d4272004-06-13 20:20:40 +00006769 *'scrolljump'* *'sj'*
6770'scrolljump' 'sj' number (default 1)
6771 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006772 Minimal number of lines to scroll when the cursor gets off the
6773 screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E,
6774 CTRL-D). Useful if your terminal scrolls very slowly.
Bram Moolenaar1e015462005-09-25 22:16:38 +00006775 When set to a negative number from -1 to -100 this is used as the
6776 percentage of the window height. Thus -50 scrolls half the window
6777 height.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006778 NOTE: This option is set to 1 when 'compatible' is set.
6779
6780 *'scrolloff'* *'so'*
Bram Moolenaar50ba5262016-09-22 22:33:02 +02006781'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
Bram Moolenaar375e3392019-01-31 18:26:10 +01006782 global or local to window |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006783 Minimal number of screen lines to keep above and below the cursor.
6784 This will make some context visible around where you are working. If
6785 you set it to a very large value (999) the cursor line will always be
6786 in the middle of the window (except at the start or end of the file or
6787 when long lines wrap).
Bram Moolenaar375e3392019-01-31 18:26:10 +01006788 After using the local value, go back the global value with one of
6789 these two: >
6790 setlocal scrolloff<
6791 setlocal scrolloff=-1
6792< For scrolling horizontally see 'sidescrolloff'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006793 NOTE: This option is set to 0 when 'compatible' is set.
6794
6795 *'scrollopt'* *'sbo'*
6796'scrollopt' 'sbo' string (default "ver,jump")
6797 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006798 This is a comma-separated list of words that specifies how
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00006799 'scrollbind' windows should behave. 'sbo' stands for ScrollBind
6800 Options.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006801 The following words are available:
6802 ver Bind vertical scrolling for 'scrollbind' windows
6803 hor Bind horizontal scrolling for 'scrollbind' windows
6804 jump Applies to the offset between two windows for vertical
6805 scrolling. This offset is the difference in the first
6806 displayed line of the bound windows. When moving
6807 around in a window, another 'scrollbind' window may
6808 reach a position before the start or after the end of
6809 the buffer. The offset is not changed though, when
6810 moving back the 'scrollbind' window will try to scroll
6811 to the desired position when possible.
6812 When now making that window the current one, two
6813 things can be done with the relative offset:
6814 1. When "jump" is not included, the relative offset is
6815 adjusted for the scroll position in the new current
6816 window. When going back to the other window, the
Bram Moolenaar02467872007-05-06 13:22:01 +00006817 new relative offset will be used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006818 2. When "jump" is included, the other windows are
6819 scrolled to keep the same relative offset. When
6820 going back to the other window, it still uses the
6821 same relative offset.
6822 Also see |scroll-binding|.
Bram Moolenaar910f66f2006-04-05 20:41:53 +00006823 When 'diff' mode is active there always is vertical scroll binding,
6824 even when "ver" isn't there.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006825
6826 *'sections'* *'sect'*
6827'sections' 'sect' string (default "SHNHH HUnhsh")
6828 global
6829 Specifies the nroff macros that separate sections. These are pairs of
6830 two letters (See |object-motions|). The default makes a section start
6831 at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh".
6832
6833 *'secure'* *'nosecure'* *E523*
6834'secure' boolean (default off)
6835 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006836 When on, ":autocmd", shell and write commands are not allowed in
6837 ".vimrc" and ".exrc" in the current directory and map commands are
6838 displayed. Switch it off only if you know that you will not run into
6839 problems, or when the 'exrc' option is off. On Unix this option is
6840 only used if the ".vimrc" or ".exrc" is not owned by you. This can be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006841 dangerous if the systems allows users to do a "chown". You better set
Bram Moolenaar071d4272004-06-13 20:20:40 +00006842 'secure' at the end of your ~/.vimrc then.
6843 This option cannot be set from a |modeline| or in the |sandbox|, for
6844 security reasons.
6845
6846 *'selection'* *'sel'*
6847'selection' 'sel' string (default "inclusive")
6848 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006849 This option defines the behavior of the selection. It is only used
6850 in Visual and Select mode.
6851 Possible values:
6852 value past line inclusive ~
6853 old no yes
6854 inclusive yes yes
6855 exclusive yes no
6856 "past line" means that the cursor is allowed to be positioned one
6857 character past the line.
6858 "inclusive" means that the last character of the selection is included
6859 in an operation. For example, when "x" is used to delete the
6860 selection.
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02006861 When "old" is used and 'virtualedit' allows the cursor to move past
6862 the end of line the line break still isn't included.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006863 Note that when "exclusive" is used and selecting from the end
6864 backwards, you cannot include the last character of a line, when
6865 starting in Normal mode and 'virtualedit' empty.
6866
6867 The 'selection' option is set by the |:behave| command.
6868
6869 *'selectmode'* *'slm'*
6870'selectmode' 'slm' string (default "")
6871 global
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01006872 This is a comma-separated list of words, which specifies when to start
Bram Moolenaar071d4272004-06-13 20:20:40 +00006873 Select mode instead of Visual mode, when a selection is started.
6874 Possible values:
6875 mouse when using the mouse
6876 key when using shifted special keys
6877 cmd when using "v", "V" or CTRL-V
6878 See |Select-mode|.
6879 The 'selectmode' option is set by the |:behave| command.
6880
6881 *'sessionoptions'* *'ssop'*
6882'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds,
Bram Moolenaarb5b75622018-03-09 22:22:21 +01006883 help,options,tabpages,winsize,terminal")
Bram Moolenaar071d4272004-06-13 20:20:40 +00006884 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02006885 {not available when compiled without the |+mksession|
Bram Moolenaar071d4272004-06-13 20:20:40 +00006886 feature}
6887 Changes the effect of the |:mksession| command. It is a comma
6888 separated list of words. Each word enables saving and restoring
6889 something:
6890 word save and restore ~
6891 blank empty windows
6892 buffers hidden and unloaded buffers, not just those in windows
6893 curdir the current directory
6894 folds manually created folds, opened/closed folds and local
6895 fold options
6896 globals global variables that start with an uppercase letter
Bram Moolenaar12805862005-01-05 22:16:17 +00006897 and contain at least one lowercase letter. Only
6898 String and Number types are stored.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006899 help the help window
6900 localoptions options and mappings local to a window or buffer (not
6901 global values for local options)
6902 options all options and mappings (also global values for local
6903 options)
Bram Moolenaard23b7142021-04-17 21:04:34 +02006904 skiprtp exclude 'runtimepath' and 'packpath' from the options
Bram Moolenaar071d4272004-06-13 20:20:40 +00006905 resize size of the Vim window: 'lines' and 'columns'
6906 sesdir the directory in which the session file is located
6907 will become the current directory (useful with
6908 projects accessed over a network from different
6909 systems)
6910 slash backslashes in file names replaced with forward
6911 slashes
Bram Moolenaar18144c82006-04-12 21:52:12 +00006912 tabpages all tab pages; without this only the current tab page
6913 is restored, so that you can make a session for each
6914 tab page separately
Bram Moolenaard473c8c2018-08-11 18:00:22 +02006915 terminal include terminal windows where the command can be
6916 restored
Bram Moolenaar071d4272004-06-13 20:20:40 +00006917 unix with Unix end-of-line format (single <NL>), even when
6918 on Windows or DOS
6919 winpos position of the whole Vim window
6920 winsize window sizes
6921
6922 Don't include both "curdir" and "sesdir".
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01006923 When neither "curdir" nor "sesdir" is included, file names are stored
6924 with absolute paths.
Bram Moolenaar2f0936c2022-01-08 21:51:59 +00006925 If you leave out "options" many things won't work well after restoring
6926 the session.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006927 "slash" and "unix" are useful on Windows when sharing session files
6928 with Unix. The Unix version of Vim cannot source dos format scripts,
6929 but the Windows version of Vim can source unix format scripts.
6930
6931 *'shell'* *'sh'* *E91*
Bram Moolenaar95a9dd12019-12-19 22:12:03 +01006932'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe")
Bram Moolenaar071d4272004-06-13 20:20:40 +00006933 global
6934 Name of the shell to use for ! and :! commands. When changing the
6935 value also check these options: 'shelltype', 'shellpipe', 'shellslash'
6936 'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006937 It is allowed to give an argument to the command, e.g. "csh -f".
Bram Moolenaar071d4272004-06-13 20:20:40 +00006938 See |option-backslash| about including spaces and backslashes.
6939 Environment variables are expanded |:set_env|.
Bram Moolenaar4bfa8af2018-02-03 15:14:46 +01006940
Bram Moolenaara2baa732022-02-04 16:09:54 +00006941 In |restricted-mode| shell commands will not be possible. This mode
6942 is used if the value of $SHELL ends in "false" or "nologin".
6943
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01006944 If the name of the shell contains a space, you need to enclose it in
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +01006945 quotes and escape the space. Example with quotes: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00006946 :set shell=\"c:\program\ files\unix\sh.exe\"\ -f
6947< Note the backslash before each quote (to avoid starting a comment) and
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006948 each space (to avoid ending the option value). Also note that the
Bram Moolenaar071d4272004-06-13 20:20:40 +00006949 "-f" is not inside the quotes, because it is not part of the command
Bram Moolenaar4bfa8af2018-02-03 15:14:46 +01006950 name. Vim automagically recognizes the backslashes that are path
Bram Moolenaar071d4272004-06-13 20:20:40 +00006951 separators.
Bram Moolenaar4bfa8af2018-02-03 15:14:46 +01006952 Example with escaped space (Vim will do this when initializing the
6953 option from $SHELL): >
6954 :set shell=/bin/with\\\ space/sh
Bram Moolenaard473c8c2018-08-11 18:00:22 +02006955< The resulting value of 'shell' is "/bin/with\ space/sh", two
Bram Moolenaar4bfa8af2018-02-03 15:14:46 +01006956 backslashes are consumed by `:set`.
6957
Bram Moolenaar071d4272004-06-13 20:20:40 +00006958 Under MS-Windows, when the executable ends in ".com" it must be
6959 included. Thus setting the shell to "command.com" or "4dos.com"
6960 works, but "command" and "4dos" do not work for all commands (e.g.,
6961 filtering).
6962 For unknown reasons, when using "4dos.com" the current directory is
6963 changed to "C:\". To avoid this set 'shell' like this: >
6964 :set shell=command.com\ /c\ 4dos
6965< This option cannot be set from a |modeline| or in the |sandbox|, for
6966 security reasons.
6967
6968 *'shellcmdflag'* *'shcf'*
Bram Moolenaar5dc62522012-02-13 00:05:22 +01006969'shellcmdflag' 'shcf' string (default: "-c";
Mike Williams12795022021-06-28 20:53:58 +02006970 Win32, when 'shell' contains "powershell":
6971 "-Command", or when it does not contain "sh"
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01006972 somewhere: "/c")
Bram Moolenaar071d4272004-06-13 20:20:40 +00006973 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006974 Flag passed to the shell to execute "!" and ":!" commands; e.g.,
Mike Williams12795022021-06-28 20:53:58 +02006975 "bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
6976 For MS-Windows, the default is set according to the value of 'shell',
6977 to reduce the need to set this option by the user.
Bram Moolenaar5302d9e2011-09-14 17:55:08 +02006978 On Unix it can have more than one flag. Each white space separated
6979 part is passed as an argument to the shell command.
6980 See |option-backslash| about including spaces and backslashes.
Mike Williams12795022021-06-28 20:53:58 +02006981 Also see |dos-shell| and |dos-powershell| for MS-Windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006982 This option cannot be set from a |modeline| or in the |sandbox|, for
6983 security reasons.
6984
6985 *'shellpipe'* *'sp'*
Mike Williams12795022021-06-28 20:53:58 +02006986'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
6987 "2>&1| tee", or
6988 "2>&1 | Out-File -Encoding default")
Bram Moolenaar071d4272004-06-13 20:20:40 +00006989 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00006990 {not available when compiled without the |+quickfix|
6991 feature}
6992 String to be used to put the output of the ":make" command in the
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00006993 error file. See also |:make_makeprg|. See |option-backslash| about
Bram Moolenaar071d4272004-06-13 20:20:40 +00006994 including spaces and backslashes.
6995 The name of the temporary file can be represented by "%s" if necessary
6996 (the file name is appended automatically if no %s appears in the value
6997 of this option).
Mike Williams12795022021-06-28 20:53:58 +02006998 For the Amiga the default is ">". For MS-Windows using powershell the
6999 default is "2>&1 | Out-File -Encoding default", otherwise the default
7000 is ">%s 2>&1". The output is directly saved in a file and not echoed
7001 to the screen.
Bram Moolenaar1c6737b2020-09-07 22:18:52 +02007002 For Unix the default is "| tee". The stdout of the compiler is saved
Bram Moolenaar071d4272004-06-13 20:20:40 +00007003 in a file and echoed to the screen. If the 'shell' option is "csh" or
7004 "tcsh" after initializations, the default becomes "|& tee". If the
Bram Moolenaar96f45c02019-10-26 19:53:45 +02007005 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
Natanael Copa56318362021-05-06 18:46:35 +02007006 "bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
7007 means that stderr is also included. Before using the 'shell' option a
7008 path is removed, thus "/bin/sh" uses "sh".
Mike Williamsa3d1b292021-06-30 20:56:00 +02007009 For Unix and MS-Windows, when the 'shell' option is "pwsh" the default
7010 becomes ">%s 2>&1" and the output is not echoed to the screen.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007011 The initialization of this option is done after reading the ".vimrc"
7012 and the other initializations, so that when the 'shell' option is set
7013 there, the 'shellpipe' option changes automatically, unless it was
7014 explicitly set before.
7015 When 'shellpipe' is set to an empty string, no redirection of the
7016 ":make" output will be done. This is useful if you use a 'makeprg'
7017 that writes to 'makeef' by itself. If you want no piping, but do
7018 want to include the 'makeef', set 'shellpipe' to a single space.
7019 Don't forget to precede the space with a backslash: ":set sp=\ ".
7020 In the future pipes may be used for filtering and this option will
7021 become obsolete (at least for Unix).
7022 This option cannot be set from a |modeline| or in the |sandbox|, for
7023 security reasons.
7024
7025 *'shellquote'* *'shq'*
Mike Williamsa3d1b292021-06-30 20:56:00 +02007026'shellquote' 'shq' string (default: "")
Bram Moolenaar071d4272004-06-13 20:20:40 +00007027 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007028 Quoting character(s), put around the command passed to the shell, for
7029 the "!" and ":!" commands. The redirection is kept outside of the
7030 quoting. See 'shellxquote' to include the redirection. It's
7031 probably not useful to set both options.
7032 This is an empty string by default. Only known to be useful for
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01007033 third-party shells on MS-Windows-like systems, such as the MKS Korn
Mike Williamsa3d1b292021-06-30 20:56:00 +02007034 Shell or bash, where it should be "\"". See |dos-shell|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007035 This option cannot be set from a |modeline| or in the |sandbox|, for
7036 security reasons.
7037
7038 *'shellredir'* *'srr'*
Mike Williams12795022021-06-28 20:53:58 +02007039'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
7040 "2>&1 | Out-File -Encoding default")
Bram Moolenaar071d4272004-06-13 20:20:40 +00007041 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007042 String to be used to put the output of a filter command in a temporary
7043 file. See also |:!|. See |option-backslash| about including spaces
7044 and backslashes.
7045 The name of the temporary file can be represented by "%s" if necessary
7046 (the file name is appended automatically if no %s appears in the value
7047 of this option).
Bram Moolenaar96f45c02019-10-26 19:53:45 +02007048 The default is ">". For Unix, if the 'shell' option is "csh" or
7049 "tcsh" during initializations, the default becomes ">&". If the
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01007050 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
Mike Williamsa3d1b292021-06-30 20:56:00 +02007051 "bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means
7052 that stderr is also included. For Win32, the Unix checks are done and
Mike Williams12795022021-06-28 20:53:58 +02007053 additionally "cmd" is checked for, which makes the default ">%s 2>&1",
7054 and "powershell" is checked for which makes the default
Mike Williamsa3d1b292021-06-30 20:56:00 +02007055 "2>&1 | Out-File -Encoding default" (see |dos-powershell|). Also, the
7056 same names with ".exe" appended are checked for.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007057 The initialization of this option is done after reading the ".vimrc"
7058 and the other initializations, so that when the 'shell' option is set
7059 there, the 'shellredir' option changes automatically unless it was
7060 explicitly set before.
7061 In the future pipes may be used for filtering and this option will
7062 become obsolete (at least for Unix).
7063 This option cannot be set from a |modeline| or in the |sandbox|, for
7064 security reasons.
7065
7066 *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
7067'shellslash' 'ssl' boolean (default off)
7068 global
Bram Moolenaar6f345a12019-12-17 21:27:18 +01007069 {only for MS-Windows}
Bram Moolenaar071d4272004-06-13 20:20:40 +00007070 When set, a forward slash is used when expanding file names. This is
Mike Williamsa3d1b292021-06-30 20:56:00 +02007071 useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or
Mike Williams12795022021-06-28 20:53:58 +02007072 powershell.exe. Backward slashes can still be typed, but they are
7073 changed to forward slashes by Vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007074 Note that setting or resetting this option has no effect for some
7075 existing file names, thus this option needs to be set before opening
7076 any file for best results. This might change in the future.
7077 'shellslash' only works when a backslash can be used as a path
7078 separator. To test if this is so use: >
7079 if exists('+shellslash')
Bram Moolenaarac3150d2019-07-28 16:36:39 +02007080< Also see 'completeslash'.
7081
Bram Moolenaar26a60b42005-02-22 08:49:11 +00007082 *'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'*
7083'shelltemp' 'stmp' boolean (Vi default off, Vim default on)
7084 global
Bram Moolenaar26a60b42005-02-22 08:49:11 +00007085 When on, use temp files for shell commands. When off use a pipe.
7086 When using a pipe is not possible temp files are used anyway.
Bram Moolenaar97293012011-07-18 19:40:27 +02007087 Currently a pipe is only supported on Unix and MS-Windows 2K and
7088 later. You can check it with: >
Bram Moolenaar26a60b42005-02-22 08:49:11 +00007089 :if has("filterpipe")
7090< The advantage of using a pipe is that nobody can read the temp file
7091 and the 'shell' command does not need to support redirection.
7092 The advantage of using a temp file is that the file type and encoding
7093 can be detected.
7094 The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
7095 |FilterWritePost| autocommands event are not triggered when
7096 'shelltemp' is off.
Bram Moolenaar269f5952016-07-15 22:54:41 +02007097 The `system()` function does not respect this option and always uses
7098 temp files.
Bram Moolenaar036986f2017-03-16 17:41:02 +01007099 NOTE: This option is set to the Vim default value when 'compatible'
7100 is reset.
Bram Moolenaar26a60b42005-02-22 08:49:11 +00007101
Bram Moolenaar071d4272004-06-13 20:20:40 +00007102 *'shelltype'* *'st'*
7103'shelltype' 'st' number (default 0)
7104 global
Bram Moolenaar6c60f472019-04-28 16:00:35 +02007105 {only for the Amiga}
Bram Moolenaar071d4272004-06-13 20:20:40 +00007106 On the Amiga this option influences the way how the commands work
7107 which use a shell.
7108 0 and 1: always use the shell
7109 2 and 3: use the shell only to filter lines
7110 4 and 5: use shell only for ':sh' command
7111 When not using the shell, the command is executed directly.
7112
7113 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands
7114 1 and 3: use "shell cmd" to start external commands
7115
Bram Moolenaardb7207e2012-02-22 17:30:19 +01007116 *'shellxescape'* *'sxe'*
7117'shellxescape' 'sxe' string (default: "";
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01007118 for MS-Windows: "\"&|<>()@^")
Bram Moolenaardb7207e2012-02-22 17:30:19 +01007119 global
Bram Moolenaardb7207e2012-02-22 17:30:19 +01007120 When 'shellxquote' is set to "(" then the characters listed in this
7121 option will be escaped with a '^' character. This makes it possible
7122 to execute most external commands with cmd.exe.
7123
Bram Moolenaar071d4272004-06-13 20:20:40 +00007124 *'shellxquote'* *'sxq'*
7125'shellxquote' 'sxq' string (default: "";
Bram Moolenaarf66b3fc2012-02-20 22:18:30 +01007126 for Win32, when 'shell' is cmd.exe: "("
Mike Williams12795022021-06-28 20:53:58 +02007127 for Win32, when 'shell' is
7128 powershell.exe: "\""
Bram Moolenaarf66b3fc2012-02-20 22:18:30 +01007129 for Win32, when 'shell' contains "sh"
7130 somewhere: "\""
Bram Moolenaar071d4272004-06-13 20:20:40 +00007131 for Unix, when using system(): "\"")
7132 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007133 Quoting character(s), put around the command passed to the shell, for
7134 the "!" and ":!" commands. Includes the redirection. See
7135 'shellquote' to exclude the redirection. It's probably not useful
7136 to set both options.
Bram Moolenaarf66b3fc2012-02-20 22:18:30 +01007137 When the value is '(' then ')' is appended. When the value is '"('
7138 then ')"' is appended.
7139 When the value is '(' then also see 'shellxescape'.
Bram Moolenaara64ba222012-02-12 23:23:31 +01007140 This is an empty string by default on most systems, but is known to be
Mike Williamsa3d1b292021-06-30 20:56:00 +02007141 useful for on Win32 version, either for cmd.exe, powershell.exe, or
7142 pwsh.exe which automatically strips off the first and last quote on a
7143 command, or 3rd-party shells such as the MKS Korn Shell or bash, where
7144 it should be "\"". The default is adjusted according the value of
Mike Williams12795022021-06-28 20:53:58 +02007145 'shell', to reduce the need to set this option by the user. See
7146 |dos-shell|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007147 This option cannot be set from a |modeline| or in the |sandbox|, for
7148 security reasons.
7149
7150 *'shiftround'* *'sr'* *'noshiftround'* *'nosr'*
7151'shiftround' 'sr' boolean (default off)
7152 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007153 Round indent to multiple of 'shiftwidth'. Applies to > and <
7154 commands. CTRL-T and CTRL-D in Insert mode always round the indent to
7155 a multiple of 'shiftwidth' (this is Vi compatible).
7156 NOTE: This option is reset when 'compatible' is set.
7157
7158 *'shiftwidth'* *'sw'*
7159'shiftwidth' 'sw' number (default 8)
7160 local to buffer
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007161 Number of spaces to use for each step of (auto)indent. Used for
Bram Moolenaar071d4272004-06-13 20:20:40 +00007162 |'cindent'|, |>>|, |<<|, etc.
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01007163 When zero the 'tabstop' value will be used. Use the |shiftwidth()|
Bram Moolenaar3a0d8092012-10-21 03:02:54 +02007164 function to get the effective shiftwidth value.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007165
7166 *'shortmess'* *'shm'*
Bram Moolenaar9dfa3132019-05-04 21:08:40 +02007167'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S",
7168 POSIX default: "AS")
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007169 global *E1336*
Bram Moolenaar071d4272004-06-13 20:20:40 +00007170 This option helps to avoid all the |hit-enter| prompts caused by file
7171 messages, for example with CTRL-G, and to avoid some other messages.
7172 It is a list of flags:
7173 flag meaning when present ~
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007174 f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f*
7175 i use "[noeol]" instead of "[Incomplete last line]" *shm-i*
7176 l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l*
7177 m use "[+]" instead of "[Modified]" *shm-m*
7178 n use "[New]" instead of "[New File]" *shm-n*
7179 r use "[RO]" instead of "[readonly]" *shm-r*
7180 w use "[w]" instead of "written" for file write message *shm-w*
Bram Moolenaar071d4272004-06-13 20:20:40 +00007181 and "[a]" instead of "appended" for ':w >> file' command
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007182 x use "[dos]" instead of "[dos format]", "[unix]" *shm-x*
7183 instead of "[unix format]" and "[mac]" instead of "[mac
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007184 format]"
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007185 a all of the above abbreviations *shm-a*
Bram Moolenaar071d4272004-06-13 20:20:40 +00007186
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007187 o overwrite message for writing a file with subsequent *shm-o*
7188 message for reading a file (useful for ":wn" or when
7189 'autowrite' on)
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007190 O message for reading a file overwrites any previous *shm-O*
7191 message; also for quickfix message (e.g., ":cn")
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007192 s don't give "search hit BOTTOM, continuing at TOP" or *shm-s*
7193 "search hit TOP, continuing at BOTTOM" messages; when using
7194 the search count do not show "W" after the count message (see
7195 S below)
7196 t truncate file message at the start if it is too long *shm-t*
7197 to fit on the command-line, "<" will appear in the left most
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007198 column; ignored in Ex mode
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007199 T truncate other messages in the middle if they are too *shm-T*
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007200 long to fit on the command line; "..." will appear in the
7201 middle; ignored in Ex mode
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007202 W don't give "written" or "[w]" when writing a file *shm-W*
7203 A don't give the "ATTENTION" message when an existing *shm-A*
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007204 swap file is found
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007205 I don't give the intro message when starting Vim, *shm-I*
Bram Moolenaar938ae282023-02-20 20:44:55 +00007206 see |:intro|
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007207 c don't give |ins-completion-menu| messages; for *shm-c*
Bram Moolenaar7db29e42022-12-11 15:53:04 +00007208 example, "-- XXX completion (YYY)", "match 1 of 2", "The only
7209 match", "Pattern not found", "Back at original", etc.
7210 C don't give messages while scanning for ins-completion *shm-C*
7211 items, for instance "scanning tags"
7212 q use "recording" instead of "recording @a" *shm-q*
7213 F don't give the file info when editing a file, like *shm-F*
7214 `:silent` was used for the command; note that this also
7215 affects messages from autocommands
Bram Moolenaar938ae282023-02-20 20:44:55 +00007216 S do not show search count message when searching, e.g. *shm-S*
7217 "[1/5]"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007218
7219 This gives you the opportunity to avoid that a change between buffers
7220 requires you to hit <Enter>, but still gives as useful a message as
7221 possible for the space available. To get the whole message that you
7222 would have got with 'shm' empty, use ":file!"
7223 Useful values:
7224 shm= No abbreviation of message.
7225 shm=a Abbreviation, but no loss of information.
7226 shm=at Abbreviation, and truncate message when necessary.
7227
7228 NOTE: This option is set to the Vi default value when 'compatible' is
7229 set and to the Vim default value when 'compatible' is reset.
7230
7231 *'shortname'* *'sn'* *'noshortname'* *'nosn'*
7232'shortname' 'sn' boolean (default off)
7233 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00007234 Filenames are assumed to be 8 characters plus one extension of 3
7235 characters. Multiple dots in file names are not allowed. When this
7236 option is on, dots in file names are replaced with underscores when
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01007237 adding an extension (".~" or ".swp"). This option is useful
Bram Moolenaar071d4272004-06-13 20:20:40 +00007238 when editing files on an MS-DOS compatible filesystem, e.g., messydos
Bram Moolenaarade0d392020-01-21 22:33:58 +01007239 or crossdos.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007240
7241 *'showbreak'* *'sbr'* *E595*
7242'showbreak' 'sbr' string (default "")
Bram Moolenaaree857022019-11-09 23:26:40 +01007243 global or local to window |global-local|
Bram Moolenaardb84e452010-08-15 13:50:43 +02007244 {not available when compiled without the |+linebreak|
Bram Moolenaar071d4272004-06-13 20:20:40 +00007245 feature}
7246 String to put at the start of lines that have been wrapped. Useful
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01007247 values are "> " or "+++ ": >
7248 :set showbreak=>\
7249< Note the backslash to escape the trailing space. It's easier like
7250 this: >
Bram Moolenaar1a384422010-07-14 19:53:30 +02007251 :let &showbreak = '+++ '
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01007252< Only printable single-cell characters are allowed, excluding <Tab> and
Bram Moolenaar071d4272004-06-13 20:20:40 +00007253 comma (in a future version the comma might be used to separate the
7254 part that is shown at the end and at the start of a line).
7255 The characters are highlighted according to the '@' flag in
7256 'highlight'.
7257 Note that tabs after the showbreak will be displayed differently.
7258 If you want the 'showbreak' to appear in between line numbers, add the
7259 "n" flag to 'cpoptions'.
Bram Moolenaaree857022019-11-09 23:26:40 +01007260 A window-local value overrules a global value. If the global value is
7261 set and you want no value in the current window use NONE: >
7262 :setlocal showbreak=NONE
7263<
Bram Moolenaar071d4272004-06-13 20:20:40 +00007264 *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02007265'showcmd' 'sc' boolean (Vim default: on, off for Unix,
7266 Vi default: off, set in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007267 global
Bram Moolenaar02467872007-05-06 13:22:01 +00007268 Show (partial) command in the last line of the screen. Set this
7269 option off if your terminal is slow.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007270 In Visual mode the size of the selected area is shown:
7271 - When selecting characters within a line, the number of characters.
Bram Moolenaarf91787c2010-07-17 12:47:16 +02007272 If the number of bytes is different it is also displayed: "2-6"
7273 means two characters and six bytes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007274 - When selecting more than one line, the number of lines.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01007275 - When selecting a block, the size in screen characters:
7276 {lines}x{columns}.
Luuk van Baalba936f62022-12-15 13:15:39 +00007277 This information can be displayed in an alternative location using the
7278 'showcmdloc' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007279 NOTE: This option is set to the Vi default value when 'compatible' is
7280 set and to the Vim default value when 'compatible' is reset.
7281
Luuk van Baalba936f62022-12-15 13:15:39 +00007282 *'showcmdloc'* *'sloc'*
7283'showcmdloc' 'sloc' string (default "last")
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007284 global
Luuk van Baalba936f62022-12-15 13:15:39 +00007285 This option can be used to display the (partially) entered command in
7286 another location. Possible values are:
7287 last Last line of the screen (default).
7288 statusline Status line of the current window.
Bram Moolenaarf1dcd142022-12-31 15:30:45 +00007289 tabline First line of the screen if 'showtabline' is enabled.
Luuk van Baalba936f62022-12-15 13:15:39 +00007290 Setting this option to "statusline" or "tabline" means that these will
7291 be redrawn whenever the command changes, which can be on every key
7292 pressed.
7293 The %S 'statusline' item can be used in 'statusline' or 'tabline' to
7294 place the text. Without a custom 'statusline' or 'tabline' it will be
7295 displayed in a convenient location.
7296
Bram Moolenaar071d4272004-06-13 20:20:40 +00007297 *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
7298'showfulltag' 'sft' boolean (default off)
7299 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007300 When completing a word in insert mode (see |ins-completion|) from the
7301 tags file, show both the tag name and a tidied-up form of the search
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007302 pattern (if there is one) as possible matches. Thus, if you have
Bram Moolenaar071d4272004-06-13 20:20:40 +00007303 matched a C function, you can see a template for what arguments are
7304 required (coding style permitting).
Bram Moolenaar446cb832008-06-24 21:56:24 +00007305 Note that this doesn't work well together with having "longest" in
7306 'completeopt', because the completion from the search pattern may not
7307 match the typed text.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007308
7309 *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'*
7310'showmatch' 'sm' boolean (default off)
7311 global
7312 When a bracket is inserted, briefly jump to the matching one. The
7313 jump is only done if the match can be seen on the screen. The time to
7314 show the match can be set with 'matchtime'.
7315 A Beep is given if there is no match (no matter if the match can be
Bram Moolenaarca635012015-09-25 20:34:21 +02007316 seen or not).
7317 This option is reset when 'paste' is set and restored when 'paste' is
7318 reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007319 When the 'm' flag is not included in 'cpoptions', typing a character
7320 will immediately move the cursor back to where it belongs.
7321 See the "sm" field in 'guicursor' for setting the cursor shape and
7322 blinking when showing the match.
7323 The 'matchpairs' option can be used to specify the characters to show
7324 matches for. 'rightleft' and 'revins' are used to look for opposite
7325 matches.
Bram Moolenaarfd2ac762006-03-01 22:09:21 +00007326 Also see the matchparen plugin for highlighting the match when moving
7327 around |pi_paren.txt|.
7328 Note: Use of the short form is rated PG.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007329
7330 *'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
7331'showmode' 'smd' boolean (Vim default: on, Vi default: off)
7332 global
7333 If in Insert, Replace or Visual mode put a message on the last line.
7334 Use the 'M' flag in 'highlight' to set the type of highlighting for
7335 this message.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007336 When |XIM| may be used the message will include "XIM". But this
Bram Moolenaar071d4272004-06-13 20:20:40 +00007337 doesn't mean XIM is really active, especially when 'imactivatekey' is
7338 not set.
7339 NOTE: This option is set to the Vi default value when 'compatible' is
7340 set and to the Vim default value when 'compatible' is reset.
7341
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00007342 *'showtabline'* *'stal'*
7343'showtabline' 'stal' number (default 1)
7344 global
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00007345 The value of this option specifies when the line with tab page labels
7346 will be displayed:
7347 0: never
7348 1: only if there are at least two tab pages
7349 2: always
7350 This is both for the GUI and non-GUI implementation of the tab pages
7351 line.
7352 See |tab-page| for more information about tab pages.
7353
Bram Moolenaar071d4272004-06-13 20:20:40 +00007354 *'sidescroll'* *'ss'*
7355'sidescroll' 'ss' number (default 0)
7356 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007357 The minimal number of columns to scroll horizontally. Used only when
7358 the 'wrap' option is off and the cursor is moved off of the screen.
7359 When it is zero the cursor will be put in the middle of the screen.
7360 When using a slow terminal set it to a large number or 0. When using
7361 a fast terminal use a small number or 1. Not used for "zh" and "zl"
7362 commands.
7363
7364 *'sidescrolloff'* *'siso'*
7365'sidescrolloff' 'siso' number (default 0)
Bram Moolenaar375e3392019-01-31 18:26:10 +01007366 global or local to window |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00007367 The minimal number of screen columns to keep to the left and to the
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00007368 right of the cursor if 'nowrap' is set. Setting this option to a
7369 value greater than 0 while having |'sidescroll'| also at a non-zero
7370 value makes some context visible in the line you are scrolling in
7371 horizontally (except at beginning of the line). Setting this option
7372 to a large value (like 999) has the effect of keeping the cursor
7373 horizontally centered in the window, as long as one does not come too
7374 close to the beginning of the line.
Bram Moolenaar375e3392019-01-31 18:26:10 +01007375 After using the local value, go back the global value with one of
7376 these two: >
7377 setlocal sidescrolloff<
7378 setlocal sidescrolloff=-1
7379< NOTE: This option is set to 0 when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007380
7381 Example: Try this together with 'sidescroll' and 'listchars' as
7382 in the following example to never allow the cursor to move
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02007383 onto the "extends" character: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00007384
7385 :set nowrap sidescroll=1 listchars=extends:>,precedes:<
7386 :set sidescrolloff=1
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02007387<
7388 *'signcolumn'* *'scl'*
7389'signcolumn' 'scl' string (default "auto")
7390 local to window
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02007391 {not available when compiled without the |+signs|
7392 feature}
Bram Moolenaar09521312016-08-12 22:54:35 +02007393 Whether or not to draw the signcolumn. Valid values are:
Bram Moolenaar938ae282023-02-20 20:44:55 +00007394 "auto" only when there is a sign to display
7395 "no" never
7396 "yes" always
Bram Moolenaar394c5d82019-06-17 21:48:05 +02007397 "number" display signs in the 'number' column. If the number
Bram Moolenaar6c1e1572019-06-22 02:13:00 +02007398 column is not present, then behaves like "auto".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007399
7400
7401 *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
7402'smartcase' 'scs' boolean (default off)
7403 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007404 Override the 'ignorecase' option if the search pattern contains upper
7405 case characters. Only used when the search pattern is typed and
7406 'ignorecase' option is on. Used for the commands "/", "?", "n", "N",
Bram Moolenaarc8734422012-06-01 22:38:45 +02007407 ":g" and ":s". Not used for "*", "#", "gd", tag search, etc. After
Bram Moolenaar071d4272004-06-13 20:20:40 +00007408 "*" and "#" you can make 'smartcase' used by doing a "/" command,
7409 recalling the search pattern from history and hitting <Enter>.
7410 NOTE: This option is reset when 'compatible' is set.
7411
7412 *'smartindent'* *'si'* *'nosmartindent'* *'nosi'*
7413'smartindent' 'si' boolean (default off)
7414 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00007415 Do smart autoindenting when starting a new line. Works for C-like
7416 programs, but can also be used for other languages. 'cindent' does
7417 something like this, works better in most cases, but is more strict,
Bram Moolenaar81af9252010-12-10 20:35:50 +01007418 see |C-indenting|. When 'cindent' is on or 'indentexpr' is set,
Bram Moolenaar166af9b2010-11-16 20:34:40 +01007419 setting 'si' has no effect. 'indentexpr' is a more advanced
7420 alternative.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007421 Normally 'autoindent' should also be on when using 'smartindent'.
7422 An indent is automatically inserted:
7423 - After a line ending in '{'.
7424 - After a line starting with a keyword from 'cinwords'.
7425 - Before a line starting with '}' (only with the "O" command).
7426 When typing '}' as the first character in a new line, that line is
7427 given the same indent as the matching '{'.
7428 When typing '#' as the first character in a new line, the indent for
7429 that line is removed, the '#' is put in the first column. The indent
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007430 is restored for the next line. If you don't want this, use this
Bram Moolenaar071d4272004-06-13 20:20:40 +00007431 mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
7432 When using the ">>" command, lines starting with '#' are not shifted
7433 right.
Bram Moolenaar036986f2017-03-16 17:41:02 +01007434 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaarca635012015-09-25 20:34:21 +02007435 This option is reset when 'paste' is set and restored when 'paste' is
7436 reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007437
7438 *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
7439'smarttab' 'sta' boolean (default off)
7440 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007441 When on, a <Tab> in front of a line inserts blanks according to
Bram Moolenaar280f1262006-01-30 00:14:18 +00007442 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
7443 <BS> will delete a 'shiftwidth' worth of space at the start of the
7444 line.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00007445 When off, a <Tab> always inserts blanks according to 'tabstop' or
Bram Moolenaar280f1262006-01-30 00:14:18 +00007446 'softtabstop'. 'shiftwidth' is only used for shifting text left or
7447 right |shift-left-right|.
Bram Moolenaarebcbd022007-05-12 14:28:25 +00007448 What gets inserted (a <Tab> or spaces) depends on the 'expandtab'
Bram Moolenaar071d4272004-06-13 20:20:40 +00007449 option. Also see |ins-expandtab|. When 'expandtab' is not set, the
Bram Moolenaar843ee412004-06-30 16:16:41 +00007450 number of spaces is minimized by using <Tab>s.
Bram Moolenaarca635012015-09-25 20:34:21 +02007451 This option is reset when 'paste' is set and restored when 'paste' is
7452 reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007453 NOTE: This option is reset when 'compatible' is set.
7454
Bram Moolenaarf6196f42022-10-02 21:29:55 +01007455 *'smoothscroll'* *'sms'* *'nosmoothscroll'* *'nosms'*
7456'smoothscroll' 'sms' boolean (default off)
7457 local to window
7458 Scrolling works with screen lines. When 'wrap' is set and the first
7459 line in the window wraps part of it may not be visible, as if it is
Bram Moolenaarf269eab2022-10-03 18:04:35 +01007460 above the window. "<<<" is displayed at the start of the first line,
7461 highlighted with |hl-NonText|.
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01007462 You may also want to add "lastline" to the 'display' option to show as
7463 much of the last line as possible.
Bram Moolenaarf269eab2022-10-03 18:04:35 +01007464 NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y
7465 and scrolling with the mouse.
Bram Moolenaarf6196f42022-10-02 21:29:55 +01007466
Bram Moolenaar071d4272004-06-13 20:20:40 +00007467 *'softtabstop'* *'sts'*
7468'softtabstop' 'sts' number (default 0)
7469 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00007470 Number of spaces that a <Tab> counts for while performing editing
7471 operations, like inserting a <Tab> or using <BS>. It "feels" like
7472 <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is
7473 used. This is useful to keep the 'ts' setting at its standard value
7474 of 8, while being able to edit like it is set to 'sts'. However,
7475 commands like "x" still work on the actual characters.
7476 When 'sts' is zero, this feature is off.
Bram Moolenaar3a0d8092012-10-21 03:02:54 +02007477 When 'sts' is negative, the value of 'shiftwidth' is used.
Bram Moolenaarca635012015-09-25 20:34:21 +02007478 'softtabstop' is set to 0 when the 'paste' option is set and restored
7479 when 'paste' is reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007480 See also |ins-expandtab|. When 'expandtab' is not set, the number of
7481 spaces is minimized by using <Tab>s.
7482 The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is
7483 set.
7484 NOTE: This option is set to 0 when 'compatible' is set.
7485
Bram Moolenaar04958cb2018-06-23 19:23:02 +02007486 If Vim is compiled with the |+vartabs| feature then the value of
7487 'softtabstop' will be ignored if |'varsofttabstop'| is set to
7488 anything other than an empty string.
7489
Bram Moolenaar217ad922005-03-20 22:37:15 +00007490 *'spell'* *'nospell'*
7491'spell' boolean (default off)
7492 local to window
Bram Moolenaar217ad922005-03-20 22:37:15 +00007493 {not available when compiled without the |+syntax|
7494 feature}
7495 When on spell checking will be done. See |spell|.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00007496 The languages are specified with 'spelllang'.
Bram Moolenaar217ad922005-03-20 22:37:15 +00007497
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007498 *'spellcapcheck'* *'spc'*
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00007499'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+")
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007500 local to buffer
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007501 {not available when compiled without the |+syntax|
7502 feature}
7503 Pattern to locate the end of a sentence. The following word will be
7504 checked to start with a capital letter. If not then it is highlighted
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00007505 with SpellCap |hl-SpellCap| (unless the word is also badly spelled).
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007506 When this check is not wanted make this option empty.
7507 Only used when 'spell' is set.
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00007508 Be careful with special characters, see |option-backslash| about
7509 including spaces and backslashes.
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00007510 To set this option automatically depending on the language, see
7511 |set-spc-auto|.
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007512
Bram Moolenaar82cf9b62005-06-07 21:09:25 +00007513 *'spellfile'* *'spf'*
7514'spellfile' 'spf' string (default empty)
7515 local to buffer
Bram Moolenaar82cf9b62005-06-07 21:09:25 +00007516 {not available when compiled without the |+syntax|
7517 feature}
7518 Name of the word list file where words are added for the |zg| and |zw|
Bram Moolenaar045e82d2005-07-08 22:25:33 +00007519 commands. It must end in ".{encoding}.add". You need to include the
7520 path, otherwise the file is placed in the current directory.
Bram Moolenaar48c3f4e2022-08-08 15:42:38 +01007521 The path may include characters from 'isfname', space, comma and '@'.
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007522 *E765*
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01007523 It may also be a comma-separated list of names. A count before the
Bram Moolenaar0d9c26d2005-07-02 23:19:16 +00007524 |zg| and |zw| commands can be used to access each. This allows using
7525 a personal word list file and a project word list file.
Bram Moolenaar82cf9b62005-06-07 21:09:25 +00007526 When a word is added while this option is empty Vim will set it for
Bram Moolenaar910f66f2006-04-05 20:41:53 +00007527 you: Using the first directory in 'runtimepath' that is writable. If
7528 there is no "spell" directory yet it will be created. For the file
7529 name the first language name that appears in 'spelllang' is used,
Bram Moolenaar3b506942005-06-23 22:36:45 +00007530 ignoring the region.
7531 The resulting ".spl" file will be used for spell checking, it does not
7532 have to appear in 'spelllang'.
7533 Normally one file is used for all regions, but you can add the region
7534 name if you want to. However, it will then only be used when
7535 'spellfile' is set to it, for entries in 'spelllang' only files
7536 without region name will be found.
Bram Moolenaare7566042005-06-17 22:00:15 +00007537 This option cannot be set from a |modeline| or in the |sandbox|, for
7538 security reasons.
Bram Moolenaar82cf9b62005-06-07 21:09:25 +00007539
Bram Moolenaar217ad922005-03-20 22:37:15 +00007540 *'spelllang'* *'spl'*
Bram Moolenaar82cf9b62005-06-07 21:09:25 +00007541'spelllang' 'spl' string (default "en")
Bram Moolenaar217ad922005-03-20 22:37:15 +00007542 local to buffer
Bram Moolenaar217ad922005-03-20 22:37:15 +00007543 {not available when compiled without the |+syntax|
7544 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01007545 A comma-separated list of word list names. When the 'spell' option is
Bram Moolenaar3b506942005-06-23 22:36:45 +00007546 on spellchecking will be done for these languages. Example: >
7547 set spelllang=en_us,nl,medical
7548< This means US English, Dutch and medical words are recognized. Words
7549 that are not recognized will be highlighted.
Bram Moolenaar911ead12019-04-21 00:03:35 +02007550 The word list name must consist of alphanumeric characters, a dash or
7551 an underscore. It should not include a comma or dot. Using a dash is
Bram Moolenaar3b506942005-06-23 22:36:45 +00007552 recommended to separate the two letter language name from a
7553 specification. Thus "en-rare" is used for rare English words.
7554 A region name must come last and have the form "_xx", where "xx" is
7555 the two-letter, lower case region name. You can use more than one
7556 region by listing them: "en_us,en_ca" supports both US and Canadian
7557 English, but not words specific for Australia, New Zealand or Great
Bram Moolenaarfa735342016-01-03 22:14:44 +01007558 Britain. (Note: currently en_au and en_nz dictionaries are older than
7559 en_ca, en_gb and en_us).
Bram Moolenaarcc63c642013-11-12 04:44:01 +01007560 If the name "cjk" is included East Asian characters are excluded from
7561 spell checking. This is useful when editing text that also has Asian
7562 words.
Bram Moolenaar6c391a72021-09-09 21:55:11 +02007563 Note that the "medical" dictionary does not exist, it is just an
7564 example of a longer name.
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00007565 *E757*
Bram Moolenaarce0842a2005-07-18 21:58:11 +00007566 As a special case the name of a .spl file can be given as-is. The
7567 first "_xx" in the name is removed and used as the region name
7568 (_xx is an underscore, two letters and followed by a non-letter).
7569 This is mainly for testing purposes. You must make sure the correct
7570 encoding is used, Vim doesn't check it.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00007571 When 'encoding' is set the word lists are reloaded. Thus it's a good
Bram Moolenaarce0842a2005-07-18 21:58:11 +00007572 idea to set 'spelllang' after setting 'encoding' to avoid loading the
7573 files twice.
Bram Moolenaar3b506942005-06-23 22:36:45 +00007574 How the related spell files are found is explained here: |spell-load|.
Bram Moolenaar217ad922005-03-20 22:37:15 +00007575
Bram Moolenaar98692072006-02-04 00:57:42 +00007576 If the |spellfile.vim| plugin is active and you use a language name
7577 for which Vim cannot find the .spl file in 'runtimepath' the plugin
7578 will ask you if you want to download the file.
7579
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00007580 After this option has been set successfully, Vim will source the files
7581 "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
Bram Moolenaarb730f0c2018-11-25 03:56:26 +01007582 up to the first character that is not an ASCII letter or number and
7583 not a dash. Also see |set-spc-auto|.
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00007584
Bram Moolenaar362b44b2020-06-10 21:47:00 +02007585 *'spelloptions'* *'spo'*
7586'spelloptions' 'spo' string (default "")
7587 local to buffer
7588 {not available when compiled without the |+syntax|
7589 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01007590 A comma-separated list of options for spell checking:
Bram Moolenaar362b44b2020-06-10 21:47:00 +02007591 camel When a word is CamelCased, assume "Cased" is a
7592 separate word: every upper-case character in a word
7593 that comes after a lower case character indicates the
7594 start of a new word.
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00007595
Bram Moolenaard857f0e2005-06-21 22:37:39 +00007596 *'spellsuggest'* *'sps'*
7597'spellsuggest' 'sps' string (default "best")
7598 global
Bram Moolenaard857f0e2005-06-21 22:37:39 +00007599 {not available when compiled without the |+syntax|
7600 feature}
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00007601 Methods used for spelling suggestions. Both for the |z=| command and
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007602 the |spellsuggest()| function. This is a comma-separated list of
7603 items:
Bram Moolenaard857f0e2005-06-21 22:37:39 +00007604
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007605 best Internal method that works best for English. Finds
7606 changes like "fast" and uses a bit of sound-a-like
7607 scoring to improve the ordering.
7608
7609 double Internal method that uses two methods and mixes the
7610 results. The first method is "fast", the other method
Bram Moolenaard857f0e2005-06-21 22:37:39 +00007611 computes how much the suggestion sounds like the bad
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007612 word. That only works when the language specifies
7613 sound folding. Can be slow and doesn't always give
7614 better results.
7615
7616 fast Internal method that only checks for simple changes:
7617 character inserts/deletes/swaps. Works well for
7618 simple typing mistakes.
7619
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00007620 {number} The maximum number of suggestions listed for |z=|.
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00007621 Not used for |spellsuggest()|. The number of
7622 suggestions is never more than the value of 'lines'
7623 minus two.
7624
Bram Moolenaar585ee072022-01-29 11:22:17 +00007625 timeout:{millisec} Limit the time searching for suggestions to
7626 {millisec} milli seconds. Applies to the following
7627 methods. When omitted the limit is 5000. When
7628 negative there is no limit. {only works when built
Bram Moolenaar8a3b8052022-06-26 12:21:15 +01007629 with the |+reltime| feature}
Bram Moolenaar585ee072022-01-29 11:22:17 +00007630
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007631 file:{filename} Read file {filename}, which must have two columns,
7632 separated by a slash. The first column contains the
7633 bad word, the second column the suggested good word.
7634 Example:
7635 theribal/terrible ~
7636 Use this for common mistakes that do not appear at the
7637 top of the suggestion list with the internal methods.
7638 Lines without a slash are ignored, use this for
7639 comments.
Bram Moolenaarbcb98982014-05-01 14:08:19 +02007640 The word in the second column must be correct,
7641 otherwise it will not be used. Add the word to an
7642 ".add" file if it is currently flagged as a spelling
7643 mistake.
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007644 The file is used for all languages.
7645
7646 expr:{expr} Evaluate expression {expr}. Use a function to avoid
Bram Moolenaara4e0b972022-10-01 19:43:52 +01007647 trouble with spaces. Best is to call a function
7648 without arguments, see |expr-option-function|.
7649 |v:val| holds the badly spelled word. The expression
7650 must evaluate to a List of Lists, each with a
7651 suggestion and a score.
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007652 Example:
Bram Moolenaar214641f2017-03-05 17:04:09 +01007653 [['the', 33], ['that', 44]] ~
Bram Moolenaar2c7a29c2005-12-12 22:02:31 +00007654 Set 'verbose' and use |z=| to see the scores that the
Bram Moolenaar24bbcfe2005-06-28 23:32:02 +00007655 internal methods use. A lower score is better.
7656 This may invoke |spellsuggest()| if you temporarily
7657 set 'spellsuggest' to exclude the "expr:" part.
7658 Errors are silently ignored, unless you set the
7659 'verbose' option to a non-zero value.
7660
7661 Only one of "best", "double" or "fast" may be used. The others may
7662 appear several times in any order. Example: >
7663 :set sps=file:~/.vim/sugg,best,expr:MySuggest()
7664<
7665 This option cannot be set from a |modeline| or in the |sandbox|, for
7666 security reasons.
Bram Moolenaard857f0e2005-06-21 22:37:39 +00007667
7668
Bram Moolenaar071d4272004-06-13 20:20:40 +00007669 *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
7670'splitbelow' 'sb' boolean (default off)
7671 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007672 When on, splitting a window will put the new window below the current
7673 one. |:split|
7674
Bram Moolenaar3c053a12022-10-16 13:11:12 +01007675 *'splitkeep'* *'spk'*
Luuk van Baal13ece2a2022-10-03 15:28:08 +01007676'splitkeep' 'spk' string (default "cursor")
7677 global
7678 The value of this option determines the scroll behavior when opening,
7679 closing or resizing horizontal splits.
7680
7681 Possible values are:
7682 cursor Keep the same relative cursor position.
7683 screen Keep the text on the same screen line.
7684 topline Keep the topline the same.
7685
7686 For the "screen" and "topline" values, the cursor position will be
7687 changed when necessary. In this case, the jumplist will be populated
7688 with the previous cursor position. For "screen", the text cannot always
Bram Moolenaar3c053a12022-10-16 13:11:12 +01007689 be kept on the same screen line when 'wrap' is enabled.
Luuk van Baal13ece2a2022-10-03 15:28:08 +01007690
Bram Moolenaar071d4272004-06-13 20:20:40 +00007691 *'splitright'* *'spr'* *'nosplitright'* *'nospr'*
7692'splitright' 'spr' boolean (default off)
7693 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007694 When on, splitting a window will put the new window right of the
7695 current one. |:vsplit|
7696
7697 *'startofline'* *'sol'* *'nostartofline'* *'nosol'*
7698'startofline' 'sol' boolean (default on)
7699 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007700 When "on" the commands listed below move the cursor to the first
Bram Moolenaar843ee412004-06-30 16:16:41 +00007701 non-blank of the line. When off the cursor is kept in the same column
Bram Moolenaar71badf92023-04-22 22:40:14 +01007702 (if possible). This applies to the commands:
7703 - CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg"
7704 - "d", "<<" and ">>" with a linewise operator
7705 - "%" with a count
7706 - buffer changing commands (CTRL-^, :bnext, :bNext, etc.)
7707 - Ex commands that only has a line number, e.g., ":25" or ":+".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007708 In case of buffer changing commands the cursor is placed at the column
7709 where it was the last time the buffer was edited.
7710 NOTE: This option is set when 'compatible' is set.
7711
Bram Moolenaar00654022011-02-25 14:42:19 +01007712 *'statusline'* *'stl'* *E540* *E542*
Bram Moolenaar071d4272004-06-13 20:20:40 +00007713'statusline' 'stl' string (default empty)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00007714 global or local to window |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00007715 {not available when compiled without the |+statusline|
7716 feature}
Bram Moolenaar944697a2022-02-20 19:48:20 +00007717 When non-empty, this option determines the content of the status line.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007718 Also see |status-line|.
7719
7720 The option consists of printf style '%' items interspersed with
7721 normal text. Each status line item is of the form:
7722 %-0{minwid}.{maxwid}{item}
Bram Moolenaar5e9b2fa2016-02-01 22:37:05 +01007723 All fields except the {item} are optional. A single percent sign can
Bram Moolenaar8133cc62020-10-26 21:05:27 +01007724 be given as "%%".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007725
Bram Moolenaar238a5642006-02-21 22:12:05 +00007726 When the option starts with "%!" then it is used as an expression,
7727 evaluated and the result is used as the option value. Example: >
7728 :set statusline=%!MyStatusLine()
Bram Moolenaar1c6fd1e2019-05-23 22:11:59 +02007729< The *g:statusline_winid* variable will be set to the |window-ID| of the
7730 window that the status line belongs to.
7731 The result can contain %{} items that will be evaluated too.
Bram Moolenaar61d35bd2012-03-28 20:51:51 +02007732 Note that the "%!" expression is evaluated in the context of the
7733 current window and buffer, while %{} items are evaluated in the
7734 context of the window that the statusline belongs to.
Bram Moolenaar238a5642006-02-21 22:12:05 +00007735
7736 When there is error while evaluating the option then it will be made
7737 empty to avoid further errors. Otherwise screen updating would loop.
Bram Moolenaar1b5f03e2023-01-09 20:12:45 +00007738 When the result contains unprintable characters the result is
7739 unpredictable.
Bram Moolenaar238a5642006-02-21 22:12:05 +00007740
Bram Moolenaar071d4272004-06-13 20:20:40 +00007741 Note that the only effect of 'ruler' when this option is set (and
7742 'laststatus' is 2) is controlling the output of |CTRL-G|.
7743
7744 field meaning ~
Bram Moolenaar582fd852005-03-28 20:58:01 +00007745 - Left justify the item. The default is right justified
Bram Moolenaar071d4272004-06-13 20:20:40 +00007746 when minwid is larger than the length of the item.
Bram Moolenaar582fd852005-03-28 20:58:01 +00007747 0 Leading zeroes in numeric items. Overridden by '-'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007748 minwid Minimum width of the item, padding as set by '-' & '0'.
7749 Value must be 50 or less.
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007750 maxwid Maximum width of the item. Truncation occurs with a '<'
Bram Moolenaar071d4272004-06-13 20:20:40 +00007751 on the left for text items. Numeric items will be
7752 shifted down to maxwid-2 digits followed by '>'number
7753 where number is the amount of missing digits, much like
7754 an exponential notation.
7755 item A one letter code as described below.
7756
7757 Following is a description of the possible statusline items. The
7758 second character in "item" is the type:
7759 N for number
7760 S for string
7761 F for flags as described below
7762 - not applicable
7763
7764 item meaning ~
Bram Moolenaar02467872007-05-06 13:22:01 +00007765 f S Path to the file in the buffer, as typed or relative to current
7766 directory.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007767 F S Full path to the file in the buffer.
7768 t S File name (tail) of file in the buffer.
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007769 m F Modified flag, text is "[+]"; "[-]" if 'modifiable' is off.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007770 M F Modified flag, text is ",+" or ",-".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007771 r F Readonly flag, text is "[RO]".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007772 R F Readonly flag, text is ",RO".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007773 h F Help buffer flag, text is "[help]".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007774 H F Help buffer flag, text is ",HLP".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007775 w F Preview window flag, text is "[Preview]".
Bram Moolenaar071d4272004-06-13 20:20:40 +00007776 W F Preview window flag, text is ",PRV".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007777 y F Type of file in the buffer, e.g., "[vim]". See 'filetype'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007778 Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'.
Bram Moolenaar7fd73202010-07-25 16:58:46 +02007779 q S "[Quickfix List]", "[Location List]" or empty.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007780 k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
7781 being used: "<keymap>"
7782 n N Buffer number.
Bram Moolenaar00654022011-02-25 14:42:19 +01007783 b N Value of character under cursor.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007784 B N As above, in hexadecimal.
7785 o N Byte number in file of byte under cursor, first byte is 1.
7786 Mnemonic: Offset from start of file (with one added)
7787 {not available when compiled without |+byte_offset| feature}
7788 O N As above, in hexadecimal.
Bram Moolenaar582fd852005-03-28 20:58:01 +00007789 N N Printer page number. (Only works in the 'printheader' option.)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007790 l N Line number.
7791 L N Number of lines in buffer.
Bram Moolenaar1d59aa12020-09-19 18:50:13 +02007792 c N Column number (byte index).
7793 v N Virtual column number (screen column).
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007794 V N Virtual column number as -{num}. Not displayed if equal to 'c'.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007795 p N Percentage through file in lines as in |CTRL-G|.
7796 P S Percentage through file of displayed window. This is like the
Bram Moolenaar14b69452013-06-29 23:05:20 +02007797 percentage described for 'ruler'. Always 3 in length, unless
7798 translated.
Luuk van Baalba936f62022-12-15 13:15:39 +00007799 S S 'showcmd' content, see 'showcmdloc'.
Bram Moolenaar582fd852005-03-28 20:58:01 +00007800 a S Argument list status as in default title. ({current} of {max})
Bram Moolenaar071d4272004-06-13 20:20:40 +00007801 Empty if the argument file count is zero or one.
Bram Moolenaar238a5642006-02-21 22:12:05 +00007802 { NF Evaluate expression between '%{' and '}' and substitute result.
Bram Moolenaar6d150f72018-04-21 20:03:20 +02007803 Note that there is no '%' before the closing '}'. The
7804 expression cannot contain a '}' character, call a function to
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01007805 work around that. See |stl-%{| below.
shadmansaleh30e3de22021-05-15 17:23:28 +02007806 {% - This is almost same as { except the result of the expression is
7807 re-evaluated as a statusline format string. Thus if the
7808 return value of expr contains % items they will get expanded.
7809 The expression can contain the } character, the end of
7810 expression is denoted by %}.
Bram Moolenaar22863042021-10-16 15:23:36 +01007811 For example: >
shadmansaleh30e3de22021-05-15 17:23:28 +02007812 func! Stl_filename() abort
7813 return "%t"
7814 endfunc
7815< `stl=%{Stl_filename()}` results in `"%t"`
7816 `stl=%{%Stl_filename()%}` results in `"Name of current file"`
Bram Moolenaar22863042021-10-16 15:23:36 +01007817 %} - End of `{%` expression
Bram Moolenaar071d4272004-06-13 20:20:40 +00007818 ( - Start of item group. Can be used for setting the width and
7819 alignment of a section. Must be followed by %) somewhere.
7820 ) - End of item group. No width fields allowed.
Bram Moolenaard1f56e62006-02-22 21:25:37 +00007821 T N For 'tabline': start of tab page N label. Use %T after the last
7822 label. This information is used for mouse clicks.
7823 X N For 'tabline': start of close tab N label. Use %X after the
7824 label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
7825 mark. This information is used for mouse clicks.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007826 < - Where to truncate line if too long. Default is at the start.
7827 No width fields allowed.
Yegappan Lakshmanan3ec78f92023-02-11 11:15:25 +00007828 = - Separation point between alignment sections. Each section will
7829 be separated by an equal number of spaces. With one %= what
7830 comes after it will be right-aligned. With two %= there is a
7831 middle part, with white space left and right of it.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007832 No width fields allowed.
Bram Moolenaar238a5642006-02-21 22:12:05 +00007833 # - Set highlight group. The name must follow and then a # again.
7834 Thus use %#HLname# for highlight group HLname. The same
7835 highlighting is used, also for the statusline of non-current
7836 windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007837 * - Set highlight group to User{N}, where {N} is taken from the
Bram Moolenaar582fd852005-03-28 20:58:01 +00007838 minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
Bram Moolenaarbe4e0162023-02-02 13:59:48 +00007839 The difference between User{N} and StatusLine will be applied to
7840 StatusLineNC for the statusline of non-current windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007841 The number N must be between 1 and 9. See |hl-User1..9|
7842
Bram Moolenaare37d50a2008-08-06 17:06:04 +00007843 When displaying a flag, Vim removes the leading comma, if any, when
7844 that flag comes right after plaintext. This will make a nice display
7845 when flags are used like in the examples below.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007846
Bram Moolenaar582fd852005-03-28 20:58:01 +00007847 When all items in a group becomes an empty string (i.e. flags that are
Bram Moolenaar071d4272004-06-13 20:20:40 +00007848 not set) and a minwid is not set for the group, the whole group will
7849 become empty. This will make a group like the following disappear
7850 completely from the statusline when none of the flags are set. >
7851 :set statusline=...%(\ [%M%R%H]%)...
Bram Moolenaar1c6fd1e2019-05-23 22:11:59 +02007852< Beware that an expression is evaluated each and every time the status
7853 line is displayed.
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01007854 *stl-%{* *g:actual_curbuf* *g:actual_curwin*
Bram Moolenaarade0d392020-01-21 22:33:58 +01007855 While evaluating %{} the current buffer and current window will be set
7856 temporarily to that of the window (and buffer) whose statusline is
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01007857 currently being drawn. The expression will evaluate in this context.
7858 The variable "g:actual_curbuf" is set to the `bufnr()` number of the
7859 real current buffer and "g:actual_curwin" to the |window-ID| of the
7860 real current window. These values are strings.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00007861
Bram Moolenaar30b65812012-07-12 22:01:11 +02007862 The 'statusline' option will be evaluated in the |sandbox| if set from
7863 a modeline, see |sandbox-option|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02007864 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaarb71eaae2006-01-20 23:10:18 +00007865
7866 It is not allowed to change text or jump to another window while
7867 evaluating 'statusline' |textlock|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007868
7869 If the statusline is not updated when you want it (e.g., after setting
7870 a variable that's used in an expression), you can force an update by
Bram Moolenaarcfa8f9a2022-06-03 21:59:47 +01007871 using `:redrawstatus`.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007872
Bram Moolenaarcfa8f9a2022-06-03 21:59:47 +01007873 A result of all digits is regarded a number for display purposes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007874 Otherwise the result is taken as flag text and applied to the rules
7875 described above.
7876
Bram Moolenaarcd71fa32005-03-11 22:46:48 +00007877 Watch out for errors in expressions. They may render Vim unusable!
Bram Moolenaar071d4272004-06-13 20:20:40 +00007878 If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and
Bram Moolenaarc4da1132017-07-15 19:39:43 +02007879 edit your .vimrc or whatever with "vim --clean" to get it right.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007880
7881 Examples:
7882 Emulate standard status line with 'ruler' set >
7883 :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
7884< Similar, but add ASCII value of char under the cursor (like "ga") >
7885 :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
7886< Display byte count and byte value, modified flag in red. >
7887 :set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
7888 :hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
7889< Display a ,GZ flag if a compressed file is loaded >
7890 :set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
7891< In the |:autocmd|'s: >
7892 :let b:gzflag = 1
7893< And: >
7894 :unlet b:gzflag
7895< And define this function: >
7896 :function VarExists(var, val)
7897 : if exists(a:var) | return a:val | else | return '' | endif
7898 :endfunction
7899<
7900 *'suffixes'* *'su'*
7901'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj")
7902 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007903 Files with these suffixes get a lower priority when multiple files
7904 match a wildcard. See |suffixes|. Commas can be used to separate the
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007905 suffixes. Spaces after the comma are ignored. A dot is also seen as
7906 the start of a suffix. To avoid a dot or comma being recognized as a
Bram Moolenaar071d4272004-06-13 20:20:40 +00007907 separator, precede it with a backslash (see |option-backslash| about
7908 including spaces and backslashes).
7909 See 'wildignore' for completely ignoring files.
7910 The use of |:set+=| and |:set-=| is preferred when adding or removing
7911 suffixes from the list. This avoids problems when a future version
7912 uses another default.
7913
7914 *'suffixesadd'* *'sua'*
7915'suffixesadd' 'sua' string (default "")
7916 local to buffer
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01007917 Comma-separated list of suffixes, which are used when searching for a
Bram Moolenaar071d4272004-06-13 20:20:40 +00007918 file for the "gf", "[I", etc. commands. Example: >
7919 :set suffixesadd=.java
7920<
7921 *'swapfile'* *'swf'* *'noswapfile'* *'noswf'*
7922'swapfile' 'swf' boolean (default on)
7923 local to buffer
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007924 Use a swapfile for the buffer. This option can be reset when a
Bram Moolenaar071d4272004-06-13 20:20:40 +00007925 swapfile is not wanted for a specific buffer. For example, with
7926 confidential information that even root must not be able to access.
7927 Careful: All text will be in memory:
7928 - Don't use this for big files.
7929 - Recovery will be impossible!
7930 A swapfile will only be present when |'updatecount'| is non-zero and
7931 'swapfile' is set.
7932 When 'swapfile' is reset, the swap file for the current buffer is
7933 immediately deleted. When 'swapfile' is set, and 'updatecount' is
7934 non-zero, a swap file is immediately created.
7935 Also see |swap-file| and |'swapsync'|.
Bram Moolenaar76f3b1a2014-03-27 22:30:07 +01007936 If you want to open a new buffer without creating a swap file for it,
7937 use the |:noswapfile| modifier.
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01007938 See 'directory' for where the swap file is created.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007939
7940 This option is used together with 'bufhidden' and 'buftype' to
7941 specify special kinds of buffers. See |special-buffers|.
7942
7943 *'swapsync'* *'sws'*
7944'swapsync' 'sws' string (default "fsync")
7945 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007946 When this option is not empty a swap file is synced to disk after
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00007947 writing to it. This takes some time, especially on busy unix systems.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007948 When this option is empty parts of the swap file may be in memory and
7949 not written to disk. When the system crashes you may lose more work.
7950 On Unix the system does a sync now and then without Vim asking for it,
7951 so the disadvantage of setting this option off is small. On some
7952 systems the swap file will not be written at all. For a unix system
7953 setting it to "sync" will use the sync() call instead of the default
7954 fsync(), which may work better on some systems.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00007955 The 'fsync' option is used for the actual file.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007956
7957 *'switchbuf'* *'swb'*
7958'switchbuf' 'swb' string (default "")
7959 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00007960 This option controls the behavior when switching between buffers.
Yegappan Lakshmanan54be5fb2023-05-12 17:49:13 +01007961 This option is checked, when
7962 - jumping to errors with the |quickfix| commands (|:cc|, |:cn|, |:cp|,
7963 etc.)
7964 - jumping to a tag using the |:stag| command.
7965 - opening a file using the |CTRL-W_f| or |CTRL-W_F| command.
7966 - jumping to a buffer using a buffer split command (e.g. |:sbuffer|,
7967 |:sbnext|, or |:sbrewind|).
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01007968 Possible values (comma-separated list):
Yegappan Lakshmanan54be5fb2023-05-12 17:49:13 +01007969 useopen If included, jump to the first open window in the
7970 current tab page that contains the specified buffer
7971 (if there is one). Otherwise: Do not examine other
7972 windows.
Bram Moolenaar779b74b2006-04-10 14:55:34 +00007973 usetab Like "useopen", but also consider windows in other tab
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00007974 pages.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007975 split If included, split the current window before loading
Bram Moolenaar15146672011-10-20 22:22:38 +02007976 a buffer for a |quickfix| command that display errors.
Bram Moolenaar63b74a82019-03-24 15:09:13 +01007977 Otherwise: do not split, use current window (when used
7978 in the quickfix window: the previously used window or
7979 split if there is no other window).
Bram Moolenaara594d772015-06-19 14:41:49 +02007980 vsplit Just like "split" but split vertically.
Bram Moolenaar446cb832008-06-24 21:56:24 +00007981 newtab Like "split", but open a new tab page. Overrules
Bram Moolenaar0bc380a2010-07-10 13:52:13 +02007982 "split" when both are present.
Bram Moolenaar539aa6b2019-11-17 18:09:38 +01007983 uselast If included, jump to the previously used window when
7984 jumping to errors with |quickfix| commands.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007985
Bram Moolenaar3b56eb32005-07-11 22:40:32 +00007986 *'synmaxcol'* *'smc'*
7987'synmaxcol' 'smc' number (default 3000)
7988 local to buffer
Bram Moolenaar3b56eb32005-07-11 22:40:32 +00007989 {not available when compiled without the |+syntax|
7990 feature}
Bram Moolenaarce0842a2005-07-18 21:58:11 +00007991 Maximum column in which to search for syntax items. In long lines the
7992 text after this column is not highlighted and following lines may not
7993 be highlighted correctly, because the syntax state is cleared.
Bram Moolenaar3b56eb32005-07-11 22:40:32 +00007994 This helps to avoid very slow redrawing for an XML file that is one
7995 long line.
7996 Set to zero to remove the limit.
7997
Bram Moolenaar071d4272004-06-13 20:20:40 +00007998 *'syntax'* *'syn'*
7999'syntax' 'syn' string (default empty)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02008000 local to buffer |special-local-buffer-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008001 {not available when compiled without the |+syntax|
8002 feature}
8003 When this option is set, the syntax with this name is loaded, unless
8004 syntax highlighting has been switched off with ":syntax off".
8005 Otherwise this option does not always reflect the current syntax (the
8006 b:current_syntax variable does).
8007 This option is most useful in a modeline, for a file which syntax is
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00008008 not automatically recognized. Example, in an IDL file:
8009 /* vim: set syntax=idl : */ ~
8010 When a dot appears in the value then this separates two filetype
8011 names. Example:
8012 /* vim: set syntax=c.doxygen : */ ~
8013 This will use the "c" syntax first, then the "doxygen" syntax.
8014 Note that the second one must be prepared to be loaded as an addition,
8015 otherwise it will be skipped. More than one dot may appear.
8016 To switch off syntax highlighting for the current file, use: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00008017 :set syntax=OFF
8018< To switch syntax highlighting on according to the current value of the
8019 'filetype' option: >
8020 :set syntax=ON
8021< What actually happens when setting the 'syntax' option is that the
8022 Syntax autocommand event is triggered with the value as argument.
8023 This option is not copied to another buffer, independent of the 's' or
8024 'S' flag in 'cpoptions'.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00008025 Only normal file name characters can be used, "/\*?[|<>" are illegal.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008026
Bram Moolenaarfd2ac762006-03-01 22:09:21 +00008027 *'tabline'* *'tal'*
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008028'tabline' 'tal' string (default empty)
Bram Moolenaar7e8fd632006-02-18 22:14:51 +00008029 global
Bram Moolenaar944697a2022-02-20 19:48:20 +00008030 When non-empty, this option determines the content of the tab pages
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008031 line at the top of the Vim window. When empty Vim will use a default
Bram Moolenaard1f56e62006-02-22 21:25:37 +00008032 tab pages line. See |setting-tabline| for more info.
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008033
8034 The tab pages line only appears as specified with the 'showtabline'
Bram Moolenaar5c8837f2006-02-25 21:52:33 +00008035 option and only when there is no GUI tab line. When 'e' is in
8036 'guioptions' and the GUI supports a tab line 'guitablabel' is used
Bram Moolenaar7f036442010-08-15 15:24:20 +02008037 instead. Note that the two tab pages lines are very different.
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008038
8039 The value is evaluated like with 'statusline'. You can use
8040 |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
Bram Moolenaard1f56e62006-02-22 21:25:37 +00008041 the text to be displayed. Use "%1T" for the first label, "%2T" for
8042 the second one, etc. Use "%X" items for closing labels.
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008043
Bram Moolenaare12bab32019-01-08 22:02:56 +01008044 When changing something that is used in 'tabline' that does not
8045 trigger it to be updated, use |:redrawtabline|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02008046 This option cannot be set in a modeline when 'modelineexpr' is off.
Bram Moolenaare12bab32019-01-08 22:02:56 +01008047
Bram Moolenaarfaa959a2006-02-20 21:37:40 +00008048 Keep in mind that only one of the tab pages is the current one, others
8049 are invisible and you can't jump to their windows.
8050
Bram Moolenaar7e8fd632006-02-18 22:14:51 +00008051
Bram Moolenaarfd2ac762006-03-01 22:09:21 +00008052 *'tabpagemax'* *'tpm'*
8053'tabpagemax' 'tpm' number (default 10)
8054 global
Bram Moolenaarfd2ac762006-03-01 22:09:21 +00008055 Maximum number of tab pages to be opened by the |-p| command line
8056 argument or the ":tab all" command. |tabpage|
8057
8058
8059 *'tabstop'* *'ts'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00008060'tabstop' 'ts' number (default 8)
8061 local to buffer
8062 Number of spaces that a <Tab> in the file counts for. Also see
Bram Moolenaarf10911e2022-01-29 22:20:48 +00008063 the |:retab| command, and the 'softtabstop' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008064
8065 Note: Setting 'tabstop' to any other value than 8 can make your file
Bram Moolenaarf10911e2022-01-29 22:20:48 +00008066 appear wrong in many places, e.g., when printing it.
8067 The value must be more than 0 and less than 10000.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008068
8069 There are four main ways to use tabs in Vim:
8070 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
8071 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim
Bram Moolenaarebcbd022007-05-12 14:28:25 +00008072 will use a mix of tabs and spaces, but typing <Tab> and <BS> will
Bram Moolenaar071d4272004-06-13 20:20:40 +00008073 behave like a tab appears every 4 (or 3) characters.
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01008074 This is the recommended way, the file will look the same with other
8075 tools and when listing it in a terminal.
8076 2. Set 'softtabstop' and 'shiftwidth' to whatever you prefer and use
8077 'expandtab'. This way you will always insert spaces. The
8078 formatting will never be messed up when 'tabstop' is changed (leave
8079 it at 8 just in case). The file will be a bit larger.
8080 You do need to check if no Tabs exist in the file. You can get rid
8081 of them by first setting 'expandtab' and using `%retab!`, making
8082 sure the value of 'tabstop' is set correctly.
8083 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use
Bram Moolenaar071d4272004-06-13 20:20:40 +00008084 'expandtab'. This way you will always insert spaces. The
8085 formatting will never be messed up when 'tabstop' is changed.
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01008086 You do need to check if no Tabs exist in the file, just like in the
8087 item just above.
8088 4. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008089 |modeline| to set these values when editing the file again. Only
Bram Moolenaar10e8ff92023-06-10 21:40:39 +01008090 works when using Vim to edit the file, other tools assume a tabstop
8091 is worth 8 spaces.
8092 5. Always set 'tabstop' and 'shiftwidth' to the same value, and
Bram Moolenaar071d4272004-06-13 20:20:40 +00008093 'noexpandtab'. This should then work (for initial indents only)
8094 for any tabstop setting that people use. It might be nice to have
8095 tabs after the first non-blank inserted as spaces if you do this
8096 though. Otherwise aligned comments will be wrong when 'tabstop' is
8097 changed.
8098
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008099 If Vim is compiled with the |+vartabs| feature then the value of
8100 'tabstop' will be ignored if |'vartabstop'| is set to anything other
8101 than an empty string.
8102
Bram Moolenaar071d4272004-06-13 20:20:40 +00008103 *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'*
8104'tagbsearch' 'tbs' boolean (default on)
8105 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008106 When searching for a tag (e.g., for the |:ta| command), Vim can either
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008107 use a binary search or a linear search in a tags file. Binary
Bram Moolenaar071d4272004-06-13 20:20:40 +00008108 searching makes searching for a tag a LOT faster, but a linear search
8109 will find more tags if the tags file wasn't properly sorted.
8110 Vim normally assumes that your tags files are sorted, or indicate that
8111 they are not sorted. Only when this is not the case does the
8112 'tagbsearch' option need to be switched off.
8113
8114 When 'tagbsearch' is on, binary searching is first used in the tags
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008115 files. In certain situations, Vim will do a linear search instead for
Bram Moolenaar071d4272004-06-13 20:20:40 +00008116 certain files, or retry all files with a linear search. When
8117 'tagbsearch' is off, only a linear search is done.
8118
8119 Linear searching is done anyway, for one file, when Vim finds a line
8120 at the start of the file indicating that it's not sorted: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00008121 !_TAG_FILE_SORTED 0 /some comment/
Bram Moolenaar071d4272004-06-13 20:20:40 +00008122< [The whitespace before and after the '0' must be a single <Tab>]
8123
8124 When a binary search was done and no match was found in any of the
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008125 files listed in 'tags', and case is ignored or a pattern is used
Bram Moolenaar071d4272004-06-13 20:20:40 +00008126 instead of a normal tag name, a retry is done with a linear search.
8127 Tags in unsorted tags files, and matches with different case will only
8128 be found in the retry.
8129
Bram Moolenaard4755bb2004-09-02 19:12:26 +00008130 If a tag file indicates that it is case-fold sorted, the second,
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008131 linear search can be avoided when case is ignored. Use a value of '2'
8132 in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
8133 sorted with the -f switch to "sort" in most unices, as in the command:
Bram Moolenaar47c532e2022-03-19 15:18:53 +00008134 "sort -f -o tags tags". For Universal ctags and Exuberant ctags
8135 version 5.x or higher (at least 5.5) the --sort=foldcase switch can be
8136 used for this as well. Note that case must be folded to uppercase for
8137 this to work.
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008138
8139 By default, tag searches are case-sensitive. Case is ignored when
8140 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
8141 "ignore".
Bram Moolenaar66e29d72016-08-20 16:57:02 +02008142 Also when 'tagcase' is "followscs" and 'smartcase' is set, or
8143 'tagcase' is "smart", and the pattern contains only lowercase
8144 characters.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008145
8146 When 'tagbsearch' is off, tags searching is slower when a full match
8147 exists, but faster when no full match exists. Tags in unsorted tags
8148 files may only be found with 'tagbsearch' off.
8149 When the tags file is not sorted, or sorted in a wrong way (not on
8150 ASCII byte value), 'tagbsearch' should be off, or the line given above
8151 must be included in the tags file.
8152 This option doesn't affect commands that find all matching tags (e.g.,
8153 command-line completion and ":help").
Bram Moolenaar071d4272004-06-13 20:20:40 +00008154
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008155 *'tagcase'* *'tc'*
8156'tagcase' 'tc' string (default "followic")
8157 global or local to buffer |global-local|
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008158 This option specifies how case is handled when searching the tags
8159 file:
8160 followic Follow the 'ignorecase' option
Bram Moolenaar66e29d72016-08-20 16:57:02 +02008161 followscs Follow the 'smartcase' and 'ignorecase' options
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008162 ignore Ignore case
8163 match Match case
Bram Moolenaar66e29d72016-08-20 16:57:02 +02008164 smart Ignore case unless an upper case letter is used
Bram Moolenaar036986f2017-03-16 17:41:02 +01008165 NOTE: This option is set to the Vi default value when 'compatible' is
8166 set and to the Vim default value when 'compatible' is reset.
Bram Moolenaar0f6562e2015-11-24 18:48:14 +01008167
Bram Moolenaar45e18cb2019-04-28 18:05:35 +02008168 *'tagfunc'* *'tfu'*
8169'tagfunc' 'tfu' string (default: empty)
8170 local to buffer
8171 {not available when compiled without the |+eval|
8172 feature}
8173 This option specifies a function to be used to perform tag searches.
8174 The function gets the tag pattern and should return a List of matching
8175 tags. See |tag-function| for an explanation of how to write the
Yegappan Lakshmanan19916a82021-11-24 16:32:55 +00008176 function and an example. The value can be the name of a function, a
8177 |lambda| or a |Funcref|. See |option-value-function| for more
8178 information.
Bram Moolenaar45e18cb2019-04-28 18:05:35 +02008179
Bram Moolenaar071d4272004-06-13 20:20:40 +00008180 *'taglength'* *'tl'*
8181'taglength' 'tl' number (default 0)
8182 global
8183 If non-zero, tags are significant up to this number of characters.
8184
8185 *'tagrelative'* *'tr'* *'notagrelative'* *'notr'*
8186'tagrelative' 'tr' boolean (Vim default: on, Vi default: off)
8187 global
Bram Moolenaarc6fe9192006-04-09 21:54:49 +00008188 If on and using a tags file in another directory, file names in that
8189 tags file are relative to the directory where the tags file is.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008190 NOTE: This option is set to the Vi default value when 'compatible' is
8191 set and to the Vim default value when 'compatible' is reset.
8192
8193 *'tags'* *'tag'* *E433*
8194'tags' 'tag' string (default "./tags,tags", when compiled with
8195 |+emacs_tags|: "./tags,./TAGS,tags,TAGS")
8196 global or local to buffer |global-local|
8197 Filenames for the tag command, separated by spaces or commas. To
8198 include a space or comma in a file name, precede it with a backslash
8199 (see |option-backslash| about including spaces and backslashes).
8200 When a file name starts with "./", the '.' is replaced with the path
8201 of the current file. But only when the 'd' flag is not included in
8202 'cpoptions'. Environment variables are expanded |:set_env|. Also see
8203 |tags-option|.
8204 "*", "**" and other wildcards can be used to search for tags files in
Bram Moolenaare2b590e2010-08-08 18:29:48 +02008205 a directory tree. See |file-searching|. E.g., "/lib/**/tags" will
8206 find all files named "tags" below "/lib". The filename itself cannot
8207 contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find
Bram Moolenaar2bd9dbc2022-08-25 18:12:06 +01008208 files called "tags?".
Bram Moolenaare7eb9df2005-09-09 19:49:30 +00008209 The |tagfiles()| function can be used to get a list of the file names
8210 actually used.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008211 If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag
8212 files are also supported. They are automatically recognized. The
8213 default value becomes "./tags,./TAGS,tags,TAGS", unless case
8214 differences are ignored (MS-Windows). |emacs-tags|
8215 The use of |:set+=| and |:set-=| is preferred when adding or removing
8216 file names from the list. This avoids problems when a future version
8217 uses another default.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008218
8219 *'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
8220'tagstack' 'tgst' boolean (default on)
8221 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008222 When on, the |tagstack| is used normally. When off, a ":tag" or
8223 ":tselect" command with an argument will not push the tag onto the
8224 tagstack. A following ":tag" without an argument, a ":pop" command or
8225 any other command that uses the tagstack will use the unmodified
8226 tagstack, but does change the pointer to the active entry.
8227 Resetting this option is useful when using a ":tag" command in a
8228 mapping which should not change the tagstack.
8229
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008230 *'tcldll'*
Bram Moolenaar3848e002016-03-19 18:42:29 +01008231'tcldll' string (default depends on the build)
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008232 global
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008233 {only available when compiled with the |+tcl/dyn|
8234 feature}
8235 Specifies the name of the Tcl shared library. The default is
8236 DYNAMIC_TCL_DLL, which was specified at compile time.
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +02008237 Environment variables are expanded |:set_env|.
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008238 This option cannot be set from a |modeline| or in the |sandbox|, for
8239 security reasons.
8240
Bram Moolenaar071d4272004-06-13 20:20:40 +00008241 *'term'* *E529* *E530* *E531*
8242'term' string (default is $TERM, if that fails:
8243 in the GUI: "builtin_gui"
8244 on Amiga: "amiga"
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008245 on Haiku: "xterm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008246 on Mac: "mac-ansi"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008247 on Unix: "ansi"
8248 on VMS: "ansi"
8249 on Win 32: "win32")
8250 global
8251 Name of the terminal. Used for choosing the terminal control
8252 characters. Environment variables are expanded |:set_env|.
8253 For example: >
8254 :set term=$TERM
8255< See |termcap|.
8256
8257 *'termbidi'* *'tbidi'*
8258 *'notermbidi'* *'notbidi'*
8259'termbidi' 'tbidi' boolean (default off, on for "mlterm")
8260 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008261 {only available when compiled with the |+arabic|
8262 feature}
8263 The terminal is in charge of Bi-directionality of text (as specified
8264 by Unicode). The terminal is also expected to do the required shaping
8265 that some languages (such as Arabic) require.
8266 Setting this option implies that 'rightleft' will not be set when
8267 'arabic' is set and the value of 'arabicshape' will be ignored.
8268 Note that setting 'termbidi' has the immediate effect that
8269 'arabicshape' is ignored, but 'rightleft' isn't changed automatically.
8270 This option is reset when the GUI is started.
8271 For further details see |arabic.txt|.
8272
8273 *'termencoding'* *'tenc'*
Bram Moolenaar3d1cde82020-08-15 18:55:18 +02008274'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008275 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008276 Encoding used for the terminal. This specifies what character
8277 encoding the keyboard produces and the display will understand. For
Bram Moolenaar3848e002016-03-19 18:42:29 +01008278 the GUI it only applies to the keyboard ('encoding' is used for the
Bram Moolenaar3d1cde82020-08-15 18:55:18 +02008279 display).
Bram Moolenaar4b7cdca2020-01-01 16:18:38 +01008280 *E617* *E950*
Bram Moolenaar3df01732017-02-17 22:47:16 +01008281 Note: This does not apply to the GTK+ GUI. After the GUI has been
Bram Moolenaar071d4272004-06-13 20:20:40 +00008282 successfully initialized, 'termencoding' is forcibly set to "utf-8".
8283 Any attempts to set a different value will be rejected, and an error
8284 message is shown.
Bram Moolenaarac360bf2015-09-01 20:31:20 +02008285 For the Win32 GUI and console versions 'termencoding' is not used,
Bram Moolenaar071d4272004-06-13 20:20:40 +00008286 because the Win32 system always passes Unicode characters.
8287 When empty, the same encoding is used as for the 'encoding' option.
8288 This is the normal value.
8289 Not all combinations for 'termencoding' and 'encoding' are valid. See
8290 |encoding-table|.
8291 The value for this option must be supported by internal conversions or
8292 iconv(). When this is not possible no conversion will be done and you
8293 will probably experience problems with non-ASCII characters.
8294 Example: You are working with the locale set to euc-jp (Japanese) and
8295 want to edit a UTF-8 file: >
8296 :let &termencoding = &encoding
8297 :set encoding=utf-8
8298< You need to do this when your system has no locale support for UTF-8.
8299
Bram Moolenaar938ae282023-02-20 20:44:55 +00008300 *'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954*
Bram Moolenaar61be73b2016-04-29 22:59:22 +02008301'termguicolors' 'tgc' boolean (default off)
8302 global
Bram Moolenaar61be73b2016-04-29 22:59:22 +02008303 {not available when compiled without the
8304 |+termguicolors| feature}
8305 When on, uses |highlight-guifg| and |highlight-guibg| attributes in
Bram Moolenaarcafafb32018-02-22 21:07:09 +01008306 the terminal (thus using 24-bit color).
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01008307
Bram Moolenaarcafafb32018-02-22 21:07:09 +01008308 Requires a ISO-8613-3 compatible terminal. If setting this option
8309 does not work (produces a colorless UI) reading |xterm-true-color|
8310 might help.
8311
8312 For Win32 console, Windows 10 version 1703 (Creators Update) or later
8313 is required. Use this check to find out: >
8314 if has('vcon')
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +01008315< This requires Vim to be built with the |+vtp| feature.
8316
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +02008317 Note that the "cterm" attributes are still used, not the "gui" ones.
Yasuhiro Matsumotoaa04e1b2022-05-07 14:09:19 +01008318
8319 When using Vim with Windows Terminal, the background of Windows
8320 Terminal is normally filled with the Vim background color. Setting
8321 'termguicolors' and the guibg of the Normal highlight group to NONE
8322 will make the background transparent: >
8323 :hi Normal guibg=NONE
8324<
Bram Moolenaar036986f2017-03-16 17:41:02 +01008325 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar61be73b2016-04-29 22:59:22 +02008326
Bram Moolenaar7dda86f2018-04-20 22:36:41 +02008327 *'termwinkey'* *'twk'*
8328'termwinkey' 'twk' string (default "")
Bram Moolenaar74675a62017-07-15 13:53:23 +02008329 local to window
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02008330 The key that starts a CTRL-W command in a terminal window. Other keys
Bram Moolenaar74675a62017-07-15 13:53:23 +02008331 are sent to the job running in the window.
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02008332 The <> notation can be used, e.g.: >
Bram Moolenaar7dda86f2018-04-20 22:36:41 +02008333 :set termwinkey=<C-L>
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02008334< The string must be one key stroke but can be multiple bytes.
8335 When not set CTRL-W is used, so that CTRL-W : gets you to the command
Bram Moolenaar7dda86f2018-04-20 22:36:41 +02008336 line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02008337 command line.
Bram Moolenaar74675a62017-07-15 13:53:23 +02008338
Bram Moolenaar6c60f472019-04-28 16:00:35 +02008339 *'termwinscroll'* *'twsl'*
8340'termwinscroll' 'twsl' number (default 10000)
8341 local to buffer
8342 {not available when compiled without the
8343 |+terminal| feature}
8344 Number of scrollback lines to keep. When going over this limit the
8345 first 10% of the scrollback lines are deleted. This is just to reduce
8346 the memory usage. See |Terminal-Normal|.
Bram Moolenaar36968af2021-11-15 17:13:11 +00008347 Also used as a limit for text sent to the terminal in one write,
8348 multiplied by the number of columns times 3 (average number of bytes
8349 per cell).
Bram Moolenaar6c60f472019-04-28 16:00:35 +02008350
Bram Moolenaar7dda86f2018-04-20 22:36:41 +02008351 *'termwinsize'* *'tws'*
8352'termwinsize' 'tws' string (default "")
Bram Moolenaar74675a62017-07-15 13:53:23 +02008353 local to window
Bram Moolenaar1c6737b2020-09-07 22:18:52 +02008354 Size used when opening the |terminal| window. Format:
8355 {rows}x{columns} or {rows}*{columns}.
Bram Moolenaar74675a62017-07-15 13:53:23 +02008356 - When empty the terminal gets the size from the window.
Bram Moolenaar498c2562018-04-15 23:45:15 +02008357 - When set with a "x" (e.g., "24x80") the terminal size is not
8358 adjusted to the window size. If the window is smaller only the
8359 top-left part is displayed.
8360 - When set with a "*" (e.g., "10*50") the terminal size follows the
8361 window size, but will not be smaller than the specified rows and/or
8362 columns.
8363 - When rows is zero then use the height of the window.
8364 - When columns is zero then use the width of the window.
8365 - Using "0x0" or "0*0" is the same as empty.
Bram Moolenaar1c6737b2020-09-07 22:18:52 +02008366 - Can be overruled in the |term_start()| options with "term_rows" and
8367 "term_cols".
Bram Moolenaar498c2562018-04-15 23:45:15 +02008368
8369 Examples:
8370 "30x0" uses 30 rows and the current window width.
8371 "20*0" uses at least 20 rows and the current window width.
8372 "0*40" uses the current window height and at least 40 columns.
Bram Moolenaar1f2903c2017-07-23 19:51:01 +02008373 Note that the command running in the terminal window may still change
8374 the size of the terminal. In that case the Vim window will be
8375 adjusted to that size, if possible.
Bram Moolenaar74675a62017-07-15 13:53:23 +02008376
Bram Moolenaarc6ddce32019-02-08 12:47:03 +01008377 *'termwintype'* *'twt'*
8378'termwintype' 'twt' string (default "")
8379 global
Bram Moolenaarc6ddce32019-02-08 12:47:03 +01008380 {only available when compiled with the |terminal|
8381 feature on MS-Windows}
8382 Specify the virtual console (pty) used when opening the terminal
8383 window.
8384
8385 Possible values are:
Bram Moolenaard9ef1b82019-02-13 19:23:10 +01008386 "" use ConPTY if it is stable, winpty otherwise
Bram Moolenaarc6ddce32019-02-08 12:47:03 +01008387 "winpty" use winpty, fail if not supported
8388 "conpty" use |ConPTY|, fail if not supported
8389
Bram Moolenaard9ef1b82019-02-13 19:23:10 +01008390 |ConPTY| support depends on the platform. Windows 10 October 2018
8391 Update is the first version that supports ConPTY, however it is still
8392 considered unstable. ConPTY might become stable in the next release
8393 of Windows 10. winpty support needs to be installed. If neither is
Bram Moolenaarc6ddce32019-02-08 12:47:03 +01008394 supported then you cannot open a terminal window.
8395
Bram Moolenaar071d4272004-06-13 20:20:40 +00008396 *'terse'* *'noterse'*
8397'terse' boolean (default off)
8398 global
8399 When set: Add 's' flag to 'shortmess' option (this makes the message
8400 for a search that hits the start or end of the file not being
8401 displayed). When reset: Remove 's' flag from 'shortmess' option. {Vi
8402 shortens a lot of messages}
8403
8404 *'textauto'* *'ta'* *'notextauto'* *'nota'*
8405'textauto' 'ta' boolean (Vim default: on, Vi default: off)
8406 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008407 This option is obsolete. Use 'fileformats'.
8408 For backwards compatibility, when 'textauto' is set, 'fileformats' is
8409 set to the default value for the current system. When 'textauto' is
8410 reset, 'fileformats' is made empty.
8411 NOTE: This option is set to the Vi default value when 'compatible' is
8412 set and to the Vim default value when 'compatible' is reset.
8413
8414 *'textmode'* *'tx'* *'notextmode'* *'notx'*
Bram Moolenaar6f345a12019-12-17 21:27:18 +01008415'textmode' 'tx' boolean (Win32: default on,
Bram Moolenaar071d4272004-06-13 20:20:40 +00008416 others: default off)
8417 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00008418 This option is obsolete. Use 'fileformat'.
8419 For backwards compatibility, when 'textmode' is set, 'fileformat' is
8420 set to "dos". When 'textmode' is reset, 'fileformat' is set to
8421 "unix".
8422
8423 *'textwidth'* *'tw'*
8424'textwidth' 'tw' number (default 0)
8425 local to buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +00008426 Maximum width of text that is being inserted. A longer line will be
8427 broken after white space to get this width. A zero value disables
Bram Moolenaarca635012015-09-25 20:34:21 +02008428 this.
8429 'textwidth' is set to 0 when the 'paste' option is set and restored
8430 when 'paste' is reset.
8431 When 'textwidth' is zero, 'wrapmargin' may be used. See also
Bram Moolenaar071d4272004-06-13 20:20:40 +00008432 'formatoptions' and |ins-textwidth|.
Bram Moolenaarfc1421e2006-04-20 22:17:20 +00008433 When 'formatexpr' is set it will be used to break the line.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008434 NOTE: This option is set to 0 when 'compatible' is set.
8435
8436 *'thesaurus'* *'tsr'*
8437'thesaurus' 'tsr' string (default "")
8438 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008439 List of file names, separated by commas, that are used to lookup words
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008440 for thesaurus completion commands |i_CTRL-X_CTRL-T|. See
8441 |compl-thesaurus|.
Bram Moolenaarf0d58ef2018-11-16 16:13:44 +01008442
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008443 This option is not used if 'thesaurusfunc' is set, either for the
8444 buffer or globally.
Bram Moolenaarf0d58ef2018-11-16 16:13:44 +01008445
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008446 To include a comma in a file name precede it with a backslash. Spaces
Bram Moolenaar071d4272004-06-13 20:20:40 +00008447 after a comma are ignored, otherwise spaces are included in the file
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008448 name. See |option-backslash| about using backslashes. The use of
8449 |:set+=| and |:set-=| is preferred when adding or removing directories
8450 from the list. This avoids problems when a future version uses
8451 another default. Backticks cannot be used in this option for security
8452 reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008453
Bram Moolenaar2f0936c2022-01-08 21:51:59 +00008454 *'thesaurusfunc'* *'tsrfu'*
Yegappan Lakshmanan160e9942021-10-16 15:41:29 +01008455'thesaurusfunc' 'tsrfu' string (default: empty)
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008456 global or local to buffer |global-local|
Yegappan Lakshmanan160e9942021-10-16 15:41:29 +01008457 {not available when compiled without the |+eval|
8458 feature}
8459 This option specifies a function to be used for thesaurus completion
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008460 with CTRL-X CTRL-T. |i_CTRL-X_CTRL-T| See |compl-thesaurusfunc|.
Yegappan Lakshmanan8658c752021-12-03 11:09:29 +00008461 The value can be the name of a function, a |lambda| or a |Funcref|.
8462 See |option-value-function| for more information.
Bram Moolenaarf4d8b762021-10-17 14:13:09 +01008463
Yegappan Lakshmanan160e9942021-10-16 15:41:29 +01008464 This option cannot be set from a |modeline| or in the |sandbox|, for
8465 security reasons.
8466
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467 *'tildeop'* *'top'* *'notildeop'* *'notop'*
8468'tildeop' 'top' boolean (default off)
8469 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008470 When on: The tilde command "~" behaves like an operator.
8471 NOTE: This option is reset when 'compatible' is set.
8472
8473 *'timeout'* *'to'* *'notimeout'* *'noto'*
8474'timeout' 'to' boolean (default on)
8475 global
8476 *'ttimeout'* *'nottimeout'*
Bram Moolenaar94237492017-04-23 18:40:21 +02008477'ttimeout' boolean (default off, set in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008478 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008479 These two options together determine the behavior when part of a
8480 mapped key sequence or keyboard code has been received:
8481
8482 'timeout' 'ttimeout' action ~
8483 off off do not time out
8484 on on or off time out on :mappings and key codes
8485 off on time out on key codes
8486
8487 If both options are off, Vim will wait until either the complete
8488 mapping or key sequence has been received, or it is clear that there
8489 is no mapping or key sequence for the received characters. For
8490 example: if you have mapped "vl" and Vim has received 'v', the next
8491 character is needed to see if the 'v' is followed by an 'l'.
8492 When one of the options is on, Vim will wait for about 1 second for
8493 the next character to arrive. After that the already received
8494 characters are interpreted as single characters. The waiting time can
8495 be changed with the 'timeoutlen' option.
8496 On slow terminals or very busy systems timing out may cause
8497 malfunctioning cursor keys. If both options are off, Vim waits
8498 forever after an entered <Esc> if there are key codes that start
8499 with <Esc>. You will have to type <Esc> twice. If you do not have
8500 problems with key codes, but would like to have :mapped key
8501 sequences not timing out in 1 second, set the 'ttimeout' option and
8502 reset the 'timeout' option.
8503
8504 NOTE: 'ttimeout' is reset when 'compatible' is set.
8505
8506 *'timeoutlen'* *'tm'*
8507'timeoutlen' 'tm' number (default 1000)
8508 global
Bram Moolenaar25c9c682019-05-05 18:13:34 +02008509
Bram Moolenaar071d4272004-06-13 20:20:40 +00008510 *'ttimeoutlen'* *'ttm'*
Bram Moolenaar94237492017-04-23 18:40:21 +02008511'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008512 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008513 The time in milliseconds that is waited for a key code or mapped key
8514 sequence to complete. Also used for CTRL-\ CTRL-N and CTRL-\ CTRL-G
8515 when part of a command has been typed.
8516 Normally only 'timeoutlen' is used and 'ttimeoutlen' is -1. When a
8517 different timeout value for key codes is desired set 'ttimeoutlen' to
8518 a non-negative number.
8519
8520 ttimeoutlen mapping delay key code delay ~
8521 < 0 'timeoutlen' 'timeoutlen'
8522 >= 0 'timeoutlen' 'ttimeoutlen'
8523
8524 The timeout only happens when the 'timeout' and 'ttimeout' options
8525 tell so. A useful setting would be >
8526 :set timeout timeoutlen=3000 ttimeoutlen=100
8527< (time out on mapping after three seconds, time out on key codes after
8528 a tenth of a second).
8529
8530 *'title'* *'notitle'*
8531'title' boolean (default off, on when title can be restored)
8532 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008533 When on, the title of the window will be set to the value of
8534 'titlestring' (if it is not empty), or to:
8535 filename [+=-] (path) - VIM
8536 Where:
8537 filename the name of the file being edited
8538 - indicates the file cannot be modified, 'ma' off
8539 + indicates the file was modified
8540 = indicates the file is read-only
8541 =+ indicates the file is read-only and modified
8542 (path) is the path of the file being edited
8543 - VIM the server name |v:servername| or "VIM"
8544 Only works if the terminal supports setting window titles
8545 (currently Amiga console, Win32 console, all GUI versions and
Bram Moolenaard1caa942020-04-10 22:10:56 +02008546 terminals with a non-empty 't_ts' option - these are Unix xterm and
Bram Moolenaar071d4272004-06-13 20:20:40 +00008547 iris-ansi by default, where 't_ts' is taken from the builtin termcap).
8548 *X11*
8549 When Vim was compiled with HAVE_X11 defined, the original title will
8550 be restored if possible. The output of ":version" will include "+X11"
8551 when HAVE_X11 was defined, otherwise it will be "-X11". This also
8552 works for the icon name |'icon'|.
8553 But: When Vim was started with the |-X| argument, restoring the title
8554 will not work (except in the GUI).
8555 If the title cannot be restored, it is set to the value of 'titleold'.
8556 You might want to restore the title outside of Vim then.
8557 When using an xterm from a remote machine you can use this command:
8558 rsh machine_name xterm -display $DISPLAY &
8559 then the WINDOWID environment variable should be inherited and the
8560 title of the window should change back to what it should be after
8561 exiting Vim.
8562
8563 *'titlelen'*
8564'titlelen' number (default 85)
8565 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008566 Gives the percentage of 'columns' to use for the length of the window
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008567 title. When the title is longer, only the end of the path name is
8568 shown. A '<' character before the path name is used to indicate this.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008569 Using a percentage makes this adapt to the width of the window. But
8570 it won't work perfectly, because the actual number of characters
8571 available also depends on the font used and other things in the title
8572 bar. When 'titlelen' is zero the full path is used. Otherwise,
8573 values from 1 to 30000 percent can be used.
8574 'titlelen' is also used for the 'titlestring' option.
8575
8576 *'titleold'*
8577'titleold' string (default "Thanks for flying Vim")
8578 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008579 This option will be used for the window title when exiting Vim if the
8580 original title cannot be restored. Only happens if 'title' is on or
8581 'titlestring' is not empty.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00008582 This option cannot be set from a |modeline| or in the |sandbox|, for
8583 security reasons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008584 *'titlestring'*
8585'titlestring' string (default "")
8586 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008587 When this option is not empty, it will be used for the title of the
8588 window. This happens only when the 'title' option is on.
8589 Only works if the terminal supports setting window titles (currently
8590 Amiga console, Win32 console, all GUI versions and terminals with a
8591 non-empty 't_ts' option).
8592 When Vim was compiled with HAVE_X11 defined, the original title will
Bram Moolenaar51628222016-12-01 23:03:28 +01008593 be restored if possible, see |X11|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02008594
Bram Moolenaar071d4272004-06-13 20:20:40 +00008595 When this option contains printf-style '%' items, they will be
8596 expanded according to the rules used for 'statusline'.
Bram Moolenaar110289e2019-05-23 15:38:06 +02008597 This option cannot be set in a modeline when 'modelineexpr' is off.
8598
Bram Moolenaar071d4272004-06-13 20:20:40 +00008599 Example: >
Bram Moolenaarc51cf032022-02-26 12:25:45 +00008600 :auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008601 :set title titlestring=%<%F%=%l/%L-%P titlelen=70
8602< The value of 'titlelen' is used to align items in the middle or right
8603 of the available space.
8604 Some people prefer to have the file name first: >
8605 :set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)
8606< Note the use of "%{ }" and an expression to get the path of the file,
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008607 without the file name. The "%( %)" constructs are used to add a
Bram Moolenaar071d4272004-06-13 20:20:40 +00008608 separating space only when needed.
8609 NOTE: Use of special characters in 'titlestring' may cause the display
8610 to be garbled (e.g., when it contains a CR or NL character).
8611 {not available when compiled without the |+statusline| feature}
8612
8613 *'toolbar'* *'tb'*
8614'toolbar' 'tb' string (default "icons,tooltips")
8615 global
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01008616 {only for |+GUI_GTK|, |+GUI_Motif| and |+GUI_Photon|}
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008617 The contents of this option controls various toolbar settings. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00008618 possible values are:
8619 icons Toolbar buttons are shown with icons.
8620 text Toolbar buttons shown with text.
8621 horiz Icon and text of a toolbar button are
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008622 horizontally arranged. {only in GTK+ 2 GUI}
Bram Moolenaar071d4272004-06-13 20:20:40 +00008623 tooltips Tooltips are active for toolbar buttons.
8624 Tooltips refer to the popup help text which appears after the mouse
8625 cursor is placed over a toolbar button for a brief moment.
8626
8627 If you want the toolbar to be shown with icons as well as text, do the
8628 following: >
8629 :set tb=icons,text
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01008630< Motif cannot display icons and text at the same time. They
Bram Moolenaar071d4272004-06-13 20:20:40 +00008631 will show icons if both are requested.
8632
8633 If none of the strings specified in 'toolbar' are valid or if
8634 'toolbar' is empty, this option is ignored. If you want to disable
8635 the toolbar, you need to set the 'guioptions' option. For example: >
8636 :set guioptions-=T
8637< Also see |gui-toolbar|.
8638
8639 *'toolbariconsize'* *'tbis'*
8640'toolbariconsize' 'tbis' string (default "small")
8641 global
Bram Moolenaar3df01732017-02-17 22:47:16 +01008642 {only in the GTK+ GUI}
Bram Moolenaar071d4272004-06-13 20:20:40 +00008643 Controls the size of toolbar icons. The possible values are:
Bram Moolenaar77cdfd12016-03-12 12:57:59 +01008644 tiny Use tiny icons.
8645 small Use small icons (default).
8646 medium Use medium-sized icons.
8647 large Use large icons.
8648 huge Use even larger icons.
8649 giant Use very big icons.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008650 The exact dimensions in pixels of the various icon sizes depend on
Bram Moolenaar77cdfd12016-03-12 12:57:59 +01008651 the current theme. Common dimensions are giant=48x48, huge=32x32,
8652 large=24x24, medium=24x24, small=20x20 and tiny=16x16.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008653
8654 If 'toolbariconsize' is empty, the global default size as determined
8655 by user preferences or the current theme is used.
8656
8657 *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
8658'ttybuiltin' 'tbi' boolean (default on)
8659 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008660 When on, the builtin termcaps are searched before the external ones.
8661 When off the builtin termcaps are searched after the external ones.
8662 When this option is changed, you should set the 'term' option next for
8663 the change to take effect, for example: >
8664 :set notbi term=$TERM
8665< See also |termcap|.
8666 Rationale: The default for this option is "on", because the builtin
8667 termcap entries are generally better (many systems contain faulty
8668 xterm entries...).
8669
8670 *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
Bram Moolenaarc1cf4c92022-11-25 15:09:35 +00008671'ttyfast' 'tf' boolean (default on)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008672 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008673 Indicates a fast terminal connection. More characters will be sent to
8674 the screen for redrawing, instead of using insert/delete line
8675 commands. Improves smoothness of redrawing when there are multiple
8676 windows and the terminal does not support a scrolling region.
8677 Also enables the extra writing of characters at the end of each screen
8678 line for lines that wrap. This helps when using copy/paste with the
8679 mouse in an xterm and other terminals.
8680
Bram Moolenaarc1cf4c92022-11-25 15:09:35 +00008681 The default used to be set only for some terminal names, but these
8682 days nearly all terminals are fast, therefore the default is now "on".
8683 If you have a slow connection you may want to set this option off,
8684 e.g. depending on the host name: >
8685 if hostname() =~ 'faraway'
8686 set nottyfast
8687 endif
8688<
Bram Moolenaar071d4272004-06-13 20:20:40 +00008689 *'ttymouse'* *'ttym'*
8690'ttymouse' 'ttym' string (default depends on 'term')
8691 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008692 {only in Unix and VMS, doesn't work in the GUI; not
8693 available when compiled without |+mouse|}
8694 Name of the terminal type for which mouse codes are to be recognized.
Bram Moolenaar2c7a7632007-05-10 18:19:11 +00008695 Currently these strings are valid:
Bram Moolenaar071d4272004-06-13 20:20:40 +00008696 *xterm-mouse*
8697 xterm xterm-like mouse handling. The mouse generates
8698 "<Esc>[Mscr", where "scr" is three bytes:
8699 "s" = button state
8700 "c" = column plus 33
8701 "r" = row plus 33
Bram Moolenaare968e362014-05-13 20:23:24 +02008702 This only works up to 223 columns! See "dec",
8703 "urxvt", and "sgr" for solutions.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008704 xterm2 Works like "xterm", but with the xterm reporting the
8705 mouse position while the mouse is dragged. This works
8706 much faster and more precise. Your xterm must at
Bram Moolenaarbc7aa852005-03-06 23:38:09 +00008707 least at patchlevel 88 / XFree 3.3.3 for this to
Bram Moolenaar071d4272004-06-13 20:20:40 +00008708 work. See below for how Vim detects this
8709 automatically.
8710 *netterm-mouse*
Bram Moolenaar25c9c682019-05-05 18:13:34 +02008711 netterm NetTerm mouse handling. A left mouse click generates
Bram Moolenaar071d4272004-06-13 20:20:40 +00008712 "<Esc>}r,c<CR>", where "r,c" are two decimal numbers
Bram Moolenaar25c9c682019-05-05 18:13:34 +02008713 for the row and column. No other mouse events are
8714 supported.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008715 *dec-mouse*
8716 dec DEC terminal mouse handling. The mouse generates a
8717 rather complex sequence, starting with "<Esc>[".
Bram Moolenaare4efc3b2005-03-07 23:16:51 +00008718 This is also available for an Xterm, if it was
8719 configured with "--enable-dec-locator".
Bram Moolenaar071d4272004-06-13 20:20:40 +00008720 *jsbterm-mouse*
8721 jsbterm JSB term mouse handling.
8722 *pterm-mouse*
8723 pterm QNX pterm mouse handling.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01008724 *urxvt-mouse*
8725 urxvt Mouse handling for the urxvt (rxvt-unicode) terminal.
Bram Moolenaare968e362014-05-13 20:23:24 +02008726 The mouse works only if the terminal supports this
8727 encoding style, but it does not have 223 columns limit
8728 unlike "xterm" or "xterm2".
Bram Moolenaar9b451252012-08-15 17:43:31 +02008729 *sgr-mouse*
8730 sgr Mouse handling for the terminal that emits SGR-styled
Bram Moolenaare968e362014-05-13 20:23:24 +02008731 mouse reporting. The mouse works even in columns
8732 beyond 223. This option is backward compatible with
8733 "xterm2" because it can also decode "xterm2" style
8734 mouse codes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008735
8736 The mouse handling must be enabled at compile time |+mouse_xterm|
Bram Moolenaare968e362014-05-13 20:23:24 +02008737 |+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
8738 |+mouse_sgr|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008739 Only "xterm"(2) is really recognized. NetTerm mouse codes are always
8740 recognized, if enabled at compile time. DEC terminal mouse codes
8741 are recognized if enabled at compile time, and 'ttymouse' is not
Bram Moolenaare968e362014-05-13 20:23:24 +02008742 "xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
8743 with them).
Bram Moolenaar071d4272004-06-13 20:20:40 +00008744 This option is automatically set to "xterm", when the 'term' option is
Bram Moolenaar45758762016-10-12 23:08:06 +02008745 set to a name that starts with "xterm", "mlterm", "screen", "tmux",
8746 "st" (full match only), "st-" or "stterm", and 'ttymouse' is not set
8747 already.
Bram Moolenaar06cd14d2023-01-10 12:37:38 +00008748 If the terminfo/termcap entry "XM" exists and the first number is
8749 "1006" then 'ttymouse' will be set to "sgr". This works for many
8750 modern terminals.
Bram Moolenaare968e362014-05-13 20:23:24 +02008751 Additionally, if vim is compiled with the |+termresponse| feature and
8752 |t_RV| is set to the escape sequence to request the xterm version
Bram Moolenaarf8a07122019-07-01 22:06:07 +02008753 number, more intelligent detection is done.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008754 The "xterm2" value will be set if the xterm version is reported to be
Bram Moolenaard47d5222018-12-09 20:43:55 +01008755 from 95 to 276. The "sgr" value will be set if Vim detects Mac
8756 Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
8757 higher.
Bram Moolenaare968e362014-05-13 20:23:24 +02008758 If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
8759 automatically, set t_RV to an empty string: >
Bram Moolenaar071d4272004-06-13 20:20:40 +00008760 :set t_RV=
8761<
8762 *'ttyscroll'* *'tsl'*
8763'ttyscroll' 'tsl' number (default 999)
8764 global
8765 Maximum number of lines to scroll the screen. If there are more lines
8766 to scroll the window is redrawn. For terminals where scrolling is
8767 very slow and redrawing is not slow this can be set to a small number,
8768 e.g., 3, to speed up displaying.
8769
8770 *'ttytype'* *'tty'*
8771'ttytype' 'tty' string (default from $TERM)
8772 global
8773 Alias for 'term', see above.
8774
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008775 *'undodir'* *'udir'*
8776'undodir' 'udir' string (default ".")
8777 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02008778 {only when compiled with the |+persistent_undo| feature}
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008779 List of directory names for undo files, separated with commas.
Bram Moolenaarb230bd52010-05-25 21:02:00 +02008780 See |'backupdir'| for details of the format.
Bram Moolenaar6a244fe2010-05-24 22:02:24 +02008781 "." means using the directory of the file. The undo file name for
8782 "file.txt" is ".file.txt.un~".
8783 For other directories the file name is the full path of the edited
8784 file, with path separators replaced with "%".
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008785 When writing: The first directory that exists is used. "." always
8786 works, no directories after "." will be used for writing.
8787 When reading all entries are tried to find an undo file. The first
8788 undo file that exists is used. When it cannot be read an error is
8789 given, no further entry is used.
8790 See |undo-persistence|.
Bram Moolenaar110289e2019-05-23 15:38:06 +02008791 This option cannot be set from a |modeline| or in the |sandbox|, for
8792 security reasons.
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008793
Bram Moolenaar543b7ef2013-06-01 14:50:56 +02008794 *'undofile'* *'noundofile'* *'udf'* *'noudf'*
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008795'undofile' 'udf' boolean (default off)
8796 local to buffer
Bram Moolenaardb84e452010-08-15 13:50:43 +02008797 {only when compiled with the |+persistent_undo| feature}
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008798 When on, Vim automatically saves undo history to an undo file when
8799 writing a buffer to a file, and restores undo history from the same
8800 file on buffer read.
Bram Moolenaarb230bd52010-05-25 21:02:00 +02008801 The directory where the undo file is stored is specified by 'undodir'.
8802 For more information about this feature see |undo-persistence|.
Bram Moolenaar59f931e2010-07-24 20:27:03 +02008803 The undo file is not read when 'undoreload' causes the buffer from
8804 before a reload to be saved for undo.
Bram Moolenaar97d62492012-11-15 21:28:22 +01008805 When 'undofile' is turned off the undo file is NOT deleted.
Bram Moolenaar036986f2017-03-16 17:41:02 +01008806 NOTE: This option is reset when 'compatible' is set.
Bram Moolenaar55debbe2010-05-23 23:34:36 +02008807
Bram Moolenaar071d4272004-06-13 20:20:40 +00008808 *'undolevels'* *'ul'*
Bram Moolenaar8024f932020-01-14 19:29:13 +01008809'undolevels' 'ul' number (default 100, 1000 for Unix, VMS and Win32)
Bram Moolenaarf5a2fd82013-11-06 05:26:15 +01008810 global or local to buffer |global-local|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008811 Maximum number of changes that can be undone. Since undo information
Bram Moolenaar5be4cee2019-09-27 19:34:08 +02008812 is kept in memory, higher numbers will cause more memory to be used.
8813 Nevertheless, a single change can already use a large amount of memory.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008814 Set to 0 for Vi compatibility: One level of undo and "u" undoes
8815 itself: >
8816 set ul=0
8817< But you can also get Vi compatibility by including the 'u' flag in
8818 'cpoptions', and still be able to use CTRL-R to repeat undo.
Bram Moolenaar945e2db2010-06-05 17:43:32 +02008819 Also see |undo-two-ways|.
Bram Moolenaarf5a2fd82013-11-06 05:26:15 +01008820 Set to -1 for no undo at all. You might want to do this only for the
8821 current buffer: >
8822 setlocal ul=-1
Bram Moolenaar071d4272004-06-13 20:20:40 +00008823< This helps when you run out of memory for a single change.
Bram Moolenaar32efaf62014-11-05 17:02:17 +01008824
8825 The local value is set to -123456 when the global value is to be used.
8826
Bram Moolenaar945e2db2010-06-05 17:43:32 +02008827 Also see |clear-undo|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008828
Bram Moolenaar59f931e2010-07-24 20:27:03 +02008829 *'undoreload'* *'ur'*
8830'undoreload' 'ur' number (default 10000)
8831 global
Bram Moolenaar59f931e2010-07-24 20:27:03 +02008832 Save the whole buffer for undo when reloading it. This applies to the
8833 ":e!" command and reloading for when the buffer changed outside of
8834 Vim. |FileChangedShell|
Bram Moolenaar24a98a02017-09-27 22:23:55 +02008835 The save only happens when this option is negative or when the number
Bram Moolenaar59f931e2010-07-24 20:27:03 +02008836 of lines is smaller than the value of this option.
8837 Set this option to zero to disable undo for a reload.
8838
8839 When saving undo for a reload, any undo file is not read.
8840
8841 Note that this causes the whole buffer to be stored in memory. Set
8842 this option to a lower value if you run out of memory.
8843
Bram Moolenaar071d4272004-06-13 20:20:40 +00008844 *'updatecount'* *'uc'*
8845'updatecount' 'uc' number (default: 200)
8846 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008847 After typing this many characters the swap file will be written to
8848 disk. When zero, no swap file will be created at all (see chapter on
8849 recovery |crash-recovery|). 'updatecount' is set to zero by starting
8850 Vim with the "-n" option, see |startup|. When editing in readonly
8851 mode this option will be initialized to 10000.
8852 The swapfile can be disabled per buffer with |'swapfile'|.
8853 When 'updatecount' is set from zero to non-zero, swap files are
8854 created for all buffers that have 'swapfile' set. When 'updatecount'
8855 is set to zero, existing swap files are not deleted.
8856 Also see |'swapsync'|.
8857 This option has no meaning in buffers where |'buftype'| is "nofile"
8858 or "nowrite".
8859
8860 *'updatetime'* *'ut'*
8861'updatetime' 'ut' number (default 4000)
8862 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008863 If this many milliseconds nothing is typed the swap file will be
8864 written to disk (see |crash-recovery|). Also used for the
8865 |CursorHold| autocommand event.
8866
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008867 *'varsofttabstop'* *'vsts'*
8868'varsofttabstop' 'vsts' string (default "")
8869 local to buffer
8870 {only available when compiled with the |+vartabs|
8871 feature}
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008872 A list of the number of spaces that a <Tab> counts for while editing,
8873 such as inserting a <Tab> or using <BS>. It "feels" like variable-
8874 width <Tab>s are being inserted, while in fact a mixture of spaces
8875 and <Tab>s is used. Tab widths are separated with commas, with the
8876 final value applying to all subsequent tabs.
8877
8878 For example, when editing assembly language files where statements
Bram Moolenaar6dc819b2018-07-03 16:42:19 +02008879 start in the 9th column and comments in the 41st, it may be useful
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008880 to use the following: >
8881 :set varsofttabstop=8,32,8
Bram Moolenaar6dc819b2018-07-03 16:42:19 +02008882< This will set soft tabstops with 8 and 8 + 32 spaces, and 8 more
8883 for every column thereafter.
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008884
8885 Note that the value of |'softtabstop'| will be ignored while
8886 'varsofttabstop' is set.
8887
8888 *'vartabstop'* *'vts'*
8889'vartabstop' 'vts' string (default "")
8890 local to buffer
8891 {only available when compiled with the |+vartabs|
8892 feature}
Bram Moolenaar04958cb2018-06-23 19:23:02 +02008893 A list of the number of spaces that a <Tab> in the file counts for,
8894 separated by commas. Each value corresponds to one tab, with the
8895 final value applying to all subsequent tabs. For example: >
8896 :set vartabstop=4,20,10,8
8897< This will make the first tab 4 spaces wide, the second 20 spaces,
8898 the third 10 spaces, and all following tabs 8 spaces.
8899
8900 Note that the value of |'tabstop'| will be ignored while 'vartabstop'
8901 is set.
8902
Bram Moolenaar071d4272004-06-13 20:20:40 +00008903 *'verbose'* *'vbs'*
8904'verbose' 'vbs' number (default 0)
8905 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00008906 When bigger than zero, Vim will give messages about what it is doing.
8907 Currently, these messages are given:
8908 >= 1 When the viminfo file is read or written.
8909 >= 2 When a file is ":source"'ed.
Bram Moolenaar647a5302020-05-03 17:01:24 +02008910 >= 4 Shell commands.
Bram Moolenaar87b5ca52006-03-04 21:55:31 +00008911 >= 5 Every searched tags file and include file.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008912 >= 8 Files for which a group of autocommands is executed.
8913 >= 9 Every executed autocommand.
Bram Moolenaar647a5302020-05-03 17:01:24 +02008914 >= 11 Finding items in a path
Bram Moolenaar071d4272004-06-13 20:20:40 +00008915 >= 12 Every executed function.
8916 >= 13 When an exception is thrown, caught, finished, or discarded.
8917 >= 14 Anything pending in a ":finally" clause.
Bram Moolenaar823654b2020-05-29 23:03:09 +02008918 >= 15 Every executed Ex command from a script (truncated at 200
8919 characters).
Bram Moolenaare7b1ea02020-08-07 19:54:59 +02008920 >= 16 Every executed Ex command.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008921
8922 This option can also be set with the "-V" argument. See |-V|.
8923 This option is also set by the |:verbose| command.
8924
Bram Moolenaar5c06f8b2005-05-31 22:14:58 +00008925 When the 'verbosefile' option is set then the verbose messages are not
8926 displayed.
8927
8928 *'verbosefile'* *'vfile'*
8929'verbosefile' 'vfile' string (default empty)
8930 global
Bram Moolenaar5c06f8b2005-05-31 22:14:58 +00008931 When not empty all messages are written in a file with this name.
8932 When the file exists messages are appended.
8933 Writing to the file ends when Vim exits or when 'verbosefile' is made
Bram Moolenaar80794b12010-06-13 05:20:42 +02008934 empty. Writes are buffered, thus may not show up for some time.
Bram Moolenaar5c06f8b2005-05-31 22:14:58 +00008935 Setting 'verbosefile' to a new value is like making it empty first.
8936 The difference with |:redir| is that verbose messages are not
8937 displayed when 'verbosefile' is set.
8938
Bram Moolenaar071d4272004-06-13 20:20:40 +00008939 *'viewdir'* *'vdir'*
Christian Brabandtb8b1c8e2023-06-23 22:23:01 +01008940'viewdir' 'vdir' string (default for Amiga "home:vimfiles/view",
Bram Moolenaar801961d2023-06-23 16:15:13 +01008941 for Win32: "$HOME/vimfiles/view",
Christian Brabandtb8b1c8e2023-06-23 22:23:01 +01008942 for Unix: "$HOME/.vim/view",
Bram Moolenaar801961d2023-06-23 16:15:13 +01008943 for macOS: "$VIM/vimfiles/view"
8944 for VMS: "sys$login:vimfiles/view")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008945 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02008946 {not available when compiled without the |+mksession|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008947 feature}
8948 Name of the directory where to store files for |:mkview|.
8949 This option cannot be set from a |modeline| or in the |sandbox|, for
8950 security reasons.
8951
8952 *'viewoptions'* *'vop'*
Bram Moolenaar13e90412017-11-11 18:16:48 +01008953'viewoptions' 'vop' string (default: "folds,options,cursor,curdir")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008954 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02008955 {not available when compiled without the |+mksession|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008956 feature}
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01008957 Changes the effect of the |:mkview| command. It is a comma-separated
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00008958 list of words. Each word enables saving and restoring something:
Bram Moolenaar071d4272004-06-13 20:20:40 +00008959 word save and restore ~
8960 cursor cursor position in file and in window
8961 folds manually created folds, opened/closed folds and local
8962 fold options
8963 options options and mappings local to a window or buffer (not
8964 global values for local options)
Bram Moolenaar6e932462014-09-09 18:48:09 +02008965 localoptions same as "options"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008966 slash backslashes in file names replaced with forward
8967 slashes
8968 unix with Unix end-of-line format (single <NL>), even when
Bram Moolenaar6f345a12019-12-17 21:27:18 +01008969 on MS-Windows
Bram Moolenaar13e90412017-11-11 18:16:48 +01008970 curdir the window-local directory, if set with `:lcd`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008971
Bram Moolenaar6f345a12019-12-17 21:27:18 +01008972 "slash" and "unix" are useful on MS-Windows when sharing view files
Bram Moolenaar071d4272004-06-13 20:20:40 +00008973 with Unix. The Unix version of Vim cannot source dos format scripts,
Bram Moolenaar6f345a12019-12-17 21:27:18 +01008974 but the MS-Windows version of Vim can source unix format scripts.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008975
8976 *'viminfo'* *'vi'* *E526* *E527* *E528*
Bram Moolenaar6f345a12019-12-17 21:27:18 +01008977'viminfo' 'vi' string (Vi default: "", Vim default for
8978 MS-Windows: '100,<50,s10,h,rA:,rB:,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01008979 for Amiga: '100,<50,s10,h,rdf0:,rdf1:,rdf2:
8980 for others: '100,<50,s10,h)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008981 global
Bram Moolenaardb84e452010-08-15 13:50:43 +02008982 {not available when compiled without the |+viminfo|
Bram Moolenaar071d4272004-06-13 20:20:40 +00008983 feature}
8984 When non-empty, the viminfo file is read upon startup and written
Bram Moolenaarc4da1132017-07-15 19:39:43 +02008985 when exiting Vim (see |viminfo-file|). Except when 'viminfofile' is
8986 "NONE".
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01008987 The string should be a comma-separated list of parameters, each
Bram Moolenaarc4da1132017-07-15 19:39:43 +02008988 consisting of a single character identifying the particular parameter,
8989 followed by a number or string which specifies the value of that
8990 parameter. If a particular character is left out, then the default
8991 value is used for that parameter. The following is a list of the
8992 identifying characters and the effect of their value.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008993 CHAR VALUE ~
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01008994 *viminfo-!*
Bram Moolenaar071d4272004-06-13 20:20:40 +00008995 ! When included, save and restore global variables that start
8996 with an uppercase letter, and don't contain a lowercase
8997 letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
Bram Moolenaar680eeca2010-10-20 17:44:42 +02008998 and "_K_L_M" are not. Nested List and Dict items may not be
Bram Moolenaar166af9b2010-11-16 20:34:40 +01008999 read back correctly, you end up with an empty item.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009000 *viminfo-quote*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009001 " Maximum number of lines saved for each register. Old name of
9002 the '<' item, with the disadvantage that you need to put a
9003 backslash before the ", otherwise it will be recognized as the
9004 start of a comment!
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009005 *viminfo-%*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009006 % When included, save and restore the buffer list. If Vim is
9007 started with a file name argument, the buffer list is not
9008 restored. If Vim is started without a file name argument, the
Bram Moolenaard042dc82015-11-24 19:18:36 +01009009 buffer list is restored from the viminfo file. Quickfix
9010 ('buftype'), unlisted ('buflisted'), unnamed and buffers on
9011 removable media (|viminfo-r|) are not saved.
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +00009012 When followed by a number, the number specifies the maximum
9013 number of buffers that are stored. Without a number all
9014 buffers are stored.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009015 *viminfo-'*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009016 ' Maximum number of previously edited files for which the marks
9017 are remembered. This parameter must always be included when
9018 'viminfo' is non-empty.
9019 Including this item also means that the |jumplist| and the
9020 |changelist| are stored in the viminfo file.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009021 *viminfo-/*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009022 / Maximum number of items in the search pattern history to be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009023 saved. If non-zero, then the previous search and substitute
Bram Moolenaar071d4272004-06-13 20:20:40 +00009024 patterns are also saved. When not included, the value of
9025 'history' is used.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009026 *viminfo-:*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009027 : Maximum number of items in the command-line history to be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009028 saved. When not included, the value of 'history' is used.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009029 *viminfo-<*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009030 < Maximum number of lines saved for each register. If zero then
9031 registers are not saved. When not included, all lines are
9032 saved. '"' is the old name for this item.
9033 Also see the 's' item below: limit specified in Kbyte.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009034 *viminfo-@*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009035 @ Maximum number of items in the input-line history to be
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009036 saved. When not included, the value of 'history' is used.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009037 *viminfo-c*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009038 c When included, convert the text in the viminfo file from the
9039 'encoding' used when writing the file to the current
Bram Moolenaar582fd852005-03-28 20:58:01 +00009040 'encoding'. See |viminfo-encoding|.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009041 *viminfo-f*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009042 f Whether file marks need to be stored. If zero, file marks ('0
9043 to '9, 'A to 'Z) are not stored. When not present or when
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009044 non-zero, they are all stored. '0 is used for the current
Bram Moolenaar071d4272004-06-13 20:20:40 +00009045 cursor position (when exiting or when doing ":wviminfo").
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009046 *viminfo-h*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009047 h Disable the effect of 'hlsearch' when loading the viminfo
9048 file. When not included, it depends on whether ":nohlsearch"
9049 has been used since the last search command.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009050 *viminfo-n*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009051 n Name of the viminfo file. The name must immediately follow
Bram Moolenaarc4da1132017-07-15 19:39:43 +02009052 the 'n'. Must be at the end of the option! If the
9053 'viminfofile' option is set, that file name overrides the one
9054 given here with 'viminfo'. Environment variables are
Bram Moolenaar063b9d12016-07-09 20:21:48 +02009055 expanded when opening the file, not when setting the option.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009056 *viminfo-r*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009057 r Removable media. The argument is a string (up to the next
9058 ','). This parameter can be given several times. Each
9059 specifies the start of a path for which no marks will be
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01009060 stored. This is to avoid removable media. For MS-Windows you
Bram Moolenaar071d4272004-06-13 20:20:40 +00009061 could use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:". You can
9062 also use it for temp files, e.g., for Unix: "r/tmp". Case is
9063 ignored. Maximum length of each 'r' argument is 50
9064 characters.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +01009065 *viminfo-s*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009066 s Maximum size of an item in Kbyte. If zero then registers are
9067 not saved. Currently only applies to registers. The default
9068 "s10" will exclude registers with more than 10 Kbyte of text.
9069 Also see the '<' item above: line count limit.
9070
9071 Example: >
9072 :set viminfo='50,<1000,s100,:0,n~/vim/viminfo
9073<
9074 '50 Marks will be remembered for the last 50 files you
9075 edited.
9076 <1000 Contents of registers (up to 1000 lines each) will be
9077 remembered.
9078 s100 Registers with more than 100 Kbyte text are skipped.
9079 :0 Command-line history will not be saved.
9080 n~/vim/viminfo The name of the file to use is "~/vim/viminfo".
9081 no / Since '/' is not specified, the default will be used,
9082 that is, save all of the search history, and also the
9083 previous search and substitute patterns.
9084 no % The buffer list will not be saved nor read back.
9085 no h 'hlsearch' highlighting will be restored.
9086
9087 When setting 'viminfo' from an empty value you can use |:rviminfo| to
9088 load the contents of the file, this is not done automatically.
9089
9090 This option cannot be set from a |modeline| or in the |sandbox|, for
9091 security reasons.
Bram Moolenaar036986f2017-03-16 17:41:02 +01009092 NOTE: This option is set to the Vim default value when 'compatible'
9093 is reset.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009094
Bram Moolenaarc4da1132017-07-15 19:39:43 +02009095 *'viminfofile'* *'vif'*
9096'viminfofile' 'vif' string (default: "")
9097 global
Bram Moolenaarc4da1132017-07-15 19:39:43 +02009098 {not available when compiled without the |+viminfo|
9099 feature}
9100 When non-empty, overrides the file name used for viminfo.
9101 When equal to "NONE" no viminfo file will be read or written.
9102 This option can be set with the |-i| command line flag. The |--clean|
9103 command line flag sets it to "NONE".
Bram Moolenaar110289e2019-05-23 15:38:06 +02009104 This option cannot be set from a |modeline| or in the |sandbox|, for
9105 security reasons.
Bram Moolenaarc4da1132017-07-15 19:39:43 +02009106
Bram Moolenaar071d4272004-06-13 20:20:40 +00009107 *'virtualedit'* *'ve'*
9108'virtualedit' 've' string (default "")
Gary Johnson51ad8502021-08-03 18:33:08 +02009109 global or local to window |global-local|
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01009110 A comma-separated list of these words:
Bram Moolenaar071d4272004-06-13 20:20:40 +00009111 block Allow virtual editing in Visual block mode.
9112 insert Allow virtual editing in Insert mode.
9113 all Allow virtual editing in all modes.
Bram Moolenaarefd2bf12006-03-16 21:41:35 +00009114 onemore Allow the cursor to move just past the end of the line
Gary Johnson53ba05b2021-07-26 22:19:10 +02009115 none When used as the local value, do not allow virtual
9116 editing even when the global value is set. When used
9117 as the global value, "none" is the same as "".
9118 NONE Alternative spelling of "none".
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009119
Bram Moolenaar071d4272004-06-13 20:20:40 +00009120 Virtual editing means that the cursor can be positioned where there is
Bram Moolenaarebcbd022007-05-12 14:28:25 +00009121 no actual character. This can be halfway into a tab or beyond the end
Bram Moolenaar071d4272004-06-13 20:20:40 +00009122 of the line. Useful for selecting a rectangle in Visual mode and
9123 editing a table.
Bram Moolenaarefd2bf12006-03-16 21:41:35 +00009124 "onemore" is not the same, it will only allow moving the cursor just
9125 after the last character of the line. This makes some commands more
9126 consistent. Previously the cursor was always past the end of the line
9127 if the line was empty. But it is far from Vi compatible. It may also
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009128 break some plugins or Vim scripts. For example because |l| can move
9129 the cursor after the last character. Use with care!
Bram Moolenaar9ba7e172013-07-17 22:37:26 +02009130 Using the `$` command will move to the last character in the line, not
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009131 past it. This may actually move the cursor to the left!
Bram Moolenaar9ba7e172013-07-17 22:37:26 +02009132 The `g$` command will move to the end of the screen line.
Bram Moolenaarefd2bf12006-03-16 21:41:35 +00009133 It doesn't make sense to combine "all" with "onemore", but you will
9134 not get a warning for it.
Bram Moolenaar53f7fcc2021-07-28 20:10:16 +02009135 When combined with other words, "none" is ignored.
Bram Moolenaar036986f2017-03-16 17:41:02 +01009136 NOTE: This option is set to "" when 'compatible' is set.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009137
9138 *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
9139'visualbell' 'vb' boolean (default off)
9140 global
Bram Moolenaar74675a62017-07-15 13:53:23 +02009141 Use a visual bell instead of beeping. The terminal code to display the
Bram Moolenaar071d4272004-06-13 20:20:40 +00009142 visual bell is given with 't_vb'. When no beep or flash is wanted,
Bram Moolenaar74675a62017-07-15 13:53:23 +02009143 use: >
9144 :set vb t_vb=
9145< If you want a short flash, you can use this on many terminals: >
9146 :set vb t_vb=[?5h$<100>[?5l
9147< Here $<100> specifies the time, you can use a smaller or bigger value
9148 to get a shorter or longer flash.
9149
9150 Note: Vim will limit the bell to once per half a second. This avoids
9151 having to wait for the flashing to finish when there are lots of
9152 bells, e.g. on key repeat. This also happens without 'visualbell'
9153 set.
9154
Bram Moolenaar071d4272004-06-13 20:20:40 +00009155 In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display
9156 for 20 msec. If you want to use a different time, use "<Esc>|40f",
9157 where 40 is the time in msec.
Bram Moolenaar74675a62017-07-15 13:53:23 +02009158
9159 Note: When the GUI starts, 't_vb' is reset to its default value. You
9160 might want to set it again in your |gvimrc|.
9161
Bram Moolenaar071d4272004-06-13 20:20:40 +00009162 Does not work on the Amiga, you always get a screen flash.
9163 Also see 'errorbells'.
9164
9165 *'warn'* *'nowarn'*
9166'warn' boolean (default on)
9167 global
9168 Give a warning message when a shell command is used while the buffer
9169 has been changed.
9170
9171 *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'*
9172'weirdinvert' 'wiv' boolean (default off)
9173 global
Bram Moolenaar1d2ba7f2006-02-14 22:29:30 +00009174 This option has the same effect as the 't_xs' terminal option.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009175 It is provided for backwards compatibility with version 4.x.
9176 Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and
9177 vice versa. Has no effect when the GUI is running.
9178
9179 *'whichwrap'* *'ww'*
9180'whichwrap' 'ww' string (Vim default: "b,s", Vi default: "")
9181 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009182 Allow specified keys that move the cursor left/right to move to the
9183 previous/next line when the cursor is on the first/last character in
9184 the line. Concatenate characters to allow this for these keys:
9185 char key mode ~
9186 b <BS> Normal and Visual
9187 s <Space> Normal and Visual
Bram Moolenaar87b5ca52006-03-04 21:55:31 +00009188 h "h" Normal and Visual (not recommended)
9189 l "l" Normal and Visual (not recommended)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009190 < <Left> Normal and Visual
9191 > <Right> Normal and Visual
9192 ~ "~" Normal
9193 [ <Left> Insert and Replace
9194 ] <Right> Insert and Replace
9195 For example: >
9196 :set ww=<,>,[,]
9197< allows wrap only when cursor keys are used.
9198 When the movement keys are used in combination with a delete or change
9199 operator, the <EOL> also counts for a character. This makes "3h"
9200 different from "3dh" when the cursor crosses the end of a line. This
9201 is also true for "x" and "X", because they do the same as "dl" and
9202 "dh". If you use this, you may also want to use the mapping
9203 ":map <BS> X" to make backspace delete the character in front of the
9204 cursor.
Bram Moolenaar362e1a32006-03-06 23:29:24 +00009205 When 'l' is included and it is used after an operator at the end of a
Bram Moolenaar589edb32019-09-20 14:38:13 +02009206 line (not an empty line) then it will not move to the next line. This
9207 makes "dl", "cl", "yl" etc. work normally.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009208 NOTE: This option is set to the Vi default value when 'compatible' is
9209 set and to the Vim default value when 'compatible' is reset.
9210
9211 *'wildchar'* *'wc'*
9212'wildchar' 'wc' number (Vim default: <Tab>, Vi default: CTRL-E)
9213 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009214 Character you have to type to start wildcard expansion in the
9215 command-line, as specified with 'wildmode'.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009216 More info here: |cmdline-completion|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009217 The character is not recognized when used inside a macro. See
9218 'wildcharm' for that.
Bram Moolenaar34cc7d82021-09-21 20:09:51 +02009219 Some keys will not work, such as CTRL-C, <CR> and Enter.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009220 Although 'wc' is a number option, you can set it to a special key: >
Bram Moolenaar34cc7d82021-09-21 20:09:51 +02009221 :set wc=<Tab>
Bram Moolenaar071d4272004-06-13 20:20:40 +00009222< NOTE: This option is set to the Vi default value when 'compatible' is
9223 set and to the Vim default value when 'compatible' is reset.
9224
9225 *'wildcharm'* *'wcm'*
9226'wildcharm' 'wcm' number (default: none (0))
9227 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009228 'wildcharm' works exactly like 'wildchar', except that it is
Bram Moolenaar582fd852005-03-28 20:58:01 +00009229 recognized when used inside a macro. You can find "spare" command-line
9230 keys suitable for this option by looking at |ex-edit-index|. Normally
Bram Moolenaar071d4272004-06-13 20:20:40 +00009231 you'll never actually type 'wildcharm', just use it in mappings that
9232 automatically invoke completion mode, e.g.: >
9233 :set wcm=<C-Z>
Bram Moolenaar446cb832008-06-24 21:56:24 +00009234 :cnoremap ss so $vim/sessions/*.vim<C-Z>
Bram Moolenaar071d4272004-06-13 20:20:40 +00009235< Then after typing :ss you can use CTRL-P & CTRL-N.
9236
9237 *'wildignore'* *'wig'*
9238'wildignore' 'wig' string (default "")
9239 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009240 A list of file patterns. A file that matches with one of these
Bram Moolenaar30b65812012-07-12 22:01:11 +02009241 patterns is ignored when expanding |wildcards|, completing file or
9242 directory names, and influences the result of |expand()|, |glob()| and
9243 |globpath()| unless a flag is passed to disable this.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009244 The pattern is used like with |:autocmd|, see |autocmd-patterns|.
9245 Also see 'suffixes'.
9246 Example: >
9247 :set wildignore=*.o,*.obj
9248< The use of |:set+=| and |:set-=| is preferred when adding or removing
9249 a pattern from the list. This avoids problems when a future version
9250 uses another default.
9251
Bram Moolenaar94950a92010-12-02 16:01:29 +01009252
Bram Moolenaar81af9252010-12-10 20:35:50 +01009253 *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
Bram Moolenaar94950a92010-12-02 16:01:29 +01009254'wildignorecase' 'wic' boolean (default off)
9255 global
Bram Moolenaar94950a92010-12-02 16:01:29 +01009256 When set case is ignored when completing file names and directories.
Bram Moolenaar71afbfe2013-03-19 16:49:16 +01009257 Has no effect when 'fileignorecase' is set.
Bram Moolenaar94950a92010-12-02 16:01:29 +01009258 Does not apply when the shell is used to expand wildcards, which
9259 happens when there are special characters.
9260
9261
Bram Moolenaar071d4272004-06-13 20:20:40 +00009262 *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +02009263'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009264 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009265 When 'wildmenu' is on, command-line completion operates in an enhanced
9266 mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
Bram Moolenaar54162322022-08-26 16:58:51 +01009267 the possible matches are shown.
9268 When 'wildoptions' contains "pum", then the completion matches are
9269 shown in a popup menu. Otherwise they are displayed just above the
9270 command line, with the first match highlighted (overwriting the status
9271 line, if there is one).
Yegappan Lakshmanan3908ef52022-02-08 12:08:07 +00009272 Keys that show the previous/next match, such as <Tab> or
Bram Moolenaar071d4272004-06-13 20:20:40 +00009273 CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
9274 When 'wildmode' is used, "wildmenu" mode is used where "full" is
9275 specified. "longest" and "list" do not start "wildmenu" mode.
Bram Moolenaar26402cb2013-02-20 21:26:00 +01009276 You can check the current mode with |wildmenumode()|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009277 If there are more matches than can fit in the line, a ">" is shown on
9278 the right and/or a "<" is shown on the left. The status line scrolls
9279 as needed.
9280 The "wildmenu" mode is abandoned when a key is hit that is not used
9281 for selecting a completion.
Yegappan Lakshmanan3908ef52022-02-08 12:08:07 +00009282 While the "wildmenu" is active, not using the popup menu, the
9283 following keys have special meanings:
Bram Moolenaar071d4272004-06-13 20:20:40 +00009284
9285 <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
9286 <Down> - in filename/menu name completion: move into a
9287 subdirectory or submenu.
9288 <CR> - in menu completion, when the cursor is just after a
9289 dot: move into a submenu.
9290 <Up> - in filename/menu name completion: move up into
9291 parent directory or parent menu.
9292
Yegappan Lakshmanan3908ef52022-02-08 12:08:07 +00009293 When using the popup menu for command line completion, the following
9294 keys have special meanings:
9295 <Down> - select next match (like CTRL-N)
9296 <Left> - in filename/menu name completion: move up into
9297 parent directory or parent menu.
9298 <Right> - in filename/menu name completion: move into a
9299 subdirectory or submenu.
9300 <Up> - select previous match (like CTRL-P)
9301 CTRL-E - end completion, go back to what was there before
9302 selecting a match.
9303 CTRL-N - go to the next entry
9304 CTRL-P - go to the previous entry
9305 CTRL-Y - accept the currently selected match and stop
9306 completion.
9307
Bram Moolenaar071d4272004-06-13 20:20:40 +00009308 This makes the menus accessible from the console |console-menus|.
9309
9310 If you prefer the <Left> and <Right> keys to move the cursor instead
9311 of selecting a different match, use this: >
9312 :cnoremap <Left> <Space><BS><Left>
9313 :cnoremap <Right> <Space><BS><Right>
9314<
9315 The "WildMenu" highlighting is used for displaying the current match
9316 |hl-WildMenu|.
9317
9318 *'wildmode'* *'wim'*
9319'wildmode' 'wim' string (Vim default: "full")
9320 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009321 Completion mode that is used for the character specified with
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01009322 'wildchar'. It is a comma-separated list of up to four parts. Each
Bram Moolenaar02467872007-05-06 13:22:01 +00009323 part specifies what to do for each consecutive use of 'wildchar'. The
Bram Moolenaar071d4272004-06-13 20:20:40 +00009324 first part specifies the behavior for the first use of 'wildchar',
9325 The second part for the second use, etc.
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02009326
9327 Each part consists of a colon separated list consisting of the
9328 following possible values:
Bram Moolenaar071d4272004-06-13 20:20:40 +00009329 "" Complete only the first match.
9330 "full" Complete the next full match. After the last match,
9331 the original string is used and then the first match
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02009332 again. Will also start 'wildmenu' if it is enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009333 "longest" Complete till longest common string. If this doesn't
9334 result in a longer string, use the next part.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009335 "list" When more than one match, list all matches.
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02009336 "lastused" When completing buffer names and more than one buffer
9337 matches, sort buffers by time last used (other than
9338 the current buffer).
9339 When there is only a single match, it is fully completed in all cases.
9340
9341 Examples of useful colon-separated values:
9342 "longest:full" Like "longest", but also start 'wildmenu' if it is
9343 enabled. Will not complete to the next full match.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009344 "list:full" When more than one match, list all matches and
9345 complete first match.
9346 "list:longest" When more than one match, list all matches and
9347 complete till longest common string.
Bram Moolenaar130cbfc2021-04-07 21:07:20 +02009348 "list:lastused" When more than one buffer matches, list all matches
9349 and sort buffers by time last used (other than the
9350 current buffer).
Bram Moolenaar071d4272004-06-13 20:20:40 +00009351
9352 Examples: >
9353 :set wildmode=full
Bram Moolenaar582fd852005-03-28 20:58:01 +00009354< Complete first full match, next match, etc. (the default) >
Bram Moolenaar071d4272004-06-13 20:20:40 +00009355 :set wildmode=longest,full
9356< Complete longest common string, then each full match >
9357 :set wildmode=list:full
9358< List all matches and complete each full match >
9359 :set wildmode=list,full
9360< List all matches without completing, then each full match >
9361 :set wildmode=longest,list
9362< Complete longest common string, then list alternatives.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009363 More info here: |cmdline-completion|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009364
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00009365 *'wildoptions'* *'wop'*
9366'wildoptions' 'wop' string (default "")
9367 global
Yegappan Lakshmanan3908ef52022-02-08 12:08:07 +00009368 A list of words that change how |cmdline-completion| is done.
9369 The following values are supported:
Bram Moolenaar1588bc82022-03-08 21:35:07 +00009370 fuzzy Use |fuzzy-matching| to find completion matches. When
Yegappan Lakshmanan38b85cb2022-02-24 13:28:41 +00009371 this value is specified, wildcard expansion will not
9372 be used for completion. The matches will be sorted by
9373 the "best match" rather than alphabetically sorted.
9374 This will find more matches than the wildcard
9375 expansion. Currently fuzzy matching based completion
9376 is not supported for file and directory names and
9377 instead wildcard expansion is used.
Bram Moolenaar8a3b8052022-06-26 12:21:15 +01009378 pum Display the completion matches using the popup menu
Yegappan Lakshmanan3908ef52022-02-08 12:08:07 +00009379 in the same style as the |ins-completion-menu|.
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00009380 tagfile When using CTRL-D to list matching tags, the kind of
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00009381 tag and the file of the tag is listed. Only one match
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00009382 is displayed per line. Often used tag kinds are:
9383 d #define
9384 f function
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00009385
Bram Moolenaar071d4272004-06-13 20:20:40 +00009386 *'winaltkeys'* *'wak'*
9387'winaltkeys' 'wak' string (default "menu")
9388 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009389 {only used in Win32, Motif, GTK and Photon GUI}
9390 Some GUI versions allow the access to menu entries by using the ALT
9391 key in combination with a character that appears underlined in the
9392 menu. This conflicts with the use of the ALT key for mappings and
9393 entering special characters. This option tells what to do:
9394 no Don't use ALT keys for menus. ALT key combinations can be
9395 mapped, but there is no automatic handling. This can then be
9396 done with the |:simalt| command.
9397 yes ALT key handling is done by the windowing system. ALT key
9398 combinations cannot be mapped.
9399 menu Using ALT in combination with a character that is a menu
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009400 shortcut key, will be handled by the windowing system. Other
Bram Moolenaar071d4272004-06-13 20:20:40 +00009401 keys can be mapped.
9402 If the menu is disabled by excluding 'm' from 'guioptions', the ALT
9403 key is never used for the menu.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00009404 This option is not used for <F10>; on Win32 and with GTK <F10> will
9405 select the menu, unless it has been mapped.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009406
Bram Moolenaar4d784b22019-05-25 19:51:39 +02009407 *'wincolor'* *'wcr'*
9408'wincolor' 'wcr' string (default empty)
9409 local to window
9410 Highlight group name to use for this window instead of the Normal
9411 color |hl-Normal|.
9412
Bram Moolenaar4399ef42005-02-12 14:29:27 +00009413 *'window'* *'wi'*
9414'window' 'wi' number (default screen height - 1)
9415 global
Bram Moolenaardad44732021-03-31 20:07:33 +02009416 Window height used for |CTRL-F| and |CTRL-B| when there is only one
9417 window and the value is smaller than 'lines' minus one. The screen
9418 will scroll 'window' minus two lines, with a minimum of one.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00009419 When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
9420 in a much smarter way, taking care of wrapping lines.
9421 When resizing the Vim window, the value is smaller than 1 or more than
9422 or equal to 'lines' it will be set to 'lines' minus 1.
Bram Moolenaardad44732021-03-31 20:07:33 +02009423 Note: Do not confuse this with the height of the Vim window, use
9424 'lines' for that.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00009425
Bram Moolenaar071d4272004-06-13 20:20:40 +00009426 *'winheight'* *'wh'* *E591*
9427'winheight' 'wh' number (default 1)
9428 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009429 Minimal number of lines for the current window. This is not a hard
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009430 minimum, Vim will use fewer lines if there is not enough room. If the
Bram Moolenaar446cb832008-06-24 21:56:24 +00009431 focus goes to a window that is smaller, its size is increased, at the
9432 cost of the height of other windows.
9433 Set 'winheight' to a small number for normal editing.
9434 Set it to 999 to make the current window fill most of the screen.
9435 Other windows will be only 'winminheight' high. This has the drawback
9436 that ":all" will create only two windows. To avoid "vim -o 1 2 3 4"
9437 to create only two windows, set the option after startup is done,
9438 using the |VimEnter| event: >
9439 au VimEnter * set winheight=999
9440< Minimum value is 1.
9441 The height is not adjusted after one of the commands that change the
Bram Moolenaar071d4272004-06-13 20:20:40 +00009442 height of the current window.
9443 'winheight' applies to the current window. Use 'winminheight' to set
9444 the minimal height for other windows.
9445
9446 *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
9447'winfixheight' 'wfh' boolean (default off)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02009448 local to window |special-local-window-option|
Bram Moolenaar071d4272004-06-13 20:20:40 +00009449 Keep the window height when windows are opened or closed and
Bram Moolenaar02467872007-05-06 13:22:01 +00009450 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the
9451 |preview-window| and |quickfix-window|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009452 The height may be changed anyway when running out of room.
9453
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009454 *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
9455'winfixwidth' 'wfw' boolean (default off)
Christian Brabandt4a8eb6e2023-08-13 19:43:42 +02009456 local to window |special-local-window-option|
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009457 Keep the window width when windows are opened or closed and
Bram Moolenaar02467872007-05-06 13:22:01 +00009458 'equalalways' is set. Also for |CTRL-W_=|.
Bram Moolenaar97b2ad32006-03-18 21:40:56 +00009459 The width may be changed anyway when running out of room.
9460
Bram Moolenaar071d4272004-06-13 20:20:40 +00009461 *'winminheight'* *'wmh'*
9462'winminheight' 'wmh' number (default 1)
9463 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009464 The minimal height of a window, when it's not the current window.
9465 This is a hard minimum, windows will never become smaller.
9466 When set to zero, windows may be "squashed" to zero lines (i.e. just a
9467 status bar) if necessary. They will return to at least one line when
9468 they become active (since the cursor has to have somewhere to go.)
9469 Use 'winheight' to set the minimal height of the current window.
9470 This option is only checked when making a window smaller. Don't use a
9471 large number, it will cause errors when opening more than a few
9472 windows. A value of 0 to 3 is reasonable.
9473
9474 *'winminwidth'* *'wmw'*
9475'winminwidth' 'wmw' number (default 1)
9476 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009477 The minimal width of a window, when it's not the current window.
9478 This is a hard minimum, windows will never become smaller.
9479 When set to zero, windows may be "squashed" to zero columns (i.e. just
9480 a vertical separator) if necessary. They will return to at least one
9481 line when they become active (since the cursor has to have somewhere
9482 to go.)
9483 Use 'winwidth' to set the minimal width of the current window.
9484 This option is only checked when making a window smaller. Don't use a
9485 large number, it will cause errors when opening more than a few
9486 windows. A value of 0 to 12 is reasonable.
9487
Bram Moolenaar9e13aa72017-08-16 23:14:08 +02009488 *'winptydll'*
9489'winptydll' string (default "winpty32.dll" or "winpty64.dll")
9490 global
Bram Moolenaar9e13aa72017-08-16 23:14:08 +02009491 {only available when compiled with the |terminal|
9492 feature on MS-Windows}
9493 Specifies the name of the winpty shared library, used for the
Bram Moolenaare7b1ea02020-08-07 19:54:59 +02009494 |:terminal| command. The default depends on whether Vim was built as a
Bram Moolenaarc572da52017-08-27 16:52:01 +02009495 32-bit or 64-bit executable. If not found, "winpty.dll" is tried as
Bram Moolenaar9e13aa72017-08-16 23:14:08 +02009496 a fallback.
9497 Environment variables are expanded |:set_env|.
9498 This option cannot be set from a |modeline| or in the |sandbox|, for
9499 security reasons.
9500
Bram Moolenaar071d4272004-06-13 20:20:40 +00009501 *'winwidth'* *'wiw'* *E592*
9502'winwidth' 'wiw' number (default 20)
9503 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009504 Minimal number of columns for the current window. This is not a hard
9505 minimum, Vim will use fewer columns if there is not enough room. If
9506 the current window is smaller, its size is increased, at the cost of
9507 the width of other windows. Set it to 999 to make the current window
9508 always fill the screen. Set it to a small number for normal editing.
9509 The width is not adjusted after one of the commands to change the
9510 width of the current window.
9511 'winwidth' applies to the current window. Use 'winminwidth' to set
9512 the minimal width for other windows.
9513
9514 *'wrap'* *'nowrap'*
9515'wrap' boolean (default on)
9516 local to window
Bram Moolenaar071d4272004-06-13 20:20:40 +00009517 This option changes how text is displayed. It doesn't change the text
9518 in the buffer, see 'textwidth' for that.
9519 When on, lines longer than the width of the window will wrap and
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009520 displaying continues on the next line. When off lines will not wrap
9521 and only part of long lines will be displayed. When the cursor is
Bram Moolenaar071d4272004-06-13 20:20:40 +00009522 moved to a part that is not shown, the screen will scroll
9523 horizontally.
9524 The line will be broken in the middle of a word if necessary. See
9525 'linebreak' to get the break at a word boundary.
9526 To make scrolling horizontally a bit more useful, try this: >
9527 :set sidescroll=5
9528 :set listchars+=precedes:<,extends:>
9529< See 'sidescroll', 'listchars' and |wrap-off|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01009530 This option can't be set from a |modeline| when the 'diff' option is
9531 on.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009532
9533 *'wrapmargin'* *'wm'*
9534'wrapmargin' 'wm' number (default 0)
9535 local to buffer
9536 Number of characters from the right window border where wrapping
9537 starts. When typing text beyond this limit, an <EOL> will be inserted
9538 and inserting continues on the next line.
9539 Options that add a margin, such as 'number' and 'foldcolumn', cause
9540 the text width to be further reduced. This is Vi compatible.
9541 When 'textwidth' is non-zero, this option is not used.
Bram Moolenaarca635012015-09-25 20:34:21 +02009542 This option is set to 0 when 'paste' is set and restored when 'paste'
9543 is reset.
Bram Moolenaara6c27c42019-05-09 19:16:22 +02009544 See also 'formatoptions' and |ins-textwidth|.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009545
9546 *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
9547'wrapscan' 'ws' boolean (default on) *E384* *E385*
9548 global
Bram Moolenaarac6e65f2005-08-29 22:25:38 +00009549 Searches wrap around the end of the file. Also applies to |]s| and
9550 |[s|, searching for spelling mistakes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009551
9552 *'write'* *'nowrite'*
9553'write' boolean (default on)
9554 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009555 Allows writing files. When not set, writing a file is not allowed.
9556 Can be used for a view-only mode, where modifications to the text are
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00009557 still allowed. Can be reset with the |-m| or |-M| command line
Bram Moolenaar071d4272004-06-13 20:20:40 +00009558 argument. Filtering text is still possible, even though this requires
9559 writing a temporary file.
9560
9561 *'writeany'* *'wa'* *'nowriteany'* *'nowa'*
9562'writeany' 'wa' boolean (default off)
9563 global
9564 Allows writing to any file with no need for "!" override.
9565
9566 *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'*
9567'writebackup' 'wb' boolean (default on with |+writebackup| feature, off
9568 otherwise)
9569 global
Bram Moolenaar071d4272004-06-13 20:20:40 +00009570 Make a backup before overwriting a file. The backup is removed after
9571 the file was successfully written, unless the 'backup' option is
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +02009572 also on.
9573 WARNING: Switching this option off means that when Vim fails to write
9574 your buffer correctly and then, for whatever reason, Vim exits, you
9575 lose both the original file and what you were writing. Only reset
9576 this option if your file system is almost full and it makes the write
9577 fail (and make sure not to exit Vim until the write was successful).
9578 See |backup-table| for another explanation.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009579 When the 'backupskip' pattern matches, a backup is not made anyway.
Bram Moolenaar0c0734d2019-11-26 21:44:46 +01009580 Depending on 'backupcopy' the backup is a new file or the original
9581 file renamed (and a new file is written).
Bram Moolenaar071d4272004-06-13 20:20:40 +00009582 NOTE: This option is set to the default value when 'compatible' is
9583 set.
9584
9585 *'writedelay'* *'wd'*
9586'writedelay' 'wd' number (default 0)
9587 global
Bram Moolenaar802a0d92016-06-26 16:17:58 +02009588 The number of milliseconds to wait for each character sent to the
Bram Moolenaar071d4272004-06-13 20:20:40 +00009589 screen. When non-zero, characters are sent to the terminal one by
Bram Moolenaar5666fcd2019-12-26 14:35:26 +01009590 one. For debugging purposes.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009591
Bram Moolenaar6f79e612021-12-21 09:12:23 +00009592 *'xtermcodes'* *'noxtermcodes'*
9593'xtermcodes' boolean (default on)
9594 global
9595 When detecting xterm patchlevel 141 or higher with the termresponse
Bram Moolenaarfa3b7232021-12-24 13:18:38 +00009596 mechanism and this option is set, Vim will request the actual terminal
Bram Moolenaar6f79e612021-12-21 09:12:23 +00009597 key codes and number of colors from the terminal. This takes care of
9598 various configuration options of the terminal that cannot be obtained
9599 from the termlib/terminfo entry, see |xterm-codes|.
9600 A side effect may be that t_Co changes and Vim will redraw the
9601 display.
9602
9603
Bram Moolenaar91f84f62018-07-29 15:07:52 +02009604 vim:tw=78:ts=8:noet:ft=help:norl: