Create a Scratch File from Selection
Create scratches faster and get the contents you want to test pre-populated.
Select a portion of the code, press ⌘⌥⏎ (macOS) / Ctrl+Alt+Enter (Windows/Linux), then choose Create new scratch file from selection to quickly create a new scratch containing the same code.