I often compare 2 files which are very similar expect that one of them has the string ABC and the other has the string XX in multiple places.
Obviously, compare will highlight these differences in red.
But sometimes I'd like to hide these particular differences and only see the remaining differences.
Eg, if I have 2 files a.txt and b.txt
a.txt:
[abc]
name=abc
option1=29
option2=37
b.txt:
[xxxx]
name=xxxx
option1=7
option2=37
It would be great if I could enter pairs of string (eg "abc" and "xxxx") somewhere and whenever the diff tool sees a difference with this pair then to not highlight it in red.
Even better if I can select existing highlighted differences, right click and have a menu option to add that pair to the difference list.
In this way, when comparing 2 config files like above I would only see the difference of 29 vs 7, not the unimportant (to me) differences of abc vs xxxx .
Thanks.
Ability to ignore certain differences in "compare contents"
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 5
- Joined: 2022-02-15, 01:40 UTC
Re: Ability to ignore certain differences in "compare contents"
To me the only way to do this is to create you own config file content plugin with dedicated comparison method. You will be able to program your own algorithm hat do not highlight section and name attribute...stepho-wrs wrote: 2022-02-16, 00:25 UTC I often compare 2 files which are very similar expect that one of them has the string ABC and the other has the string XX in multiple places.
Obviously, compare will highlight these differences in red.
But sometimes I'd like to hide these particular differences and only see the remaining differences.
Eg, if I have 2 files a.txt and b.txt
a.txt:
[abc]
name=abc
option1=29
option2=37
b.txt:
[xxxx]
name=xxxx
option1=7
option2=37
It would be great if I could enter pairs of string (eg "abc" and "xxxx") somewhere and whenever the diff tool sees a difference with this pair then to not highlight it in red.
Even better if I can select existing highlighted differences, right click and have a menu option to add that pair to the difference list.
In this way, when comparing 2 config files like above I would only see the difference of 29 vs 7, not the unimportant (to me) differences of abc vs xxxx .
Thanks.
Re: Ability to ignore certain differences in "compare contents"
I use Beyond Compare in TC.
You can define "unimportand Text" in the rules.
You can define "unimportand Text" in the rules.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC6 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.3 x64
TC 11.55 RC6 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.3 x64
-
- Junior Member
- Posts: 5
- Joined: 2022-02-15, 01:40 UTC
Re: Ability to ignore certain differences in "compare contents"
I was hoping for an addition to the built-in diff tool but using Beyond Compare is certainly a viable option.
Thank you.
Thank you.