nvim: install yanky

This commit is contained in:
Daniel Lundin 2022-10-07 10:25:36 +02:00
parent 798fe67090
commit 83cd3cc230
2 changed files with 17 additions and 0 deletions

View file

@ -28,6 +28,13 @@ return require("packer").startup(function()
end,
})
use({
"gbprod/yanky.nvim",
config = function()
require("plugins/yanky")
end,
})
use({
"b3nj5m1n/kommentary",
config = function()

View file

@ -0,0 +1,10 @@
local yanky = require("yanky")
yanky.setup({})
vim.keymap.set({ "n", "x" }, "p", "<Plug>(YankyPutAfter)")
vim.keymap.set({ "n", "x" }, "P", "<Plug>(YankyPutBefore)")
vim.keymap.set({ "n", "x" }, "gp", "<Plug>(YankyGPutAfter)")
vim.keymap.set({ "n", "x" }, "gP", "<Plug>(YankyGPutBefore)")
vim.keymap.set("n", "<c-n>", "<Plug>(YankyCycleForward)")
vim.keymap.set("n", "<c-p>", "<Plug>(YankyCycleBackward)")