Margin Rail

by marchrouter
5
4
3
2
1
Score: 50/100

Description

The Margin Rail plugin places heading markers along the edge of a note and highlights the current section while reading or editing. Hovering reveals heading labels with optional text previews and position information. Clicking jumps to a heading, dragging scrolls through the note and keyboard controls reach nested headings. Tracking can follow heading positions, divide scrolling by section length, give every heading an equal share or remain off. Presets and detailed settings control marker appearance, placement, hover effects and label animations. Section progress fills and fading for sections already passed provide further position cues. Heading bookmarks use the Bookmarks core plugin, which must be enabled for that feature. The rail works locally without network requests or usage tracking. It is hidden on phones by default, with options to show it in landscape or both orientations.

Reviews

No reviews yet.

Stats

0
stars
656
downloads
0
forks
12
days
10
days
10
days
1
total PRs
0
open PRs
0
closed PRs
1
merged PRs
0
total issues
0
open issues
0
closed issues
36
commits

Latest Version

11 days ago

Changelog

Fixes the bookmark icon fading on Mac after the iPad compatibility improvements in 1.2.3.

  • Keeps the bookmark icon at a steady opacity instead of inheriting Obsidian’s icon hover fade.
  • Preserves the same SVG during label refreshes, replacing it only when its bookmark state changes.
  • Keeps iPad pointer support and missing-icon fallbacks intact.

Includes the improvements from 1.2.3: more precise rail dragging, optional Mac trackpad haptic ticks (off by default), reliable iPad taps and rapid navigation, and correct active marks for closely spaced headings. No touch haptics are added.

Validated with the automated suite, Chromium/WebKit regression tests, and hands-on Mac and iPad testing.

README file from

Github

Margin Rail

Find your place in a long note without opening a sidebar. Margin Rail is a scrollspy: a slim set of heading markers along the edge of your note. Hover for a preview, click to jump, or drag to scroll. Works while reading and editing.

Margin Rail in action: scrolling, heading previews, and bookmarks

Watch the full video.

Install

In Obsidian, open Settings → Community plugins → Browse, search for Margin Rail, then install and enable it. You can also find it on the community plugins page.

Requires Obsidian 1.2.7 or later. Compatibility details below.

Download main.js, manifest.json, and styles.css from the latest release. Inside your vault’s .obsidian/plugins/ folder, create a folder with the name shown in the id field of manifest.json. Put the three files there, restart Obsidian, and enable Margin Rail in Community plugins.

Using the rail

Open a note with a few headings. Each small bar represents a heading, and the highlighted bar shows where you are.

  • Hover over a bar to see its heading. Labels can also show a short text preview and how far down the note the heading is.
  • Click to navigate to that mark using your selected tracking rule.
  • Drag up or down along the rail to scroll through the note.
  • Scroll or swipe over the rail to browse headings when the outline is taller than the pane.
  • Keyboard: Tab to the rail, use Up/Down or Home/End to select any heading, including nested headings, then Enter to jump. Escape dismisses the label.
  • Bookmark a heading with the button on its label. Click it again to remove the bookmark. Saved headings have a dot beside their bar.

Bookmarks use Obsidian’s Bookmarks core plugin, so it needs to be enabled. You can show or hide the bookmark button under Settings → Margin Rail → Labels.

Make it yours

Open Settings → Margin Rail to adjust the look and behaviour. Changes appear immediately in the live preview and your open notes. Start with a preset:

Preset What it looks and feels like
v2 · default Slim bars that grow near your pointer, with heading previews and a bookmark button.
Absolutely Claude-inspired styling: fine, widely spaced marks on the left with simple labels.
Quiet A subtle rail with simple heading labels.
Outline Indented bars and heading-level labels to show your note’s structure.
Progress Equal scroll shares, square marks with a hover swell, and section progress filling from right to left.

