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:
parent
788775bbee
commit
8e6bd03576
1 changed files with 1 additions and 12 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue