Is there a way to show line numbers only in Source Mode and not in Live Preview?

Line numbers can be very useful, but when I’m using my freewriting workspace I find them distracting (in this case I use Live Preview mode, hiding all the markdown syntax).

You could try a CSS snippet to see if it works out for you or not. The first one removes the gutter area where the line numbers are:

.is-live-preview .cm-gutters {
    display: none;
}


source mode | live preview

or this one (less appealing to me) which leaves the gutter area but hides the numbers.

.is-live-preview .cm-gutters {
    opacity: 0;
}


source mode | live preview


How to https://help.obsidian.md/Extending+Obsidian/CSS+snippets if needed.

2 Likes

Thanks a lot, it worked perfectly.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.