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

VCS changes picker #5362

Open
poliorcetics opened this issue Jan 2, 2023 · 8 comments
Open

VCS changes picker #5362

poliorcetics opened this issue Jan 2, 2023 · 8 comments
Labels
A-helix-term Area: Helix term improvements A-vcs Area: Version control system interaction C-enhancement Category: Improvements

Comments

@poliorcetics
Copy link
Contributor

When I code I often need to go back to the places I modified.

Now that helix supports VCS (i.e., git for now), we could add a VCS picker that would list all changes, for easy navigation.

For the sorting order I propose:

  • Current file, current change,
  • Current file, other changes,
  • Other files, changes sorted by line number

Including the first line of the change (or the line just before the deletion) would probably help searching too:

path/to/file:73 fn added_function() {

I have no idea what to pick for the picker key, Space + v maybe ?

@poliorcetics poliorcetics added the C-enhancement Category: Improvements label Jan 2, 2023
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Jan 2, 2023
@kirawi kirawi added the A-vcs Area: Version control system interaction label Jan 2, 2023
@lukepighetti
Copy link

lukepighetti commented Jan 11, 2023

I think we should use <space>g and <space>G and rebind debug to <space>e

@pascalkuthe
Copy link
Member

I agree that it would be nice to keep it consistent here altough it also feels kind of bad repeatly moving the debug binding around. It was just recently moved from <space>d to <space>g

@lukepighetti
Copy link

I totally understand that, but it feels like it's worth putting in the effort to find it a forever home, and it is still an experimental feature so I would expect folks to be open to a little minor chaos

@haikyuu
Copy link

haikyuu commented Jan 18, 2023

space e might be taken by tree explorer as well *

@xJonathanLEI
Copy link
Contributor

After looking at #5472 I think we need 2/3 pickers:

  1. untracked/modified/deleted FILE picker
  2. current document diff blocks picker (implemented in Feat: Add VCS change picker for current document and workspace #5472)
  3. current workspace diff blocks picker (not exactly implemented in Feat: Add VCS change picker for current document and workspace #5472 - see Feat: Add VCS change picker for current document and workspace #5472 (comment))

IMHO picker 1 is actually the most useful - it's basically a git status picker. I don't see any issue or PR tracking it yet.

Regarding key binding, I think binding to <SPACE>g makes the most sense given the existing [g and ]g bindings. But I think <SPACE>g should be a node itself, with the subsequent key selecting one of the many VCS pickers.

@lukepighetti
Copy link

lukepighetti commented Jan 23, 2023

Regarding key binding, I think binding to <SPACE>g makes the most sense given the existing [g and ]g bindings. But I think <SPACE>g should be a node itself, with the subsequent key selecting one of the many VCS pickers.

I can only find one keybinding dialog that is two levels deep, and that is Window via <SPACE>w..., but that one can be brought up with c-w. If we're going to nest it like that, I think we should plan for a shortcut with c-g as well

@xJonathanLEI
Copy link
Contributor

Actually. I changed my mind. I think pickers 2&3 are quite useless - for 2 you might as well just do [g and ]g with better UX; and 3 is just 1 + 2.

That's why in my PR implementing 1 (#5645), I actually just did the <SPACE>g binding, no nesting.

@poliorcetics
Copy link
Contributor Author

I don't agree at all, all three pickers are useful, and the numbers of reactions on my initial message say I'm not the only one who thinks so.

We have workspace and current file diagnostic pickers despite navigation+file picker bringing the same functionalities, dismissing the VCS ones simply because you prefer navigation is not a good argument. Not everyone has the same workflow or preferences in how they use their tools.

We can have both modified files and modified blocks (current, workspace) pickers and only bind one of them by default if we want to avoid cluttering the keybinds (and that's a good idea), but arguing against them when wholly we already have equivalent is shortsighted IMO.

Sorry if that comes off too strongly, I'm not intending to insult anyone, I just want to be sure to remind everyone that helix is not used only by its developers and that "I don't see a use for that therefore it is useless" it not a good argument when people have expressed a used for "that" and taken time to make issues and PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements A-vcs Area: Version control system interaction C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants