comparison 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
comparison
equal deleted inserted replaced
20440:74db00344bf6 20441:86dde5c4b375
197 197
198 vim.open({fname}) Opens a new buffer for file {fname} and 198 vim.open({fname}) Opens a new buffer for file {fname} and
199 returns it. Note that the buffer is not set as 199 returns it. Note that the buffer is not set as
200 current. 200 current.
201 201
202 vim.call({name} [,{args}])
203 Proxy to call Vim function named {name} with
204 arguments {args}. Example: >
205 :lua print(vim.call('has', 'timers'))
206 <
207 vim.fn Proxy to call Vim functions. Proxy methods are
208 created on demand. Example: >
209 :lua print(vim.fn.has('timers'))
210 <
202 211
203 ============================================================================== 212 ==============================================================================
204 3. List userdata *lua-list* 213 3. List userdata *lua-list*
205 214
206 List userdata represent vim lists, and the interface tries to follow closely 215 List userdata represent vim lists, and the interface tries to follow closely