-
Notifications
You must be signed in to change notification settings - Fork 393
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
Moving around diffs #50
Comments
Cool, that's a neat trick! So, here's what's going on:
OK, so how can we make this work better? One idea is to match the horizontal line separator delta uses at each new file. E.g. something like this:
Unfortunately, every time it jumps to the match, it leaves the actual file name off screen by one line, which isn't helpful. If we could use a regexp that matches two lines it could work, but it looks like that that's just not going to be possible. Here's something that does work, at the cost of slightly uglier output:
So -- what do you think? Is it worth adding an option for delta to emit a searchable anchor along with the modified file name? (And if so would you like to work on it? :) ) In general I would say that the part of delta involving the various options for changing the way different sections of the diff output are styled, is probably an area that could benefit from some more attention. |
We could add back the word "modified" and be done with it, but I wonder whether more in keeping with delta's aims would be to use a set of single-character symbols, instead of the full words, e.g.
|
That's not as bad as I thought it would be, to be honest 😄
I think it's useful or it's just my muscle memory, I also don't mind working on it but I have zero Rust experience so I will need lots of help 😉
I honestly think bringing back "modified" is the best option, adding icons should be optional IMO. |
I tend to agree with this, text is usually more clear than icons.
@dandavison where would you start? |
|
Hi everyone, this should be addressed now in the Here's what I've done. Basically there are now two ways to activate diff navigation in delta:
I know that some people suggested prefixing every file path with By default, But that's just the default, you can do
In general it shouldn't be necessary to pipe Feedback and testing on 1 Just to be totally explicit for anyone reading this, |
@dandavison Any idea when the next release is going to be slated? Would love to not have to build directly from source to use this. 🙏 |
Hi @dsifford, soon! I'm working on it. There have been a huge number of changes related to how we configure stylable elements (see #205) and in master we can now use |
Thanks @dandavison! I got back from leave and have a few things to catch up on. Once that's done, I can have a go at building from source and report any findings |
|
Works like a charm. Thanks @dandavison 👍 |
The latest release of delta allows
This is motivated by the fact that leaving |
I'd like to do something like this
diff-so-fancy
moving around diffI tried this, but it only worked with
git show
but notgit diff
The text was updated successfully, but these errors were encountered: