Dynamic Highlights

by nothingislost
5
4
3
2
1
Score: 39/100

Description

Category: Coding & Technical Tools

The Dynamic Highlights plugin is a powerful tool that allows you to dynamically highlight text in Obsidian. With this plugin, you can select or search for specific words or phrases and have them highlighted throughout your document.

One of the most useful features of this plugin is its ability to highlight all occurrences of a selected word or phrase, regardless of their location in the document. This makes it easy to quickly identify and review specific topics or concepts.

In addition to selection highlighting, the plugin also allows you to define persistent highlights based on search queries. You can create custom highlighters with unique class names and colors, making it easy to visually distinguish between different types of highlighted text.

The plugin's settings allow you to customize its behavior, including adjusting the delay before highlighting is applied and ignoring specific words or phrases. Overall, the Dynamic Highlights plugin is a great tool for anyone looking to add an extra layer of organization and visual clarity to their Obsidian notes.

Reviews

No reviews yet.

Stats

149
stars
26,610
downloads
10
forks
1,568
days
848
days
1,542
days
5
total PRs
1
open PRs
1
closed PRs
3
merged PRs
72
total issues
41
open issues
31
closed issues
0
commits

Latest Version

4 years ago

Changelog

  • Fix an esbuild issue
  • Switch to a fork of Pickr that fixes requestAnimationFrame issues
  • Removed an errant package import

README file from

Github

Dynamic Highlights

An Obsidian plugin that dynamically highlights text based on selection or search query.

This plugin currently only works in the Source or Live Preview editor modes. For now it will not affect Reading mode or the Legacy Editor.

Selection Highlights

If there is no active selection, all occurences of the word underneath the current cursor position will be highlighted

  • Word matching is case insensitive
  • The word currently under the cursor will be marked with .cm-current-word
  • Occurences of the current word found elsewhere in the document will be marked with cm-matched-word
  • All occurences will recieve the data-contents data attribute which will hold the current word value

If there is an active selection, all occurences of the text inside the selection will be highlighted.

  • String matching is case insensitive
  • The currently selected string will be marked by default with .cm-selection
  • Occurences of the currently selected string found elsewhere in the document will be marked with cm-matched-string
  • All matches will recieve the data-contents data attribute which will hold the selected string value

Persistent Highlights

Persistent highlights are created by defining a search query and associating a CSS class name and color. Once defined, any string that matches the search query will be marked with the associated CSS class and will receive background color that matches the chosen color.

Search queries can be written using regular expressions as long as you toggle the regex option for the query.

You can define as many unique highlighters as you'd like as long as the class names are unique. Performance may be impacted when creating a large number of complex regex queries so be mindful of your regex complexity.

Examples

You can import the examples with the Import Button at the top right of the plugin's settings.

Visual Linting

Highlights double spaces, empty list markers, double list markers, preceding spaces, and trailing spaces.

{
  "Mini-Linting": {
    "class": "Mini-Linting",
    "color": "#A70F0F38",
    "regex": true,
    "query": " {2,}(?!\\|| |$)|- - |^\\s*- \\n|^ +(?![0-9-`])",
    "mark": [
      "match"
    ],
    "css": ".cm-line .Mini-Linting {\n  background: none;\n}\n\n.cm-line:not(.cm-active) .Mini-Linting {\n  outline: 1px solid var(--text-error);\n}"
  },
}
Strike Out Filler Words to avoid in Writing
{
  "Filler-Words": {
    "class": "Filler-Words",
    "color": "#2D801838",
    "regex": true,
    "query": "\\b([Aa] bit|[Aa]bsolutely|[Aa]ctually|[Aa]nd all that|[Aa]nd so forth|[Aa]nyway|[Bb]asically|[Cc]ertainly|[Cc]learly|[Cc]ompletely|[Dd]efinitely|[Ee]ffectively|[Ee]ntirely|[Ee]ssentially|[Ee]vidently|[Ee]xtremely|[Ff]airly|[Ff]rankly|[Ff]requently|[Gg]enerally|[Hh]opefully|[Kk]ind of|[Ll]argely|[Ll]iterally|[Mm]ore or less|[Mm]ostly|[Oo]ccasionally|[Oo]ften|[Oo]verall|[Pp]articularly|[Pp]erhaps|[Pp]ossibly|[Pp]ractically|[Pp]recisely|[Pp]resumably|[Pp]retty|[Pp]rimarily|[Pp]robably|[Pp]urely|[Qq]uite|[Rr]arely|[Rr]ather|[Rr]eally|[Rr]elatively|[Ss]eriously|[Ss]ignificantly|[Ss]imply|[Ss]lightly|[Ss]omehow|[Ss]ort of|[Ss]pecifically|[Ss]trongly|[Ss]upposedly|[Ss]urely|[Tt]he fact that|[Tt]otally|[Tt]ruly|[Tt]ypically|[Uu]ltimately|[Uu]sually|[Vv]ery|[Vv]irtually|[Ww]idely)\\b",
    "mark": [
      "match"
    ],
    "css": ".cm-line .Filler-Words{\n\ttext-decoration: line-through;\n\tbackground: none;\n\tcolor: var(--text-muted);\n}\n\n/* where to disable */\n.HyperMD-quote.cm-line .Filler-Words,\n.pdf-annotations .cm-line .Filler-Words {\n\ttext-decoration: none;\n\tcolor: unset;\n}"
  }
}
Highlight Custom Styles in Pandoc Exports (:::)
{
  "Pandoc-Syntax": {
    "class": "Pandoc-Syntax",
    "color": "#77787C4A",
    "regex": true,
    "query": "::: \\{.*?\\}[\\s\\S]*?:::",
    "mark": [
      "match",
      "group"
    ],
    "css": ""
  }
}

