Closed Iron-E closed 8 months ago
Closes #28.
Allows closing modes with self:exit
self:exit
local M = {} M.mode1 = { m = function() vim.notify('Mode 1') end, n = function(self) require('libmodal').mode.enter('My mode 2', M.mode2) self:exit() end } M.mode2 = { m = function() vim.notify('Mode 2') end, n = function(self) require('libmodal').mode.enter('Mode 1', M.mode1) self:exit() end } vim.keymap.set('n', 'M', function() require('libmodal').mode.enter('Mode 1', M.mode1) end)
Closes #28.
Allows closing modes with
self:exit