return { { 'svermeulen/vim-cutlass', }, { 'gbprod/substitute.nvim', config = function() local map = require("helpers.keys").map map("n", "s", require('substitute').operator, "substitute") map("n", "ss", require('substitute').line, "substitute: linewise") map("n", "S", require('substitute').eol, "substitute: eol") map("x", "s", require('substitute').visual, "substitute: visual") map("n", "s", require('substitute.range').operator, "substitute: over range") map("x", "s", require('substitute.range').visual, "substitute: over visual") map("n", "ss", require('substitute.range').word, "substitute: with word over range") map("n", "sx", require('substitute.exchange').operator, "exchange") map("n", "sxx", require('substitute.exchange').line, "exchange line") map("x", "sX", require('substitute.exchange').visual, "exchange visual") map("n", "sxc", require('substitute.exchange').cancel, "exchange cancel") require("substitute").setup({ highlight_substituted_text = { enabled = true, timer = 300, }, }) end, }, { "gbprod/yanky.nvim", config = function() if vim.fn.executable('xsel') == 1 then -- fix Target STRING not available -- if we are using xsel (X11) vim.g.clipboard = { name = 'xsel_override', copy = { ['+'] = 'xsel --input --clipboard', ['*'] = 'xsel --input --primary', }, paste = { ['+'] = 'xsel --output --clipboard', ['*'] = 'xsel --output --primary', }, cache_enabled = 1, } end local map = require("helpers.keys").map map({ "n", "x" }, 'p', '(YankyPutAfter)') map({ "n", "x" }, 'P', '(YankyPutBefore)') map("n", "", "(YankyCycleForward)") map("n", "", "(YankyCycleBackward)") local utils = require("yanky.utils") local mapping = require("yanky.telescope.mapping") require("yanky").setup({ ring = { history_length = 100, storage = "shada", sync_with_numbered_registers = true, cancel_event = "update", ignore_registers = { "_" }, }, system_clipboard = { sync_with_ring = true, }, picker = { telescope = { use_default_mappings = false, mappings = { default = mapping.set_register(utils.get_default_register()), }, }, }, highlight = { on_put = true, on_yank = true, timer = 300, }, }) end, } }