Skip to content

SATOSprod/pins-save

Repository files navigation

Pins Save

Obsidian plugin that remembers which Markdown tabs you pinned and automatically re-opens and re-pins them every time you restart Obsidian.

Author: SATOSprod
License: MIT — see LICENSE


Why Pins Save?

Obsidian does not remember pinned tabs between restarts. Pin five notes you are actively working on, close the app — or it crashes, or your system reboots — and the next time you open Obsidian, those tabs are gone and everything is unpinned again. Pins Save fixes that by tracking every pinned Markdown note and restoring it automatically.


Features

  • Auto scan in background — while you work, the plugin listens for pin/unpin actions and saves the list automatically, with no manual step required
  • Auto restore on startup — when Obsidian loads, every previously pinned note is reopened as a pinned tab, exactly as you left it
  • Rename-safe — if a pinned file is renamed or moved, the saved path is updated automatically so the pin is never lost
  • Delete-safe — if a pinned file is deleted, it is automatically removed from the saved list on the next scan
  • Manual actions — three on-demand commands in the Command Palette:
    • Scan pinned tabs now — force an immediate save of the current pinned notes
    • Restore pinned notes now — force an immediate reopen/re-pin of all saved notes
    • Clear saved pinned notes list — remove all saved entries without touching open tabs
  • Status panel — live list of every note path currently tracked
  • SVG icons, no emoji — clean, consistent settings UI

Requirements

  • Obsidian 1.7.2 or later
  • Works on desktop and mobile

Installation

From source

# 1. Clone the repository
git clone https://github.com/SATOSprod/pins-save.git
cd pins-save

# 2. Install dependencies
npm install

# 3. Build
npm run build
# Produces: main.js

Copy the following files into your vault:

<your-vault>/.obsidian/plugins/pins-save/
├── main.js          ← compiled output
├── manifest.json
└── styles.css

Open Obsidian → Settings → Community plugins → Installed plugins and enable Pins Save.

Development mode (auto-rebuild on save)

npm run dev

Configuration

Open Settings → Pins Save.

Restore pinned notes on startup toggle

State Behaviour
On Every saved note is automatically reopened and re-pinned each time Obsidian starts
Off Saved notes are kept, but nothing is reopened automatically — manual restore still works

Show notice after restoring

State Behaviour
On A short confirmation notice appears after startup restoration finishes
Off Restoration happens silently in the background

Manual Actions

All actions are available from the Command Palette (Ctrl/Cmd + P) or as buttons in the settings panel.

Action Description
Scan pinned tabs now Immediately re-scans the workspace and saves the currently pinned notes. Safe to run multiple times.
Restore pinned notes now Reopens and re-pins every saved note. Notes already open are simply re-pinned, not duplicated.
Clear saved pinned notes list Removes all saved entries. Does not touch currently open or pinned tabs.

Status Panel

The settings page shows a live list of tracked notes:

Field Description
Currently saved notes Full vault-relative path of every note currently tracked for restoration

File Structure

pins-save/
├── main.ts               ← TypeScript source
├── main.js               ← compiled output (gitignored, built locally)
├── styles.css             ← plugin styles
├── manifest.json           ← Obsidian plugin manifest
├── package.json
├── tsconfig.json
├── esbuild.config.mjs
├── version-bump.mjs
├── versions.json
├── .gitignore
├── LICENSE
└── README.md

How It Works

  1. On load, the plugin waits for onLayoutReady, then attaches a pinned-change listener to every open Markdown leaf via Obsidian's Workspace API.
  2. Whenever a tab is pinned or unpinned, the listener triggers a debounced save that writes the current list of pinned note paths to the plugin's local data.json.
  3. On the next startup, if auto-restore is enabled, the plugin opens each saved path with workspace.getLeaf("tab") and calls leaf.setPinned(true) to restore the pin.
  4. Listeners on vault.on("rename") and vault.on("delete") keep the saved list accurate as files move or disappear.
  5. All operations go through app.vault and app.workspace, so they are compatible with local vaults and sync services alike.

License

This project is released under the MIT License.
See LICENSE for full terms.

© 2026 SATOSprod

About

Obsidian plugin that remembers which Markdown tabs you pinned and automatically re-opens and re-pins them every time you restart Obsidian.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages