Are there any plans to support side-by-side viewing?
Can you expand on what this feature would be? I don't think it's been discussed yet. So far, delta is based around parsing default git output and unified diff output (which is very similar).
Lots of IDEs and GUI diff tools show differences side-by-side, instead of on different lines in a unified output like diff (and git diff) do by output. In addition, there are several command-line tools, such as sdiff and icdiff.
Do you think you would ever consider something like that? It may be out of the scope of this project, which I would completely understand. But I figured I would ask 馃槃
Hi @HarrisonMc555, thanks! OK, so, delta doesn't have access to the original files being compared: what delta is is a tool for applying syntax highlighting to the _output_ of diff programs (such as git and diff -u). In addition to simple syntax highlighting, it tries to do some fancy string-comparison edit inference, and restructures the git output a bit for readability.
So delta itself would not _generate_ the side-by-side view (it can't, it doesn't have access to the original files). Delta could however process the output of a program such as sdiff or icdiff, to add syntax highlighting etc. (Git can be configured to use an arbitrary executable for its diffs as explained in this SO post). This would require writing a new module for parsing those new sorts of inputs, so it would be quite a major addition, and I don't think I will be doing it personally.
OK, here's a question. I wonder whether, rather than using delta, there's a solution that uses bat to do the syntax highlighting in combination with sdiff or icdiff? These naive attempts didn't seem to work, but do you think something in this direction could work?
sdiff <(bat --plain --color=always a.py) <(bat --plain --color=always b.py)
icdiff <(bat --plain --color=always a.py) <(bat --plain --color=always b.py)

Thanks for your response! I'll have to think about it for a bit. Thanks for your help!
No problem, I'll close this for now, but feel free to add any further thoughts.
@dandavison I strongly agree @HarrisonMc555 's idea. This feature would be so awesome with this amazing tool. icdiff have this side-by-side feature, we can also add a option like that called: --side-by-side, which would be so great. ;)
Thanks @Dentrax and @HarrisonMc555. I think I said something wrong above. It's possible for delta to construct a side-by-side view without access to the original files. I agree that this is a feature that would very much make sense.
+1 馃憤
We (developers) often have a wider screen which can accommodate side-by-side view.
Definitely a nice feature to have as it increases the usability of this tool.
@Dentrax Thanks for sharing, quite interesting.
@dandavison would you like any help with this issue? not making any promises but I'd be interested in looking into it
@mscottnelson thanks, that would be great! So I'll give you a bit of time to take a look at what needs to be done -- I won't do anything in this area without pinging you on this ticket first.
I'm currently working on getting the next release out (0.2.0). But let's not try to include this feature in that release -- we can release this when it's ready. I'm excited about this feature, but there's also no shortage of other delta improvements for me to work on, so very happy for others to take features like this. I believe that the recent changes in master have put us in a decent position to implement this. For example, line numbers have been added to delta by @clnoll in #190 (and open PR #219), and they have a left and right column of numbers that should fit naturally into the left and right split in side-by-side view.
@mscottnelson are you still thinking of working on this or should we consider it open again?
@mscottnelson I'm (probably!) going to have a go at this. Let me know if you've already started work on it. doing this.
@dandavison Great! sorry for the poor communication. Thanks for being so awesome/proactive!
Thank you so much for such a great job! @dandavison
Side-by-side diff view has been released (delta 0.3.0). It has a section in the README, but basically you use
[delta]
side-by-side = true
or the equivalent command-line flags -s or --side-by-side.
![]() |
![]() |
It can be combined with any other options, such as diff-highlight or diff-so-fancy emulation.
cc @Amorymeltzer, @Avi-D-coder, @Kr1ss-XD, @MarcoIeni, @RobbieClarken, @Valloric, @crash-g, @jeffkaufman, @jwatt, @kenchan0130, @kyohsuke, @lightspeedbriefs, @madnight, @maricn, @mosic, @mscottnelson, @navarroaxel, @nemonweb, @panchalkalpesh, @softoika, @wataash, @zdenekkostal
(Thanks @Dentrax!)
This feature really rocks! :clap:
Most helpful comment
Side-by-side diff view has been released (delta 0.3.0). It has a section in the README, but basically you use
or the equivalent command-line flags
-sor--side-by-side.It can be combined with any other options, such as
diff-highlightordiff-so-fancyemulation.cc @Amorymeltzer, @Avi-D-coder, @Kr1ss-XD, @MarcoIeni, @RobbieClarken, @Valloric, @crash-g, @jeffkaufman, @jwatt, @kenchan0130, @kyohsuke, @lightspeedbriefs, @madnight, @maricn, @mosic, @mscottnelson, @navarroaxel, @nemonweb, @panchalkalpesh, @softoika, @wataash, @zdenekkostal
(Thanks @Dentrax!)