aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt32
-rw-r--r--runtime/doc/tagsrch.txt2
2 files changed, 26 insertions, 8 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 818c6d0115..37f8ea4b20 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -314,13 +314,21 @@ Note: In the future more global options can be made |global-local|. Using
*option-value-function*
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
-'operatorfunc', 'quickfixtextfunc' and 'tagfunc') are set to a function name
-or a function reference or a lambda function. Examples:
+'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
+a function name or a function reference or a lambda function. Examples:
>
set opfunc=MyOpFunc
- set opfunc=function("MyOpFunc")
- set opfunc=funcref("MyOpFunc")
- set opfunc={t\ ->\ MyOpFunc(t)}
+ set opfunc=function('MyOpFunc')
+ set opfunc=funcref('MyOpFunc')
+ set opfunc={a\ ->\ MyOpFunc(a)}
+ " set using a funcref variable
+ let Fn = function('MyTagFunc')
+ let &tagfunc = string(Fn)
+ " set using a lambda expression
+ let &tagfunc = "{t -> MyTagFunc(t)}"
+ " set using a variable with lambda expression
+ let L = {a, b, c -> MyTagFunc(a, b , c)}
+ let &tagfunc = string(L)
<
Setting the filetype
@@ -1446,7 +1454,9 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies a function to be used for Insert mode completion
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
See |complete-functions| for an explanation of how the function is
- invoked and what it should return.
+ invoked and what it should return. The value can be the name of a
+ function, a |lambda| or a |Funcref|. See |option-value-function| for
+ more information.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -4413,7 +4423,9 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies a function to be used for Insert mode omni
completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
See |complete-functions| for an explanation of how the function is
- invoked and what it should return.
+ invoked and what it should return. The value can be the name of a
+ function, a |lambda| or a |Funcref|. See |option-value-function| for
+ more information.
This option is usually set by a filetype plugin:
|:filetype-plugin-on|
This option cannot be set from a |modeline| or in the |sandbox|, for
@@ -6443,7 +6455,9 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies a function to be used to perform tag searches.
The function gets the tag pattern and should return a List of matching
tags. See |tag-function| for an explanation of how to write the
- function and an example.
+ function and an example. The value can be the name of a function, a
+ |lambda| or a |Funcref|. See |option-value-function| for more
+ information.
*'taglength'* *'tl'*
'taglength' 'tl' number (default 0)
@@ -6566,6 +6580,8 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to buffer |global-local|
This option specifies a function to be used for thesaurus completion
with CTRL-X CTRL-T. |i_CTRL-X_CTRL-T| See |compl-thesaurusfunc|.
+ The value can be the name of a function, a |lambda| or a |Funcref|.
+ See |option-value-function| for more information.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index d079db0717..aab6f78315 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -909,6 +909,8 @@ If the function returns |v:null| instead of a List, a standard tag lookup will
be performed instead.
It is not allowed to change the tagstack from inside 'tagfunc'. *E986*
+It is not allowed to close a window or change window from inside 'tagfunc'.
+*E1299*
The following is a hypothetical example of a function used for 'tagfunc'. It
uses the output of |taglist()| to generate the result: a list of tags in the