Keep pinned tabs open.
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.
Latch is available in the Obsidian community directory.
main.js and manifest.json from the latest release..obsidian/plugins/latch/ inside your vault and copy both files into it.Disable other tab-closing protection plugins to avoid conflicting behavior. Disable Latch at any time to restore normal closing behavior.
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.
No network requests, telemetry, note-content access, or vault-file writes. Latch changes tab-closing behavior only.
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.