mugiwara85 / CodeblockCustomizer

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

anti-logical: By default, all codeblocks are folded, except that` ` ` cpp unfold #81

Closed calmwaves111 closed 2 weeks ago

calmwaves111 commented 2 months ago

Thank you for your plugin. It's must-have for me in most cases, I hope my codeblocks are folded because they are too long But now I need to add a "fold" to every codeblock, which is troublesome so I hope to use it with an exclusion logic:Default "fold", except that I use the "unfold" tag

mugiwara85 commented 2 months ago

I wouldn't say that it is anti-logical. There wasn't a need for the behavior you described until now. Most of the people have smaller code blocks, so it is enough to add fold where it is needed. But I can add a toggle where you can reverse the logic. No problem

mugiwara85 commented 1 month ago

Hi @calmwaves111, sorry that it took this long. I just pushed some changes. You can take the main.js and overwrite yours (after backing it up first) with it. After that you'll see a new toggle in the codeblock settings page, where you can inverse the fold behavior. If this is enabled, than it means that all code block is folded by default. If you don't want to fold a code block by default, then you can use the "unfold" parameter. Please test it thoroughly and give me a feedback. Hopefully I didn't forget anything :D

XMB-7 commented 4 weeks ago

Please release this new feature to allow more users to test it.

mugiwara85 commented 4 weeks ago

Please release this new feature to allow more users to test it.

The new version will soon be released. I made some big improvements regarding performance. I just have to finish it, and test everything again.

mugiwara85 commented 2 weeks ago

@XMB-7 @calmwaves111 Finally released. Officially available in version 1.2.7

calmwaves111 commented 2 weeks ago

Thanks for your hard work, everything is working fine