From 8e6bd0357683cebf27b596450df6103e0f08b83d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 4 Jan 2022 22:04:27 +0100 Subject: [PATCH] nvim: Replace surround plugin for vim-sandwich Finally made the switch from the lua surround plugin of my choice to sandwich -- it provides sane defaults, needs little to no setup, and comes with a pretty alright default mapping method: `sa` to add surroundings to object `sr` to replace surroundings (including `srb` for automatically figuring out what to replace) `sd` to delete existing. Simple and efficient, should make the cut in my estimation. --- nvim/.config/nvim/lua/plugins.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 119baa6..1a16825 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -57,18 +57,7 @@ require("packer").startup(function() -- editing use {'tpope/vim-commentary', event = "BufRead"} -- easily toggle comments for lines, paragraphs etc with gc - use { - 'blackCauldron7/surround.nvim', -- lets you change surrounding things with cs (or ds to del, ys to add) - config = function() - vim.g.surround_mappings_style = "surround" - vim.g.surround_pairs = { - nestable = {{'(', ')'}, {'[', ']'}, {'{', '}'}}, - linear = {{"'", "'"}, {'"', '"'}, {'*', '*'}, {'`', '`'}} - } - require('surround').setup {} - end, - event = "BufRead" - } + use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr use { 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers event = "BufRead"