From 67390e8393c7ee69d3bda1487ae7740987577684 Mon Sep 17 00:00:00 2001 From: Iron-E Date: Fri, 22 Mar 2024 12:05:07 -0400 Subject: [PATCH] docs(examples): add `fn` example --- examples/lua/keymaps-supress-exit.lua | 2 +- examples/lua/keymaps.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/lua/keymaps-supress-exit.lua b/examples/lua/keymaps-supress-exit.lua index c2725c5..c407265 100644 --- a/examples/lua/keymaps-supress-exit.lua +++ b/examples/lua/keymaps-supress-exit.lua @@ -22,7 +22,7 @@ local fooModeKeymaps = y = function(self) self:switch('Bar', barModeKeymaps) -- enters Bar and then exits Foo when it is done end, - z = libmodal.mode.switch('Bar', barModeKeymaps), -- the same as above, but more convenience + z = libmodal.mode.map.switch('Bar', barModeKeymaps), -- the same as above, but more convenience } -- tell the mode not to exit automatically diff --git a/examples/lua/keymaps.lua b/examples/lua/keymaps.lua index 7f39edd..aa5b2ba 100644 --- a/examples/lua/keymaps.lua +++ b/examples/lua/keymaps.lua @@ -24,7 +24,9 @@ local fooModeKeymaps = o = 'norm o', p = 'bp', - zf = 'split', + x = libmodal.mode.map.fn(vim.notify, 'hello'), + + zf = libmodal.mode.map.fn(vim.cmd.split), zfc = 'q', zff = split_twice, zfo = 'vsplit',