A plugin for Obsidian that syncs your fold states across devices by storing them in your plugin settings.
Obsidian stores fold states in localStorage, which doesn't sync across devices. This plugin solves that by:
- Storing all fold states in the plugin's
data.jsonfile (which syncs with your vault) - Automatically syncing changes as you fold/unfold content
- Restoring fold states when you open files on different devices
- On plugin load: Imports existing fold states from settings to localStorage (or exports current localStorage state if no folds are saved)
- When you fold/unfold content: Automatically saves the change to settings (debounced to 150ms)
- When settings change externally: Automatically detects and syncs changes to localStorage
- Apply fold info to active leafs if fold state is changed externally (synced)
- Open Settings → Community Plugins
- Search for "Sync Folds"
- Click Install, then Enable
- Download
main.js,manifest.jsonfrom the latest release - Create a folder
VaultFolder/.obsidian/plugins/sync-folds/ - Copy the files into that folder
- Reload Obsidian
- Enable the plugin in Settings → Community Plugins
The plugin stores fold states in .obsidian/plugins/sync-folds/data.json, which syncs automatically with:
- Obsidian Sync
- iCloud
- Dropbox
- Git
- Self-hosted syncing solutions (Syncthing, CouchDB, etc.)
- Any other file syncing solution you use
Just make sure the plugin is installed and enabled on all devices!
- Export Folds from Local Storage: Manually export all current fold states to settings
- Import Folds into Local Storage: Manually import fold states from settings to localStorage
MIT