giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.37k stars 459 forks source link

Text Folding, collapsible selected sections? #1821

Open RFImages opened 2 years ago

RFImages commented 2 years ago

Hello,

As some of my nodes grow in length, it would be EXTREMELY helpful to be able to select a section, right click and collapse that section to show only the first line - then expand/collapse it with the typical "+/-" icon.

This type of feature of course is used in most code editors and would greatly help me to navigate my long node texts without endless scrolling and searching. I can focus on only the current section that I am viewing/editing.

I apologize if this feature already exists and I have missed it, if so please show me how?

Thank you so much for considering this. If this is implemented I will certainly make a monetary donation to this project.

giuspen commented 2 years ago

I'm not sure if Gtk is allowing that but surely is allowing to insert line marks, I may support that and quickly jumping between marks with a keyboard shortut similarly to how geany does

RFImages commented 2 years ago

ok well I suppose that is somewhat helpful but I could do the same with links so I am not sure it is worth the effort. Collapsing sections makes it easier to scroll through long nodes and simplify the view while at the same time being able to see the first line of each section, the first line being a subtopic of the node you are working in.. This is similar to what you are doing with Nodes and child nodes but the capability exists within the text of a single node..

When everything is collapsed, it gives you a good compact overview of the contents of the node, a table of contents basically.. I know you might say to break it up into child nodes, but this is useful before everything is organized like that (which is a lot of work and when rapidly inputing information) . There is not time to organize into child nodes so this is a quick way to group long text into sections based on subtopics. I am thinking of the way a text editor designed for a specific language (such as C) will for example, locate a function and give you the option to collapse or exapnd it to compact the code view. Thank you for the response and the consideration.

RFImages commented 2 years ago

HI there again, I am wondering if there has been any more thought about this. My subnodes are getting long and it would really help navigate if I could fold up sections of text to make it more compact, then expand only the area I am working on. Similar to what you do with your navigation tree. (Collapse/fold--expand/unfold (a paragraph, showing only the first line when folded and a plus sign to expand) Thank you for considering it!

checho1989 commented 1 year ago

Hi, I love cherrytree, I been used it for a long time. Someone has more information about how implement this feature? I think it will be a powerfull key for developers who used Cherry and people who keeps large amounts of information in single nodes. I appreciate if you guys can add it in future releases.

Thank you!