winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Ignore Section

Open solaceten opened this issue 2 years ago • 1 comments

Sorry if this has been asked before - I searched for some time but did not see any mention of this...

I use winmerge to compare files - sometimes, there is a need to ignore a specific section which may be missing from one side - for example, a staging site file on the Left that has notes in it, but a live site file on the Right that does not need these notes.

Is there a way to mark such a section / number of lines as to be ignored - and then the file can be returned as "equal" in the file / folder list?

This is useful because when comparing folders with lots of files, currently if a file has differences, it is obvious as it shows up with a red icon "files are different". However, if they are the same - except for "marked as ignored" sections - they could then be shown as "Identical" or perhaps even a new status of "Identical (with marked sections).

This would be very helpful as visual aid in folder list with many hundreds of files to compare.

Thank you for your time.

solaceten avatar Jul 28 '23 05:07 solaceten

If there is a specific marker at the beginning of each line in that section, you can use WinMerge's Line Filters feature to ignore lines containing that specific marker (in this example, ===).

image

However, if there is no specific marker at the beginning of the lines, unfortunately, you won't be able to achieve the expected results with the current functionality of WinMerge.

sdottaka avatar Jul 28 '23 12:07 sdottaka