-
Notifications
You must be signed in to change notification settings - Fork 377
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
Is it possible to show the file path in the hunk header? #309
Comments
Hi @infokiller, that's very interesting, I didn't know (or had forgotten; I used d-s-f for many years) that diff-so-fancy did that. I think I might like that also -- as you say, in large multi-file diffs, I do find myself looking at a hunk and then having to scroll up or something to confirm what file it's in. |
This would be great to add! A related idea is to hyperlink the hunk context. Right now the context line number looks a bit off to me. Especially for e.g. removed files: I know I can disable it with I'm aware that the hunk context isn't at the line number reported, but as the hunk context line number doesn't refer to the first line of the context, but to the first line where there's a change, the line number is "wrongly placed" anyways, and merging it into the hunk context (function) line would simplify things visually. |
This would also make it easier to open the file directly at the given line number for a hunk, with tools that understand the |
@torarnv I don't want to lose your idea above (#309 (comment)). Maybe we should open a new ticket for it. Do you use the file/line-number hyperlinks? (Have you set things up so they open in an editor/IDE?) |
This is released now (v0.4.5). |
Many thanks @dandavison, delta is great and you keep making getting better! |
@Dreomite good call, absolutely, let's get that fixed. |
0.5.0 was just released and contains all the changes discussed in this ticket and related PRs. Copying from the release notes: This release introduces a cosmetic change to delta output: the line number (when full Use
If you are displaying the file path in the hunk header, you may want to get rid of the main file line. Use |
Hi,
Right now, the hunk header only shows the line number. diff-so-fancy also shows the file path, which I like because it gives me better orientation in a large diff (although it can be redundant with the commit/file box).
Is it possible to emulate this in delta?
Thanks!
The text was updated successfully, but these errors were encountered: