diff --git a/README.md b/README.md index b1e1dea..c24daa0 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ Use the folllowing mappings to execute lua code: Binding | Action ------------------------- | ------ `(Luadev-RunLine)` | Execute the current line -`(Luadev-Run)` | in visual mode: execute visual selection -`(Luadev-RunOperator)` | in normal mode: execute the motion selection, if linewise the whole lines +`(Luadev-Run)` | Operator to execute lua code over a movement or text object. `(Luadev-RunWord)` | Eval identifier under cursor, including `table.attr` `(Luadev-Complete)` | in insert mode: complete (nested) global table fields @@ -27,7 +26,7 @@ Planned features: - [x] autodetect expression vs statements - [x] Fix `inspect.lua` to use `tostring()` on userdata (done on a local copy) - [x] completion of global names and table attributes (WIP: basic implementation done) - - [x] make `(Luadev-RunOperator)` a proper operator + - [x] make `(Luadev-Run)` a proper operator - [ ] solution for step-wise execution of code with `local` assignments (such as a flag to copy local values to an env) - [x] tracebacks diff --git a/plugin/luadev.vim b/plugin/luadev.vim index ad77223..be93d92 100644 --- a/plugin/luadev.vim +++ b/plugin/luadev.vim @@ -21,7 +21,7 @@ function! s:luadev_run_operator(is_op) let lines[0] = lines[0][col1 - 1:] end let lines = join(lines, "\n")."\n" - call luaeval("require'luadev'.exec(_A)", lines) + call v:lua.require'luadev'.exec(lines) endfunction function! s:get_current_word()