Scroll Anchor

approvedunreviewed

by senjanson

Remembers scroll and cursor position for every note across all tabs. Restores all open tabs on app restart — great for mobile.

★ 2 stars↓ 749 downloadsUpdated 6d agoMIT

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)

  1. Open Settings → Community plugins and turn off Restricted mode if it is on
  2. Click Browse, search for Scroll Anchor, then click Install
  3. 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.

  1. Install BRAT from the Obsidian Community Plugins directory
  2. Open Settings → BRAT → Add Beta plugin
  3. Enter the repository URL:
    https://github.com/senjanson/obsidian-scroll-anchor
    
  4. Click Add Plugin
  5. 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

  1. Go to the latest release and download main.js and manifest.json
  2. Create a folder scroll-anchor inside your vault's .obsidian/plugins/ directory
  3. Copy the two downloaded files into that folder
  4. Restart Obsidian and enable Scroll Anchor in Settings → Community plugins

Settings

SettingDescriptionDefault
Data file namePath to the JSON file that stores positions (empty uses the default).obsidian/plugins/scroll-anchor/cursor-positions.json
Delay after opening a noteDelay before restoring scroll position, 0–300 ms (increase if interfering with #header links)50 ms
Save intervalHow often positions are flushed to disk, 2000–20000 ms2000 ms
Max entriesMaximum number of file positions to remember1000

Compatibility

  • Obsidian v0.15.4+
  • Desktop (Windows, macOS, Linux) and Mobile (iOS, Android)

License

MIT

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.