1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00
2024-08-25 23:34:03 +02:00

18 lines
448 B
Lua

require("yanky").setup {
preserve_cursor_position = {
enabled = false,
},
highlight = {
on_put = true,
on_yank = false,
timer = 300,
},
}
vim.keymap.set({ "n", "x" }, "p", "<Plug>(YankyPutAfter)")
vim.keymap.set({ "n", "x" }, "P", "<Plug>(YankyPutBefore)")
-- cycle through the yank history, only work after paste
vim.keymap.set("n", "[y", "<Plug>(YankyPreviousEntry)")
vim.keymap.set("n", "]y", "<Plug>(YankyNextEntry)")