From b712b48d3cbf4d012ef8f2d809e9a8ddd7dd1198 Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Tue, 3 May 2016 15:29:16 +0100 Subject: Add tests for creating mappings and using feedkeys Tests `vis:map()` and `vis:feedkeeys()` --- lua/basic_map.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/basic_map.lua (limited to 'lua/basic_map.lua') diff --git a/lua/basic_map.lua b/lua/basic_map.lua new file mode 100644 index 0000000..95dc035 --- /dev/null +++ b/lua/basic_map.lua @@ -0,0 +1,23 @@ +vis:map(vis.MODE_NORMAL, "K", function() + vis:feedkeys("aNormal Mode") +end) +vis:map(vis.MODE_INSERT, "K", function() + vis:feedkeys("Insert Mode") +end) +vis:map(vis.MODE_VISUAL, "K", function() + vis:feedkeys("aVisual Mode") +end) +vis:map(vis.MODE_VISUAL_LINE, "K", function() + vis:feedkeys("aVisual Line Mode") +end) +vis:map(vis.MODE_REPLACE, "K", function() + vis:feedkeys("Replace Mode") +end) + +vis:feedkeys("K") +vis:feedkeys("iK") +vis:feedkeys("vK") +vis:feedkeys("VK") +vis:feedkeys("RK") + +vis:command("w! basic_map.out") \ No newline at end of file -- cgit v1.2.3