Settings

Delay

The delay before highlighting is applied after moving the cursor

Ignored Words

A comma delimited list of words that will not be highlighted

The default list can be found here: https://gist.github.com/sebleier/554280

Limitations

  • There is currently no support for dynamic highlights in reading/preview mode.
  • Only strings with 3 or more characters will be highlighted in selection highlight mode

Acknowledgments

Thanks to @chrisgrieser aka @pseudometa for the plugin idea and feedback. Thanks to @chetachiezikeuzor for the plugin settings UI code which was inspired by https://github.com/chetachiezikeuzor/highlightr-Plugin/

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Regex Find and Replace
4 years ago by Martin Eder
Plugin for Obsidian, providing search/replace functionality which supports regular expressions and selections.
Remember File State
4 years ago by Ludovic Chabant
A plugin for Obsidian that remembers cursor position, selection, scrolling, and more for each file.
Mark and Select
4 years ago by anselmwang
Kobo Highlights Importer
4 years ago by Flavio Cordari
Scroll Offset
4 years ago by Lijyze
Scroll Offset for Obsidian
Advanced Codeblock
4 years ago by Lijyze
An obsidian plugin that give additional features to code blocks.
Linkify
4 years ago by Matthew Chan
Ninja Cursor
4 years ago by vorotamoroz
Focus and Highlight
4 years ago by BO YI TSAI
A plugin for obsidian to focus and highlight on a specific heading in Reading mode.
Raindrop Highlights
4 years ago by kaiiiz
An Obsidian.md plugin that syncs highlights from Raindrop.
Dashing Cursor
4 years ago by Shukai Ni
Bulk Rename
4 years ago by Oleg Lustenko
Simple Mention
4 years ago by der-tobi
Obsidian plugin for mentioning people
Onyx Boox Annotation & Highlight Extractor
4 years ago by Akos Balasko
This tool extracts the highlights and the annotations from OnyxBoox Reading Notes txt files, and converts them to linked zettelkasten literature and permanent notes
Readavocado Sync
4 years ago by Cyrus Zhang
Readavocado obsidian plugin to sync your favorite highlights.
Apple Books Highlights
3 years ago by Atif Afzal
Sync your Apple Books highlights in Obsidian
Floating Highlights
3 years ago by Karthik S Raju
This is a plugin for obsidian which highlights a block of text or a word as you scroll down while reading.
Global Search and Replace
3 years ago by Mahmoud Fawzy Khalil
A plugin to do a global search and replace in all your Obsidian vault files.
Character Insertion
3 years ago by TakamiChie
カーソル前に記号を挿入するプラグイン(Plug-in to insert symbol before cursor)
WuCai highlights Official
3 years ago by 希果壳五彩
WuCai highlights Official, for Sync highlights into your obsidian notes
Select current line
3 years ago by Gokul
Obsidian plugin to select the current line on 'Esc' button press.
Pocketbook Cloud Highlight Importer
3 years ago by Lena Brüder
Imports highlights and notes from books stored in the pocketbook cloud to your obsidian vault
Auto Hide Cursor
3 years ago by Mo Ismat
A simple plugin for https://obsidian.md
HamsterBase Official
3 years ago by HamsterBase
Cloze
3 years ago by Vikki
A plugin for Obsidian which enables converting highlights, underlines, bolded texts, or any selected texts into clozes.
File Explorer++
3 years ago by kelszo
A plugin for https://obsidian.md, which enables the ability to hide and pin specific files and folders in the file explorer by applying custom filters.
TreeFocus
3 years ago by iOSonntag
Obsidian plugin: Highlight, dim & style your files & folders in the file explorer (navigation) based on predefined or custom rules.
Vocabulary Highlighter
2 years ago by eatgrass
Highlight English words according to the frequency with Obsidian
Vim Yank Highlight
2 years ago by Aleksey Rowan
Highlight yanked text in Vim mode. Enjoy that subtle animation you've missed so much.
R.E.L.A.X.
2 years ago by Syr
Regex Obsidian Plugin
Highlight Helper
2 years ago by Chongmyung Park
Helper to collect highlight in Obsidian
cursor-goaway
2 years ago by Xuer
make cursor goaway after open a text file
Apple Books - Import Highlights
2 years ago by bandantonio
Import highlights and notes from your Apple Books to Obsidian
Enhanced Annotations
2 years ago by ycnmhd
Tag Links
2 years ago by Zacchary Dempsey-Plante
A plugin for Obsidian that allows tags to be opened as links using a hotkey.
LinkMagic
2 years ago by AndyReifman
Cursor Jump
2 years ago by Sangwon Jung
Regex Mark
2 years ago by Mara-Li
Multiplatform Highlights Importer
2 years ago by wwwkieran
Import and consolidate highlights from different reading sources. Supports reconciling books across reading sources.
Extract Highlights
5 years ago by Alexis Rondeau
Manage your highlights in Obsidian by easily creating, removing and exporting them.
PDF Highlights
5 years ago by Alexis Rondeau
Extract highlights, underlines and annotations from your PDFs into Obsidian
Remember cursor position
5 years ago by Dmitry Savosh
Obsidian plugin. Remember cursor position for each note
Find and replace in selection
5 years ago by Dmitry Savosh
Obsidian plugin. Find and replace in selection.
Highlight Public Notes
5 years ago by dennis seidel
Regex Pipeline
5 years ago by No3371
An Obsidian plugin that allows users to setup custom regex rules to automatically format notes.
Readwise Community
5 years ago by renehernandez
Sync Readwise highlights into your obsidian vault
Kindle Highlights
3 years ago by Hady Osman
Sync your Kindle notes and highlights directly into your Obsidian vault
Cursor Location
5 years ago by Sean Slater
Display the cursors line and column in Obsidian
Relative Find
5 years ago by phibr0
Hypothes.is
5 years ago by weichenw
An Obsidian.md plugin that syncs highlights from Hypothesis.
Advanced Cursors
5 years ago by SkepticMystic
Cursor Bridge
2 years ago by Adam Cloud
Seamlessly bridge Obsidian and Cursor, the AI-powered code editor. Elevate your coding workflow by opening notes directly in Cursor, bringing the power of AI to your knowledge base.
Blue Star
2 years ago by Wang Guoshi
A plugin for Obsidian that generates Anki flashcards in various ways.
Unearthed (Kindle Sync)
a year ago by CheersCal
Cursor Position on Title Enter
a year ago by Por Chainarong Tangsurakit
Obsidian Plugin: Set the cursor position after pressing Enter on the note title.
KoReader Highlight Importer
a year ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Hide Commands in Menu
a year ago by bomian98
Obsidian Plugin, hide different commands in different menus.
Cursor Position History
a year ago by Florian Gubler
A Plugin to remember (and make accessible) the cursor history in Obsidian. Both within a file and across files.
InfoFlow
a year ago by RockieStar Inc.
Obsidian plugin for InfoFlow.app - This plugin integrates InfoFlow with Obsidian, allowing you to sync your saved articles, web pages, notes, and highlights directly into your Obsidian vault.
Smooth Cursor
a year ago by Busyo
Obsidian光标美化插件
AutoMover
a year ago by Al0cam
Move files and notes with specified names into their designated folders according to rules you define.
HiNote
a year ago by Kai
Add comments to highlighted notes, use AI for thinking, and flashcards for memory.
aDHL
a year ago by tine-schreibt
The Dynamic Highlights Plugin, but with hotkeys, more options and sorting; works well with Highlightr.
FileName Styler
a year ago by Marc Feininger
An Obsidian plugin to hide, customize, and decorate file names in the sidebar using regex and customizable profiles.
MatchSyntax
a year ago by Eda
An Obsidian plugin that lets you write "regex-like" syntax to search the contents of a note, including part-of-speech tagging and (limited) fuzzy matching.
Regex Line Filter
a year ago by 64MM4-KN1F3
A note filtering plugin for Obsidian
TODO Highlighter
a year ago by Nuraly Dyussenov
Obsidian Plugin that formats the exact string TODO, so it can be easily seen in your notes.
Custom Selected Word Count
a year ago by banisterious
Custom Selected Word Count for Obsidian
Auto Replacer
10 months ago by Alecell
A live text replacement plugin that applies automatic formatting, corrections, or custom replacements in real-time. Define your own regex-based rules and transformation logic to modify text dynamically as you type.
Kindle Highlights Import
10 months ago by Leon Luttenberger
Plugin for Obsidian that allows users to import Kindle highlights into their Obsidian vault.
Sidebar Highlights
10 months ago by trevware
URL Formatter
8 months ago by Thomas Snoeck
Automatically formats specific URLs pasted into Obsidian into clean Markdown links.
HOME key
8 months ago by shichishima
Obsidian Plugin to move cursor to beginning of text, considering Markdown heading characters.
Move Cursor On Startup
8 months ago by Jared Kelnhofer
Obsidian plugin to move the cursor to the right and back to the left when starting up. Why? To keep DataView expressions from not running on the first load of, say, your Home file.