diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/config/yanky.lua | 13 | ||||
| -rw-r--r-- | lua/plugins.lua | 10 |
2 files changed, 20 insertions, 3 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)") diff --git a/lua/plugins.lua b/lua/plugins.lua index 0ab0f69..bcbfe29 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -208,10 +208,14 @@ packer.startup { -- Show undo history visually use { "simnalamburt/vim-mundo", cmd = { "MundoToggle", "MundoShow" } } + -- better UI for some nvim actions + use {'stevearc/dressing.nvim'} + -- Manage your yank history - if vim.g.is_win or vim.g.is_mac then - use { "svermeulen/vim-yoink", event = "VimEnter" } - end + use({ + "gbprod/yanky.nvim", + config = [[require('config.yanky')]] + }) -- Handy unix command inside Vim (Rename, Move etc.) use { "tpope/vim-eunuch", cmd = { "Rename", "Delete" } } |
