# Preserve heading/indent foldings on desktop after file is edited on mobile, and vice versa

**URL:** <https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998>\
**Category:** Feature requests\
**Tags:** sync\
**Created:** [March 31, 2022, 8:54am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998 "2022-03-31T08:54:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![topherhunt](https://forum.obsidian.md/user_avatar/forum.obsidian.md/topherhunt/32/10582_2.png) [@topherhunt](https://forum.obsidian.md/u/topherhunt)\
**Post date:** [March 31, 2022, 8:54am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/1 "2022-03-31T08:54:07Z")

</div>

I live and die by my outliner’s ability to fold headers and lists, and one source of busywork for me is that Obsidian is constantly forgetting my heading/indent folding state on files that I also edit on mobile. Originally I thought this was a [bug](https://forum.obsidian.md/t/list-header-folding-state-on-desktop-app-is-reset-when-file-is-edited-on-mobile-and-vice-versa/34084), but WhiteNoise clarified that I should report it as a feature request instead.

### Steps to reproduce this use case / problem:

Given a vault that syncs with the mobile app (Android in my case):

- Create a TestFile on desktop, whose contents include a simple nested list.
- Fold the list so the nested contents are hidden.
- Navigate to another file, then back, to confirm that the fold is remembered.
- Wait a moment for the changes to sync.
- Navigate to a different file (on desktop).
- Open the same file in the mobile app. Note that the list is NOT folded.
- (in the mobile app) Fold the list. Then edit some other content elsewhere on the page.
- Wait a moment for the changes to sync.
- Back on desktop, open the file and notice that your fold settings were reset.

### Desired behavior / proposed solution

I’d like my folding state to be preserved even after changes to the file are synced from mobile. _Ideally_ I’d like for folding state to be synced/shared between desktop and mobile, but I suspect this would be technically challenging.

Note that the document folding state _is_ preserved if that page stays open in the desktop app when the changes are synced from mobile. Folding is only lost if the file is not currently being displayed in the desktop app.

Also note that the problematic behavior runs both ways: editing the file on desktop causes my mobile app folding state to get lost, which is comparably inconvenient.

### Current workaround

My only workaround right now is to just avoid editing certain files on mobile, because I know that doing so will bulldoze the file’s folding state on desktop (assuming the file is not currently open at the moment of sync) and then I’ll need to manually re-fold again to hide the clutter. The “Fold all headings & lists” command isn’t much use here because usually I don’t want to fold _all_ top-level headings, only certain cluttered sections.

---

<div class="post-metadata">

**Author:** ![bwydoogh](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/919ad9/32.png) [@bwydoogh](https://forum.obsidian.md/u/bwydoogh)\
**Post date:** [March 31, 2022, 11:48am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/2 "2022-03-31T11:48:21Z")

</div>

> [@topherhunt](#):
>
> _Ideally_ I’d like for folding state to be synced/shared between desktop and mobile, but I suspect this would be technically challenging.

Why wouldn’t this be possible? Folding state should be a “first-class citizen” of Obsidian. In terms of UX, the fact that folding state isn’t preserved across devices is annoying.

So +1 :-).

---

<div class="post-metadata">

**Author:** ![taglia](https://forum.obsidian.md/user_avatar/forum.obsidian.md/taglia/32/31279_2.png) [@taglia](https://forum.obsidian.md/u/taglia)\
**Post date:** [July 15, 2022, 2:25am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/3 "2022-07-15T02:25:01Z")

</div>

I was also surprised to see the folding state isn’t synced. +1 as well.

---

<div class="post-metadata">

**Author:** ![chrsle](https://forum.obsidian.md/user_avatar/forum.obsidian.md/chrsle/32/33701_2.png) [@chrsle](https://forum.obsidian.md/u/chrsle)\
**Post date:** [July 16, 2022, 12:37pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/4 "2022-07-16T12:37:39Z")

</div>

Another workaround would be to use the ‘Creases’ plugin. You can set it to open notes with the ‘creased’ parts folded by default.

And I agree, I use very long notes with unimportant text parts folded out of sight, and it often takes me a long time to find the relevant sections again because everything gets unfolded when I edit the note on different devices.

---

<div class="post-metadata">

**Author:** ![concentration](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@concentration](https://forum.obsidian.md/u/concentration)\
**Post date:** [July 16, 2022, 4:25pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/5 "2022-07-16T16:25:16Z")

</div>

Creases doesn’t work for folding headings if you’re using the Daily Note plugin. Would love to see folding work with sync.

---

<div class="post-metadata">

**Author:** ![rogerfan48](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rogerfan48/32/36138_2.png) [@rogerfan48](https://forum.obsidian.md/u/rogerfan48)\
**Post date:** [October 17, 2022, 12:19pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/6 "2022-10-17T12:19:18Z")

</div>

I’m looking foward to this feature. Hope can implement it ASAP!

---

<div class="post-metadata">

**Author:** ![WQR](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@WQR](https://forum.obsidian.md/u/WQR)\
**Post date:** [September 28, 2023, 3:40pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/7 "2023-09-28T15:40:20Z")

</div>

> [@topherhunt](#):
>
> I suspect this would be technically challenging.

What would make this so hard? As I mentioned in [my thread](https://forum.obsidian.md/t/sync-folded-status/68348/2), the makers of Obsidian have already done this in Dynalist.

My other question: How hard would it be to make a plugin to do this? Should we put in a request in the Plugins section of these forums?

Instead of doing some things in Dynalist and others in Obsidian, I’d really like to go all-in on Obsidian… But this isn’t practical for me until folding status is preserved.

---

<div class="post-metadata">

**Author:** ![james1294](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@james1294](https://forum.obsidian.md/u/james1294)\
**Post date:** [October 5, 2023, 12:42am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/8 "2023-10-05T00:42:17Z")

</div>

I just discovered this. Haven’t tried it yet

obsidian://show-plugin?id=obsidian-remember-file-state

---

<div class="post-metadata">

**Author:** ![jtucker2](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/13edae/32.png) [@jtucker2](https://forum.obsidian.md/u/jtucker2)\
**Post date:** [January 12, 2024, 8:59pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/9 "2024-01-12T20:59:23Z")

</div>

This seems like a strange limitation that would be fairly easy to fix. Currently, foldings are saved using localStorage, which means they only exist per individual installation. They are simply entries stored for every file that has foldings, saying “fold from this line to this line”. This could very easily be stored in a JSON file in the vault and then would sync everywhere. I’m not sure why they chose to do it this way. Maybe performance?

---

<div class="post-metadata">

**Author:** ![garugc](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/85e7bf/32.png) [@garugc](https://forum.obsidian.md/u/garugc)\
**Post date:** [January 25, 2025, 3:12pm UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/10 "2025-01-25T15:12:38Z")

</div>

For the fact that Obsidian is actually made to make life easier for users, I spend far too many hours looking for solutions to the most primitive features. I don’t understand why such a request is ignored for years. It annoys me when different headings are collapsed on the cell phone and on the PC. Crease doesn’t help here either.

---

<div class="post-metadata">

**Author:** ![itsonlyjames](https://forum.obsidian.md/user_avatar/forum.obsidian.md/itsonlyjames/32/97708_2.png) [@itsonlyjames](https://forum.obsidian.md/u/itsonlyjames)\
**Post date:** [February 2, 2026, 5:20am UTC](https://forum.obsidian.md/t/preserve-heading-indent-foldings-on-desktop-after-file-is-edited-on-mobile-and-vice-versa/34998/12 "2026-02-02T05:20:10Z")

</div>

> [@Plugin: Sync Folds](https://forum.obsidian.md/t/plugin-sync-folds/110716):
>
> I’ve released a plugin that enables Obsidian to sync fold states across devices. These folds are also known as creases. Currently, Obsidian stores fold states within localStorage, which individualises these across devices. My plugin monkey patches all localStorage fold actions, and places them within the the sync-folds data.json file, which does sync between devices. Thus enabling consistent fold states across multiple devices. It’s currently awaiting PR approval and merge to be available with…
