'IntelliJ IDEA compare tabs

I'm using IDE 10.5 Community edition.

In one project, I have multiple modules. I also have opened multiple tabs in the editor from different modules.

Is there a way to compare the content of two different tabs in the editor, which can be from different modules?



Solution 1:[1]

There is a plugin Compare Tab With Editor which may not have existed when this question was asked. I'm using it with IntelliJ 2017.2.

There is an updated version for IDE versions 2020.3 — 2022.1, Compare Tab With Editor 2.

Solution 2:[2]

One simple solution is the 'Compare with Clipboard' function (in your contextual menu - right click), which allows you to compare the contents of an editor tab with whatever is in your clipboard. As long as you can copy something, you can compare it against a file...

Solution 3:[3]

In 2019, select your file and "compare with editor" (which is your opened tab)

I use this to have a config file loaded in intelliJ (which is changed by the server, not stored in my project) and need to compare it to a baseline (in my project)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Darkyen
Solution 2 Brian Agnew
Solution 3 Qualaelay