Use Normal for named choices for mark shape, length, spacing, emphasis, hover, labels, and placement. Advanced exposes individual sliders and exact numeric inputs. Both edit the same values: Normal shows a matching choice automatically, or Custom when the values do not match. Switching modes preserves your setup.

Hover options include Still, Swell, Heading badge, Focus (frame the pointed mark and dim its neighbours), and Dot (morph the mark into a circle). Advanced lets you tune the badge and dot sizes. Labels have separate Show and hide (None, Fade, Slide) and Between marks (None, Slide) animations, with speed choices in Normal and exact durations in Advanced. Label animations respect reduced motion. Absolutely uses Slide for both; Progress keeps both off.

Align marks to the left, centre, right, or the rail’s side. Section progress can fill from left to right, right to left, or outward from the centre.

Use Save as… to name a new preset. The preset options menu holds reset and delete actions. Changes to a preset show as Custom (unsaved) until you save them. Update appears after edits and saves over the preset you started from; use its dropdown to choose another saved preset. Updating a built-in creates a local copy. If the starting preset is unknown or was deleted, choose a destination before updating. Your phone visibility choice stays the same when switching presets.

How headings follow your scrolling

Choose a rule under Behaviour → Scroll tracking and try it with the preview’s scroll slider.

Setting What happens
Follow the note A heading becomes current when it reaches the top of the note area.
By section length Longer sections stay current for more of your scrolling. Every heading gets a turn.
Equal shares Every heading stays current for the same amount of scrolling.
No tracking Use the rail to navigate without highlighting a current heading.

With By section length, navigation places the heading 24px below the top of the note area when space allows. That same landing position starts its tracking range, which continues to the next heading’s landing position. Ranges follow the rendered layout, including wrapped text and images. Near the bottom, where a heading cannot reach the top, trailing ranges use the remaining scroll space. Short or empty sections borrow some scroll space from the preceding section, while keeping their headings visible. Their headings may therefore land lower. Very short notes may not have enough scroll space for distinct ranges.

Equal shares keeps equal portions of the scroll range for each heading; navigation prefers showing the heading within its assigned portion. Opening a heading bookmark from Obsidian or following a heading link uses the same landing rule as clicking a mark. Follow the note and No tracking keep Obsidian’s exact heading jumps.

Under Behaviour → Heading navigation, you can enable Place cursor at heading for editing mode and Briefly highlight heading for a fading destination highlight in either mode. Both are off by default and are independent of presets.

On Mac, Haptic ticks while dragging adds subtle trackpad feedback when a rail drag crosses a section boundary. It is off by default, stays independent of presets, and adds no feedback to clicks or ordinary scrolling. Requires a compatible Force Touch or Magic Trackpad with system haptics enabled. A small helper uses macOS’s built-in osascript and AppKit only during a drag; no extra binary or installation is required. Fast crossings are rate limited rather than queued. This option does not change phone behaviour.

While dragging with section-length or equal-share tracking, each mark’s pointer area maps to that heading’s scroll range. The label follows the selected section without animation lag, and each crossing has a brief landing detent and a small mark pulse. Fast dragging smoothly reduces the heading holds, pulses and haptic ticks; slowing down restores them without pulling the note backwards. Speed is measured in marks per second so rail spacing does not change the feel. Dense outlines bring the selected mark beneath the cursor; folded headings remain reachable during the drag. Reduced motion disables the pulse.

On touchscreens, taps select the mark originally pressed and long outlines scroll with a native swipe. Rail gestures do not trigger Obsidian’s pull-down command. Touch labels omit the quick bookmark button; using a mouse, trackpad, or keyboard restores it, including on iPad. Heading navigation uses precise pixel landings so closely spaced headings activate their own marks.

By section length is the default for new installations. Existing saved choices are preserved. Nested headings each start their own range.

Finish on the last heading highlights the final heading when you reach the bottom of a scrollable note. It works with any rule, including No tracking if you only want a highlight at the very end.

You can also highlight other headings that are on screen, fade sections you’ve passed, or let the current bar fill as you move through its section.

On your phone

The rail is hidden on phones by default. To enable it, go to Settings → Margin Rail → Placement → On phones and choose Landscape only or Show on phones. The settings preview is always available.

If the rail doesn’t appear

Check Placement: the rail can hide on notes with too few headings, narrow desktop or tablet panes, or phones. Run Margin Rail: Refresh rail and show status from the command palette to refresh it and see what might be keeping it hidden.

Still having trouble? Open an issue with your Obsidian version, device, whether you were reading or editing, and what happened.

Compatibility and privacy

Margin Rail works locally. It doesn’t send network requests or collect usage data.

Desktop testing includes Obsidian 1.12.7 and 1.14.4, and the plugin has also been tested on iPhone. Support back to 1.2.7 is based on checking that version’s code and APIs; it hasn’t been tested by hand on that version. Reports from older versions, Android devices, and tablets are welcome.

Scrolling and bookmarks rely on some parts of Obsidian that aren’t official plugin APIs. Those can change when Obsidian updates, so an update could affect these features.

Plain JavaScript and CSS; no build step. Run node scripts/verify.cjs for all checks. Optional browser layout and interaction checks use Playwright with an installed Chromium: node tests/browser/navigation.cjs. Set PLAYWRIGHT_MODULE to its module path if it is not installed locally. Touch regressions run in Chromium and WebKit with node tests/browser/touch.cjs (install both Playwright browsers). To release, commit on the branch tracking origin/main, then run node scripts/release.cjs <next-version>. GitHub Actions checks, attests, and publishes the plugin files.

License

MIT — you’re welcome to use, modify, and share it under that license.

Maintained by Mars-den.

