ryu1kn / vscode-partial-diff

Visual Studio Code Extension. Take a diff of 2 parts of text(s)
https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff
MIT License
186 stars 16 forks source link

Feature Request: Compare two open tabs with single command #11

Closed kiddailey closed 6 years ago

kiddailey commented 7 years ago

Great extension, thank you! The only thing I wish this had was a command to simply compare two open tabs in a single step rather than having to set the selection for the first tab, then navigate to the second tab to perform the comparison.

In other words, a new command labeled "Compare Open Tabs" or similar that when selected, automatically compares the active tab with the next/nearest tab.

I'm not sure if this is even possible, but it would be awesome if it was :)

ryu1kn commented 7 years ago

Thanks for the suggestion and sorry for my slow response!

There seem to be some cases not too obvious how the command should work:

kiddailey commented 7 years ago

Maybe if more than two tabs are open, it simply does not perform the comparison and displays a message?

If you want to compare while more than two tabs are open in this case, you'll have to manually select the tabs as you do now.

hrvoj3e commented 6 years ago

When working in split screen mode (only two splits - left and right). Compare active tab on left side with active tab on right side - that is it - the most common case I have.

Hope this gets implemented soon.

ryu1kn commented 6 years ago

Maybe we can utilise the new QuickPick API introduced in the last VS Code release (v1.22) to choose 2 tabs.

Multi-Select QuickPick

We have added an option to the QuickPick API that makes return a list of picked items with a new UI that allows the user to pick any number of items:

https://code.visualstudio.com/updates/v1_22

ryu1kn commented 6 years ago

But if what we want is a single user action to compare the currently openend 2 tabs, we can introduce a command that only solves this very requirement.

ryu1kn commented 6 years ago

Landed as v0.6.0!