Bookmark

pending

by Alexander Kucera

Add bookmarks to your notes for quick navigation. Click the bookmark icon in the note header to set a bookmark, click again to jump back to it.

โ˜… 4 starsUpdated 6mo agoGPL-3.0Discovered via Obsidian Unofficial Plugins
View on GitHub

Bookmark

GitHub release License: GPL v3 Downloads CodeRabbit Reviews Desktop & Mobile

Add bookmarks to your Obsidian notes for quick navigation. Click the bookmark icon in the note header to set a bookmark, click again to jump back to it.

Table of Contents

Key Features

  • ๐Ÿ“ One-Click Bookmarking - Set bookmarks instantly with the header button
  • ๐ŸŽฏ Smart Return Navigation - Jump back to your bookmark with visual feedback
  • ๐Ÿงน Automatic Cleanup - Bookmarks self-destruct after navigation to keep notes clean
  • ๐Ÿ”„ Dual Mode Support - Works seamlessly in both edit and preview modes
  • ๐ŸŽจ Visual Indicators - Gutter decorations show bookmark locations
  • ๐Ÿง  Smart Placement - Avoids YAML frontmatter and handles code blocks intelligently
  • โŒจ๏ธ Keyboard Shortcuts - Full hotkey support for power users
  • ๐Ÿ”ง Zero Configuration - Works out of the box with no setup required

Why This Plugin?

Long documents can be challenging to navigate, especially when you need to frequently jump between different sections. Traditional bookmarks in browsers don't help with individual document navigation, and Obsidian's built-in linking requires creating permanent markers.

This plugin solves the problem by providing temporary, session-based bookmarks that:

  • Don't clutter your document with permanent markers
  • Provide instant visual feedback about bookmark locations
  • Work across both edit and preview modes
  • Automatically clean up when you're done navigating

Perfect for researchers, writers, and anyone working with lengthy documents who needs quick navigation without permanent document modifications.

Installation

Community Plugin Store (Recommended)

  1. Open Obsidian Settings
  2. Go to Community Plugins and disable Safe Mode
  3. Click Browse and search for "Bookmark"
  4. Install and enable the plugin

Manual Installation from GitHub

  1. Download the latest release from GitHub Releases
  2. Extract the contents to {vault}/.obsidian/plugins/bookmark/
  3. Reload Obsidian and enable the plugin in Community Plugins

BRAT (Beta)

  1. Install the BRAT plugin
  2. Add this repository: https://github.com/AlexKucera/bookmark
  3. Enable the plugin in Community Plugins

Quick Start

  1. Set a Bookmark: Click the bookmark icon (๐Ÿ“–) in any note's header
  2. Navigate: Scroll or move around your document
  3. Return: Click the bookmark icon again (now ๐Ÿ“–โœ“) to jump back
  4. Auto-Cleanup: The bookmark automatically disappears after 500ms

The bookmark icon changes state to show whether a bookmark is set:

  • ๐Ÿ“– Empty bookmark icon = No bookmark set
  • ๐Ÿ“–โœ“ Filled bookmark icon = Bookmark is set

Commands

CommandDescriptionDefault Hotkey
Toggle bookmarkSet bookmark at current position or jump to existing bookmarkNot set
Clean up multiple bookmarksRemove all bookmark markers from the current noteNot set

You can assign custom hotkeys to these commands in Obsidian's Settings โ†’ Hotkeys.

How It Works

The plugin uses invisible HTML comment markers (<!-- bookmark-marker -->) to track bookmark positions. These markers:

  • Are completely invisible in both edit and preview modes
  • Persist with your document but don't interfere with content
  • Are automatically removed after navigation
  • Work across Obsidian sessions and device syncing

Smart Features

  • Frontmatter Protection: Bookmarks are never placed in YAML frontmatter
  • Code Block Handling: Special logic for bookmarks within code blocks
  • Scroll Preservation: Your scroll position is maintained during bookmark operations
  • Multi-Bookmark Detection: Warns if multiple bookmarks are detected

Troubleshooting

IssueSolution
Bookmark not appearingTry reloading the note or restarting Obsidian
Multiple bookmark warningUse the "Clean up multiple bookmarks" command
Bookmark in wrong locationThe plugin uses scroll position detection - try setting bookmark while stationary
Bookmark not jumping correctlyEnsure you're not in a heavily formatted section; try another location

Development

This plugin is built with TypeScript and uses esbuild for bundling.

Setup

# Clone the repository
git clone https://github.com/AlexKucera/bookmark.git
cd bookmark

# Install dependencies
npm install

Build Commands

CommandDescription
npm run devStart development mode with watch compilation
npm run buildBuild for production with type checking
npm run versionBump version and update manifest files
eslint main.tsRun ESLint on main TypeScript file
tsc -noEmit -skipLibCheckRun TypeScript type checking

Architecture

The plugin consists of several key components:

  • BookmarkPlugin (main.ts) - Main plugin orchestrator
  • BookmarkManager (bookmarkManager.ts) - Core bookmark logic
  • ViewActionManager (viewActionManager.ts) - Header button management
  • GutterDecorationManager (gutterDecoration.ts) - Visual gutter indicators

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Support

If you find this plugin helpful, consider supporting its development:

Buy Me a Coffee Ko-fi Patreon

Contact

Alexander Kucera

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.