mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
21 lines
426 B
Lua
21 lines
426 B
Lua
local M = {}
|
|
|
|
local function bind(op, outer_opts)
|
|
outer_opts = outer_opts or {noremap = true}
|
|
return function(lhs, rhs, opts)
|
|
opts = vim.tbl_extend("force",
|
|
outer_opts,
|
|
opts or {}
|
|
)
|
|
vim.keymap.set(op, lhs, rhs, opts)
|
|
end
|
|
end
|
|
|
|
M.nmap = bind("n", {noremap = false})
|
|
M.nnoremap = bind("n")
|
|
M.vnoremap = bind("v")
|
|
M.xnoremap = bind("x")
|
|
M.inoremap = bind("i")
|
|
|
|
return M
|