2022-09-12 13:48:29 +02:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
local function swap(key)
|
2022-12-09 02:32:25 +01:00
|
|
|
vim.keymap.set("nv", key, "g" .. key, { buffer = true })
|
|
|
|
vim.keymap.set("nv", "g" .. key, key, { buffer = true })
|
2022-09-12 13:48:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Same as swap, but the key is aprt of an arpeggio chord
|
|
|
|
local function swapArpeggio(key)
|
2022-12-09 02:32:25 +01:00
|
|
|
vim.keymap.set("nv", "<Plug>(arpeggio-default:" .. key .. ")", "g" .. key, { buffer = true })
|
|
|
|
vim.keymap.set("nv", "g" .. key, key, { buffer = true })
|
2022-09-12 13:48:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function M.setup()
|
|
|
|
swapArpeggio("j")
|
|
|
|
swap("k")
|
|
|
|
swap("0")
|
|
|
|
swap("$")
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|