aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/options.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/options.txt')
-rw-r--r--runtime/doc/options.txt24
1 files changed, 19 insertions, 5 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index a48d020a34..b4eb3b6f28 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1315,6 +1315,9 @@ A jump table for the options with a short description can be found at |Q_op|.
v:fname_out name of the output file
Note that v:fname_in and v:fname_out will never be the same.
+ The advantage of using a function call without arguments is that it is
+ faster, see |expr-option-function|.
+
If the 'charconvert' expression starts with s: or |<SID>|, then it is
replaced with the script ID (|local-function|). Example: >vim
set charconvert=s:MyConvert()
@@ -2781,6 +2784,9 @@ A jump table for the options with a short description can be found at |Q_op|.
< This will invoke the mylang#Format() function in the
autoload/mylang.vim file in 'runtimepath'. |autoload|
+ The advantage of using a function call without arguments is that it is
+ faster, see |expr-option-function|.
+
The expression is also evaluated when 'textwidth' is set and adding
text beyond that limit. This happens under the same conditions as
when internal formatting is used. Make sure the cursor is kept in the
@@ -3416,11 +3422,14 @@ A jump table for the options with a short description can be found at |Q_op|.
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >vim
- setlocal includeexpr=s:MyIncludeExpr(v:fname)
- setlocal includeexpr=<SID>SomeIncludeExpr(v:fname)
+ setlocal includeexpr=s:MyIncludeExpr()
+ setlocal includeexpr=<SID>SomeIncludeExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
+ It is more efficient if the value is just a function call without
+ arguments, see |expr-option-function|.
+
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.
@@ -3483,6 +3492,9 @@ A jump table for the options with a short description can be found at |Q_op|.
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
+ The advantage of using a function call without arguments is that it is
+ faster, see |expr-option-function|.
+
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).
@@ -5923,9 +5935,11 @@ A jump table for the options with a short description can be found at |Q_op|.
The file is used for all languages.
expr:{expr} Evaluate expression {expr}. Use a function to avoid
- trouble with spaces. |v:val| holds the badly spelled
- word. The expression must evaluate to a List of
- Lists, each with a suggestion and a score.
+ trouble with spaces. Best is to call a function
+ without arguments, see |expr-option-function|.
+ |v:val| holds the badly spelled word. The expression
+ must evaluate to a List of Lists, each with a
+ suggestion and a score.
Example:
[['the', 33], ['that', 44]] ~
Set 'verbose' and use |z=| to see the scores that the