Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
prabirshrestha committed Jun 24, 2020
1 parent 676a49a commit 90b2053
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime/doc/if_lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ Vim evaluation and command execution, and others.
vim.fn Proxy to call Vim functions. Proxy methods are
created on demand. Example: >
:lua print(vim.fn.has('timers'))
:lua vim.fn.timer_start(1000, function (timer) print('timer callback') end)
<

==============================================================================
Expand Down Expand Up @@ -334,6 +333,16 @@ Examples:
:lua l = d.len -- assign d as 'self'
:lua print(l())
<
Lua functions and closures are automatically converted to a vim funcref and
can be accessed in Vim scripts.

Examples:
>
lua <<EOF
vim.fn.timer_start(1000, function(timer)
print('timer callback')
end)
EOF
==============================================================================
7. Buffer userdata *lua-buffer*
Expand Down

0 comments on commit 90b2053

Please sign in to comment.