Skip to content

The Quiet Luxury of scratch.md

What is a scratch.md file? A simple trick to pin a distraction-free scratchpad in VS Code or any editor without polluting git.

dev-tools
workflow
writing
productivity
vscode

I first fell in love with scratch files inside JetBrains DataGrip.

When etching ad-hoc SQL queries (most days having fun in PostgreSQL, but occasionally wrestling whatever antique dialect was forged in 1992), the last thing you want is temp_query_v2.sql cluttering your git tree. You just need an uncommitted sandbox to test syntax.

Have you ever wondered what a scratch.md file actually is?

Think of it as digital scrap paper. It’s an unindexed, throwaway Markdown file pinned right inside your editor. No git commits, no naming anxiety, no complex note-taking system—just a clean buffer between raw thought and finished work.

You can set one up in 5 seconds in VS Code, Cursor, or Windsurf:

  1. Create a scratch.md in your project or home folder.
  2. Right-click the tab and select Pin (VS Code pinned tabs tuck neatly to the left and never get closed by "Close Others").
  3. Add scratch.md to .git/info/exclude so git never sees it.

Whenever a fleeting idea strikes or you need to draft a message, it’s already open and waiting.

Drop the needle, test the cut, wipe the deck.

DJ scratching vinyl record

Get new posts by email

New writing in your inbox. Unsubscribe anytime.