Copy to, or create a Scratch File

Scratch files persist across all versions of IntelliJ IDEA

You can use ⇧⌘N (macOS) / Ctrl+Alt+Shift+Insert (Windows/Linux) to create a new scratch file. If you have content selected then the new scratch file will contain that content.

Related Resources

Expand and Collapse Code
Quickly view specific parts of a class by expanding or collapsing code
Move Statement
Move a statement up or down
Optimize imports
Remove unused imports from your code