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.