35 lines
651 B
Lua
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
|