pnedev / comparePlus

Compare plugin for Notepad++
GNU General Public License v3.0
961 stars 139 forks source link

Algorithm? Standalone? #367

Closed philippbc closed 10 months ago

philippbc commented 10 months ago

I’m looking for a tool to compare a large number of code files. I’ve looked far and wide (WinMerge, Beyond Compare, …), but this plugin actually gets the best results (by a distance). Could you shed some light on the algorithm you use and any possibility of calling the comparison programmatically and saving a diff/patch file (e.g., command line, from Python)?

pnedev commented 10 months ago

Hello,

I didn't implement the algorithm myself - I just enhanced the long-time existing original Compare plugin. As far as I understand (from the comments in the code - please see diff.h file at its beginning where the license info is) the comparison algorithm used is Myers' and it is claimed this is the same algorithm used by GNU diff.

You can invoke ComparePlus plugin comparison directly from command line with this command: notepad++ -pluginMessage=compare new_file.txt old_file.txt Currently it is not possible to generate patch file.

BR