Compare by contents: Word wrap
Moderators: Hacker, petermad, Stefan2, white
Compare by contents: Word wrap
Suggested at forum.wincmd.ru
Would be nice if CBC window will allow to change the Word Wrap mode on/off.
Would be nice if CBC window will allow to change the Word Wrap mode on/off.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The problem is that the wrapped lines would not be in sync between left and right side. Immagine a 100 word paragraph wrapped to several lines. The left and right lines would quickly get out of sync if one side contains additional words at the beginning of that paragraph...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yes, that's true, but the differences would still be highlighted. The comparing process can still be made in single line, but the wrap could be just visual, e.g. wouldn't change nothing or trigger another compare.
Word wrap would be useful so you don't have to slide for 3 or more screens. It becomes very confusing sometimes as you have to go back and check if you missed something.
The comparission would be made without the wrap, but an option to just turn the wrap on for just this comparission, which would be gone when you close the window, would be great.
Please try to do it and we can test it then.
Who doesn't like it, wouldn't use it.
Word wrap would be useful so you don't have to slide for 3 or more screens. It becomes very confusing sometimes as you have to go back and check if you missed something.
The comparission would be made without the wrap, but an option to just turn the wrap on for just this comparission, which would be gone when you close the window, would be great.
Please try to do it and we can test it then.
Who doesn't like it, wouldn't use it.
ghisler(Author)
Other programs can handle this. For example, Compare It! just shows empty space (filled with crossed lines) where line from one side is shorter than the corresponding line from another side.
Other programs can handle this. For example, Compare It! just shows empty space (filled with crossed lines) where line from one side is shorter than the corresponding line from another side.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
Compare by content: wrap long lines
The present version of "File|Compare by content" is not very useful if one needs to compare text files with very long lines. I very often write text files (actually TeX files) where the whole paragraph is actually a long single line. My editor just wraps it as I reach the end of the window NOT INSERTING HARD BREAKS (new line character(s)) into file itself. This is very useful because if I edit the text, it will be wrapped automatically (I do not need to care about (re)formatting/deleting/reinserting line breaks).
If I try to compare two versions of such files using "File|Compare by content", TC shows which lines are different, but the differences are not visible as they are far away behind the right edge of left and right window.
Suggestions 1: can TC word wrap long lines when it shows them in comparison window? Corresponding check box would be great!
Suggestions 2: Can TC treat new-line character like space? More exactly, one new_line=space, more then one new+line = new paragraph.
If I try to compare two versions of such files using "File|Compare by content", TC shows which lines are different, but the differences are not visible as they are far away behind the right edge of left and right window.
Suggestions 1: can TC word wrap long lines when it shows them in comparison window? Corresponding check box would be great!
Suggestions 2: Can TC treat new-line character like space? More exactly, one new_line=space, more then one new+line = new paragraph.
The software can only get beta 

- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The compare tool in TC is line-based. It couldn't handle very long lines well even if it did word wrapping. The comparison calculates a checksum (hash) for each line, and then compares the hashes. With long paragraphs, the chance would be high that there would be no (or very few) line matches between the two files.
Maybe a different compare tool can do what you need? Try e.g. "beyond compare" or "Winmerge". You can define a compare tool in wincmd.ini with the line
CompareTool=c:\path\toolname.exe
Maybe a different compare tool can do what you need? Try e.g. "beyond compare" or "Winmerge". You can define a compare tool in wincmd.ini with the line
CompareTool=c:\path\toolname.exe
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Christian,
They both do not provide word wrap either. But listen, what is needed is pretty simple: it does not affect the way how comparison is done! It only affects the way how the text is SHOWN after comparison. So instead of
with no visible differences in line 101 ('|' represents the window boundary and the text is actually much longer than the window width) I would like to have the following representation
Is it possible to implement?
The number of corrections is usually small, so NOT every long line (paragraph) is different.
They both do not provide word wrap either. But listen, what is needed is pretty simple: it does not affect the way how comparison is done! It only affects the way how the text is SHOWN after comparison. So instead of
Code: Select all
| 100: blah | 100: blah |
| 101: text text text text text text | 101: text text text text text text |
| 102: blah | 102: blah |
Code: Select all
| 100: blah | 100: blah |
| 101: text text text text text text | 101: text text text text text text |
| text NEW RED TEXT text text | text text text text text text |
| text text text | |
| 102: blah | 102: blah |
The number of corrections is usually small, so NOT every long line (paragraph) is different.
The software can only get beta 

What e_gold suggests seems like a nice feature to have.
Until then I use Lucida Console size 7 in the CbC tool - it is just readable and shows a lot of text.
Until then I use Lucida Console size 7 in the CbC tool - it is just readable and shows a lot of text.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
WinMerge definitely does.e_gold wrote:They both do not provide word wrap either.
However, if CbC supported word wrapping it would be really nice.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
Not exactly. There is a binary comparison option. I wonder why nobody proposed that, since I do not see, even theoretically, any better way out for the original problem.ghisler(Author) wrote:The compare tool in TC is line-based.
I do not know if the "Ignore repeated spaces" and "Case sensitive" options work in the binary mode, but I guess they should.
Replacing "Ignore repeated spaces" with "Ignore repeated whitespace" and specifying what exactly is whitespace, including EOL symbols, may be very handy in special cases.