AutoYADM commit: 2025-02-07 00:15:03
This commit is contained in:
parent
0d0b88dcdf
commit
10a1a8f3af
2 changed files with 41 additions and 1 deletions
|
@ -10,3 +10,43 @@ M.map = {
|
|||
k = "m",
|
||||
l = "e",
|
||||
}
|
||||
|
||||
M.modes = {
|
||||
"n",
|
||||
"x",
|
||||
"v",
|
||||
"o",
|
||||
}
|
||||
|
||||
local mods = {
|
||||
"<C-",
|
||||
"<M-",
|
||||
"<S-",
|
||||
"<C-M-",
|
||||
"<C-S-",
|
||||
"<M-S-",
|
||||
"<C-M-S-",
|
||||
}
|
||||
|
||||
local get_permutations = function(key)
|
||||
local s = string
|
||||
local out = {}
|
||||
table.insert(out, key)
|
||||
table.insert(out, s.upper(key))
|
||||
for _, mod in ipairs(mods) do
|
||||
table.insert(out, mod .. key .. ">")
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
local opts = { noremap = true }
|
||||
|
||||
local function set(lhs, rhs)
|
||||
vim.keymap.set(M.modes, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
M.init = function()
|
||||
for lhs, rhs in pairs(M.map) do
|
||||
local perms = get_lhs_permutations(lhs)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ end
|
|||
vim.g.maplocalleader = ","
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "m", "h", { noremap = true })
|
||||
vim.keymap.set("n", "<leader>m", function()
|
||||
vim.keymap.set("n", "<C-S-M>", function()
|
||||
vim.notify("presed")
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue