Mercurial > vim
diff runtime/doc/if_lua.txt @ 20441:86dde5c4b375 v8.2.0775
patch 8.2.0775: not easy to call a Vim function from Lua
Commit: https://github.com/vim/vim/commit/eb04f0893afe01faff272ef84c70d8cc16d8e80a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 17 14:32:35 2020 +0200
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 https://github.com/vim/vim/issues/6063)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 May 2020 14:45:04 +0200 |
parents | 04ef2ccf2519 |
children | 74e3316c1d5a |
line wrap: on
line diff
--- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -199,6 +199,15 @@ Vim evaluation and command execution, an 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*