diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-17 14:32:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-17 14:32:35 +0200 |
commit | eb04f0893afe01faff272ef84c70d8cc16d8e80a (patch) | |
tree | c0397134cdeb9f9e4b9c47bc517a1d6175df64c2 /runtime | |
parent | 26e86445bf06ab7e7587dfdf75f33f7c70632b46 (diff) | |
download | vim-git-eb04f0893afe01faff272ef84c70d8cc16d8e80a.tar.gz |
patch 8.2.0775: not easy to call a Vim function from Luav8.2.0775
Problem: Not easy to call a Vim function from Lua.
Solution: Add vim.call() and vim.fn(). (Prabir Shrestha, closes #6063)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/if_lua.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 75bb963a9..ff108eebb 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -199,6 +199,15 @@ Vim evaluation and command execution, and others. returns it. Note that the buffer is not set as current. + vim.call({name} [,{args}]) + Proxy to call Vim function named {name} with + arguments {args}. Example: > + :lua print(vim.call('has', 'timers')) +< + vim.fn Proxy to call Vim functions. Proxy methods are + created on demand. Example: > + :lua print(vim.fn.has('timers')) +< ============================================================================== 3. List userdata *lua-list* |