init commit
This commit is contained in:
commit
fd509a515b
8 changed files with 419 additions and 0 deletions
35
lua/keys/alias.lua
Normal file
35
lua/keys/alias.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
-- 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
|
||||
7
lua/keys/main.lua
Normal file
7
lua/keys/main.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require("keys/alias")
|
||||
|
||||
-- Set addtional hotkey for disable mod
|
||||
im("<C-k>", "<escape>")
|
||||
vm("<C-k>", "<escape>")
|
||||
nm("<C-k>", "<escape>")
|
||||
tm("<C-k>", "<escape>")
|
||||
Loading…
Add table
Add a link
Reference in a new issue