diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-09-06 08:57:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 08:57:53 +0200 |
commit | 4bf005e9fdfb57397475b2663a3651faa83886ff (patch) | |
tree | 2b690743460445cdfdcc215c0866ce2275e82290 /runtime/doc/builtin.txt | |
parent | 5b7213ad7fdac47345b7d9d9a008db23eed4d17c (diff) | |
download | rneovim-4bf005e9fdfb57397475b2663a3651faa83886ff.tar.gz rneovim-4bf005e9fdfb57397475b2663a3651faa83886ff.tar.bz2 rneovim-4bf005e9fdfb57397475b2663a3651faa83886ff.zip |
vim-patch:partial 0daafaa7d99e (#20083)
Update runtime files
https://github.com/vim/vim/commit/0daafaa7d99ef500f76b1b12f5fe8153e2fcaea0
skip vim9script ftplugin
create userfunc.txt from Neovim content (skip section 3, needs 9.0.0379)
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r-- | runtime/doc/builtin.txt | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 3ca6f04389..57b41c664b 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -6,9 +6,7 @@ Builtin functions *builtin-functions* -1. Overview |builtin-function-list| -2. Details |builtin-function-details| -3. Matching a pattern in a String |string-match| + Type |gO| to see the table of contents. ============================================================================== 1. Overview *builtin-function-list* @@ -1276,7 +1274,7 @@ complete_info([{what}]) *complete_info()* typed text only, or the last completion after no item is selected when using the <Up> or <Down> keys) - inserted Inserted string. [NOT IMPLEMENT YET] + inserted Inserted string. [NOT IMPLEMENTED YET] *complete_info_mode* mode values are: @@ -2530,18 +2528,18 @@ function({name} [, {arglist}] [, {dict}]) The arguments are passed to the function in front of other arguments, but after any argument from |method|. Example: > func Callback(arg1, arg2, name) - ... + "... let Partial = function('Callback', ['one', 'two']) - ... + "... call Partial('name') < Invokes the function as with: > call Callback('one', 'two', 'name') < With a |method|: > func Callback(one, two, three) - ... + "... let Partial = function('Callback', ['two']) - ... + "... eval 'one'->Partial('three') < Invokes the function as with: > call Callback('one', 'two', 'three') @@ -2550,10 +2548,10 @@ function({name} [, {arglist}] [, {dict}]) Funcref. The extra arguments are appended to the list of arguments. Example: > func Callback(arg1, arg2, name) - ... + "... let Func = function('Callback', ['one']) let Func2 = function(Func, ['two']) - ... + "... call Func2('name') < Invokes the function as with: > call Callback('one', 'two', 'name') @@ -2563,22 +2561,23 @@ function({name} [, {arglist}] [, {dict}]) function Callback() dict echo "called for " .. self.name endfunction - ... + "... let context = {"name": "example"} let Func = function('Callback', context) - ... + "... call Func() " will echo: called for example < The use of function() is not needed when there are no extra - arguments, these two are equivalent: > + arguments, these two are equivalent, if Callback() is defined + as context.Callback(): > let Func = function('Callback', context) let Func = context.Callback < The argument list and the Dictionary can be combined: > function Callback(arg1, count) dict - ... + "... let context = {"name": "example"} let Func = function('Callback', ['one'], context) - ... + "... call Func(500) < Invokes the function as with: > call context.Callback('one', 500) |