pojokcodeid.nvim-lazy/lua/user/yanky.lua

18 lines
398 B
Lua
Raw Permalink Normal View History

2023-01-15 00:17:41 +07:00
local status_ok, yanky = pcall(require, "yanky")
if not status_ok then
return
end
yanky.setup({
ring = {
history_length = 50,
storage = "memory",
},
preserve_cursor_position = {
enabled = false,
},
})
-- cycle through the yank history, only work after paste
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")