kylechui / nvim-surround

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

feat: add linewise deletion of surrounds #311

Closed phgz closed 4 months ago

phgz commented 4 months ago

Skeleton implementation for #305.

Mainly missing doc and tests.

kylechui commented 4 months ago

One minor concern that I have is how cS will now be interpreted, i.e. does the "line" for S mean that the replacement will be on new lines (as is current), or that it will delete the lines the surround is on (as you propose)? I feel that this might not be the most intuitive.

phgz commented 4 months ago

I see. Well personally I do not directly use dS, but rather dVs (remap) as mentioned in #305. So maybe it could directly be added as such, although I'm not sure how many people are familiar with the force-motion feature.

kylechui commented 4 months ago

Hmm... I'm personally quite wary of adding new features nowadays; I would probably like to see a few more people say that they really want this feature before I commit to adding it in. I personally don't think most people know about force-motion; many don't even know about motion or text-object :wink:

phgz commented 4 months ago

No problem! I'll maintain my fork hehe.