1
0
Fork 0
nvim-dot-file/lua/keys/alias.lua
2024-05-29 16:20:25 +03:00

35 lines
651 B
Lua

-- Set alias for quick-access to method setting hotkey
local map = vim.api.nvim_set_keymap
--[[
Method for setting hotkey (normal) looks like this:
key - {string} String with hotkey
command - {string} Command (LUL)
]]--
function nm(key, command)
map("n", key, command, {noremap = true})
end
--[[
Method for setting hotkey (input)
]]--
function im(key, command)
map("i", key, command, {noremap = true})
end
--[[
Method for setting hotkey (visual)
]]--
function vm(key, command)
map("v", key, command, {noremap = true})
end
--[[
Method for setting hotkey (terminal)
]]--
function tm(key, command)
map("t", key, command, {noremap = true})
end