ZeroBraneStudio icon indicating copy to clipboard operation
ZeroBraneStudio copied to clipboard

Suggestion about folding

Open moteus opened this issue 8 years ago • 4 comments

I suggest this one scheme Shift+FoldingClick - fold unfold all nested blocks Ctrl+Shift+FoldClick - fold unfold all blocks (including nested) in entire document

I made this one

        if shift and ctrl then
          editor:FoldSome()
        elseif shift then
          editor:FoldSome(line)
....

moteus avatar Dec 21 '17 08:12 moteus

Why is this better than the current shortcuts?

pkulchenko avatar Dec 24 '17 06:12 pkulchenko

No it seems not possible fold all blocks using mouse click. Agree this is may be just me. So I will try to describe how I use it. When I open some file to read the source I like first collaps all blocks to see structure of file. Then for each block I like to be able easy to fold/unfold nested blocks using mouse E.g. fold all nested blocks and then unfold only top level.

So it will be good if this can be configured

PS. I change Shift+FoldingClick to Ctrl+FoldingClick

moteus avatar Dec 24 '17 13:12 moteus

Then for each block I like to be able easy to fold/unfold nested blocks using mouse E.g. fold all nested blocks and then unfold only top level.

This can be done with Ctrl+Shift+FoldClick on the fold margin and then click on the fold (+) sign to unfold a particular top level fold, no?

If you are thinking about doing this for all elements in the file, then this can be done using Edit | Source | Fold/Unfold All menu item. If you want to simplify the use of it, you can add an icon to the toolbar linked to that ID to trigger the same behavior.

pkulchenko avatar Dec 25 '17 06:12 pkulchenko

If you are thinking about doing this for all elements in the file, then this can be done using Edit | Source | Fold/Unfold All

I want do this by Ctrl+Shift+FoldClick And with Ctrl+FoldClick Fold all nested blocks.

This is more about ability to configure such thing. Because there exits code to do this. But all mouse clicks hardcoded.

moteus avatar Dec 25 '17 08:12 moteus