Hi, Marcelo.
I've been developing a plugin [1] which I find useful (it is also featured in the wishlist page) and I hope to see it in the geany-plugins project.
Great minds think alike! Just last month I wrote a Lua script to do almost exactly the same thing. I've uploaded it to https://wiki.geany.org/config/scripts/lua if you're interested in reading through it.
I see that you've used a configuration file to allow selection or customisation of the diff command used. Clever :). You might also want to include kdiff3 and tkdiff in the list of stock commands.
I chose to use the unsaved version of the file for comparisons, regardless of whether comparing to itself or another version. I guess it's a matter of preference (maybe something to add to your config file?). However, doing it my way, if you did want to compare to the latest saved version, you could always swap to the other file and compare from there. Doing it your way, there just isn't any way of comparing the unsaved changes to another file.
Thanks for working on this! The Compare plugin is one of the two Notepad++ features that I've really missed (with the other being support for binary files).
Thrawn
Hi Thrawn,
On Mon, Jan 7, 2013 at 3:42 AM, Thrawn shell_layer-geany@yahoo.com.au wrote:
Hi, Marcelo.
I've been developing a plugin [1] which I find useful (it is also featured in the wishlist page) and I hope to see it in the geany-plugins project.
Great minds think alike! Just last month I wrote a Lua script to do almost exactly the same thing. I've uploaded it to https://wiki.geany.org/config/scripts/lua if you're interested in reading through it.
Nice! I was suspecting somebody would have already implement such feature. I love how simple your script is, but I think that implementing as a plugin it can be more flexible (configuration, toolbar integration, etc).
I see that you've used a configuration file to allow selection or customisation of the diff command used. Clever :). You might also want to include kdiff3 and tkdiff in the list of stock commands.
Done.
I chose to use the unsaved version of the file for comparisons, regardless of whether comparing to itself or another version. I guess it's a matter of preference (maybe something to add to your config file?). However, doing it my way, if you did want to compare to the latest saved version, you could always swap to the other file and compare from there. Doing it your way, there just isn't any way of comparing the unsaved changes to another file.
Indeed, I don't see why not do it your way. Thanks for the suggestion.
Marcelo
Thanks for working on this! The Compare plugin is one of the two Notepad++ features that I've really missed (with the other being support for binary files).
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
I love how simple your script is, but I think that implementing as a plugin it can be more flexible (configuration, toolbar integration, etc).
Yes, toolbar integration is an advantage. Adding behind-the-scenes behavior works fine in Lua, but adding things to the interface really needs C.
Is it feasible to copy the integrated diff viewer from the geanyvc plugin? That would be really useful. I don't know about you, but the geanyvc diff behavior was what gave me the idea for compare.lua.
I've uploaded a new version, by the way, replacing the hacked-together file-choosing alert with a proper choice dialog.