generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi! I just came up with this snippet for my own use and figured I'd share it:
edited 2025-04-09 Wed to account for #37 (comment):
/* filename: .obsidian/snippets/hide-non-active-comments.css */
/* Hide HTML comments in non-active lines (displays as `<-- …`) */
.cm-line:not(.cm-active) .cm-comment:not(.cm-hmd-codeblock) {
display: block;
max-width: 5ch;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-style: italic;
}Screenshots
Without the snippet:
With the snippet, cursor not on any comment line:
With the snippet, cursor on first comment line:
dvub
Metadata
Metadata
Assignees
Labels
No labels


