How can I diff two arbitrary files in my project?

I know how to diff two revisions of the same file, but how do I diff two arbitrary files in my project (which might or might not be under source control)?

7 comments
Comment actions Permalink

I found "Compare Two Files" in the context menu, but it doesn't work (nothing happens). I'll raise an issue.

0
Comment actions Permalink

for the time being you could use "compare with clipboard"  (you need to copy
content, of course)
-m

0
Comment actions Permalink

How to invoke "Compare With Clipboard"? Cannot find it.

Meanwhile I've also tried "Compare with Editor", but it doesn't work either (again nothing happens). I guess the problem is that whenever I right-click a file in Project View, the editor switches to that file too, so I'm always comparing the file to itself. Really frustrating.

0
Comment actions Permalink

copy something onto clipboard and than rightclick(context menu) > compare with clipboard.
or:
CTRL+SHIFT+A, select include none menu items(ALT+N),
and search for: clipboard

hth,
cheers

0
Comment actions Permalink

OK, "include none menu items" did the trick. I wonder why "Compare with Clipboard" is not shown in my context menu. (IDEA IU-94.273).

0
Comment actions Permalink

Oh, now I found it. It's in the editor's context menu, not the Project View's. Thanks for your help.

0
Comment actions Permalink

Just go to one of file content opened in the editor, select al, and then copy in the clipboard, Then open another file in the editor and call "Compare from Clipboard"from editor popup menu.

0

Please sign in to leave a comment.