-
Notifications
You must be signed in to change notification settings - Fork 343
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
external diff-editors: allow 3-pane diff, set up meld-3
.
#2003
Conversation
Re the HELP WANTED commit: @yuja suggested I simply have a separate function to check if a variable is in the args. I'll probably do that at some point. The biggest issue slowing down this PR is now the lack of tests. |
a3064cd
to
bec6547
Compare
Wild idea, we could do something like enum InterpolationChunk<'a> {
Literal(&'a str),
Variable {
name: &'a str, // e.g. "output"
original: &'a str, // e.g. "$output", maybe someday "${output}"
}
}
fn interpolated_variables(s: &'_ str) -> impl Iterator<Item=InterpolationChunk<'_>> {} (of course with better names. VariableStrChunk? TemplateChunk?) Which would allow doing the replacements and querying if a variable is present efficiently. |
b5e89c3
to
8a0a78b
Compare
meld-3
.
@Dr-Emann That's a nice idea. If we start doing something more complicated with arguments, we should try it. For now, I'll just follow Yuya's simple suggestion. |
This PR is a bit more polished now. I did not completely adapt JJ-INSTRUCTIONS text to the 3-pane diff, but I hope that the preambles I added will eliminate confusion. I may add tests for JJ-INSTRUCTIONS to this in the future or in a separate PR. I am not sure whether to remove the (currently unused) possibility to start out |
64dd590
to
94c4c07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'm curious to hear feedback about this once people start using it. I think it sounds like a big improvement.
Yeah, I've been using this and I like it quite a bit! I'm not super-happy about it from the technical perspective: I can't get this to work nicely with anything other than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fyi, kdiff3
's behavior would be close to meld-3
since the diff panes are readonly.
Thanks, Yuya!
It is similar, even without any need for the trickery with meld. However, it's frustratingly disfunctional. Let me know if you know how to get it to work. The issues are:
I was thinking of filing a feature request to execute "Select B everywhere" after starting a "diff merge" (in KDiff3 parlance), but issue number 2 made me throw my hands up in frustration. |
To be used in the next commit
Yep. I don't recommend kdiff3 over meld for diff editing. I just mean it's similar to
I think you could do that in "Directory merge" pane (select A or B, then "Run Operation for Current Item), but it's not intuitive. I don't know a better option. |
Implementation for 3-pane diff as discussed in #1905 (reply in thread).
To test it out, patch this PR and try
If you'd like to try programs other than
meld
, just use a merge tool config that has$output
in itsedit-args
.I am also thinking about trying out a conflict resolution interface based on this.
Checklist
If applicable:
CHANGELOG.md