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<object><something>` to add surroundings to object
`sr<oldsurround><newsurround>` to replace surroundings (including
`srb<new>` for automatically figuring out what to replace)
`sd<surround>` to delete existing.

Simple and efficient, should make the cut in my estimation.
This commit is contained in:
Marty Oehme 2022-01-04 22:04:27 +01:00
parent 788775bbee
commit 8e6bd03576
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -57,18 +57,7 @@ require("packer").startup(function()
-- editing -- editing
use {'tpope/vim-commentary', event = "BufRead"} -- easily toggle comments for lines, paragraphs etc with gc use {'tpope/vim-commentary', event = "BufRead"} -- easily toggle comments for lines, paragraphs etc with gc
use { use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr
'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 { use {
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
event = "BufRead" event = "BufRead"