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)?

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

0

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

请先登录再写评论。