conf option: ignore linebreaks when synch'ing dir with text

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

fgnievinski
Junior Member
Junior Member
Posts: 11
Joined: 2011-11-10, 02:34 UTC

conf option: ignore linebreaks when synch'ing dir with text

Post by *fgnievinski »

A configuration option to ignore linebreaks when synchronizing directories having text files; the option is disabled by default, so that it's backwards compatible. For background, see topics ID # 234340 and 28753.
fgnievinski
Junior Member
Junior Member
Posts: 11
Joined: 2011-11-10, 02:34 UTC

Post by *fgnievinski »

Would you see any hurdles in implementing this?
thx
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should actually work when using the "compare as text" plugin: Forst check the "by content" option, then click on >>, and then choose the file types (e.g. *.txt *.htm *.html). Then choose the only available compare plugin, tc -> compare as text.
Author of Total Commander
https://www.ghisler.com
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

That's cool, but it doesn't work when the only difference between the files are tabs/spaces, or trailing whitespace on a line.

Perhaps this should be it's own suggestion? But it would be very useful when comparing source trees if the "" not-equals symbol could distinguish that somehow --- Especially since when you open the file with the Compare Tool, it indicates 0 differences when "ignore repeated spaces" is checked.

A different Icon & Icon box/filter would be most helpful, e.g.
OR

Example, the box filters might be layed out:
         (with this as a tiny 1/2 size box above the not equals)
=

The icon could also only be used in the display file list below, and it could be a checkbox modifier, [x] Ignore difference in tab/spaces.

Or adjust the TC "compare as text" plugin to also ignore space/tabs.

I would still recommend adding the new almost-equal icon in the file-list though for both mismatching line-breaks and tab/spaces --- so we can tell that there is a difference - just not a very relevant one.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Balderstrom, compare plugin may easilly return custom icon to TC together with compare result, so it is not a problem - it is possible to write compare plugin that will work like you wish.

E.g. my little plugin from this post (it allows to skip e.g. compare for large files) allows to mark some files as equal and to show custom icon.
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

MVV,

Highly useful this one. One can skip e.g. ISO files while comparing dirs with Compare Contents checked (which is my default mode).

Would be even more useful if one could define a size limit for behaviour. Like if filesize > 1Gb then Skip else do regular compare. I don't even know if this is possible at all?

Regards, EricB
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

EricB, just define search template with rule (Advanced tab, File size > e.g. 100 MB) and choose plugin for this template. :D
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

MVV, You're the man! Works like a charm. Silly me, that I've never thought of doing it with a defined type before.
This will probably also solve my request in the Suggestions thread :wink:

Thx, EricB
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

MVV,

Just to fire up this old thread: could you publish SkipCompare also on totalcmd.net? And maybe add version information in the wdx, so it can be used by TotalUpdater?

TIA, EricB
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Version info will increase file size from 2.5K to 3.5K. :roll:
I don't think there will be any updates but maybe I'll put it on totalcmd.net.
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Fair enough. I think the wdx is very useful, others might think alike. Publication on totalcmd .net might get you more fans ;-)

Regards, EricB
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I've put plugin on totalcmd.net with 64-bit version and small Readme.
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Thx, MVV.

And I see you added version info too. Admittedly a huge increase in relative size, but useful.

Regards, EricB
Regards, EricB
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Code: Select all

Admittedly a huge increase in relative size
That was a joke BTW, notice the smile. :wink:
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Same for me, I tried to put in some irony, but that's sometimes hard for a non-native speaker...
Regards, EricB
Post Reply