Hotlines

approved

by Steve Crutchfield

Grab your attention by highlighting entire lines matching keywords or regex patterns with custom styles. - This plugin has not been manually reviewed by Obsidian staff.

β˜… 1 stars↓ 139 downloadsUpdated 1mo agoMIT

πŸ–οΈ Hotlines

Highlight whole lines in your notes that match keywords or regex patterns β€” with custom background, text color, weight, and CSS. Great for making TODO, PROBLEM, IMPORTANT, or any marker you use jump off the page.

Highlighting is automatic based on plain text in your note, no callout or other added markdown syntax required.

Works in both Reading Mode and Live Preview, on desktop and mobile.

Hotlines in action

I like the aDHL plugin; Hotlines is simpler but adds the ability to style with any custom CSS (in particular I wanted to customize the font color as well as the background). aDHL adds lots of other nice features thoughβ€”check it out too.


Features

  • Regex or keyword matching β€” each rule highlights any line containing a match.
  • Full-row highlight β€” the background spans the whole row, not just the matched word, while bullets, list indentation, and dashes keep rendering on top.
  • Reading mode and Live Preview β€” consistent look in both, including inside callouts, soft-wrapped paragraphs, list items, and plain code blocks.
  • Per-rule styling β€” background color, text color, bold, italic, and a full custom CSS field for anything else (borders, radius, underline, opacity…).
  • First matching rule wins β€” order your rules to control precedence.
  • Mobile-friendly settings β€” grouped, touch-sized controls.

Screenshots

Settings β€” rule editor

Mobile settings

Mobile settings

Mobile settings

Installation

Manual

  1. Create a folder named hotlines in your vault's .obsidian/plugins/ directory.
  2. Copy main.js and manifest.json into it.
  3. In Obsidian, open Settings β†’ Community plugins, enable Hotlines (you may need to reload or toggle "Restricted mode" off first).

[!NOTE] The plugin ships with four starter rules β€” NOTE, PROBLEM/BUG, TODO, and CONTINUE β€” which you can edit or delete.


Usage

Open Settings β†’ Community plugins β†’ Hotlines to manage rules.

Each rule has:

FieldWhat it does
NameA label for the rule (shown on the colored preview bar).
EnabledToggle the rule on/off. Use the ↑ / ↓ buttons to reorder β€” earlier rules win on a line that matches more than one.
PatternA (JavaScript) regular expression (no slashes needed, so you can also just put a keyword here). Any line whose text matches gets highlighted.
Case-sensitiveWhen off, matching ignores case.
ColorBackground and text colors (color pickers).
StyleBold and/or italic.
CSSThe raw CSS applied to the highlight. The color/style controls write into this; you can also edit it directly for full control.

Simple example patterns

GoalPattern
The word TODO\bTODO\b
PROBLEM or BUG\b(PROBLEM|BUG)\b
TODO next (with whitespace)\bTODO\s+next\b
A @mention@\w+
Lines starting with !^\s*!

Custom CSS

The CSS field (collapsible, under each rule) holds the exact style applied to matching rows. The GUI controls edit only their own property, so anything else you add by hand is preserved when you tweak a color or toggle bold.

Some properties you can drop in:

background: #2563eb;
color: #ffffff;
font-weight: bold;
font-style: italic;
padding: 2px 6px;
border-radius: 8px;
border: 1px solid #606060;
border-left: 4px solid #fbbf24;
text-decoration: underline;
opacity: 0.9;

[!NOTE] In Live Preview, layout-shifting properties (padding/margin) are stripped automatically so they don't disturb list indentation or the editor cursor β€” the row still gets its full-width background.


Behavior notes

  • Callouts & soft-wrapped paragraphs β€” only the matching line is highlighted, not the whole block.
  • Lists β€” the highlight spans the full row and the bullet sits on it; sibling bullets stay aligned.
  • Plain code blocks (no language) β€” only the matching line(s) are highlighted.
  • Language-tagged code blocks (e.g. ```cpp) are intentionally not highlighted β€” syntax highlighting splits each line into many tokens, so reliable per-line matching isn't possible there.

Compatibility

  • Desktop and mobile (isDesktopOnly: false).
  • Tested against Obsidian's default theme and Minimal; custom themes should generally work, but very custom list/callout styling may affect spacing.

License

MIT β€” do what you like.

Author

Steve Crutchfield β€” @crufi

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.