Grab your attention by highlighting entire lines matching keywords or regex patterns with custom styles.
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.
Works in both Reading Mode and Live Preview, on desktop and mobile.
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.
Settings — rule editor
Mobile settings
hotlines in your vault's .obsidian/plugins/ directory.main.js and manifest.json into it.[!NOTE] The plugin ships with four starter rules —
NOTE,PROBLEM/BUG,TODO, andCONTINUE— which you can edit or delete.
Open Settings → Community plugins → Hotlines to manage rules.
Each rule has:
| Field | What it does |
|---|---|
| Name | A label for the rule (shown on the colored preview bar). |
| Enabled | Toggle the rule on/off. Use the ↑ / ↓ buttons to reorder — earlier rules win on a line that matches more than one. |
| Pattern | A (JavaScript) regular expression (no slashes needed, so you can also just put a keyword here). Any line whose text matches gets highlighted. |
| Case-sensitive | When off, matching ignores case. |
| Color | Background and text colors (color pickers). |
| Style | Bold and/or italic. |
| CSS | The raw CSS applied to the highlight. The color/style controls write into this; you can also edit it directly for full control. |
| Goal | Pattern |
|---|---|
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*! |
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.
```cpp) are intentionally not highlighted — syntax highlighting splits each line into many tokens, so reliable per-line matching isn't possible there.isDesktopOnly: false).MIT — do what you like.
Steve Crutchfield — @crufi