diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index c8d4bea5a8..875767283a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -384,15 +384,22 @@ the name, e.g. "<lambda>123". Examples: set opfunc=function('MyOpFunc') set opfunc=funcref('MyOpFunc') set opfunc={a\ ->\ MyOpFunc(a)} - " set using a funcref variable + +Set to a script-local function: > + set opfunc=s:MyLocalFunc + set opfunc=<SID>MyLocalFunc + +Set using a funcref variable: > let Fn = function('MyTagFunc') let &tagfunc = Fn - " set using a lambda expression + +Set using a lambda expression: > let &tagfunc = {t -> MyTagFunc(t)} - " set using a variable with lambda expression + +Set using a variable with lambda expression: > let L = {a, b, c -> MyTagFunc(a, b , c)} let &tagfunc = L -< + Setting the filetype |