This repository has been archived on 2025-01-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
opdavies.nvim/lua/opdavies/keymap.lua

23 lines
401 B
Lua

local M = {}
M.imap = function(tbl)
vim.keymap.set("i", tbl[1], tbl[2], tbl[3])
end
M.map = function(tbl)
vim.keymap.set(tbl[1], tbl[2], tbl[3], tbl[4] or {})
end
M.nmap = function(tbl)
vim.keymap.set("n", tbl[1], tbl[2], tbl[3])
end
M.vmap = function(tbl)
vim.keymap.set("v", tbl[1], tbl[2], tbl[3])
end
M.xmap = function(tbl)
vim.keymap.set("x", tbl[1], tbl[2], tbl[3])
end
return M