[Github-comments] [geany/geany] Folding code: more advanced ways to do it (#2920)

Vic notifications at xxxxx
Fri Oct 8 01:11:57 UTC 2021


Currently, the only ways to change the folding is:
- toggle current fold
- fold all
- unfold all

For files with many nodes (fold points) and deep levels of children nodes, it would be great to have commands for efficient navigation of the hierarchical structure , jumping from node to node and expanding/collapsing them as following:
* 1)) command for folding current node and moving into parent node. After repeated invokation, it will eventually fold the greatest ancestor, of level 0.
* 2)) an opposite command, for unfolding current node and moving into Ist child node. After repeated invokation, it will eventually unfold the Ist path towards a leaf in the tree. 
* 3)) command to move to next sibling node
* 4)) command to move to previous sibling node
* 
These 4 commands would mirror how the navigation is possible in many file managers' tree view of folders, often with the arrow keys (right/left to collapse/expand, and up/down to jump  through sibling nodes).

In addition, the following 2 commands would be useful for fast (but controlled) expansion/collapsing at whole document level:
* 5)) command to fold current node and all nodes of same level as current node, AND move cursor to parent of current node. With repeated invokation, it will fold upwards all nodes in file, untill only nodes of level 0 are visible.
* 6)) opposite command to unfold current node and all nodes of same level as current node, AND move cursor to Ist child of current node. With repeated invokation, it will unfold downwards the nodes in file, untill nodes at the level of the leaf encountered on Ist path from the starting node. 
* 
These 2 commands would be more useful, IMO, than the fixed-level fold/unfold of all nodes that other editors provide (for ex , Notepad++ ).





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211007/69e0874e/attachment-0001.htm>


More information about the Github-comments mailing list