mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-10 13:10:29 +00:00
21 lines
482 B
Lua
21 lines
482 B
Lua
-- Imports
|
|
local libmodal = require('libmodal')
|
|
|
|
-- A function which will split the window both horizontally and vertically.
|
|
local function _split_twice()
|
|
local cmd = vim.api.nvim_command
|
|
cmd('split')
|
|
cmd('vsplit')
|
|
end
|
|
|
|
-- Register key combos for splitting windows and then closing windows
|
|
local fooModeCombos = {
|
|
['zf'] = 'split',
|
|
['zfo'] = 'vsplit',
|
|
['zfc'] = 'q',
|
|
['zff'] = _split_twice
|
|
}
|
|
|
|
-- Enter the mode using the key combos.
|
|
libmodal.mode.enter('FOO', fooModeCombos)
|