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

FR: File based scrolling (jumping) in diff panel/view #1360

Open
vt-alt opened this issue Jan 13, 2025 · 2 comments
Open

FR: File based scrolling (jumping) in diff panel/view #1360

vt-alt opened this issue Jan 13, 2025 · 2 comments

Comments

@vt-alt
Copy link

vt-alt commented Jan 13, 2025

There could be situation with very lengthy diffs for some file in particular commit. (For example feature is added and big new file is added with small integrations to other files.) It would be useful to improve UI to let it jump between files in diff panel of main view.

For example, with ctrl- or alt- + -up or -down arrow would move diff frame to a next file.

Currently it's possible to move cursor in diff panel with j/k to a filename (that require very many keypresses to scroll pass commit message and formatting) then enter to the filename and it jumps to a diff part for that file, then it is not possible to return or select next file. Jump with one keypress would be a lot handier.

Action names could be scroll-next-file/scroll-prev-file

Additionally, with this feature it would be useful to enable diff view for merge commits as we could easily navigate through it.

@koutcher
Copy link
Collaborator

Taking example on the binding @ jumping to the next chunk doing :/^@@, you can do :/^diff to jump to the next file. You can see merge commits with tig -m.

@vt-alt
Copy link
Author

vt-alt commented Jan 16, 2025

Ah great. Thanks for another hint!

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