diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-19 14:13:14 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-06 01:56:04 +0100 |
commit | 842a54a1bbdd3724ba9283269b3f9899b3844e35 (patch) | |
tree | 2ba7f8a8a49b9d8261d90d9d3b85b223abf52244 /runtime/doc/if_lua.txt | |
parent | 04b3c327723587fa63f391884b8dfce44233cc77 (diff) | |
download | rneovim-842a54a1bbdd3724ba9283269b3f9899b3844e35.tar.gz rneovim-842a54a1bbdd3724ba9283269b3f9899b3844e35.tar.bz2 rneovim-842a54a1bbdd3724ba9283269b3f9899b3844e35.zip |
doc
Diffstat (limited to 'runtime/doc/if_lua.txt')
-rw-r--r-- | runtime/doc/if_lua.txt | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index a123041866..968d882a22 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -24,7 +24,7 @@ the existing `package.cpath` are used. Example: 1. Given that - 'runtimepath' contains `/foo/bar,/xxx;yyy/baz,/abc`; - - initial (defined at compile time or derived from + - initial (defined at compile-time or derived from `$LUA_CPATH`/`$LUA_INIT`) `package.cpath` contains `./?.so;/def/ghi/a?d/j/g.elf;/def/?.so`. 2. It finds `?`-containing suffixes `/?.so`, `/a?d/j/g.elf` and `/?.so`, in @@ -159,14 +159,17 @@ Examples: > :lua vim.api.nvim_command('echo "Hello, Nvim!"') < +To see the Lua version: > + :lua print(_VERSION) + +To see the LuaJIT version: > + :lua print(jit.version) +< :[range]lua << {endmarker} {script} {endmarker} Execute Lua script {script}. - Note: This command doesn't work when the Lua - feature wasn't compiled in. To avoid errors, see - |script-here|. {endmarker} must NOT be preceded by any white space. If {endmarker} is omitted from after the "<<", a dot '.' must be used after {script}, like @@ -186,15 +189,8 @@ Example: EOF endfunction -Note that the variables are prefixed with `local`: they will disappear when -block finishes. This is not the case for globals. - -To see what version of Lua you have: > - :lua print(_VERSION) - -If you use LuaJIT you can also use this: > - :lua print(jit.version) -< +Note that the `local` variables will disappear when block finishes. This is +not the case for globals. *:luado* :[range]luado {body} Execute Lua function "function (line, linenr) {body} |