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 开发者_StackOverflow社区different modules?
Select two files (with pressed Ctrl) in project view panel → Right Mouse button →
Compare Files
.Right click on the file in project view →
Compare With...
(Ctrl+D)If you have opened one file in editor you can navigate in project view to another file and press right mouse button on that file
Compare with Editor
.It is possible to compare file against your clipboard content.
View
→Compare With clipboard
Also you can use idea as external diff tool
idea diff file1.txt file2.txt
Outdated; Old verison of IntelliJ: Also you can compare files from 'Commander' tab, just select two files in right and left panels, right click on any of them → Compare two files
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.
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...
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)
精彩评论