by senjanson
Remembers scroll and cursor position for every note across all tabs. Restores all open tabs on app restart — great for mobile.
Scroll Anchor
An Obsidian plugin that anchors your scroll and cursor position in every note, and restores them all when the app restarts.
Features
- Per-file position memory: Independently saves cursor and scroll position for each note
- Multi-tab restore: All open tabs restore their positions on app restart, not just the last active one
- Reading mode support: Saves and restores scroll position in both editing and reading modes
- Mobile-first design: Aggressive save strategy for iOS/Android where the app may be killed by the system — you never lose your reading spot
- Configurable: Adjustable save interval, restore delay, and maximum stored entries
How It Works
Positions are saved to a JSON file inside your vault. Saving happens:
- Continuously while you read (every 100 ms for the active tab, and as soon as you stop scrolling)
- When switching between tabs
- When the app goes to background (critical for mobile)
- On app quit, and when the plugin is disabled or updated
Positions are written to disk every 2 seconds (the Save interval), and only when something changed. The file is written safely, so a crash or a killed app never leaves you with an empty file.
When the app restarts, every previously open tab is restored to its saved position.
Only notes where you scrolled or moved the cursor away from the top are remembered. Entries for notes that were deleted, even outside Obsidian, are cleaned up automatically.
Sync
If a sync tool copies the data file between devices (iCloud, Syncthing, Dropbox and other tools that sync the whole vault folder), the plugin notices when the file is replaced by another device's copy and merges it with the positions saved on this device, so each device sees the positions you read on the others.
Obsidian Sync does not sync the data file: inside a plugin's folder it only syncs main.js, manifest.json, styles.css and data.json. With Obsidian Sync, each device keeps its own positions.
Installation
Method 1: Community Plugins (Recommended)
- Open Settings → Community plugins and turn off Restricted mode if it is on
- Click Browse, search for Scroll Anchor, then click Install
- Click Enable
Updates arrive through Settings → Community plugins → Check for updates.
Method 2: BRAT (beta versions from GitHub)
BRAT is a community plugin that lets you install and auto-update plugins directly from GitHub.
- Install BRAT from the Obsidian Community Plugins directory
- Open Settings → BRAT → Add Beta plugin
- Enter the repository URL:
https://github.com/senjanson/obsidian-scroll-anchor - Click Add Plugin
- Go to Settings → Community plugins and enable Scroll Anchor
To update later: open Settings → BRAT → Check for updates to all beta plugins.
Method 3: Manual Installation
- Go to the latest release and download
main.jsandmanifest.json - Create a folder
scroll-anchorinside your vault's.obsidian/plugins/directory - Copy the two downloaded files into that folder
- Restart Obsidian and enable Scroll Anchor in Settings → Community plugins
Settings
| Setting | Description | Default |
|---|---|---|
| Data file name | Path to the JSON file that stores positions (empty uses the default) | .obsidian/plugins/scroll-anchor/cursor-positions.json |
| Delay after opening a note | Delay before restoring scroll position, 0–300 ms (increase if interfering with #header links) | 50 ms |
| Save interval | How often positions are flushed to disk, 2000–20000 ms | 2000 ms |
| Max entries | Maximum number of file positions to remember | 1000 |
Compatibility
- Obsidian v0.15.4+
- Desktop (Windows, macOS, Linux) and Mobile (iOS, Android)
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.