1
Fork 0

Vim clipboard, fixed esc inside tmux and other stuff

This commit is contained in:
Matei Adriel 2022-09-12 13:48:29 +02:00
parent f17b922131
commit f981cb55e9
4 changed files with 67 additions and 0 deletions
dotfiles/neovim/lua/my/helpers

View file

@ -0,0 +1,21 @@
local M = {}
local function swap(key)
vim.keymap.set("n", key, "g" .. key, { buffer = true })
vim.keymap.set("n", "g" .. key, key, { buffer = true })
end
-- Same as swap, but the key is aprt of an arpeggio chord
local function swapArpeggio(key)
vim.keymap.set("n", "<Plug>(arpeggio-default:" .. key .. ")", "g" .. key, { buffer = true })
vim.keymap.set("n", "g" .. key, key, { buffer = true })
end
function M.setup()
swapArpeggio("j")
swap("k")
swap("0")
swap("$")
end
return M