Skip to content
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

feat: Repeat operations for add/change/delete. #360

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kylechui
Copy link
Owner

@kylechui kylechui commented Nov 24, 2024

TODO: Repeat deletions, unit test stuff.

Feels like there's a cleaner way to parse the user input than the scuffed nil stuff I have right now. Although at the very least it's isolated in the get_char function 🤔

@kylechui kylechui linked an issue Nov 24, 2024 that may be closed by this pull request
1 task
@kylechui kylechui changed the title feat: Repeat delimiters for add. feat: Repeat operations for add/change/delete. Nov 24, 2024
@kylechui
Copy link
Owner Author

Another issue that has come up is the idea of deleting multiple surrounds. If we do ds3), but the buffer only has ((hello)), should the delete function no-op or do a "best-effort" and try to delete as many as possible?

@kylechui
Copy link
Owner Author

kylechui commented Nov 24, 2024

The case (foo) cursor_here (bar) is so cursed with ds2b---I want to avoid mutating the buffer until everything is found so change_surround can highlight everything properly, but finding the next possible surrounding pair to delete while ignoring already found pairs seems incredibly hard, if not impossible. If only I didn't implement reverse search.... 😭

Because I'm selfish I'm going to remove reverse search from the plugin in this branch just to see how the plugin feels

@kylechui kylechui closed this Nov 25, 2024
@kylechui kylechui force-pushed the feat/repeat-delimiters branch from 0fef5ac to dca2e99 Compare November 25, 2024 00:19
@kylechui kylechui reopened this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved count support
1 participant