Vim clipboard, fixed esc inside tmux and other stuff
This commit is contained in:
parent
f17b922131
commit
f981cb55e9
4 changed files with 67 additions and 0 deletions
dotfiles/neovim/lua/my/helpers
21
dotfiles/neovim/lua/my/helpers/wrapMovement.lua
Normal file
21
dotfiles/neovim/lua/my/helpers/wrapMovement.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue