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

pause_undo_history and resume_undo_history commands #91

Open
neurocyte opened this issue Dec 22, 2024 · 3 comments
Open

pause_undo_history and resume_undo_history commands #91

neurocyte opened this issue Dec 22, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@neurocyte
Copy link
Owner

Add pause_undo_history and resume_undo_history commands so that you can write long command sequences without spamming the history with undo steps.

@neurocyte neurocyte added the enhancement New feature or request label Dec 22, 2024
@neurocyte neurocyte added this to the v0.3.0 milestone Dec 22, 2024
@PalanixYT
Copy link

vim insert mode counts as a single action and can be reverted interely by pressing u once.

By using these commands, that functionality could be imitated, depending on the implementation.

This would require for these commands to "squash" the undo history (maybe this might be a better name for these commands?) into a single entry in the history

@neurocyte
Copy link
Owner Author

This would require for these commands to "squash" the undo history (maybe this might be a better name for these commands?) into a single entry in the history

pause_undo_history will disable the automatic creation of undo history for each command executed. resume_undo_history will enable it again, and create an undo point if the buffer has changed. I think the names are ok.

@neurocyte
Copy link
Owner Author

neurocyte commented Dec 23, 2024

vim insert mode counts as a single action and can be reverted interely by pressing u once.\n\nBy using these commands, that functionality could be imitated, depending on the implementation.

I think we should also add support for mode init and deinit commands for this. That way we won't have to add pause/unpause to every keybinding that enters or exits insert mode. That can be done with a different feature request.

I added #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants