Skip to content

Save, undo, and recover edits

Edits stay in a copy of the file until you save them; see How editing works. A dot on the tab means it has unsaved edits.

Press Ctrl+S or choose File → Save. An edit still open in the inline editor or the subtree editor is applied first. JSON Digger replaces the file with your edited version and shows “Saved.”

If the file changed on disk while you were editing, JSON Digger asks “Overwrite the changed file?” first; see Files with unsaved edits.

If another program holds the file open, the save fails with a message that the file was not changed, and your edits are kept. Close the other program and save again.

If saving fails with “the original file was removed but the new contents could not be moved into place”, your edits are the only copy of the file, kept in the file the message names. Press Ctrl+S again and confirm Overwrite to put them in place, or save them under a new name with Save As….

To keep the original and write your edited version elsewhere, press Ctrl+Shift+S or choose File → Save As…, and choose a name. The new file opens in a tab of its own and the edited tab closes; the original file stays as it was.

Press Ctrl+Z (Undo Edit) to undo the last edit, and Ctrl+Y (Redo Edit) to redo it. The tree shows the node that changed.

Undo goes back one edit. To go back further, discard all the edits. Saving also clears the undo history, so check your last edit before you save.

To drop every unsaved edit, choose File → Discard Edits and confirm with Discard. The file on disk stays as it is, and the tab shows it again.

Closing a tab with unsaved edits asks “Save changes to name?”:

  • Save saves the edits, then closes the tab.
  • Discard and Close drops the edits and closes the tab.
  • Cancel keeps the tab open.

Quitting JSON Digger with unsaved edits in any tab asks once for all of them, and only offers Quit Without Saving or Cancel. To keep your edits, select Cancel and save each tab first.

If the original file no longer exists, for example because another program deleted it, closing the tab or quitting does not delete your edits. JSON Digger keeps them next to where the file was, named like config.recovered-….json, and when you close a tab, a message names the file.

If JSON Digger closes without saving, for example after a crash or a power cut, it asks about the edits the next time it starts: “Recover unsaved edits of name?”

  • Recover reopens the file with the edits, unsaved, so you can review and save them.
  • Open as Copy appears instead when the file changed on disk since. It saves the edits as a separate file next to the original, named like config.recovered-….json, and opens it.
  • Discard deletes the edits.
  • Cancel asks again at the next start.

If you select Cancel and then edit the same file, JSON Digger keeps the earlier edits as a separate file next to the original, named like config.recovered-….json, and a message names it.

If the file is on a drive that is not connected when JSON Digger starts, such as a USB stick or a network drive, JSON Digger asks about its edits at a later start, once the drive is connected again.