pnedev / comparePlus

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

Add the ability to compare the selected text with clipboard text? #295

Closed znsoooo closed 2 years ago

znsoooo commented 2 years ago

Sometimes there are two similar functions in a SAME file, and this function will be more convenient at this time. Or I want to compare just TWO similar functions in different files (but not OTHER functions in those files).

If can do better, do edit in comparison window, changes will be updated to the SELECTION AREA and CLIPBOARD synchronously.

pnedev commented 2 years ago

The new plugin ComparePlus (a successor of Compare) that I'm currently working on (and will soon be ready) has a feature to compare selections (just sections of two files).

About the compare against clipboard - it will be handy in your first use case when you want to compare sections from the same file. I'll see what I can do about that. But if I implement compare against clipboard, have in mind that the clipboard content will not editable (that is you will not be able to edit the clipboard part of the file).

znsoooo commented 2 years ago

@pnedev Amazing! I am looking forward to it.

pnedev commented 2 years ago

@znsoooo ,

Compare (selection) against clipboard is implemented and will be included in the release of ComparePlus plugin. I hope it will be out in a month or so.

Yaron10 commented 2 years ago

Hello Pavel,

Another great useful feature. 👍 Thank you for your work.

Two minor comments:

  1. When I first saw the Compare (selection) against clipboard command, I thought it would only work if there was a selection. I do understand your wording now, but I'm wondering if Compare against clipboard should not be better. (And elaborate in the user-guide).

  2. Wouldn't Clipboard does not contain any text to compare. be slightly more accurate than Clipboard is empty.?

BR

pnedev commented 2 years ago

Hello Yaron,

Thank you for testing it and for the feedback :+1:

About 1 - I would like to give a hint to the user with the command name (even if he/she haven't read the manual) that both selection and the whole file can be compared to clipboard. Does Compare file/selection against clipboard sound more clear or maybe File/selection diff against clipboard? Are those confusing as well?

About 2 - I think shorter message is better in that case, why do you think it is not appropriate? If clipboard contains copied image or some other object?

Thanks, BR

Yaron10 commented 2 years ago

Hello Pavel,

Compare file/selection to Clipboard or Compare (file/selection) to Clipboard would be great.

If clipboard contains copied image or some other object?

Yes. And it may be quite common.

Thanks again. 👍

BR

pnedev commented 2 years ago

Hello Yaron,

Changed as you suggested in the dev branch. Thanks. :+1:

BR

pnedev commented 2 years ago

Implemented/fixed and will be included in the first ComparePlus plugin release coming in a month or so.

Yaron10 commented 2 years ago

Thank you Pavel. 👍