You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim-libmodal/examples/lua/submodes.lua

21 lines
398 B
Lua

local libmodal = require('libmodal')
local fooModeRecurse = 1
function FooMode()
local userInput = string.char(vim.api.nvim_get_var(
'foo' .. tostring(fooModeRecurse) .. 'ModeInput'
))
if userInput == 'z' then
fooModeRecurse = fooModeRecurse + 1
Enter()
fooModeRecurse = fooModeRecurse - 1
end
end
function Enter()
libmodal.mode.enter('FOO' .. fooModeRecurse, FooMode)
end
Enter()