patch 8.2.0775: not easy to call a Vim function from Lua
Problem: Not easy to call a Vim function from Lua.
Solution: Add vim.call() and vim.fn(). (Prabir Shrestha, closes #6063)
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 75bb963..ff108ee 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -199,6 +199,15 @@
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*