vis

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

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

commit 230b3c1485318e3a028a53082627a128ddaa2754
parent 2b18735726cd92be87e20f30680d85e7f0f1a3b2
Author: Josh Wainwright <josh.wainwright@ldra.com>
Date:   Thu, 21 Apr 2016 09:05:38 +0100

Quit vis from within test visrc.lua

Diffstat:
Mlua/test.sh | 3+--
Mlua/visrc.lua | 9+++------
2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/lua/test.sh b/lua/test.sh @@ -16,8 +16,7 @@ for t in $test_files; do TESTS_RUN=$((TESTS_RUN + 1)) t=${t%.in} t=${t#./} -# vis $t.in - printf "<Escape>Q:q<Enter>" | ../util/keys | vis $t.in + $VIS $t.in printf "%-30s" "$t" if [ -e $t.out ]; then diff --git a/lua/visrc.lua b/lua/visrc.lua @@ -2,13 +2,10 @@ require("utils") vis.events = {} vis.events.win_open = function(win) + -- test.in file passed to vis in_file = win.file.name + -- use the corresponding test.lua file lua_file = string.gsub(in_file, '%.in$', '') require(lua_file) --- These both seem to cause crashes at the moment. --- vis:command('q!') --- --- vis:map(vis.MODE_NORMAL, "Q", function() --- vis:command('q!') --- end) + vis:command('q!') end