diff options
-rw-r--r-- | runtime/doc/eval.txt | 4 | ||||
-rw-r--r-- | runtime/doc/if_lua.txt | 15 | ||||
-rw-r--r-- | runtime/doc/index.txt | 3 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 1 |
4 files changed, 16 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 341e65d381..0b5a29080e 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2140,6 +2140,7 @@ lispindent({lnum}) Number Lisp indent for line {lnum} localtime() Number current time log({expr}) Float natural logarithm (base e) of {expr} log10({expr}) Float logarithm of Float {expr} to base 10 +luaeval({expr}[, {expr}]) any evaluate Lua expression map({expr}, {string}) List/Dict change each item in {expr} to {expr} maparg({name}[, {mode} [, {abbr} [, {dict}]]]) String or Dict @@ -5095,6 +5096,9 @@ log10({expr}) *log10()* :echo log10(0.01) < -2.0 +luaeval({expr}[, {expr}]) + Evaluate Lua expression {expr} and return its result converted + to Vim data structures. See |lua-luaeval| for more details. map({expr1}, {expr2}) *map()* {expr1} must be a |List| or a |Dictionary|. diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 0660ffc73b..932564170d 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -114,8 +114,9 @@ functions may be found in |api-funcs.txt|. *luaeval()* The (dual) equivalent of "vim.eval" for passing Lua values to Vim is -"luaeval". "luaeval" takes an expression string and an optional argument and -returns the result of the expression. It is semantically equivalent in Lua to: +"luaeval". "luaeval" takes an expression string and an optional argument used +for _A inside expression and returns the result of the expression. It is +semantically equivalent in Lua to: > local chunkheader = "local _A = select(1, ...) return " function luaeval (expstr, arg) @@ -129,8 +130,8 @@ thrown if conversion of any of the remaining Lua types is attempted. Note 2: lua tables are used as both dictionaries and lists, thus making it impossible to determine whether empty table is meant to be empty list or empty -dictionary. To distinguish between these cases there is the following -agreement: +dictionary. Additionally lua does not have integer numbers. To distinguish +between these cases there is the following agreement: 0. Empty table is empty list. 1. Table with N incrementally growing integral numbers, starting from 1 and @@ -165,9 +166,9 @@ Examples: > :echo Rand(1,10) Note that currently second argument to `luaeval` undergoes VimL to lua -conversion, so changing resulting containers in lua do not affect values in -VimL. Return value is also always converted. When converting, -|msgpack-special-dict|s are treated specially. +conversion, so changing containers in lua do not affect values in VimL. Return +value is also always converted. When converting, |msgpack-special-dict|s are +treated specially. ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index bab15bcbb6..a1df0a265d 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1339,6 +1339,9 @@ tag command action ~ |:ltag| :lt[ag] jump to tag and add matching tags to the location list |:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode +|:lua| :lua execute Lua command +|:luado| :luad[o] execute Lua command for each line +|:luafile| :luaf[ile] execute Lua script file |:lvimgrep| :lv[imgrep] search for pattern in files |:lvimgrepadd| :lvimgrepa[dd] like :vimgrep, but append to current list |:lwindow| :lw[indow] open or close location window diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 77c238ae97..10d2a8cddd 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -950,6 +950,7 @@ Various: *various-functions* taglist() get list of matching tags tagfiles() get a list of tags files + luaeval() evaluate Lua expression py3eval() evaluate Python expression (|+python3|) pyeval() evaluate Python expression (|+python|) |