From d35778cf91ed44f797c109be8f4cf32ccfb545e6 Mon Sep 17 00:00:00 2001 From: Iron-E Date: Thu, 10 Sep 2020 16:50:32 -0400 Subject: [PATCH] Add more tests --- examples/lua/key-combos-submode.lua | 3 +++ examples/lua/prompt-commands.lua | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/lua/key-combos-submode.lua b/examples/lua/key-combos-submode.lua index 5bf57b5..3b1d728 100644 --- a/examples/lua/key-combos-submode.lua +++ b/examples/lua/key-combos-submode.lua @@ -15,5 +15,8 @@ function FooMode() fooModeRecurse = fooModeRecurse - 1 end +-- Define the character 'f' as the function we defined— but directly through lua, instead of vimL. +fooModeCombos['f'] = FooMode + -- Call FooMode() initially to begin the demo. FooMode() diff --git a/examples/lua/prompt-commands.lua b/examples/lua/prompt-commands.lua index 5f45fb2..be96481 100644 --- a/examples/lua/prompt-commands.lua +++ b/examples/lua/prompt-commands.lua @@ -1,17 +1,12 @@ -- Import local libmodal = require('libmodal') --- A function, which when called, goes to the first tab. -local function _first() - vim.api.nvim_command('tabfirst') -end - -- Define commands through a dictionary. local commands = { ['new'] = 'tabnew', ['close'] = 'tabclose', ['last'] = 'tablast', - ['first'] = _first + ['exit'] = libmodal.utils.api.mode_exit } -- Begin the prompt.