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
392 B
Lua

local libmodal = require('libmodal')
local barModeRecurse = 0
function barMode()
local uinput = string.char(vim.api.nvim_get_var(
'bar' .. tostring(barModeRecurse) .. 'ModeInput'
))
if uinput == 'z' then
barModeRecurse = barModeRecurse + 1
enter()
barModeRecurse = barModeRecurse - 1
end
end
function enter()
libmodal.mode.enter('BAR' .. barModeRecurse, barMode)
end
enter()