docs: `Mode:switch`

pull/30/head
Iron-E 3 months ago
parent 68927a3b11
commit e5fbe988a0
No known key found for this signature in database
GPG Key ID: 569E791B76A42A1A

@ -217,6 +217,28 @@ FUNCTIONS *libmodal-usage-function
end,
})
<
*libmodal.Mode:switch()*
`libmodal.Mode`:switch(...)
|libmodal.mode.enter()| a new mode, and when it is finished, |Mode:exit()|
the current mode.
Parameters: ~
See |libmodal.mode.enter()|.
Example: ~
>lua
libmodal.mode.enter('Foo', {
f = function(self)
self:switch('Bar', {
b = function()
vim.notify('Inside Bar mode')
end,
})
end,
})
<
*libmodal-layer* *libmodal.layer*
`libmodal.layer`.enter({keymap} [, {exit_char}]) *libmodal.layer.enter()*

Loading…
Cancel
Save