Open sguillia opened 5 years ago
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
I asked on Stack overflow beforehand if any extension already does the job.
My post got downvoted and voted for close.
The issue reporter suggests to ask questions on stack overflow with VS Code tag, and I didn't want to request a feature that an extension already provides.
Could anyone explain me what I did wrong??
Eh nothing's wrong, it's more of Stack Overflow's community guidelines, they want you to be as relevant as possible (hence the tag problem the reporter said) and make sure you search as thoroughly as possible, and try to be as specific as possible (I understand what you meant), and if you want it integrated into VSCode as a Feature Request, then it's fine to post your idea here!
Asking for 3 way diff support.
Diff on four (4) files would be great as well! It would REALLY help to justify the purchase ("investment towards productivity increase") of a 34" 3440x1440 monitor
Yes. n files. We might need two n of those monitors (for productivity).
Any update on how this can be used? (diff for 3 files)
This would be very useful!
Diff for n
files would be great. I have number of projects that use a base file that is nearly the same, however I would like to check which projects have custom code in it.
Wondering if there is a possibility of getting this feature in 2023?
Yet another n-differ hoping this makes it..
Chiming in as an nth supporter wanting to diff n
files :)
please
VS Code now has a three way diff editor.
For anyone (like me 🤦♂️) that was accidentally watching this ticket looking for 3-way merge version 1.69 (https://code.visualstudio.com/updates/v1_69#_3-way-merge-editor) introduced the feature and there's a menu item to show the base (two actually, one for top, one for center). See: https://github.com/microsoft/vscode/issues/155277.
@srudolph-credera, that seems to describe the 3-way merge editor (for merging a base and two sides, I would think).
@hediet, can you clarify how one opens the 3-way diff editor? Which version was it added in?
@srudolph-credera, that seems to describe the 3-way merge editor (for merging a base and two sides, I would think).
@hediet, can you clarify how one opens the 3-way diff editor? Which version was it added in?
Yes, indeed - I had mistakenly conflated them and wanted to help anyone else that had similarly done so. In figuring out what had been added to VS Code, I too could not find the 3-way diff support announcement/UI. I wonder if it got conflated with being able to show multiple 2-way diffs in the same pane, which was just released in preview: https://code.visualstudio.com/updates/v1_85#_multifile-diff-editor.
I wonder if it got conflated with being able to show multiple 2-way diffs in the same pane, which was just released in preview: https://code.visualstudio.com/updates/v1_85#_multifile-diff-editor.
Yeah, could be. Incidentally, the combination of that feature with 3-way diffs would be useful for us for giving the user a nice UI for splitting commits (https://github.com/martinvonz/jj/issues/1155). And ideally it can be started from the CLI. So that's what I'm really hoping for.
My mistake, I thought 3 way diff editor would refer to 3 way merge editor.
Can you describe the uses cases for a 3 way diff editor? How would they be diffed? A vs B and C vs B? or A vs B and B vs C, while aligning the two Bs?
I mentioned splitting commits above. You can use the same interface for something like git commit -i
. I don't know that use cases others have in mind.
For splitting commits, we would want the content from the parent commit on the left, the content from the commit itself on the right, and the result (output) in the middle. We currently let users split commits by letting them edit the right pane in a 2-way diff instead. I think it would be useful to have the separate output in the middle, so you can compare that to the final state on the right.
The complicated part of a 3 file diff editor is to compute the line alignments:
Given the diffs between A<->B and B<->C, each as { orig: Range, mod: Range }[]
(Range
having a start/end lineNumber/column), how do I compute the alignment-spacers (in form of { afterLineNumber: number, heightInLines: number }[]
) for A, B and C, such that after inserting these spacers, unmodified lines are aligned (and modified lines are aligned heuristically)?
PhpStorm can diff three files. Why can't we have such a feature?
code --diff <path1> <path2> [<path3>]
https://www.jetbrains.com/help/phpstorm/command-line-differences-viewer.html
VS Code allows to easily compare two files by choosing
Select for compare
andCompare with selected
.But we can only select two files.
diff3
,kdiff3
andvimdiff
do the job but I would prefer it integrated into VS Code.This would be helpful!
Edit: would also be nice to be able to compare 4 files 😄 vimdiff and diffuse do