vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit a7ea9d7f2e90e49fa2b411f3dc633e5a24195737
parent b2937f9a5a7aa757bb741aa87fe917a01f77a436
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sat, 25 Mar 2017 21:49:22 +0100

Merge branch 'master' of https://github.com/joshaw/vis

Diffstat:
Mvis-lua.c | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/vis-lua.c b/vis-lua.c @@ -1163,7 +1163,16 @@ static bool command_lua(Vis *vis, Win *win, void *data, bool force, const char * * @tparam[opt] string help the single line help text as displayed in `:help` * @treturn bool whether the command has been successfully registered * @usage - * TODO + * vis:command_register("foo", function(argv, force, win, cursor, range) + * for i,arg in ipairs(argv) do + * print(i..": "..arg) + * end + * print("was command forced with ! "..(force and "yes" or "no")) + * print(win.file.name) + * print(cursor.pos) + * print(range ~= nil and ('['..range.start..', '..range.finish..']') or "invalid range") + * return true; + * end) */ static int command_register(lua_State *L) { Vis *vis = obj_ref_check(L, 1, "vis");