summaryrefslogtreecommitdiffstats
path: root/runtime/doc/if_lua.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-17 14:32:35 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-17 14:32:35 +0200
commiteb04f0893afe01faff272ef84c70d8cc16d8e80a (patch)
treec0397134cdeb9f9e4b9c47bc517a1d6175df64c2 /runtime/doc/if_lua.txt
parent26e86445bf06ab7e7587dfdf75f33f7c70632b46 (diff)
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/doc/if_lua.txt')
-rw-r--r--runtime/doc/if_lua.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 75bb963a9f..ff108eebb6 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*