Outliner sync with note while scrolling

I’d like to have an outliner which autocatically syncs with the position of the corresponding note.
I mean: if I’m editing/previewing heading “abc” then “abc” appears in bold in the outliner and so on. The outliner automatically scolls in sync with the visualized heading.

Just as reference, Typora implements that feature.

29 Likes

A good request indeed, I also miss that feature from Typora.

1 Like

+1 +1 +1

Feel for it if you have no idea what synchronous scrolling is about

4 Likes

Yes please.

This is the same as: Outliner: highlight location of cursor

1 Like

@Kiroro: that’s exactly what we need.

1 Like

@Sentiment: good point, so these 2 could be merged, moderators.

1 Like

It would be amazing if this worked just like the “Table of Contents” pane in the right column of Obsidian Publish. Current section highlighted as you scroll.

For ex: Obsidian Publish

2 Likes

I have asked a couple of CSS wizards and they told me it is not possible. Death_au managed to come up with something but showed that by scrolling it messes up the numbering.

I still don’t fully understand why it can be done in Typora and not in Obsidian, although someone did give me an explanation once.

Apparently in Obsidian it is only possible with JavaScript, so someone would have to make a JS-based plug-in.

In a long document, I just need to get my bearings sometimes. Being able to see that in the TOC would be brilliant!

Really!!! It seems the work is already done for this feature. Please implement it in Obsidian!

Half the work is already done as shown in Obsidian’s File Navigation Pane. It already highlights where we are. However it doesn’t automatically scroll unless the Reveal command is given.

If auto-scroll is the challenging part of implementation, I would be okay if the TOC didn’t auto-scroll so long as the highlight of current heading in TOC was introduced. Manually scrolling a TOC is worlds better than manually scrolling a 50-page document full of similarly titled sub-headings.

@goodsignal: I have asked various people about this, incl. superguru death_au and the answer was this cannot be done with CSS, only with JavaScript, i.e. a plug-in.

1 Like

I love DIY and community driven solutions. But yeah, if it could be done in CSS, we might not be posting this in the feature requests.

I admit that I’m being naive when I say half the work is done. But I suspect that Electron could handle the feature relatively easily.

Location awareness is just such a nice element contributing to a positive UX that my hope is it gets worked into Obsidian as a core feature.

@goodsignal: I agree with your observation. In fact, Typora is also an Electron-based app and does it very well, so I don’t understand why it could not be done in Obs. I desperately want it in Obs too.

1 Like

Use case or problem

I am frequently disoriented regarding where I am in my document at any given time, and looking at the outline pane does not help since it does not track with my current location.

Then when I tried to use the outline pane to navigate to a new place, I don’t have a reference point for where I currently am either.

Proposed solution

The idea would be for the outline pane that is tied to a given editor pane to follow along with where I am in the page. For example, if I am editing the content under the third header, I would want the outline pane to jump there as well. If I then moved my cursor somewhere, I would want the outline to track along with that.

Along with that, if the current section header could be highlighted in the outline pane, that would help as well.

This is how MS Word Outline for example works.

Current workaround (optional)

Related feature requests (optional)

3 Likes

@RyanQuey : I sympathize with that feeling of disorientation. There is a good workaround, which is the Number headings plug-in.

It automatically numbers the headings and subheadings in your note, which is then reflected in the outline pane.

Some remarks:

  • I asked the dev if he could add a Typora-type highlight that indicates which header one is looking at, as per the requests in this thread. He said he would look at it. That was about 2 months ago, I have not heard back.
  • The numbers are physically added to the headings of a note, so they are part of the note. I asked if, as per Typora, he could make the plug-in so it does not physically add the numbers. He told me that it is not possible with this plug-in.
  • So far, if one changes heading titles manually, those changes will be ported to all the links in other notes that link to that header. However, since the plug-in updates the heading numbers automatically when you change a heading title, the links are broken. Licat is working on making the heading links adjustments automatic, which, apart from the Number headings plug-in, makes more sense anyway. As long as this automatic adjustment is not implemented I keep the plug-in disabled, much to my regret. It is on Licat’s short-term roadmap, so I for one cannot wait for it to be implemented. :grinning:

Cheers for now.

2 Likes

Does the “Number headings” plug-in highlight the currently-viewed heading?

Or does it just add numbers to the headings?

@ZenMoto :it only adds numbers to the headings, i.e. those numbers are part of the note. The plug-in does have a way to delete those numbers.

I asked the plug-in dev to add a highlight to the currently viewed heading; he said he would have a look but so far has not added it.

Okay, thank you for the reply.

I’ve begun researching what JS it would take to highlight the current heading.

1 Like

@ZenMoto If you manage to work it out, please post it here because I have wanted it for a long time. The Numbered Headings plug-in just does not feel quite complete without it.

FYI, another feature I asked from the dev is to not have the numbers written to the note. Typora does it quite nicely: you get the headings numbered in a virtual sort of way, but they are not part of the note.

He replied that it would require another plug-in.

2 Likes

this plugin even also collapses pre-defined headings and scrolls/shows headings as you go:

obsidian://show-plugin?id=obsidian-quiet-outline