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

Add movement shortcut for history #1088

Merged
merged 1 commit into from
Nov 14, 2021
Merged

Conversation

pickfire
Copy link
Contributor

alt-u and alt-U

@pickfire
Copy link
Contributor Author

cc @Omnikar since he worked on #981

@pickfire
Copy link
Contributor Author

I wonder would if be useful if we mentioned to the user how many steps were done?

@Omnikar
Copy link
Contributor

Omnikar commented Nov 13, 2021

I haven't really looked at the code but… I'm confused; what's the difference between this and undo/redo?

@pickfire
Copy link
Contributor Author

pickfire commented Nov 14, 2021

insert a

a

insert a

aa

insert a

aaa

undo u

aa

insert b

aab

move backward in history altu

aaa

move forward in history altU

aab

Basically if you messed up after you undo, you can still go back. Like undo tree but think it is two dimension, the normal undo is one branch of the undo tree, but this traverse by time of the undo tree rather than by branch.

Previously we have :earlier and :later for this which is more powerful but it is good to have a key for this. Vim have this as g- and g+ and kakoune have the same keys used here.

@Omnikar
Copy link
Contributor

Omnikar commented Nov 14, 2021

Ah, that's quite useful.

@archseer archseer merged commit b7c3877 into helix-editor:master Nov 14, 2021
@pickfire pickfire deleted the history branch November 15, 2021 11:48
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.

3 participants