pnedev / comparePlus

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

[FR] Quick Switch / Flip #379

Closed Ghost-Terms closed 4 months ago

Ghost-Terms commented 4 months ago

(Forgive me if this is implemented in a way I haven't noticed, I did look.)

I'd like the ability to quickly flip the targets of "First to Compare" and "Compare", i.e. the left column and the right column switch places and now what was set as "Compare" is now "FIrst to Compare" and what was set to "First to Compare" is now "Compare".

This might be possible with some sort of custom command I'm not aware of (and I'd like to know what that command is if you'll indulge me), but regardless, I think it should be some something you can select within ComparePlus's submenu.

pnedev commented 4 months ago

Hello @ImportTaste ,

You can configure the default placing by going to ComparePlus Settings... (located in its submenu). I don't know if you consider this a "quick flip" but it is a one time configuration anyway that will affect each Compare until you change it again.

So in Settings you will find on the top-left Files Position section - it sets which file is put in the right panel on compare - the "new" or the "old". Just below that setting you'll find the Set as First to Compare section - it sets which file the command with the corresponding name selects - the "new" or the "old". So for example if Files Position is set to Old file in right view and the Set as First to Compare section is set to Set as old file then when you use Set as First to Compare on a file it is marked as the "old" file which means that it will go to the right view when you trigger Compare. If the Set as First to Compare section is set to Set as new file then when you use Set as First to Compare on a file it is marked as the "new" file which means that it will go to the left view when you trigger Compare (because Files Position is set to Old file in right view and your first is marked as the new one).

I hope it clears things up but you could play a bit with those two settings to get a visual idea of how they affect the files placement on compare.