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

use yanky.nvim to replace vim-yoink (#168)

This commit is contained in:
jdhao
2022-12-14 12:52:40 +08:00
committed by GitHub
parent 53c17aea96
commit 7e7944a30c
3 changed files with 20 additions and 28 deletions

13
lua/config/yanky.lua Normal file
View File

@@ -0,0 +1,13 @@
require("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)")