pnedev / comparePlus

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

Option to bookmark modified and/or unique lines #338

Closed jsimon1080 closed 1 year ago

jsimon1080 commented 1 year ago

I would like to suggest an enhancement. It would be really nice if we could bookmark modified or unique lines after doing the comparison. This would make it possible to copy/cut bookmarked lines after and save the changes in another text file.

Keep up the good work!

Carm01 commented 1 year ago

+1 a good idea to copy the differences as it is needed badly IMO

jsimon1080 commented 1 year ago

BTW, I found a trick using macros to do it!

1) Set the ComparePlus plugin to show only differences. 2) Go at the beginning of the file and start recording a macro. 3) Hit the DOWN arrow and then CTRL-F2 to put a bookmark on the first line that is changed. 4) Stop recording the macro. 5) Select "Run a Macro Multiple Times" in the Macro menu. 6) Select "Run until the end of file" and hit Run!

It would still be nice if ComparePlus could integrate the feature, but at least this works in the meantime. ;)

Carm01 commented 1 year ago

That is a nice work around honestly, a built in function would be very nice indeed. I been playing with this and I noticed that if the difference is on the first line it does not exactly work correctly. see my test files; unless i am missing something but the macro is simple test-1.txt test-2.txt Capture

jsimon1080 commented 1 year ago

If the first line is shown as being modified, you have to hit CTRL-F2 before the DOWN arrow (inverse steps 2 and 3) when recording the macro. ;)

pnedev commented 1 year ago

Hello guys,

I have added commands to bookmark diff lines as requested and they will be available in the next plugin official release but meanwhile you can use these development builds: 32-bit / 64-bit

Please have in mind that these builds are made for Notepad++ version 8.5.6 (latest to date) and higher (on lower versions there will be an annoying message on Notepad++ startup). These builds also contain new features and fixes that might lead to regressions (or at least to changed functionalities).

I'm closing this issue now but please feel free to comment here if you need further assistance.

BR

Carm01 commented 1 year ago

VERY NICE

Yaron10 commented 1 year ago

Hello Pavel,

The implementation is beautiful. 👍 Thank you again for your hard work.

BR

pnedev commented 1 year ago

Hello Yaron,

Thank you.

BR

jsimon1080 commented 1 year ago

Thank you very much for the awesome update! :)