Remember recent undo-redo history for each recently opened note

usecase:
sequence: I have just cut (Ctrl+X) large piece of content, created link, copied link title, opened link (Ctrl+Click) (this saves actual version and forgets history of changes), pasted title, realized I do not have content in clipboard, navigated back to now irreversibly lost content.

Now I have motivation to implement some clipboard history solution but undo-redo history and/or parallel backup vault containing previous file versions would cover many more potential accidents. I could just open ‟backup vault” or ‟list of recent notes” (to be implemented) and retrieve what I destroyed.

Current workaround: (added 2021-06-09)

  • In last several months, “RealTimeSync” from FreeFileSync together with WinMerge allows me to visualize / restore changes between any two points in history of a file. I store old versions locally so they are always available and searchable.
  • Obsidian now has File recovery plugin.
16 Likes

related (overlapping) request: Remember position and undo history when switching between notes

I agree that Undo can be improved particularly around scenarios where multiple documents are being edited. I also just made this same mistake trying to cut something from one doc to another but ended up loosing what was in my clipboard.

I think what would solve this problem is to allow undo to work across multiple documents. Here is how I would expect it to work:

  • Open Obsidian
  • I make one edit on Document A
  • I move to Document B
  • I make one edit on Document B
  • I press undo, undo edit on Document B
  • I press undo again, move back to Document A (nothing is undone)
  • I press undo again, undo edit on Document A
  • Now all of my edits are undone
2 Likes

Along these same lines, In the Mac client, I’d like to see the cmd-Z and shift-cmd-Z undo/redo menubar functionality brought to Obsidian. I have accidentally deleted a block of text only to find the undo function does not do anything. The clipboard manager I use saves me from losing copied text, but the undo/redo functionality would be more broadly useful.

Thanks for your consideration!

@kbavier: in Obs on macOS +Z works, as does ++Z.

I just retried it and it does, in fact, work. I’m not sure why it wasn’t for me before. Most likely user error :slight_smile: Thanks for confirming.

1 Like

I was about to create this request, but found that it already exists (not in Bugs, but in a Feature Requests category)

I recently almost lost a part of my note. I deleted a piece of text, because I was almost sure it was duplicated in my other note. Then I switched to other note to double-check it, but it was not duplicated😱. When I returned back to my initial note, and was unable to undo. Thanks to cloud storages like Dropbox/OneDrive which store multiple copies of a single file for recent periods of time. If I worked with bare file system, I would have lost what I removed.

There was also another episode when I mixed up with hotkeys and removed the whole content of a note and then switched to other note which led to content loss.

Missing undo for each file I work with during a session is really disappointing. And for me, as a software developer used to work with IDEs, it is also counterintuitive. Obsidian writes changes to notes when you switch between them implicitly, and at the same time does not allow to undo your work. Intellij (which I mostly work with) also saves files implicitly, but you have an undo buffer working until you restart the app.

So this improvement would be really nice to have.

Simplenote has an excellent per-note edit history. In fact it’s a nice little slider at the top of the note. Just move the slider back and forward by notches and you can undo and redo all your edits.