Select two files (by pressing Ctrl) in the project viewing panel → Right mouse button → Compare two files.
You can also use the idea as an external demarcation tool idea diff file1.txt file2.txt
UPDATE: you can also compare files from the Commander tab, just select two files in the right and left panels, right-click on any of them → Compare two files
source share