Closed xbladesub closed 5 months ago
Can you be more specific about the behavior you want?
I believe it is the same issue as this #122
You can either use ysiw)
or change config
["("] = {
add = { "(", ")" },
find = function()
return M.get_selection({ motion = "a(" })
end,
delete = "^(. ?)().-( ?.)()$",
},
I'd suggest swapping the default behavior of the left and right surrounds, or providing an option to toggle it.
Changing the default behavior at this point is out of the question, since I find this choice mostly arbitrary, and would rather preserve compatibility with vim-surround
. To change this, the configuration provided in this link should suffice.
Thanks!
While it's nice to keep compatibility for veterans of vim-surround
, newcomers are likely to be confused by the extra spaces when modifying surrounds, like cs"' :: "content" -> 'content'
but cs([ :: (content) -> [ content ]
.
What about providing an option? Since I find that left surrounds are clearly more customary than right ones, and that no spaces between surrounds and contents are more common than spaces.
I'm not particularly convinced that an option/toggle would be the preferred way to go about this. I'm currently in the process of trying to open up the internals of this plugin a bit more to make things "more idiomatic" from a Vim perspective; I believe that such a small change like this should just be done by the user.
I can't find a way to disable leading and trailing whitespace? Could you please help me with config?