I\'m really liking the IntelliJ diff tool. I\'m wondering if it is possible to use this tool to diff two arbitrary files. I.e. files NOT in an IntelliJ project. Just pick tw
Since 2018.2, IntelliJ has officially supported it:
For windows: Ctrl + Shift + A, then type "Open Blank Diff Window"
For Mac: Cmd + Shift + A then type "Open Blank Diff Window"
I have found even better way if you need to compare opened file with any arbitrary file on filesystem:
In order to compare two files that both aren't in the project, the following works for me in IntelliJ IDEA Ultimate 14.1.7 on Windows:
It then opens up in the traditional file comparison pane. If you try to edit one of the files, it presents the usual "Are you sure you want to edit a file that's not in your project" dialog, which one can accept if that's what one is trying to do.
Found this command line:
on MacOSX: (IDEA EAP 11)
/Applications/IntelliJ\ IDEA\ 11.app/Contents/MacOS/idea diff /Users/ben75/file1.txt /Users/ben75/file2.txt
On MacOSX it can't run when IDEA (11) is open.
on Windows: (IDEA EAP 12)
"C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0\bin\idea.exe" diff C:\Users\ben75\file1.txt C:\Users\ben75\file2.txt
It runs even if IDEA is already open.
I have trouble when trying to compare files with no extensions (or extensions that don't match )
Directly from IDEA (EAP 12)
Not so easy, but it works...