kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
3.15k stars 63 forks source link

Add functionality to also delete the entire lines containing the surrounds #305

Closed phgz closed 4 months ago

phgz commented 7 months ago

Checklist

Is your feature request related to a problem? Please describe. I would like to be able to delete the lines containing the surrounds. For example, if i have

local ins_char = (
  |input.get_char()
)

where | is the cursor location, and do, say, dS), then it would end up like this:


|input.get_char()

Describe the solution you'd like I already did an implementation and would like to know if you are interested by the idea.

Additional context I often use the :h forced-motion feature and it feels unnatural when I do dVs) to not have the entire lines removed.

kylechui commented 7 months ago

Sorry for the delay; this actually seems like quite an interesting idea. I don't believe vim-surround has a dS keymap set up by default :thinking:

kylechui commented 4 months ago

After some more consideration, I don't think this is a common enough ask to be worth the maintenance burden + would cloud the semantics of what the S here would mean (as opposed to yS, cS). If more people show interest maybe I'll reconsider.