evil-helix icon indicating copy to clipboard operation
evil-helix copied to clipboard

Delete until char

Open antoyo opened this issue 7 months ago • 3 comments

This adds the support for new key bindings like df and dF.

I kept the two commits separate for now because I wasn't sure this was the correct solution to make sure a selection doesn't appear when doing undo.

antoyo avatar May 16 '25 10:05 antoyo

Since this code was inspired by code from another evil helix fork called evilhelix, I added a notice file to mention that.

cc @RoastBeefer00

antoyo avatar May 16 '25 10:05 antoyo

Thank you for preparing this PR. I'm not sure how to proceed with it though: It seems to replace the delete command - is that really the intention?

I also believe the df? and dF? commands could be integrated in the existing implementation in evil.rs, which uses the concepts of command, modifiers and motions. Maybe we could then extend get_character_based_selection() to take the modifier into account.

usagi-flow avatar May 30 '25 07:05 usagi-flow

Ah, my bad. With this approach, we would need to specify all the commands as you can see in the other evil helix fork here. Maybe it's not a good idea here and we should stick with the approach in #103.

antoyo avatar May 30 '25 12:05 antoyo