feat: initial commit
This commit is contained in:
27
nvim/lua/utils.lua
Normal file
27
nvim/lua/utils.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local M = {}
|
||||
|
||||
M.map = function(mode, shortcut, command)
|
||||
vim.keymap.set(mode, shortcut, command, { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
M.nmap = function(shortcut, command)
|
||||
M.map("n", shortcut, command)
|
||||
end
|
||||
|
||||
M.imap = function(shortcut, command)
|
||||
M.map("i", shortcut, command)
|
||||
end
|
||||
|
||||
M.vmap = function(shortcut, command)
|
||||
M.map("v", shortcut, command)
|
||||
end
|
||||
|
||||
M.nvmap = function(shortcut, command)
|
||||
M.map({ "n", "v" }, shortcut, command)
|
||||
end
|
||||
|
||||
M.tmap = function(shortcut, command)
|
||||
M.map("t", shortcut, command)
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user