Autosave Control

by Miha Smrekar
5
4
3
2
1
Score: 54/100

Description

An Obsidian plugin for overriding the default auto-save frequency.

Reviews

No reviews yet.

Stats

85
stars
9,416
downloads
3
forks
138
days
6
days
6
days
1
total PRs
0
open PRs
1
closed PRs
0
merged PRs
37
total issues
0
open issues
37
closed issues
107
commits

Latest Version

7 days ago

Changelog

Automatically created release for tag 1.0.20.

Release notes: -fix for #44: Custom Attachment Location named a pasted attachment after the heading from the note's last saved state, so a heading added or renamed just before pasting was ignored. To find the heading above the cursor, Custom Attachment Location saves the note itself and then reads the headings Obsidian has indexed from the file on disk. Autosave Control held that save like any other, so the index still described the old note. A save that another plugin asks for directly now goes through at once in Delayed Autosave mode, as it does without this plugin, using the same early write as the #43 fix. Obsidian's own save requests (clicking away from the editor, switching modes, the properties editor) are still held. Autosave Disabled mode still never writes anything on your behalf, so there the attachment is named from the last saved note until you save. -internal: added end-to-end tests that paste an image through the real Custom Attachment Location plugin in both save modes. The delayed-mode test was confirmed to fail without the fix.

README file from

Github

Obsidian Autosave Control

This plugin gives you full control over how Obsidian.md saves your notes.

By default, Obsidian saves every ~2 seconds while you type. While convenient, this behavior can cause issues such as:

  • Sync conflicts with cloud storage (e.g. Google Drive, Dropbox, Proton Drive, ...)
  • Performance problems with large files
  • Issues when working on network drives
  • Increased battery usage

This plugin allows you to change that behavior.

Modes

1. Delayed Autosave

  • You type normally.
  • The save timer resets on every edit (per file).
  • Obsidian saves once, only after you stop editing for the configured delay (by default 10 seconds).

This reduces unnecessary writes and avoids constant file updates.

2. Autosave Disabled

  • No automatic saving occurs.
  • Files are saved only when you manually trigger a save.
  • You must use the Save File command (assign a hotkey if needed).
  • Quitting Obsidian or closing its window with unsaved changes shows a warning that lists the affected notes.
  • Switching notes in a tab or closing a note tab does not prompt: your unsaved changes are kept in memory and restored when you reopen the note.
  • Hover the status-bar indicator to see the list of notes with unsaved changes.

Workspace Layout Saves

  • Obsidian also saves layout state to .obsidian/workspace.json.
  • Switching notes can update that file even when note content does not change.
  • This plugin can delay those writes too.

Status Indicator

The plugin shows save state in the status bar:

🔵 Blue — Unsaved changes pending
🟢 Green — All changes saved

Colors and the size of the icon can be customized in settings.

Settings

Save Delay

  • Defines how long Obsidian waits after you stop editing before saving
  • Only available in Delayed Autosave mode

Disable Autosave Completely

  • Turns off all automatic saving
  • Hides the delay setting
  • Requires manual saves

Defer workspace layout saves

  • Delays writes to .obsidian/workspace.json
  • Helps reduce sync activity when switching notes
  • Works independently of note autosave mode

Workspace layout save delay

  • How long to wait before writing deferred layout changes
  • Only used when Defer workspace layout saves is enabled
  • Separate from the note save delay

Saved status color

  • Status dot color when all changes are saved.

Pending status color

  • Status dot color while changes are not saved.

Status icon size

  • Size of the status bar dot in pixels.

Installation

Install from Obsidian Community Plugins directory

This plugin is available in the official Obsidian Community Plugins directory:

https://community.obsidian.md/plugins/autosave-control

  1. In Obsidian, open Settings -> Community plugins.
  2. Select Browse.
  3. Search for Autosave Control.
  4. Install the plugin.
  5. Enable the plugin.

Install with BRAT

This plugin can be installed and auto-updated with BRAT (Beta Reviewers Auto-update Tester):

  1. In Obsidian, install BRAT from Settings -> Community plugins -> Browse.
  2. Open the command palette and run BRAT: Plugins: Add a beta plugin for testing (with or without version).
  3. Enter this repository path: mihasm/obsidian-autosave-control
  4. Choose Latest version if you want BRAT to keep the plugin updated automatically.
  5. Confirm the install.

BRAT installs the plugin from this repository's GitHub releases and can update it for you later.

Manual install

  1. Download the latest release from GitHub:
    https://github.com/mihasm/obsidian-autosave-control/releases

  2. Create this folder in your vault if it does not exist: your-vault/.obsidian/plugins/autosave-control

  3. Download main.js, manifest.json, and styles.css from the release and place them in that folder.

  4. In Obsidian:

  • Open Settings → Community Plugins
  • Enable the plugin

Important Notes

  • Unsaved changes are kept in memory until written to disk.
  • If Obsidian or your system crashes before saving, changes may be lost.
  • If workspace layout deferral is enabled, recent layout state can also be lost after a crash until workspace.json is flushed.
  • Some Obsidian features and community plugins only update after a save occurs. For example, the Outline (headings) pane on the right won't reflect new headings until the autosave fires. Because this plugin delays or disables saves, expect similar lag in any feature or plugin that reacts to file writes rather than in-editor changes.
  • On mobile, force-killing Obsidian within a fraction of a second of editing can lose the last edit — a platform limitation the plugin can't fully prevent.
  • Plugins that rewrite a note directly on disk (Frontmatter Modified Date, Linter, Templater, sync clients, ...) read the file, not your editor, so while a save is held they would otherwise work from an outdated copy. In Delayed Autosave mode such a rewrite first flushes that note's pending changes, so it reads what you actually have on screen — one write earlier than the delay alone would have made. In Autosave Disabled mode nothing is ever written on your behalf: Obsidian merges the change into your editor instead and your note stays unsaved until you save it.
  • Some plugins save the note themselves right before reading it — Custom Attachment Location does this to name a pasted attachment after the {{heading}} above the cursor. In Delayed Autosave mode such a save goes through at once, as it would without this plugin. In Autosave Disabled mode it is held like any other save, so the plugin sees the note as last saved; press Ctrl/Cmd+S first when that matters.

Testing

  • Run npm install.

Desktop:

npm run wdio:desktop

Android:

npm run wdio:android

All tests:

npm run wdio

One test:

npx wdio run ./wdio.conf.mts --spec ./test/specs/autosave-control.e2e.ts --mochaOpts.grep "stops typing and waits for exactly one save after the configured delay"

License

MIT — see LICENSE