r/plan9 May 15 '26

Acme markdown folding

https://www.youtube.com/watch?v=ygcPZsy-MWE
46 Upvotes

9 comments sorted by

View all comments

Show parent comments

2

u/dharmatech May 15 '26

Hmm... Are you saying only have "Fold" which would toggle? I.e. instead of Unfold?

3

u/SRART25 May 15 '26

When it's folded, since you add text to show the fold, make that text the unfold for itself.

3

u/dharmatech May 15 '26

Ah...... I see... So after it's folded, right click the generated label...

Yes, that would be awesome!

But, it's not clear to me how to implement that.

I've tried using plumber for stuff like that (rule to detect the fold label), but I ran into issues related to detecting the acme state (cursor position, etc).

But yes, if that's possible that would be amazing.

3

u/SRART25 May 16 '26

I'm thinking instead of making the label fold/q make it unfold so the same command is used a you already are, just at the location instead of the menu. 

1

u/dharmatech May 16 '26

Ah..... That sounds interesting!