2

Using Ubuntu Linux 20.04 I would like to use a graphical diff tool (like Meld, Kdiff3, Kompare, etc.) that supports automatic line breaks. What I mean by that is that I would like to see the entire text in the graphical window that's available to me, without the need of scrolling horizontally, as this is incredibly painful when using text (scientific papers) with very long lines (i.e., long paragraphs).

I've checked all "top X diff tools" webpages and tried more than 10 graphical diff tools. NONE of them supports automatic word wraps/line breaks (or however they are called). In all of them, long lones are just endlessly long lines.

Fun fact: I know that meld did support this at some point, but apparently it does not anymore, for some extremely weird reason they've just removed this feature.

To be more precise, kdiff3 actually does support this, but it seems that it does not allow to edit the text being displayed, which is another extremely essential feature since diff tools get "confused" very easily, so one needs to constantly do some minor alterations to the text so that the differ keepz regognizing similarities.

So, can anybody recommend such a tool to me? It's driving me crazy that I can't use a differ anymore...

4 Answers 4

1

BeyondCompare unreservedly and without hesitation. The trial will work forever if you don't mind the nag screens on startup. Note that you need BC5 which is still in beta, but works wonderfully as far as i can tell. YouTube -- Beyond Compare 5: Word Wrap

It's about the 2nd best diff tool ever, and it's multiplatform as a bonus. (The first best imho is Araxis Merge but unfortunately it's never been ported to Linux so it doesn't answer the question, included for others asking almost the same question though. Merge supports word wrap and has a superior UI and synchronization algo Araxis Merge -- Wrap long lines

1
  • I use Beyond Compare myself. Commented Mar 8 at 11:19
0

One possible answer, though that is technically not what I'm looking for since it's not a GUI (though I only said "graphical", which it is, I did technically not restrict to GUI -- although I meant that) is icdiff. It puts the two texts onto the terminal, but highlights differences in color (with the demanded line wrap).

It was recommended in another stackoverflow post, which you should probably vote on (question + answer) if you find this helpful.

0

You could use unix process substitution and the command-line utility fold together (and meldfor instance:)

meld <(fold --width 80 file1.txt) <(fold --width 80 file2.txt)

but (correct) in-place-edit of the input files would not be possible.

0

Another response, though this is even more off -- since I've clearly asked for Linux -- is the graphical diff tool by tortoise git for Windows. I was reaching out to that OS since there really doesn't seem to exist decent software for Linux... (But I'm happy to be disproved!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.