nvim-surround icon indicating copy to clipboard operation
nvim-surround copied to clipboard

Add functionality to also delete the entire lines containing the surrounds

Open phgz opened this issue 2 years ago • 1 comments

Checklist

  • [x] Have you read through :h nvim-surround to see if there might be any relevant information there?

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.

phgz avatar Feb 07 '24 20:02 phgz

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 avatar Feb 25 '24 18:02 kylechui

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.

kylechui avatar May 30 '24 19:05 kylechui