-
-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Delete surrounding function #157
Comments
+1 for this feature. I see there is wrap implementation with |
I was just made aware of https://gist.github.com/romgrk/35186f3b5a71a7d89b2229b6f73e4f32 which seems to implement this perfectly. Maybe it can be added to vim-surround? @romgrk: Would that be fine with you? |
I have no problem with that. I've cleaned up a bit the gist and added comments (it was extracted from many parts of my RC files), so it should be more readable now. I'm here if you have any questions, but mostly it piggybacks on vim-surround. The main part is It will still need to be tested in a clean environment, because maybe there are still some assumptions that I made knowing it was meant to execute in my own environment, but I've been using that for years without problems. |
I'll make an attempt to implement this, if no one else has already begun? |
@philipjhj there already is #118 |
Since this issue seems pretty abandoned, I just want to let you know that a similar plugin has support for deleting surrounding functions, see https://github.com/machakann/vim-sandwich/wiki/Magic-characters#function-surroundings. |
csf = Change surround function to specified one. dsf = Remove surrounding function. The deleted function name is stored in the unnamed register. Closes tpope#157.
I just made vim-surround-funk to do that. You can also then 'grip' some text object with the function call. So |
Currently we have a way to surround
foo
viaysiwftest
totest(foo)
.I would like to go back from
test(foo)
tofoo
by typingdsf
. It just has to act likedsb
, except that it needs to also delete the word in front of the target. That would be super useful!The text was updated successfully, but these errors were encountered: