Compare by content: wrap long lines
Moderators: white, Hacker, petermad, Stefan2
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 ![Wink ;-)](./images/smilies/icon_wink.gif)
![Wink ;-)](./images/smilies/icon_wink.gif)
- ghisler(Author)
- Site Admin
- Posts: 48083
- 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 ![Wink ;-)](./images/smilies/icon_wink.gif)
![Wink ;-)](./images/smilies/icon_wink.gif)
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.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: 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 10.52 / Win10 x64
Using TC 10.52 / 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.
Wrapping lines as and option in Compare by content window may be simply useful for binary files. But this feature is absolutely necessary to compare text files. Have anybody any ideas, for what reason Christian does does not like the idea of adding this option to save those users, who needs it?
This argument ( http://www.ghisler.ch/board/viewtopic.php?p=237222&sid=d2f6be429af5fc95925cda6ba4c003b0#237222 )does not seem to be very convenient for me, is there are any hidden considerations![Wink ;)](./images/smilies/icon_wink.gif)
This argument ( http://www.ghisler.ch/board/viewtopic.php?p=237222&sid=d2f6be429af5fc95925cda6ba4c003b0#237222 )does not seem to be very convenient for me, is there are any hidden considerations
![Wink ;)](./images/smilies/icon_wink.gif)
-
- Junior Member
- Posts: 98
- Joined: 2003-07-16, 22:40 UTC
- Location: Spain
Strong support by myself
I also strongly vote for this option: showing long lines as wrapped would solve the problem that I suffer daily when comparing my C files.
Thanks,
Jose
Nubia Redmagic 7Pro with non-rooted Android 13
Jose
Nubia Redmagic 7Pro with non-rooted Android 13
-
- Junior Member
- Posts: 11
- Joined: 2011-11-10, 02:34 UTC
Re: Compare by content: wrap long lines
the request is simply to make the horizontal scrollbar optional instead of being mandatory.
that way, the user can adjust the textbox width simply resizing the entire window.
that way, the user can adjust the textbox width simply resizing the entire window.