vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit c006839aeb5f35395c1807651675f3180268f972 parent 8e2607c6e477aea6bc553fe554cc2cd9642cd4b2 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 21 May 2016 22:25:58 +0200 vis-lua: add vis.recording property Diffstat:
| M | README.md | | | 1 | + |
| M | vis-lua.c | | | 4 | ++++ |
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md @@ -601,6 +601,7 @@ At this time there exists no API stability guarantees. - `command_register(name, function(argv, force, win, cursor, range))` hook up a Lua function to `:name` command - `map(mode, key, function)` map a Lua function to `key` in `mode` - `feedkeys(keys)` interpret `keys` as if they were read from the keyboard. If called from a key handling function, the keys will only be processed *after* the current key handling function has returned. + - `recording` boolean property, indicates whether a macro is currently being recorded - `file` - `content(pos, len)` or `content({start, finish})` - `insert(pos, data)` diff --git a/vis-lua.c b/vis-lua.c @@ -556,6 +556,10 @@ static int vis_index(lua_State *L) { return 1; } + if (strcmp(key, "recording") == 0) { + lua_pushboolean(L, vis_macro_recording(vis)); + return 1; + } } return index_common(L);