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

diff kitten feature enhancements for terminal power users #7143

Closed
razcore-rad opened this issue Feb 22, 2024 · 1 comment
Closed

diff kitten feature enhancements for terminal power users #7143

razcore-rad opened this issue Feb 22, 2024 · 1 comment

Comments

@razcore-rad
Copy link

Is your feature request related to a problem? Please describe.
What stops the diff kitten being a useful tool in my opinion are these two lacking features:

  1. Select and transfer hunks from one file to the other.
  2. When running on directories it should present a browser so we can select which files to open instead of diffing one-by-one.

Describe the solution you'd like
For 1. - be able to select hunks with the keyboard and transfer them to the other file, similar to how hints work. For example we could have ctrl+shift+p>k to bring up the interface for selecting a hunk with the numbering/lettering system. Then if the hunk does exist in one file and not the other it should be copied over. Maybe a ctrl+shift+p>d for deleting hunks. I'm sure we can come up with a reasonable behavior. We also need some undo/redo or cancel operation somehow.

For 2. - something like a dual panel similar to meld would be nice where files that have differences are color-coded, then we should be able to select which file we want to open in the per-file diff view.

Describe alternatives you've considered
Replace using the diff kitten with meld which is a GUI app, I'd rather stay in kitty if possible.

Additional context
Example meld selection panel for directory diff:
image

Example meld transferring from one file to the other in per-file diff view:
image

@kovidgoyal
Copy link
Owner

The diff kitten is exactly that, diff. Patchset management features are
out of scope for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants