Mercurial > vim
comparison runtime/doc/options.txt @ 16728:e55c26aaf484 v8.1.1366
patch 8.1.1366: using expressions in a modeline is unsafe
commit https://github.com/vim/vim/commit/110289e78195b6d01e1e6ad26ad450de476d41c1
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 23 15:38:06 2019 +0200
patch 8.1.1366: using expressions in a modeline is unsafe
Problem: Using expressions in a modeline is unsafe.
Solution: Disallow using expressions in a modeline, unless the
'modelineexpr' option is set. Update help, add more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 May 2019 15:45:06 +0200 |
parents | 1eaf34420bb3 |
children | dc85d49349f7 |
comparison
equal
deleted
inserted
replaced
16727:8be69877c5de | 16728:e55c26aaf484 |
---|---|
1 *options.txt* For Vim version 8.1. Last change: 2019 May 08 | 1 *options.txt* For Vim version 8.1. Last change: 2019 May 23 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
576 If you want to include a ':' in a set command precede it with a '\'. The | 576 If you want to include a ':' in a set command precede it with a '\'. The |
577 backslash in front of the ':' will be removed. Example: | 577 backslash in front of the ':' will be removed. Example: |
578 /* vi:set dir=c\:\tmp: */ ~ | 578 /* vi:set dir=c\:\tmp: */ ~ |
579 This sets the 'dir' option to "c:\tmp". Only a single backslash before the | 579 This sets the 'dir' option to "c:\tmp". Only a single backslash before the |
580 ':' is removed. Thus to include "\:" you have to specify "\\:". | 580 ':' is removed. Thus to include "\:" you have to specify "\\:". |
581 | 581 *E992* |
582 No other commands than "set" are supported, for security reasons (somebody | 582 No other commands than "set" are supported, for security reasons (somebody |
583 might create a Trojan horse text file with modelines). And not all options | 583 might create a Trojan horse text file with modelines). And not all options |
584 can be set. For some options a flag is set, so that when it's used the | 584 can be set. For some options a flag is set, so that when the value is used |
585 |sandbox| is effective. Still, there is always a small risk that a modeline | 585 the |sandbox| is effective. Some options can only be set from the modeline |
586 causes trouble. E.g., when some joker sets 'textwidth' to 5 all your lines | 586 when 'modelineexpr' is set (the default is off). |
587 are wrapped unexpectedly. So disable modelines before editing untrusted text. | 587 |
588 The mail ftplugin does this, for example. | 588 Still, there is always a small risk that a modeline causes trouble. E.g., |
589 when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly. | |
590 So disable modelines before editing untrusted text. The mail ftplugin does | |
591 this, for example. | |
589 | 592 |
590 Hint: If you would like to do something else than setting an option, you could | 593 Hint: If you would like to do something else than setting an option, you could |
591 define an autocommand that checks the file for a specific string. For | 594 define an autocommand that checks the file for a specific string. For |
592 example: > | 595 example: > |
593 au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif | 596 au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif |
1147 Vim does not try to send a message to an external debugger (Netbeans | 1150 Vim does not try to send a message to an external debugger (Netbeans |
1148 or Sun Workshop). | 1151 or Sun Workshop). |
1149 | 1152 |
1150 The expression will be evaluated in the |sandbox| when set from a | 1153 The expression will be evaluated in the |sandbox| when set from a |
1151 modeline, see |sandbox-option|. | 1154 modeline, see |sandbox-option|. |
1155 This option cannot be set in a modeline when 'modelineexpr' is off. | |
1152 | 1156 |
1153 It is not allowed to change text or jump to another window while | 1157 It is not allowed to change text or jump to another window while |
1154 evaluating 'balloonexpr' |textlock|. | 1158 evaluating 'balloonexpr' |textlock|. |
1155 | 1159 |
1156 To check whether line breaks in the balloon text work use this check: > | 1160 To check whether line breaks in the balloon text work use this check: > |
3224 for each line to obtain its fold level. See |fold-expr|. | 3228 for each line to obtain its fold level. See |fold-expr|. |
3225 | 3229 |
3226 The expression will be evaluated in the |sandbox| if set from a | 3230 The expression will be evaluated in the |sandbox| if set from a |
3227 modeline, see |sandbox-option|. | 3231 modeline, see |sandbox-option|. |
3228 This option can't be set from a |modeline| when the 'diff' option is | 3232 This option can't be set from a |modeline| when the 'diff' option is |
3229 on. | 3233 on or the 'modelineexpr' option is off. |
3230 | 3234 |
3231 It is not allowed to change text or jump to another window while | 3235 It is not allowed to change text or jump to another window while |
3232 evaluating 'foldexpr' |textlock|. | 3236 evaluating 'foldexpr' |textlock|. |
3233 | 3237 |
3234 *'foldignore'* *'fdi'* | 3238 *'foldignore'* *'fdi'* |
3357 An expression which is used to specify the text displayed for a closed | 3361 An expression which is used to specify the text displayed for a closed |
3358 fold. See |fold-foldtext|. | 3362 fold. See |fold-foldtext|. |
3359 | 3363 |
3360 The expression will be evaluated in the |sandbox| if set from a | 3364 The expression will be evaluated in the |sandbox| if set from a |
3361 modeline, see |sandbox-option|. | 3365 modeline, see |sandbox-option|. |
3366 This option cannot be set in a modeline when 'modelineexpr' is off. | |
3362 | 3367 |
3363 It is not allowed to change text or jump to another window while | 3368 It is not allowed to change text or jump to another window while |
3364 evaluating 'foldtext' |textlock|. | 3369 evaluating 'foldtext' |textlock|. |
3365 | 3370 |
3366 *'formatexpr'* *'fex'* | 3371 *'formatexpr'* *'fex'* |
3394 the internal format mechanism. | 3399 the internal format mechanism. |
3395 | 3400 |
3396 The expression will be evaluated in the |sandbox| when set from a | 3401 The expression will be evaluated in the |sandbox| when set from a |
3397 modeline, see |sandbox-option|. That stops the option from working, | 3402 modeline, see |sandbox-option|. That stops the option from working, |
3398 since changing the buffer text is not allowed. | 3403 since changing the buffer text is not allowed. |
3404 This option cannot be set in a modeline when 'modelineexpr' is off. | |
3399 NOTE: This option is set to "" when 'compatible' is set. | 3405 NOTE: This option is set to "" when 'compatible' is set. |
3400 | 3406 |
3401 *'formatlistpat'* *'flp'* | 3407 *'formatlistpat'* *'flp'* |
3402 'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*") | 3408 'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*") |
3403 local to buffer | 3409 local to buffer |
3450 systems without an fsync() implementation, this variable is always | 3456 systems without an fsync() implementation, this variable is always |
3451 off. | 3457 off. |
3452 Also see 'swapsync' for controlling fsync() on swap files. | 3458 Also see 'swapsync' for controlling fsync() on swap files. |
3453 'fsync' also applies to |writefile()|, unless a flag is used to | 3459 'fsync' also applies to |writefile()|, unless a flag is used to |
3454 overrule it. | 3460 overrule it. |
3461 This option cannot be set from a |modeline| or in the |sandbox|, for | |
3462 security reasons. | |
3455 | 3463 |
3456 *'gdefault'* *'gd'* *'nogdefault'* *'nogd'* | 3464 *'gdefault'* *'gd'* *'nogdefault'* *'nogd'* |
3457 'gdefault' 'gd' boolean (default off) | 3465 'gdefault' 'gd' boolean (default off) |
3458 global | 3466 global |
3459 When on, the ":substitute" flag 'g' is default on. This means that | 3467 When on, the ":substitute" flag 'g' is default on. This means that |
3617 used. See |gui-fontwide|. | 3625 used. See |gui-fontwide|. |
3618 | 3626 |
3619 *'guiheadroom'* *'ghr'* | 3627 *'guiheadroom'* *'ghr'* |
3620 'guiheadroom' 'ghr' number (default 50) | 3628 'guiheadroom' 'ghr' number (default 50) |
3621 global | 3629 global |
3622 - {only for GTK and X11 GUI} | 3630 {only for GTK and X11 GUI} |
3623 The number of pixels subtracted from the screen height when fitting | 3631 The number of pixels subtracted from the screen height when fitting |
3624 the GUI window on the screen. Set this before the GUI is started, | 3632 the GUI window on the screen. Set this before the GUI is started, |
3625 e.g., in your |gvimrc| file. When zero, the whole screen height will | 3633 e.g., in your |gvimrc| file. When zero, the whole screen height will |
3626 be used by the window. When positive, the specified number of pixel | 3634 be used by the window. When positive, the specified number of pixel |
3627 lines will be left for window decorations and other items on the | 3635 lines will be left for window decorations and other items on the |
3775 | 3783 |
3776 The format of this option is like that of 'statusline'. | 3784 The format of this option is like that of 'statusline'. |
3777 'guitabtooltip' is used for the tooltip, see below. | 3785 'guitabtooltip' is used for the tooltip, see below. |
3778 The expression will be evaluated in the |sandbox| when set from a | 3786 The expression will be evaluated in the |sandbox| when set from a |
3779 modeline, see |sandbox-option|. | 3787 modeline, see |sandbox-option|. |
3788 This option cannot be set in a modeline when 'modelineexpr' is off. | |
3780 | 3789 |
3781 Only used when the GUI tab pages line is displayed. 'e' must be | 3790 Only used when the GUI tab pages line is displayed. 'e' must be |
3782 present in 'guioptions'. For the non-GUI tab pages line 'tabline' is | 3791 present in 'guioptions'. For the non-GUI tab pages line 'tabline' is |
3783 used. | 3792 used. |
3784 | 3793 |
4025 When Vim was compiled with HAVE_X11 defined, the original icon will be | 4034 When Vim was compiled with HAVE_X11 defined, the original icon will be |
4026 restored if possible |X11|. | 4035 restored if possible |X11|. |
4027 When this option contains printf-style '%' items, they will be | 4036 When this option contains printf-style '%' items, they will be |
4028 expanded according to the rules used for 'statusline'. See | 4037 expanded according to the rules used for 'statusline'. See |
4029 'titlestring' for example settings. | 4038 'titlestring' for example settings. |
4039 This option cannot be set in a modeline when 'modelineexpr' is off. | |
4030 {not available when compiled without the |+statusline| feature} | 4040 {not available when compiled without the |+statusline| feature} |
4031 | 4041 |
4032 *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* | 4042 *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* |
4033 'ignorecase' 'ic' boolean (default off) | 4043 'ignorecase' 'ic' boolean (default off) |
4034 global | 4044 global |
4042 'imactivatefunc' 'imaf' string (default "") | 4052 'imactivatefunc' 'imaf' string (default "") |
4043 global | 4053 global |
4044 This option specifies a function that will be called to | 4054 This option specifies a function that will be called to |
4045 activate or deactivate the Input Method. | 4055 activate or deactivate the Input Method. |
4046 It is not used in the GUI. | 4056 It is not used in the GUI. |
4057 The expression will be evaluated in the |sandbox| when set from a | |
4058 modeline, see |sandbox-option|. | |
4047 | 4059 |
4048 Example: > | 4060 Example: > |
4049 function ImActivateFunc(active) | 4061 function ImActivateFunc(active) |
4050 if a:active | 4062 if a:active |
4051 ... do something | 4063 ... do something |
4158 return is_active ? 1 : 0 | 4170 return is_active ? 1 : 0 |
4159 endfunction | 4171 endfunction |
4160 set imstatusfunc=ImStatusFunc | 4172 set imstatusfunc=ImStatusFunc |
4161 < | 4173 < |
4162 NOTE: This function is invoked very often. Keep it fast. | 4174 NOTE: This function is invoked very often. Keep it fast. |
4175 The expression will be evaluated in the |sandbox| when set from a | |
4176 modeline, see |sandbox-option|. | |
4163 | 4177 |
4164 *'imstyle'* *'imst'* | 4178 *'imstyle'* *'imst'* |
4165 'imstyle' 'imst' number (default 1) | 4179 'imstyle' 'imst' number (default 1) |
4166 global | 4180 global |
4167 {only available when compiled with |+xim| and | 4181 {only available when compiled with |+xim| and |
4174 For a long time on-the-spot style had been used in the GTK version of | 4188 For a long time on-the-spot style had been used in the GTK version of |
4175 vim, however, it is known that it causes troubles when using mappings, | 4189 vim, however, it is known that it causes troubles when using mappings, |
4176 |single-repeat|, etc. Therefore over-the-spot style becomes the | 4190 |single-repeat|, etc. Therefore over-the-spot style becomes the |
4177 default now. This should work fine for most people, however if you | 4191 default now. This should work fine for most people, however if you |
4178 have any problem with it, try using on-the-spot style. | 4192 have any problem with it, try using on-the-spot style. |
4193 The expression will be evaluated in the |sandbox| when set from a | |
4194 modeline, see |sandbox-option|. | |
4179 | 4195 |
4180 *'include'* *'inc'* | 4196 *'include'* *'inc'* |
4181 'include' 'inc' string (default "^\s*#\s*include") | 4197 'include' 'inc' string (default "^\s*#\s*include") |
4182 global or local to buffer |global-local| | 4198 global or local to buffer |global-local| |
4183 {not available when compiled without the | 4199 {not available when compiled without the |
4208 found. Allows doing "gf" on the name after an 'include' statement. | 4224 found. Allows doing "gf" on the name after an 'include' statement. |
4209 Also used for |<cfile>|. | 4225 Also used for |<cfile>|. |
4210 | 4226 |
4211 The expression will be evaluated in the |sandbox| when set from a | 4227 The expression will be evaluated in the |sandbox| when set from a |
4212 modeline, see |sandbox-option|. | 4228 modeline, see |sandbox-option|. |
4229 This option cannot be set in a modeline when 'modelineexpr' is off. | |
4213 | 4230 |
4214 It is not allowed to change text or jump to another window while | 4231 It is not allowed to change text or jump to another window while |
4215 evaluating 'includeexpr' |textlock|. | 4232 evaluating 'includeexpr' |textlock|. |
4216 | 4233 |
4217 *'incsearch'* *'is'* *'noincsearch'* *'nois'* | 4234 *'incsearch'* *'is'* *'noincsearch'* *'nois'* |
4295 See |indent-expression|. | 4312 See |indent-expression|. |
4296 NOTE: This option is set to "" when 'compatible' is set. | 4313 NOTE: This option is set to "" when 'compatible' is set. |
4297 | 4314 |
4298 The expression will be evaluated in the |sandbox| when set from a | 4315 The expression will be evaluated in the |sandbox| when set from a |
4299 modeline, see |sandbox-option|. | 4316 modeline, see |sandbox-option|. |
4317 This option cannot be set in a modeline when 'modelineexpr' is off. | |
4300 | 4318 |
4301 It is not allowed to change text or jump to another window while | 4319 It is not allowed to change text or jump to another window while |
4302 evaluating 'indentexpr' |textlock|. | 4320 evaluating 'indentexpr' |textlock|. |
4303 | 4321 |
4304 | 4322 |
4891 where the arguments will be included, for example: > | 4909 where the arguments will be included, for example: > |
4892 :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*} | 4910 :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*} |
4893 < This option cannot be set from a |modeline| or in the |sandbox|, for | 4911 < This option cannot be set from a |modeline| or in the |sandbox|, for |
4894 security reasons. | 4912 security reasons. |
4895 | 4913 |
4914 *'makespellmem'* *'msm'* | |
4915 'makespellmem' 'msm' string (default "460000,2000,500") | |
4916 global | |
4917 Values relevant only when compressing a spell file, see |spell|. | |
4918 This option cannot be set from a |modeline| or in the |sandbox|. | |
4919 | |
4896 *'matchpairs'* *'mps'* | 4920 *'matchpairs'* *'mps'* |
4897 'matchpairs' 'mps' string (default "(:),{:},[:]") | 4921 'matchpairs' 'mps' string (default "(:),{:},[:]") |
4898 local to buffer | 4922 local to buffer |
4899 Characters that form pairs. The |%| command jumps from one to the | 4923 Characters that form pairs. The |%| command jumps from one to the |
4900 other. | 4924 other. |
4913 the $VIMRUNTIME/pack/dist/opt/matchit directory. |add-local-help| | 4937 the $VIMRUNTIME/pack/dist/opt/matchit directory. |add-local-help| |
4914 | 4938 |
4915 *'matchtime'* *'mat'* | 4939 *'matchtime'* *'mat'* |
4916 'matchtime' 'mat' number (default 5) | 4940 'matchtime' 'mat' number (default 5) |
4917 global | 4941 global |
4918 {in Nvi} | |
4919 Tenths of a second to show the matching paren, when 'showmatch' is | 4942 Tenths of a second to show the matching paren, when 'showmatch' is |
4920 set. Note that this is not in milliseconds, like other options that | 4943 set. Note that this is not in milliseconds, like other options that |
4921 set a time. This is to be compatible with Nvi. | 4944 set a time. This is to be compatible with Nvi. |
4922 | 4945 |
4923 *'maxcombine'* *'mco'* | 4946 *'maxcombine'* *'mco'* |
5047 | 5070 |
5048 *'modeline'* *'ml'* *'nomodeline'* *'noml'* | 5071 *'modeline'* *'ml'* *'nomodeline'* *'noml'* |
5049 'modeline' 'ml' boolean (Vim default: on (off for root), | 5072 'modeline' 'ml' boolean (Vim default: on (off for root), |
5050 Vi default: off) | 5073 Vi default: off) |
5051 local to buffer | 5074 local to buffer |
5075 If 'modeline' is on 'modelines' gives the number of lines that is | |
5076 checked for set commands. If 'modeline' is off or 'modelines' is zero | |
5077 no lines are checked. See |modeline|. | |
5078 | |
5079 *'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'* | |
5080 'modelineexpr' 'mle' boolean (default: off) | |
5081 global | |
5082 When on allow some options that are an expression to be set in the | |
5083 modeline. Check the option for whether it is affected by | |
5084 'modelineexpr'. Also see |modeline|. | |
5085 | |
5052 *'modelines'* *'mls'* | 5086 *'modelines'* *'mls'* |
5053 'modelines' 'mls' number (default 5) | 5087 'modelines' 'mls' number (default 5) |
5054 global | 5088 global |
5055 If 'modeline' is on 'modelines' gives the number of lines that is | 5089 If 'modeline' is on 'modelines' gives the number of lines that is |
5056 checked for set commands. If 'modeline' is off or 'modelines' is zero | 5090 checked for set commands. If 'modeline' is off or 'modelines' is zero |
5057 no lines are checked. See |modeline|. | 5091 no lines are checked. See |modeline|. |
5058 NOTE: 'modeline' is set to the Vi default value when 'compatible' is | 5092 NOTE: 'modeline' is set to the Vi default value when 'compatible' is |
5059 set and to the Vim default value when 'compatible' is reset. | 5093 set and to the Vim default value when 'compatible' is reset. |
5060 | 5094 |
5061 *'modifiable'* *'ma'* *'nomodifiable'* *'noma'* | 5095 *'modifiable'* *'ma'* *'nomodifiable'* *'noma'* |
5096 *E21* | |
5062 'modifiable' 'ma' boolean (default on) | 5097 'modifiable' 'ma' boolean (default on) |
5063 local to buffer | 5098 local to buffer |
5064 *E21* | |
5065 When off the buffer contents cannot be changed. The 'fileformat' and | 5099 When off the buffer contents cannot be changed. The 'fileformat' and |
5066 'fileencoding' options also can't be changed. | 5100 'fileencoding' options also can't be changed. |
5067 Can be reset on startup with the |-M| command line argument. | 5101 Can be reset on startup with the |-M| command line argument. |
5068 | 5102 |
5069 *'modified'* *'mod'* *'nomodified'* *'nomod'* | 5103 *'modified'* *'mod'* *'nomodified'* *'nomod'* |
6056 {not available when compiled without the |+statusline| | 6090 {not available when compiled without the |+statusline| |
6057 feature} | 6091 feature} |
6058 When this option is not empty, it determines the content of the ruler | 6092 When this option is not empty, it determines the content of the ruler |
6059 string, as displayed for the 'ruler' option. | 6093 string, as displayed for the 'ruler' option. |
6060 The format of this option is like that of 'statusline'. | 6094 The format of this option is like that of 'statusline'. |
6095 This option cannot be set in a modeline when 'modelineexpr' is off. | |
6096 | |
6061 The default ruler width is 17 characters. To make the ruler 15 | 6097 The default ruler width is 17 characters. To make the ruler 15 |
6062 characters wide, put "%15(" at the start and "%)" at the end. | 6098 characters wide, put "%15(" at the start and "%)" at the end. |
6063 Example: > | 6099 Example: > |
6064 :set rulerformat=%15(%c%V\ %p%%%) | 6100 :set rulerformat=%15(%c%V\ %p%%%) |
6065 < | 6101 < |
6596 c don't give |ins-completion-menu| messages. For example, | 6632 c don't give |ins-completion-menu| messages. For example, |
6597 "-- XXX completion (YYY)", "match 1 of 2", "The only match", | 6633 "-- XXX completion (YYY)", "match 1 of 2", "The only match", |
6598 "Pattern not found", "Back at original", etc. | 6634 "Pattern not found", "Back at original", etc. |
6599 q use "recording" instead of "recording @a" | 6635 q use "recording" instead of "recording @a" |
6600 F don't give the file info when editing a file, like `:silent` | 6636 F don't give the file info when editing a file, like `:silent` |
6601 was used for the command | 6637 was used for the command; note that this also affects messages |
6638 from autocommands | |
6602 S do not show search count message when searching, e.g. | 6639 S do not show search count message when searching, e.g. |
6603 "[1/5]" | 6640 "[1/5]" |
6604 | 6641 |
6605 This gives you the opportunity to avoid that a change between buffers | 6642 This gives you the opportunity to avoid that a change between buffers |
6606 requires you to hit <Enter>, but still gives as useful a message as | 6643 requires you to hit <Enter>, but still gives as useful a message as |
7163 The variable "g:actual_curbuf" is set to the `bufnr()` number of the | 7200 The variable "g:actual_curbuf" is set to the `bufnr()` number of the |
7164 real current buffer. | 7201 real current buffer. |
7165 | 7202 |
7166 The 'statusline' option will be evaluated in the |sandbox| if set from | 7203 The 'statusline' option will be evaluated in the |sandbox| if set from |
7167 a modeline, see |sandbox-option|. | 7204 a modeline, see |sandbox-option|. |
7205 This option cannot be set in a modeline when 'modelineexpr' is off. | |
7168 | 7206 |
7169 It is not allowed to change text or jump to another window while | 7207 It is not allowed to change text or jump to another window while |
7170 evaluating 'statusline' |textlock|. | 7208 evaluating 'statusline' |textlock|. |
7171 | 7209 |
7172 If the statusline is not updated when you want it (e.g., after setting | 7210 If the statusline is not updated when you want it (e.g., after setting |
7343 the text to be displayed. Use "%1T" for the first label, "%2T" for | 7381 the text to be displayed. Use "%1T" for the first label, "%2T" for |
7344 the second one, etc. Use "%X" items for closing labels. | 7382 the second one, etc. Use "%X" items for closing labels. |
7345 | 7383 |
7346 When changing something that is used in 'tabline' that does not | 7384 When changing something that is used in 'tabline' that does not |
7347 trigger it to be updated, use |:redrawtabline|. | 7385 trigger it to be updated, use |:redrawtabline|. |
7386 This option cannot be set in a modeline when 'modelineexpr' is off. | |
7348 | 7387 |
7349 Keep in mind that only one of the tab pages is the current one, others | 7388 Keep in mind that only one of the tab pages is the current one, others |
7350 are invisible and you can't jump to their windows. | 7389 are invisible and you can't jump to their windows. |
7351 | 7390 |
7352 | 7391 |
7871 Only works if the terminal supports setting window titles (currently | 7910 Only works if the terminal supports setting window titles (currently |
7872 Amiga console, Win32 console, all GUI versions and terminals with a | 7911 Amiga console, Win32 console, all GUI versions and terminals with a |
7873 non-empty 't_ts' option). | 7912 non-empty 't_ts' option). |
7874 When Vim was compiled with HAVE_X11 defined, the original title will | 7913 When Vim was compiled with HAVE_X11 defined, the original title will |
7875 be restored if possible, see |X11|. | 7914 be restored if possible, see |X11|. |
7915 | |
7876 When this option contains printf-style '%' items, they will be | 7916 When this option contains printf-style '%' items, they will be |
7877 expanded according to the rules used for 'statusline'. | 7917 expanded according to the rules used for 'statusline'. |
7918 This option cannot be set in a modeline when 'modelineexpr' is off. | |
7919 | |
7878 Example: > | 7920 Example: > |
7879 :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p") | 7921 :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p") |
7880 :set title titlestring=%<%F%=%l/%L-%P titlelen=70 | 7922 :set title titlestring=%<%F%=%l/%L-%P titlelen=70 |
7881 < The value of 'titlelen' is used to align items in the middle or right | 7923 < The value of 'titlelen' is used to align items in the middle or right |
7882 of the available space. | 7924 of the available space. |
8058 works, no directories after "." will be used for writing. | 8100 works, no directories after "." will be used for writing. |
8059 When reading all entries are tried to find an undo file. The first | 8101 When reading all entries are tried to find an undo file. The first |
8060 undo file that exists is used. When it cannot be read an error is | 8102 undo file that exists is used. When it cannot be read an error is |
8061 given, no further entry is used. | 8103 given, no further entry is used. |
8062 See |undo-persistence|. | 8104 See |undo-persistence|. |
8105 This option cannot be set from a |modeline| or in the |sandbox|, for | |
8106 security reasons. | |
8063 | 8107 |
8064 *'undofile'* *'noundofile'* *'udf'* *'noudf'* | 8108 *'undofile'* *'noundofile'* *'udf'* *'noudf'* |
8065 'undofile' 'udf' boolean (default off) | 8109 'undofile' 'udf' boolean (default off) |
8066 local to buffer | 8110 local to buffer |
8067 {only when compiled with the |+persistent_undo| feature} | 8111 {only when compiled with the |+persistent_undo| feature} |
8367 feature} | 8411 feature} |
8368 When non-empty, overrides the file name used for viminfo. | 8412 When non-empty, overrides the file name used for viminfo. |
8369 When equal to "NONE" no viminfo file will be read or written. | 8413 When equal to "NONE" no viminfo file will be read or written. |
8370 This option can be set with the |-i| command line flag. The |--clean| | 8414 This option can be set with the |-i| command line flag. The |--clean| |
8371 command line flag sets it to "NONE". | 8415 command line flag sets it to "NONE". |
8416 This option cannot be set from a |modeline| or in the |sandbox|, for | |
8417 security reasons. | |
8372 | 8418 |
8373 *'virtualedit'* *'ve'* | 8419 *'virtualedit'* *'ve'* |
8374 'virtualedit' 've' string (default "") | 8420 'virtualedit' 've' string (default "") |
8375 global | 8421 global |
8376 {not available when compiled without the | 8422 {not available when compiled without the |