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

Feature request: allow switching between branches #189

Open
enoryw opened this issue Jan 22, 2025 · 1 comment
Open

Feature request: allow switching between branches #189

enoryw opened this issue Jan 22, 2025 · 1 comment

Comments

@enoryw
Copy link

enoryw commented Jan 22, 2025

Feature request: allow switching between branches, as demonstrated in this Emacs undotree demo where left/right keys switch branches and up and down keys navigate through a branch.

When going back in history, users tend to start from most recent and move incrementally backwards, usually linearly. If switching branches, we usually traverse it linearly because it makes the most intuitive sense and easiest to understand. Currently, the layout does not allow for this--it's only possible to navigate vertically and not as if it's a tree (it only appears like a tree but doesn't act like it).

For example here, it is confusing navigating from third entry from the top (the first entry diverging from left branch) to the forth (next) entry from the top (the tip of the right branch). To replicate the intuitive nature of the Emacs undotree branch, the user would need to use vim motions to manually jump past irrelevant diverges in history. I found I use undotree much more frequently and naturally in Emacs where left/right keys switch branches and up/down keys navigate through the branch (I mean hjkl keys, of course).

It's probably non-trivial to implement this though.

@mbbill
Copy link
Owner

mbbill commented Jan 22, 2025

that's some great suggestions, thanks! As for the example, when you are at state 37, you can press 'u' to go directly to the state 27 and you don't have to use vim motions to manually jump past irrelevant states, if that's what you want.

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

No branches or pull requests

2 participants