Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 436
kovica Avatar asked Jun 17 '11 07:06

kovica


People also ask

Can we compare 2 files in IntelliJ?

IntelliJ IDEA lets you compare two files, one of which is present in the right folder, and another one in the left even though such files are treated as different entities.

How do I show diff in IntelliJ?

To open the Diff & Merge page, open settings by pressing Ctrl+Alt+S and navigate to Tools | Diff & Merge. Click this button to scroll both differences panes simultaneously. If this button is released, each of the panes can be scrolled independently.

How do I switch between tabs in IntelliJ?

Switch between tabs To move between tabs, press Alt+Right or Alt+Left . You can also switch between recently viewed tabs or files. In the editor, press Ctrl+Tab .


1 Answers

  • 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. ViewCompare 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

like image 163
Igor Konoplyanko Avatar answered Sep 22 '22 15:09

Igor Konoplyanko