Every time you save a snippet, Code Snippets stores a revision of it. If you make a change you regret, or a snippet stops working after an edit, you can go back to any earlier version.

Where to find revisions

Open a snippet in the editor. The revision history panel is in the editor sidebar.

What you can do

  • Compare versions — a side-by-side diff view shows exactly what changed between two revisions, with change navigation and a timeline.
  • Restore — one click brings back any earlier version of the code.
  • Delete — remove individual revisions you no longer need.

Managing revisions

Revisions are controlled in Settings:

  • How many to keep — a setting controls the maximum number of revisions kept per snippet. When the limit is reached, the oldest revisions are removed first. Set it to 0 to turn revisions off.
  • Per-snippet toggle — you can also turn revisions on or off for a single snippet.

What happens when a snippet is deleted

When you permanently delete a snippet that has revisions, a dialog asks whether to delete its revisions too, or keep them as a backup. You can remember your choice for next time, and a site-wide setting controls the default.

This feature requires Code Snippets Pro, 4.0 or later.