From: Joachim E. <joa...@gm...> - 2012-08-02 19:58:15
|
Hi Antonio, The current method to do this is via a "Line matching preprocessor" in the diff-options. But KDiff3 uses external tools for this: e.g. sed On Linux sed is a standard tool anyway and on Windows starting with KDiff3 0.9.96 it is also part of the installation package. So you can use the command sed "s/chapter/paper/g" which replaces all occurances of "chapter" with "paper" but only during the line-matching phase. After that the difference is still highlighted as white space which you can also disable via the menu "Diffview" ->"Show white space". If you have more than one word to replace you can separate the commands with semicolon: e.g. sed "s/first/1/g;s/second/2/g" (where 's' means substitute and 'g' means global. Without 'g' only the first occurance in each line is replaced.) Best regards, Joachim Am Samstag, 28. Juli 2012, 08:26:31 schrieb Antonio DiCesare: > Is there any way to tell Kdiff3 that two different words in two different > files have to be treated as equal? > > I use Kdiff3 mainly on LaTeX files and at the moment I'm working on a paper > that I would also include in a book. So, in the file Paper.tex I have > sentences like "In this paper…" while in the Book.tex I have "In this > chapter…". Is it possible to tell Kdiff3 not to highlight a difference when > it finds "chapter" instead of "paper"? > > Thank you all. > > Antonio. > > > ---------------------------------------------------------------------------- > -- Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Kdiff3-user mailing list > Kdi...@li... > https://lists.sourceforge.net/lists/listinfo/kdiff3-user |