Developed using AI assistance.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Pinboard Sync
5 years ago by Mathew Spolin
Obsidian plugin to sync Pinboard.in links to Daily Notes
Insert Heading Link
5 years ago by Signynt
Add a Link to a Heading.
Remember File State
5 years ago by Ludovic Chabant
A plugin for Obsidian that remembers cursor position, selection, scrolling, and more for each file.
Lapel
5 years ago by Liam Cain
🤵 Dress up your editor. Obsidian plugin to show the heading level in the gutter.
Scroll Offset
5 years ago by Lijyze
Scroll Offset for Obsidian
Filename Emoji Remover
4 years ago by Yüksel Tolun
A simple plugin for the note taking app Obsidian that will rename your files to remove emojis in their names.
Heading Shifter
4 years ago by kasahala
Easily Shift and Change markdown headings.
Short Internal Links to Headings
4 years ago by Scott Moore
An Obsidian plugin to display short internal links.
Audio Player
4 years ago by noonesimg
audio player plugin with bookmarks for Obsidian.md
Brainframe
4 years ago by pedersen
Floccus Bookmarks to Markdown
3 years ago by mddevils
Automatic Table Of Contents
3 years ago by Johan Satgé
💠 An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes
Go To Heading
3 years ago by join
Quickly navigate between your document's headings in Obsidian
Teleprompter
3 years ago by Lumetrium
Plugin for Obsidian designed to seamlessly integrate teleprompter functionality into your note-taking workflow.
Continuous Mode
3 years ago by Michael Schrauzer
Displays all open notes in a tab group as if they were a continuous scrollable document (similar to Scrivener’s "Scrivenings mode"). Open all notes in Continuous Mode from a folder, search results, or links in a file or Dataview/query block; use arrow keys to navigate between notes; display notes in "Compact Mode" similar to Evernote or Bear; more.
Sticky Headings
3 years ago by Shen Shen
Bearings
2 years ago by Jeet Sukumaran
An Obsidian plugin providing dynamically scoped tree views of multidimensional semantic and logcal archictectures of your vault.
Bookmarks Caller
2 years ago by namikaze-40p
This is an Obsidian plugin which can easily open bookmarks.
Headings in Explorer
2 years ago by Patrick Chiang
This Obsidian plugin makes headings first class concepts in the file explorer and consolidates navigation to a single panel.
Page Scroll
2 years ago by triski
Obsidian Page Up|Down|Top|Bottom
Heading Toggler
2 years ago by Lord Turmoil
Toggle heading levels in Obsidian
Recent Files
6 years ago by Tony Grosinger
Display a list of most recently opened files
Calendar
6 years ago by Liam Cain
Simple calendar widget for Obsidian.
Typewriter Scroll
6 years ago by death_au
Typewriter Scroll Obsidian Plugin
Hotkeys for Bookmarks
6 years ago by Vinzent
Journey
6 years ago by Alexis Rondeau
Discover the story between your notes in Obsidian
Zoom
5 years ago by Viacheslav Slinko
Collapse All
5 years ago by Nathonius
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
Number Headings
5 years ago by Kevin Albrecht
Automatically number headings in a document in Obsidian
Prominent Bookmarked Files
5 years ago by Jeremy Valentine
Prominently display starred files in Obsidian.md
Daily notes calendar
2 years ago by bartkessels
Quickly navigate your vault using a calendar view, this plugin allows you to create and navigate to periodic notes and notes that are created on a specific date.
Readeck Importer
2 years ago by Makebit
Import bookmarks from Readeck to Obsidian
Heading Decorator
2 years ago by dragonish
Implement displaying specific content around headings based on their levels.
Backlink Settings
a year ago by calvinwyoung
Countdown To
a year ago by Gui Cattani
A countdown/progress Obsidian widget using progressbar.js
Better Heading Hierarchy
a year ago by rogerfan48
a Obsidian plugin that add guide lines to make the hierarchy of Markdown headings more visually clear
Heading Helper
a year ago by Siddhartha Khuntia
Scrolling
a year ago by omeyenburg
Obsidian plugin to keep your cursor centered, disable code wrapping, remember position in a file, and more.
Scrolls To Nav Top
a year ago by mario
Simply scrolls to nav top
Drag To Scroll
a year ago by Constantine Sazonov
Adds drag-to-scroll functionality to Obsidian. Hold mouse button and drag - now you can scroll like on touch device!
Web viewer Bookmarks
a year ago by Stefan Danzl
Obsidian Plugin to create Bookmarks for internal Web Viewer
Scroller
a year ago by René Coignard
Adds typewriter mode, unfocused text dimming and commands to quickly scroll to the top or bottom of note.
My Typewriter Line
a year ago by dmo-code
Floating Headings
8 months ago by k0src
Displays a floating, collapsible outline of a note's headings on the right side of the editor. Expands on hover, click to navigate.
Negative Heading
7 months ago by Ashan Devine
Plugin for Adding Discord Style Negative Headings to Obsidian
Quick Switcher++
5 months ago by darlal
Enhanced Quick Switcher plugin for Obsidian.md
Sort and Permute lines
3 months ago by Vinzent
Sort and Permute lines in whole file or selection.
ReverySky Map
3 months ago by MoonSkorch Studio
Obsidian plugin rendering the vault graph as an interactive 3D star map with Unity WebGL
Barosaurus
3 months ago by polygonhunter
A command bar for Obsidian — one field for notes, commands, tabs, headings, bookmarks and tags, and every result can be acted on: rename, move, bookmark, format.
Mobile Sidebar Notes
2 months ago by ckep1
Open notes & new tabs in the sidebar on the Obsidian mobile app.
Heading View
2 months ago by 菅原ユリア
Linked Graph Navigator
2 months ago by woonyong-kr
Follow links from the current Obsidian note in written order, using a sidebar outline or graph.
Home Cards
4 days ago by ttangents
Home Cards plugin for Obsidian. Show a start page of note cards, in sections drawn from recent activity, properties, tags and links, styled by your active theme.