Using IntelliJ to diff two arbitrary files

后端 未结 10 1509
感动是毒
感动是毒 2020-12-24 11:42

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

10条回答
  •  难免孤独
    2020-12-24 12:08

    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:

    1. Open the first file in the IDE (either by dragging from Windows Explorer into the window, or by File / Open).
    2. In the view menu, choose "Compare With…"
    3. In the "Select Path" dialog that appears, select the second file (either directly, or by dragging from Windows Explorer into the dialog).

    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.

提交回复
热议问题