Sign in to follow this  
Followers 0
CatchFish

Question about folding in SciTE

6 posts in this topic

#1 ·  Posted (edited)

It seems that all blocks will be unfolded when I call "Toogle All Folds" if some of them are folded. I have a script of size 120K+ and I have to use folding all time. The unnecessary action of unfolding wastes nearly 10 seconds.

Could anyone tell me how to fold all blocks at once, regardless of the current folding status? Thanks.

Edited: spelling...

Edited by CatchFish

Share this post


Link to post
Share on other sites



Toggle is the name. Have you tried it more then once? It will toggle all to unfold or fold. I'm perhaps guessing on exactly what you mean.

Toggling folds on a 100kb file takes about 1 sec+, but cpu speed may change times.

Share this post


Link to post
Share on other sites

Thanks for the reply, and sorry for my poor expression.

Suppose that there are 3 folds.

- If ALL of them are UNFOLD, a call to Toggle All Folds will make them all FOLD.

- If ANY single item of them is FOLD, a call to Toggle All Folds will make them all UNFOLD.

I cannot guarantee all folds are unfold all the time, so calling Toggle All Folds usually makes them all unfold.

What nags me is that the unnecessary action of making items unfold wastes me unacceptable long time. (You think it acceptable? Sorry, your code is not complex enough;) What I need is a method to instantly make all items FOLD, even if some of them is already fold. Toggle All Folds is not suitable for me in this case.

Here is my suggestion:

1. A third-party plugin of "Make All Fold" would be nice.

2. Improvement of SciTE to reduce time cost on folds is even better.

3. Another script editor for replacement is the last choice.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

From http://www.scintilla.org/SciTEDoc.html

SciTE supports folding for many languages (see the list of languages understood by SciTE for more information.) Fold points are based upon indentation for Python and on counting braces for the other languages. The fold point markers can be clicked to expand and contract folds. Ctrl+Shift+Click in the fold margin will expand or contract all the top level folds. Ctrl+Click on a fold point to toggle it and perform the same operation on all children. Shift+Click on a fold point to show all children.

EDIT: Well, I thought that it did a fold-all, but it is still just a toggle, sorry.

There should be some way with Lua-scripting..... SciTE website might have support/newsgroups....

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Thank you, CyberSlug. Before asking questions, I've read the help doc of SciTE, especially that paragraph. Hot keys do save time for a second or two, but it doesn't (really) solve the problem.

Maybe I have spent too much time on this topic. I could have make the code fold & unfold hundreds of times if I didn't ask questions like this... B)

All replies are appreciated, anyway.

Share this post


Link to post
Share on other sites

There should be some way with Lua-scripting..... SciTE website might have support/newsgroups....

Well, I'll look into Lua-scripting or seek support on SciTE website if I have time. Now just want to find quick solution here... B)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0