Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to diff files sentence-by-sentence instead of line-by-line?

Tags:

diff

word-diff

Just trying to get diff to work better for certain kinds of documents. With LaTeX, for example, I might have a long paragraph that is strictly just one line, but I don't want to see that entire paragraph if just a sentence is changed. Particularly if I'm running some kind of version control and a co-author edits the same paragraph (but not the same sentence) as me. I wouldn't want that to show up as a conflict.

That's a secondary question. The main question is whether I can use diff to look sentence-by-sentence. Thanks.

Edit

wdiff is almost perfect. But is there a merge equivalent, as diff has with diff3?

like image 442
Chris Avatar asked May 10 '09 16:05

Chris


1 Answers

wdiff will give you a word-by-word diff instead of line-by-line. I'm not aware of any sentence-by-sentence diff programs.

like image 176
Adam Rosenfield Avatar answered Sep 22 '22 01:09

Adam Rosenfield