As someone who likes to keep his notes database clean and organized, I often delete empty or no longer useful notes (Ctrl+Shift+Del). Often, when I do this too fast, I accidentally delete the wrong note, and immediately hit Ctrl+Z in attempt to recover the file from my Recycle Bin, to no avail.
Proposed solution
Since Ctrl+Z is used for Edit Mode undos, I suggest Ctrl+Shift+Z to undo all file movement / deletion related actions (similar to Mac/Windows file navigation behavior). For example, this feature would quickly remediate the following: dragging and dropping files into wrong folder, deleting the wrong note / folder, perhaps even creating a new note by accident?
Current workaround (optional)
I currently have to go to my recyble bin, look for and recover the said file.
You may want to look into using software revision control like âgitâ. I believe there is a plug-in called obsidian-git that helps automate this process.
I have tried several community plugins (for other purposes) and from my experience those can sometimes be a little buggy.
Just curious if there is sufficient community support to warrant this feature as âdefault-behavior-worthyâ to be included in future releases. Or at least added as a Core Plugin. Thanks for the response.
Set up: I have Obsidianâs âDeleted filesâ configured to âMove to system trashâ, and env is Mac OSX Catalina with Obsidian 0.9.15.
Use-case: If 1) I accidentally delete a file from within Obsidian (either by right-clicking -> Delete or by keyboard shortcut, and then 2) I press cmd+z or select âEdit -> Undoâ, nothing happens.
If I go to the systemâs trash and I right click on the deleted note, the usual âPut backâ menu option isnât there and I canât double-click to open the file and copy-paste the contents because you canât open files while theyâre in OSXâs system trash.
Proposed solution
Make Undo and cmd+z actually undo delete file operations if the file still exists.
Make files sent to the systemâs trash have a âPut backâ menu option so that itâs easier to recover them if for some reason you canât recover them from within Obsidian.
Current workaround (optional)
I have to open the systemâs trash and manually move the file to my vault.
@juan Iâm glad we are on the same page on this. I now have the deleted files moved to Obsidian trash (.trash folder) option enabled in my settings, just as a safeguard in case I delete something valuable to my (frequently emptied) recycle bin.
Use case or problem
A new problem now arises, as for some reason, â.trashâ folder does not show up in the file explorer panel on the left, nor does it show up in Ctrl+O searches.
Proposed solution
Display â.trashâ folder in file navigation panel. And make Cmd+Z / Ctrl+Z undo file deletion, similar to my initial post.
I may be a little obtuse (no comments necessary), but why is there an option for sending deleted files to a â.Trashâ if there is no way to access the folder by the User? Or maybe the question should beâŚWhy can I not Recover a deleted file when selecting the UI option âMove to Obsidian trashâ?
I am with you on this as well. The UI is not great.
But the current stop-gap solution at least keeps my accidentally deleted notes âsafeâ, where I can retrieve it manually via file browser if I ever needed to.
I find a third-party solution for that:
you can use google drive to sync your Vault Folder , then when you Try to delete any files in your vault itâs automatically go to google drive trash and you can restore theme easily .
Thanks Issam. I prefer to not add an external dependency like that because it introduces a host of sync issues. For now Iâm relying on both Obsidian Sync and a .git repo within the vault. Itâs not a great experience and Iâm still hit by this issue (yesterday for example), but I can manage until we have undo delete file.
This seems like a pretty obvious and basic feature and I wonder why it isnât there yet?
A simple app like Notes (Mac) allows us to recover a deleted note.
Itâs the kind of workflow that any user would expect from the Undo.
Also, I just noticed that if we use Undo after renaming a note, that wonât undo the renaming of the note (which it should), but it just undoes whatever editing we did on the note itself, which is weird as well.
Please add / fix these things. It shouldnât be expected that user re-learns something that is common in other apps, as well as having to find workarounds for something that should be native.
This link has the technical answer for why âmoving a file to ~/.Trash doesnât give macOS the right metadata to âPut Backâ the file from Finderâ
It looks like Obsidian, (or possibly a plugin) would need to also edit ~/.Trash/.DS_Store â but Iâm unsure if this is supported for third-party appsâŚ
Third party apps can and should be able to use trash the same way finder does. There are three ways to put items in trash in mac:
put it in a folder used for Trash by OS - this was once ~/.Trash, but this folder doesnât exist since a few macOS versions ago ⌠not sure where it is now or if its advisable to use even
use main system API for this - documented, works, but no put back option
use Finderâs own API - documented, works and has Put Back option
Its quite feasible and even correct macOS app development to use option 3!
Iâm bumping this: Iâm sorry, but this is not intuitive.
There should be a command: âUndo Move to Trashâ, which move back the most recently deleted note to itâs original location.
There should be an Undo History chain of X amount of notes (preferably 100) so that trashing several notes in a row will place them back in their last location in reverse. The use case for this is if you accidently delete a note and then delete additional notes: itâs sometimes faster to just undo the chain of deletions to reach back to the note you want to recover, and then re-delete all of the following. Instead of finding the .trash-folder in the file handler, finding the original location and then manually move back the note.
This is how every note taking app Iâve ever used works, itâs how all major file handlers, macro softwares, IDEs, etc work.
The file handling in Obsidian needs an overhaul to correspond to how files are handled in a normal way. Not a âsmarterâ way, or whatever someone thought of.