1
0
Fork 0
nvim-dot-file/lua/keys/alias.lua

36 lines
651 B
Lua
Raw Permalink Normal View History

2024-05-29 18:20:25 +05:00
-- 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