-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Undo tree UI #1075
Comments
We have an undo tree internally with support for :earlier :later. We just don't have a good way to visualize the tree |
Can we keep this issue open for implementing a UI for it ? |
But I think we don't have a shortcut for it. Like |
We could map it to gu But should we do it like Vim/Kakoune or should we make something like Spaceu |
Could we use the infobox to display the tree? e.g. #980 It would require making the infobox interactable, however... |
It would be better to have a tree widget component which can properly handle the structure and associated keybinds, and plus it can be reused for a file tree (#200). |
Agree! i suggest we redesign the picker UI: The current picker is pretty fancy, too fancy actually. Everything is contained inside a box in the center of the window which block the whole view of the buffer and also make the picker look clutter. We should expand the picker to the whole window: from this: to this: ./ ┃ 1 ┃ print("Hello, World!")
├╴foo/ ┃ 2 ┃
> │ ├╴1.py ┃ 3 ┃
│ └╴2.py ┃ 4 ┃
├╴bar/ ┃ 5 ┃
└╴README.md ┃ 6 ┃
┃ 7 ┃
┃ 8 ┃
░ NOR ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1:1 ░
file picker:▁ [3/3] by:
Navigate the picker should be the same (using UP, DOWN and ENTER), if the pointer focus on a directory (e.g: Bonus: The user could keep the picker on the screen all the time, this should close #200. |
I disagree with this / this should be split into two separate issues.
It's the most minimal UI we could implement without adding a full file explorer with lots of state (which is your proposal, essentially an embedded I'd like to keep the default interface simple and clutter free and discourage using a file tree; helix is not vscode and it's best to pair it with a terminal file manager like I agree that we could visualize the undo tree though. |
Just adding my thoughts on undo files tree: Do you believe this is feasible, ideally on treesitter-based level?
Functionality could work like this
From briefly thinking this through, this has no fundamental limitation that does not occur with the usual approach besides added complexity for copy-paste besides restricting content to occur exactly in one register or adding complexity to resolve what content moved into which register (think of inserting and copying into temporary buffers etc). Do you happen to know, if pijul allows tracking changes at statement level or if anyone wrote a formalization on how this could work? Conflating and removing redundant editings to retrieve the relevant semantic changes can then be done in a separate pass. |
Could this use the tree work in #2377 ? |
The handmande networks wishlist has code-aware CVS HandmadeNetwork/wishlist#5, which is essentially structured editing (version control system), which is essentially a language-tailored form of ropes + tracking+resolving their changes. See "Typed Image-based Programming with Structure Editing" by Edwards and Petricek linked on https://alarmingdevelopment.org/?p=1570 and the video presentation + this nice explanation what ropes are https://blog.jetbrains.com/fleet/2022/02/fleet-below-deck-part-ii-breaking-down-the-editor/ to connect the dots. It would be obviously nice, if projects like https://www.shadaj.me/writing/introducing-rust-sitter/ come up with better performance of the parser, rather poorly scaling treesitter query system (qeries are rather dumb and dont utilize caching/previous qeries etc) and an API to combine semantic information. |
Until this is implemented for those that need very granular overview over their edit tree, could we add an option that Somebody also built a crate for that: https://docs.rs/undo_2 The option could be called something like |
I implemented tree-view with two solutions.
|
Is this still a priority? https://github.com/mbbill/undotree I find this super useful, would be great to have a similar UI here |
Come from Kakoune, one of the feature that many feel missing is Undo tree, from Kakoune wiki:
This seem kinda hard, maybe implement this in the far future.
The text was updated successfully, but these errors were encountered: