mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-04 18:00:15 +00:00
20 lines
444 B
Lua
20 lines
444 B
Lua
local libmodal = require 'libmodal'
|
|
|
|
-- a function which will split the window both horizontally and vertically
|
|
local function split_twice()
|
|
vim.api.nvim_command 'split'
|
|
vim.api.nvim_command 'vsplit'
|
|
end
|
|
|
|
-- register keymaps for splitting windows and then closing windows
|
|
local fooModeKeymaps =
|
|
{
|
|
zf = 'split',
|
|
zfo = 'vsplit',
|
|
zfc = 'q',
|
|
zff = split_twice
|
|
}
|
|
|
|
-- enter the mode using the keymaps
|
|
libmodal.mode.enter('FOO', fooModeKeymaps)
|