1 min read
Compare out-of-context files using IntelliJ IDEA

To compare two pieces of text or code outside a project context using IntelliJ IDEA, follow these steps:

  1. Create a scratch file:

    • Go to File | New | Scratch File or press Ctrl + Alt + Shift + Insert.

    • Alternatively, in the Project tool window, right-click any area and navigate to New | Scratch File.

  2. Paste the text you want to compare into the scratch file.

  3. Now you can copy the text you want to compare against.

  4. Right-click in the scratch file and select Compare with Clipboard.

Source: https://www.jetbrains.com/help/idea/scratches.html