|
|
|
@ -5,12 +5,13 @@ The `:Luadev` command will open an scratch window which will show output from ex
|
|
|
|
|
|
|
|
|
|
Use the folllowing mappings to execute lua code:
|
|
|
|
|
|
|
|
|
|
Binding | Action
|
|
|
|
|
------------------------- | ------
|
|
|
|
|
`<Plug>(Luadev-RunLine)` | Execute the current line
|
|
|
|
|
`<Plug>(Luadev-Run)` | in visual mode: execute visual selection
|
|
|
|
|
`<Plug>(Luadev-RunWord)` | Eval identifier under cursor, including `table.attr`
|
|
|
|
|
`<Plug>(Luadev-Complete)` | in insert mode: complete (nested) global table fields
|
|
|
|
|
Binding | Action
|
|
|
|
|
------------------------- | ------
|
|
|
|
|
`<Plug>(Luadev-RunLine)` | Execute the current line
|
|
|
|
|
`<Plug>(Luadev-Run)` | in visual mode: execute visual selection
|
|
|
|
|
`<Plug>(Luadev-RunOperator)` | in normal mode: execute the motion selection, if linewise the whole lines
|
|
|
|
|
`<Plug>(Luadev-RunWord)` | Eval identifier under cursor, including `table.attr`
|
|
|
|
|
`<Plug>(Luadev-Complete)` | in insert mode: complete (nested) global table fields
|
|
|
|
|
|
|
|
|
|
If the code is a expression, it will be evaluated, and the result shown with
|
|
|
|
|
`inspect.lua`. Otherwise it will be executed as a block of code. A top-level
|
|
|
|
@ -26,7 +27,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)
|
|
|
|
|
- [ ] make `<Plug>(Luadev-Run)` a proper operator
|
|
|
|
|
- [x] make `<Plug>(Luadev-RunOperator)` 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
|
|
|
|
|