Bookmark
pendingby 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.
Bookmark
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
- Why This Plugin?
- Installation
- Quick Start
- Commands
- How It Works
- Troubleshooting
- Development
- Contributing
- License
- Support
- Contact
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)
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Bookmark"
- Install and enable the plugin
Manual Installation from GitHub
- Download the latest release from GitHub Releases
- Extract the contents to
{vault}/.obsidian/plugins/bookmark/ - Reload Obsidian and enable the plugin in Community Plugins
BRAT (Beta)
- Install the BRAT plugin
- Add this repository:
https://github.com/AlexKucera/bookmark - Enable the plugin in Community Plugins
Quick Start
- Set a Bookmark: Click the bookmark icon (๐) in any note's header
- Navigate: Scroll or move around your document
- Return: Click the bookmark icon again (now ๐โ) to jump back
- 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
| Command | Description | Default Hotkey |
|---|---|---|
Toggle bookmark | Set bookmark at current position or jump to existing bookmark | Not set |
Clean up multiple bookmarks | Remove all bookmark markers from the current note | Not 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
| Issue | Solution |
|---|---|
| Bookmark not appearing | Try reloading the note or restarting Obsidian |
| Multiple bookmark warning | Use the "Clean up multiple bookmarks" command |
| Bookmark in wrong location | The plugin uses scroll position detection - try setting bookmark while stationary |
| Bookmark not jumping correctly | Ensure 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
| Command | Description |
|---|---|
npm run dev | Start development mode with watch compilation |
npm run build | Build for production with type checking |
npm run version | Bump version and update manifest files |
eslint main.ts | Run ESLint on main TypeScript file |
tsc -noEmit -skipLibCheck | Run 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - 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:
Contact
Alexander Kucera
- Website: https://alexanderkucera.com
- GitHub: @AlexKucera
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.