diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-23 12:07:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-23 12:07:04 +0000 |
commit | 6f4754b9f7253d7e4ba527064a24aff1acdb1e8f (patch) | |
tree | 2ee504882bd13acef481efb94164afba33a96202 /runtime/doc/options.txt | |
parent | bcfa11b7dfdfbb4d412dd843a6da3fce68ba2e39 (diff) |
Update runtime files
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r-- | runtime/doc/options.txt | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 65ed54f046..55e3cf8ba5 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2022 Jan 02 +*options.txt* For Vim version 8.2. Last change: 2022 Jan 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -170,7 +170,7 @@ When a key code is not set, it's like it does not exist. Trying to get its value will result in an error: > :set t_kb= :set t_kb - E846: Key code not set: t_kb +< E846: Key code not set: t_kb ~ The t_xx options cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -1229,7 +1229,9 @@ A jump table for the options with a short description can be found at |Q_op|. the script ID (|local-function|). Example: > set bexpr=s:MyBalloonExpr() set bexpr=<SID>SomeBalloonExpr() -< +< Otherwise, the expression is evaluated in the context of the script + where the option was set, thus script-local items are available. + The expression will be evaluated in the |sandbox| when set from a modeline, see |sandbox-option|. This option cannot be set in a modeline when 'modelineexpr' is off. @@ -3439,7 +3441,9 @@ A jump table for the options with a short description can be found at |Q_op|. {not available when compiled without the |+folding| or |+eval| features} The expression used for when 'foldmethod' is "expr". It is evaluated - for each line to obtain its fold level. See |fold-expr|. + for each line to obtain its fold level. The context is set to the + script where 'foldexpr' was set, script-local items can be accessed. + See |fold-expr| for the usage. The expression will be evaluated in the |sandbox| if set from a modeline, see |sandbox-option|. @@ -3573,7 +3577,9 @@ A jump table for the options with a short description can be found at |Q_op|. {not available when compiled without the |+folding| feature} An expression which is used to specify the text displayed for a closed - fold. See |fold-foldtext|. + fold. The context is set to the script where 'foldexpr' was set, + script-local items can be accessed. See |fold-foldtext| for the + usage. The expression will be evaluated in the |sandbox| if set from a modeline, see |sandbox-option|. @@ -3616,7 +3622,9 @@ A jump table for the options with a short description can be found at |Q_op|. the script ID (|local-function|). Example: > set formatexpr=s:MyFormatExpr() set formatexpr=<SID>SomeFormatExpr() -< +< Otherwise, the expression is evaluated in the context of the script + where the option was set, thus script-local items are available. + The expression will be evaluated in the |sandbox| when set from a modeline, see |sandbox-option|. That stops the option from working, since changing the buffer text is not allowed. @@ -4463,7 +4471,9 @@ A jump table for the options with a short description can be found at |Q_op|. the script ID (|local-function|). Example: > set includeexpr=s:MyIncludeExpr(v:fname) set includeexpr=<SID>SomeIncludeExpr(v:fname) -< +< Otherwise, the expression is evaluated in the context of the script + where the option was set, thus script-local items are available. + The expression will be evaluated in the |sandbox| when set from a modeline, see |sandbox-option|. This option cannot be set in a modeline when 'modelineexpr' is off. @@ -4537,11 +4547,14 @@ A jump table for the options with a short description can be found at |Q_op|. The expression is evaluated with |v:lnum| set to the line number for which the indent is to be computed. The cursor is also in this line when the expression is evaluated (but it may be moved around). + If the expression starts with s: or |<SID>|, then it is replaced with the script ID (|local-function|). Example: > set indentexpr=s:MyIndentExpr() set indentexpr=<SID>SomeIndentExpr() -< +< Otherwise, the expression is evaluated in the context of the script + where the option was set, thus script-local items are available. + The expression must return the number of spaces worth of indent. It can return "-1" to keep the current indent (this means 'autoindent' is used for the indent). @@ -5685,7 +5698,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'opendevice'* *'odev'* *'noopendevice'* *'noodev'* 'opendevice' 'odev' boolean (default off) global - {only for MS-Windows} + {only for MS-Windows} *E796* Enable reading and writing from devices. This may get Vim stuck on a device that can be opened but doesn't actually do the I/O. Therefore it is off by default. |