Disable auto-save or change frequency

Use case or problem

Paradoxically the auto-save feature is something that makes it much more likely to lose data than not having auto-save. I’m always anxious when I move text between files, thinking “let’s just hope the app won’t crash now”. After using Obsidian for 2 months, I finally lost a note to this. Instead of hitting Ctrl+X, I hit X, didn’t notice, moved to a new document and I couldn’t paste the data. I go back to the previous file, there’s an ‘x’ in place of the notes, it was auto-saved and there’s no undo.

Personally, I find it a bit odd that the feature is there and not just let the user hit Ctrl+S. I have been using Brackets before Obsidian for managing personal notes. It was really convenient to just know if a file has been saved or not and know that the file gets saved only when Ctrl+S and Ctrl+S is just something so simple you don’t think about it - I have been Ctrl+S for the first 2 weeks of using Obsidian just out of a habit.

Proposed solution

Add a feature to turn off auto-save and add an indicator whether a file is saved or not.

Alternatively, track undo history for the last 20 files or so. Also tracking the cursor position in the last 20 opened files would be great - sometimes I go back to the same file and have to scroll down again.

On another note, this is a great app. Thank you for making it. It really has transformed my note-taking process for the better.

37 Likes

As long as you don’t close your note, you can always go back and use ctrl + z in order to undo the last changes. Thus, when cut/pasting content from one note to another, just open them side by side - so there wouldn’t be the risk of losing content (of course - if the app crashes just the moment after cutting content from one note, then this content would be lost - but in this case you would additionally lose a couple more of your last changes without an autosave option…).

Most of the time undo works well, but I’ve lost some (small) bits in a similar way - I don’t have the precise steps that stop undo from working, but sometimes it does.
I feel like the solution is to make undo more robust and maybe autosave the undo stack also, not turn of auto-saving. That’d be so scary!

1 Like

I’m not downplaying you request, just a more resilient solution suggestion: have a backup with history support that is always automatically running, that way once you noticed the missing data you could navigate the history for that .md file and restore the information. On the Mac Time Machine can do that for you, if you don’t want an external drive Backblaze (for Windows too) is an excellent online backup that I have used for years and gives you history per file. Of course there are a lot of other backup options.

1 Like

Yes, a more resilient undo would be great - e.g. to store the undo history on disk for the last 10 - 20 open files.

For me personally, the auto-save is scary. As a developer, I’m used to the code editor not auto-saving files (it would be terrible if it did). There’s a very clear indicator of whether the file is saved or not. Ctrl+S is very quick and it becomes a second nature you don’t ever question. It’s like, I hit Ctrl+S whenever I want to save the file, instinctively, and never in my life did I lose something because I forgot to hit Ctrl+S (I’m in the field for 6 years) - compare that with losing a big chunk of data after using Obsidian just after 2 months of use. It should be at least an opt-in feature or an extension.

I thought about using some kind of automated backup, e.g. a Git repo and a script that makes commits every day, however, this is some work to setup. For now, I will be more careful and copy text instead of cutting it. This is more like a feature request for the future. Please consider adding an official extension to disable auto-save and add indicators whether a file is saved or not (like any text / code editor have).

1 Like

FYI You might like the new File Recovery added in v0.11.17 :grin: (not exactly a manual save option but might make you feel better)

1 Like

I want this features too , auto-saving always cause trouble to synchronizing, even provide an auto-save interval option would be better.

6 Likes

I want this feature too. I use it with Hugo, and often saving make a huge loading on CPU when Hugo Server is started. Currently, I need to stop Hugo Server during editing.

The auto save is very annoying. I constantly see my sync drive updating the file I’m working on as I type. I don’t want to save my notes all the time and I need a proper undo.

Obsidian needs to bite the bullet and allow for disabling of auto save, perhaps at first making it save only when switching files. Longer term, a proper cache for all files that allows proper undo and user-controlled saving is really important.

5 Likes

I’d like to up this request as well.

Auto-save can be INCREDIBLY destructive when using Obsidian as a collaborative tool - my friend and I are currently tied to Scrivener for a writing/comic project because it’s more robust and can be shared via dropbox on all devices. I want to move us to Obsidian, but this sort of feature keeps us from fully migrating our projects over.

I’ve also had issues with the auto save feature randomly creating new duplicate documents that cannot be deleted. Can’t tell you how many times I’ve had to duplicate my vault in another folder to resolve these kinds of issues that auto-save creates.

Been using the program for about a month all told and I love it, this is just one very unfortunate sticking point for me.

2 Likes

There is kind of a workaround :adhesive_bandage: for this: use an external app for editing (VSCode, Notepad++, Typora, etc.), Obsidian for reading.

Tip You can quickly open external app with “Open in default app” option or command (enable in core plugins).

Also I’m unable to find a plugin to control auto-save, probably because obsidian plugins API isn’t capable of it (yet?).

1 Like

FYI. There is now a “Switching between files will now keep the undo/redo history for the last 20 files, unless the file was changed externally. Not available for the legacy editor.” feature implemented in Obsidian.

5 Likes

I would also like something like this.

It doesn’t have to be an on/off thing, but maybe a way to tune the frequency? E.g. auto-saving each X minutes, or after writing Y number of characters.

But I would also welcome a simple on/off switch.

1 Like

For my use case it would also be helpful if auto-save could be changed on a per folder basis.

Just a quick idea:

  1. Obsidian core: Add just a basic ability to toggle auto-saving on or off. Just a simple switch, affects the whole vault.
  2. Provide an API for plugins to change the auto-save option on a per-file (or per-pane) basis. Then community plugins can build more sophisticated solutions for controlling auto-save based on folder, time, keypresses, or whatever rule.
5 Likes

I just want to support this request; I think the autosave is quite a frustrating feature due to the amount of disk and cloud writes it generates.

Ideally one could set an auto-save interval, but to be honest, I would prefer no auto-save at all over the way it is implemented at the moment so even a simple on/off switch would be appreciated.

Since there was a bit of talk about save history in this discussion, I thought I’d include this link: Clipboard data loss prevention through history states

Thanks.

I want to have an option to set when to do the auto save action, like deactivate the window/some time later like stuff, thanks!

1 Like

I support this feature request too, because auto-save creates unnecessary disk write (worn SSD) and network traffic (I sync the vault with cloud storage)

4 Likes

I wonder if there is any official indication whether disabling autosave and/or setting autosave frequency might be implemented in the future (however long it takes to work out), or the 2s autosave is a conscious and final design decision. There’s enough threads about it in the FR forum already, but I don’t think I’ve ever seen a response from the devs.

Obsidian is an excellent piece of software otherwise and I understand the logic in promoting its own sync solution but I feel like this particular way to do it is creating a lot of issues (collaboration problems, sync problems, unnecessary disk writes, data loss…). For sure there are workarounds to all, other than the disk writes, but they could also be fixed at root by allowing users to choose when or how often they save their files.