mugiwara85 / CodeblockCustomizer

Codeblock Customizer plugin for Obsidian
MIT License
168 stars 7 forks source link

[Feature Request] When switching files, remember the folding status of the current file code block #45

Open doit132 opened 1 year ago

doit132 commented 1 year ago

When I collapse a code block in a file, but once I switch to another file and then return to that file, the folding effect disappears

mugiwara85 commented 1 year ago

For initial folding state you can define the fold parameter. That way if you open a file, it will be displayed folded. For other code blocks where fold was not defined, the folding effect is remembered as long you are in the same document. I am not sure if it is possible to "remember" the folding effect of code blocks through different documents. Maybe it can be stored in a document. I am not promising anything yet, but I can look into it. Maybe there is a way I don't know about.

doit132 commented 1 year ago

For initial folding state you can define the fold parameter. That way if you open a file, it will be displayed folded. For other code blocks where fold was not defined, the folding effect is remembered as long you are in the same document. I am not sure if it is possible to "remember" the folding effect of code blocks through different documents. Maybe it can be stored in a document. I am not promising anything yet, but I can look into it. Maybe there is a way I don't know about.↳

Okay, I will adopt this approach