[New Plugin] ComparePlus v1.0.0
-
@pnedev said in [New Plugin] ComparePlus v1.0.0:
- Can run files compare directly when starting Notepad++ from the command line (notepad++ -pluginMessage=“compare” old_file.txt new_file.txt)
Command line usage? Are you serious!?!?! OMG, it works! You’ve outdone yourself!
I’ve been using your incremental builds of ComparePlus along the way to get used to it in preparation for switching from the old Compare Plugin … This is great!
Cheers.
-
Hello my friend Pavel,
“Those who sow in tears shall reap in joy.”
Thank you for patiently and meticulously sowing.
Thank you for the tears.
And thank you for sharing the harvest and joy.On behalf of myself and many others: we appreciate you, your brilliant work and the masterpiece you have produced.
Congratulations!
-
Congratulations Pavel on the development and the release of your plugin.
I appreciate the effort and the time that you have put into it.
I downloaded it and I think it can be a useful plugin.
Thank you. -
Awesome!
For all of you who are looking for a link to the repo, like me, here it is: pnedev/comparePlus. -
@pnedev
Thank you for the release!
And I have a feature request :)
This plugin adds 10 toolbar buttons. Could you add an option (or options) to select whether we want any button on the toolbar or, as an enhanced version, to specify which exact buttons we want or do not want on the toolbar? For example:----------------------------------- | [ ] Show Toolbar buttons | | [ ] Set as First to Compare | | [ ] Compare | | [ ] Compare Selections | | [ ] Clear Active Compare | | ... | -----------------------------------
-
@Vitalii-Dovgan said in [New Plugin] ComparePlus v1.0.0:
This plugin adds 10 toolbar buttons.
Wow, 10 toolbar buttons seems excessive. Maybe this would have been better served by having a dedicated panel for this plugin, similar in base concept to the panel in the Changed Lines plugin.
-
Any reason not to use the CustomizeToolbar plugin?
IMO it’s a must-have plugin regardless of ComparePlus. -
-
@Michael-Vincent said in [New Plugin] ComparePlus v1.0.0:
Command line usage? Are you serious!?!?! OMG, it works!
I’m not able to get command-line use working.
I presume that it is supposed to load the files and then start the compare on them, but that’s just a presumption on how I think it should work; I haven’t seen anything that says that.It loads the files, but doesn’t start the compare. The plugin itself loaded fine as I can see the toolbar buttons and I can start the compare manually, but…
I think I’m doing it correctly:
Anyone have any hints for me?
-
I use the old Notepad++ Compare plug-in almost daily. So it’s great news that you’re continuing its development and keeping it active and up-to-date.
I’ve seen other useful software tools slowly disappear due to software rot, so even if you hadn’t added new features I think it’s great just for the maintenance of such a useful utility 👍
-
Try removing the quotes from
compare
- run it like that:--pluginMessage=compare
Sorry for the misleading info in the description, my bad.
-
@Yaron said in [New Plugin] ComparePlus v1.0.0:
Any reason not to use the CustomizeToolbar plugin?
IMO it’s a must-have plugin regardless of ComparePlus.The CustomizeToolbar has two tiny issues which are actually not issues for most of people but are issues for me. First, CustomizeToolbar makes Notepad++'s toolbar to blink (repaint) during start-up. Second, CustomizeToolbar slows down Notepad++'s startup for almost a second (for a cold start). As I wrote, these are not issues for most of the people, but I’m very sensitive to such things.
-
Hello, @pnedev and All,
Ah… OK !. So the correct syntax is :
...\notepad++ -pluginMessage=compare Old_file.txt New_file.txt
Howewer, we have to consider different cases. Let’s consider a session with two files
change.log
andcopy.log
( with a few changes compared tochange.log
) and some other tabs, too :
- The
change.log
andcopy.log
tabs exist, both, in current N++ session AND thecopy.log
tab comes next to thechange.log
tab. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
works correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
does not work correctly
- The
change.log
andcopy.log
tabs exist, both, in current N++ session AND thechange.log
tab comes next to thecopy.log
tab. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
does not work correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
works corectly
- The
change.log
andcopy.log
tabs exist, both, in current N++ session BUT thecopy.log
tab andchange.log
tab are not adjacent. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
does not work correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
does not work correctly
- The
change.log
tab only exists in current N++ session and is the last one. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
works correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
does not work correctly
- The
change.log
tab only exists in current N++ session and is not the last one. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
does not work correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
does not work correctly
- The
copy.log
tab only exists in current N++ session and is the last one. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
does not work correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
works correctly
- The
copy.log
tab only exists in current N++ session and is not the last one. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
does not work correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
does not work correctly
- The two tabs
change.log
andcopy.log
do not exist in current N++ session. After closing N++ :
=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
works correctly=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
works correctly
Of course, all the previous cases happen if the current session contains, in addition, some tabs different from
change.log
ANDcopy.log
In the rare cases where the current session contains only the two files
change.log
andcopy.log
or one of the two or no file at all :=> The CMD command
...\notepad++ -pluginMessage=compare change.log copy.log
works correctly in all cases=> The CMD command
...\notepad++ -pluginMessage=compare copy.log change.log
works correctly in all cases
So, @pnedev, I suppose that you need to define the first file with the
Set as First to Compare
option and, probably, a newSet as Second to Compare
option, used internally, to define the second file, in order that theDOS
prompt command...\notepad++ -pluginMessage=compare Old_file.txt New_file.txt
always starts the comparison of the given files in all cases ?!Best Regards,
guy038
- The
-
@pnedev said in [New Plugin] ComparePlus v1.0.0:
Try removing the quotes from compare - run it like that:
–pluginMessage=compare
Sorry for the misleading info in the description, my bad.That works; thanks.
-
Hello @guy038 ,
You are right. The command line compare works correctly only in case there is no auto-restored session. Otherwise it might mess things up.
I’ll look into it for the next version, thanks.BR
-
Maybe also test with the N++ argument
-noSession
? -
Hi, @pnedev, @alan-kilborn, @yaron and All,
@pnedev, don’t bother about my previous post ! No need to investigate further about the provided cases. The solution was obvious ! Always use the syntax :
...\notepad++ -nosession -pluginMessage=compare Old_file.txt New_file.txt
BTW, @alan-kilborn, the parameter to use is
-nosession
( and not-noSession
) !Best Regards
guy038
-
@guy038 said in [New Plugin] ComparePlus v1.0.0:
the parameter to use is -nosession ( and not -noSession )
You’re right. However, I will take the opportunity to say that it is a bit odd that it is this way (all lowercase) when,
-openSession
(one I use often) is mixed case. -
@guy038 said in [New Plugin] ComparePlus v1.0.0:
don’t bother about my previous post ! No need to investigate further about the provided cases. The solution was obvious
I don’t know that I agree fully with that.
It seems reasonable to want to do a command line compare and start the compare automatically between the 2 files where the files are loaded into a running Notepad++'s current session.
Of course, a user doing this would probably want to close the 2 files when they are done analyzing the compare, to avoid the files remaining in the remembered session, but even that is not a certaintly.
I suppose
-nosession
is ignored if N++ is already running (with a session) and another command line invocation ofnotepad++.exe
occurs (without-multiInst
).Maybe that’s the ultimate solution for something like a “git difftool” solution using this new plugin capability: using
-multiInst -nosession -pluginMessage=compare
… -
-
@pnedev said in [New Plugin] ComparePlus v1.0.0:
Try removing the quotes from compare - run it like that:
–pluginMessage=compareSo is this actually a bug in the ComparePlus plugin?
(I don’t mean the--
part, which obviously should have just been-
, I mean the lack of quotes)From the description in the N++ user manual HERE, I’d say a correct argument looks like this:
-pluginMessage="compare filepath1 filepath2"
(And of course, if either of the filepaths contains spaces, then my brain is starting to hurt, but…)
Does it work without the double quotes because it must be used as the last argument on the N++ command line, and anything after
-pluginMessage=
is passed to the plugin and not looked at at all by N++?And how does N++ know that this specific one is meant for the ComparePlus plugin? Or does this same message get sent to all plugins? (that would strike me as “not a good thing”)