Preserve Outline Collapse/Expand State Across Notes

Problem Description

Currently, when working with notes that contain multiple headings, I often use the Outline pane to collapse inner sections, allowing me to get a high-level overview of the note. However, this functionality is lost when switching between notes. When I navigate away from a note and then return to it, the Outline pane resets, expanding all headings instead of maintaining my previously collapsed/expanded structure. This behavior makes it time-consuming to manually re-collapse sections every time I return to a note. The issue persists even if the note remains open in a tab but loses focus due to another note being viewed.

Proposed Solution

The Outline pane should retain its collapsed/expanded state under the following conditions:

  1. When switching between notes: If I collapse or expand certain headings in a note’s outline and then switch to another note, returning to the original note should restore the outline state exactly as I left it.
  2. Across sessions: Ideally, the collapsed/expanded state of the Outline pane should persist even after closing and reopening Obsidian, ensuring that users can pick up where they left off without manually reorganizing the outline structure each time.

Potential Benefits

  • Improved workflow efficiency: Users won’t have to repeatedly collapse sections, making navigation smoother.
  • Better note organization: Maintains the structure a user finds most useful for their workflow.
  • Consistency: Matches the behavior of the editor itself, where folded headings in the main note persist when reopening it.

Would it be possible to implement this functionality as a core feature?
Thanks for considering this feature request!

Across sessions: Ideally, the collapsed/expanded state of the Outline pane should persist even after closing and reopening Obsidian, ensuring that users can pick up where they left off without manually reorganizing the outline structure each time.

This feature needs to be premised on the implementation of this feature: