Latch

approved

by Fourthform

Keep pinned tabs open until you explicitly unpin them. - This plugin has not been manually reviewed by Obsidian staff.

19 downloadsUpdated 7d agoMIT

Latch

Keep pinned tabs open.

Use

Pin a tab to protect it. Unpin it to close it.

Latch prevents the close command from unpinning your tab, even after repeated presses of Cmd+W / Ctrl+W. It also blocks direct tab removal, including the native close button and plugins that use Obsidian's standard tab-removal method. A brief notice explains a blocked close.

Unpinned tabs behave normally. No settings or hotkey changes are needed.

Install

Latch is available in the Obsidian community directory.

  1. Install Latch from Obsidian's Community plugins, or download main.js and manifest.json from the latest release.
  2. Create .obsidian/plugins/latch/ inside your vault and copy both files into it.
  3. Restart Obsidian and enable Latch in Settings → Community plugins.

Disable other tab-closing protection plugins to avoid conflicting behavior. Disable Latch at any time to restore normal closing behavior.

Limits

Requires Obsidian 1.13.7 or later. Tested on macOS; Windows and mobile are not yet tested.

Latch protects individual tab closure. It does not block quitting, closing an entire pop-out window, switching workspace layouts, or replacing a tab's content. A plugin that bypasses the guarded closing methods may bypass protection.

Privacy

No network requests, telemetry, note-content access, or vault-file writes. Latch changes tab-closing behavior only.

Develop

Use Node.js 20 or later. No dependencies to install.

npm run check

This builds main.js from src/ and runs the tests. Obsidian supplies the runtime API. The generated file is committed so release assets can be compared with the source.

  • src/main.js: startup, notices, and error reporting.
  • src/protection.js: the rule for protecting a tab.
  • src/obsidian.js: Obsidian hooks and cleanup.
  • tests/: behavior and simulated integration tests.

See architecture for the contract and compatibility boundary, and releasing for the release process.

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.