vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit efb42f27a071c967cd66e3ca8dfc61d0e3433353 parent d18d8de9b08372a5b075c28f81c9e9973bd65370 Author: Randy Palamar <randy@rnpnr.xyz> Date: Mon, 25 Mar 2024 18:43:15 -0600 complete-word: restore mode to INSERT on exit Diffstat:
| M | lua/plugins/complete-word.lua | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lua/plugins/complete-word.lua b/lua/plugins/complete-word.lua @@ -33,4 +33,6 @@ vis:map(vis.modes.INSERT, "<C-n>", function() out = out:sub(#prefix + 1, #out - 1) file:insert(pos, out) win.selection.pos = pos + #out + -- restore mode to what it was on entry + vis.mode = vis.modes.INSERT end, "Complete word in file")