diff options
| author | jdhao <jdhao@hotmail.com> | 2022-12-14 12:52:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-14 12:52:40 +0800 |
| commit | 7e7944a30c340319665582cf635aed7678b8a353 (patch) | |
| tree | 7064f4913e420ad7ac94eb57192c89217d5996b1 /lua/config | |
| parent | 53c17aea969b108662d3cb614534be10d37e3170 (diff) | |
use yanky.nvim to replace vim-yoink (#168)
Diffstat (limited to 'lua/config')
| -rw-r--r-- | lua/config/yanky.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/config/yanky.lua b/lua/config/yanky.lua new file mode 100644 index 0000000..0f8eceb --- /dev/null +++ b/lua/config/yanky.lua @@ -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)") |
