Add a "Line Highlights" when clicking inside the left editor gutter

Use case or problem

It would be great if we could click in the space between the line number and “toggle fold” toggle highlighting of a line. This area usually referred to as the left side gutter.

In code editors with debuggers, you can click a line number to set a “Line Breakpoint” which will add a :red_circle: next to the line number. When the debugger pauses on that line, it’ll end up highlighting the whole line. This is a pretty useful indicator to draw attention to a line.

Screenshot from Intellij and other Jetbrain IDEs:
image

These breakpoints are usually just saved only for local debug sessions.
Other viewers of the code base do not see set breakpoints.

Use cases

One uses case would be to toggle the active item in a To Do List.

Another use case is to highlight the line as a temporary reminder or a note.

Proposed solution

Users would be able to hover of the left side gutter, users can toggle a line highlight.

Obsidian could support options to toggle line colors when right clicking the highlight. Another option is to support symbols so that users can indicate to themselves why this highlight existed.

These highlights would be persisted in .obsidian/config so that they’re persisted when Obsidian closes and reopens.

They would also be visible and editable from mobile as well.

In the command palette, add options:

  • Toggle line highlight
  • Remove all line highlights from this file
  • Remove all line highlights from all files
  • Show all line highlights across all files

Current workaround

I’m currently just trying to use some kind of symbol inline to remember my place.

Here’s an example of what I’m currently doing using an emoji :red_circle:

1 Like