Lucas66 downloadsSave drafts of a note and see what changed between them. Get back passages you cut, and restore any earlier draft.

Save drafts of a note without leaving Obsidian, and see what changed between them, what you cut, and any earlier draft you want back.
A pentimento is an earlier brushstroke showing through the paint on top of it. The plugin keeps your earlier drafts the same way: out of sight until you want them.


Each draft is a copy of the note in a hidden .history/<note>/ folder beside it, with a summary of each draft in meta.yml. Move or rename the note and its drafts go with it. Everything is plain text and can be read without the plugin. Syncthing, iCloud, Dropbox, and git carry the drafts with the rest of your vault; Obsidian Sync doesn't (see below).
The first draft adds three properties to the note: Pentimento, Current Revision, and History Folder. Saving a draft edits only those three lines, so your own properties stay exactly as you wrote them. (It edits those lines directly instead of through Obsidian's processFrontMatter, which would rewrite the whole properties block in its own format.) When the note is open, the cursor stays where it was and a restore can be undone with Cmd/Ctrl+Z.
The plugin reads and writes the .history folders through Obsidian's file adapter, because Obsidian's vault index leaves out hidden folders. It never touches files outside a note's own history folder, the note itself, and its own settings.
Obsidian Sync skips hidden folders, so drafts in .history stay on the device that saved them. Turn on Sync drafts with Obsidian Sync and new notes keep their drafts in a visible _history/<note>/ folder instead, which Sync carries. When you turn it on, the plugin offers to move the drafts of notes that already have some, and "Move all drafts to the folder chosen in settings" does the same later (or moves them back when you turn it off).
Because _history isn't hidden, Obsidian treats the saved drafts as notes:
_history to Settings → Files and links → Excluded files to keep them out of those._history excluded, so an old draft's links point at the new name. The plugin itself never treats a saved draft as a note.rNNN.md and meta.yml, and Sync can't keep both.The command-line tool follows this setting for notes in the same vault.
Drafts use the same format as the Pentimento command-line tool, so you can use either, or both, on the same notes.
_history instead of the hidden .history. See With Obsidian Sync.Until the plugin is in Obsidian's community list, download main.js, manifest.json, and styles.css from the latest release into <your vault>/.obsidian/plugins/pentimento/, then turn Pentimento on in Settings → Community plugins.
From source:
pnpm install --frozen-lockfile
pnpm run build
pnpm run install-vault "/path/to/your vault"
pnpm run dev rebuilds on change.pnpm test builds the plugin and runs test/harness.mjs, which loads the built main.js against a small fake of Obsidian's API and walks a note through saving, editing, restoring, daily drafts, and removal.pnpm run lint applies Obsidian's own review rules (eslint-plugin-obsidianmd).The draft format (saving, reading, restoring, the diff, cuttings) comes from the pentimento npm package, where it is tested against the command-line tool's own output.
To release, bump the version in manifest.json, package.json, and versions.json, add a CHANGELOG.md entry, and push a tag with the bare version (0.3.1). CI builds the plugin and publishes the GitHub release Obsidian installs from.