shEiD Posted April 21, 2010 Posted April 21, 2010 Hi,I searched the forums but couldn't find anything about this.Is there a way to set default "folding level" on file open (and/or on toggle all folds). I mean, I have scite set "fold.on.open=1", though it folds only 1st level. It would be most convenient to be able to set default level to fold by. The best example would be IE.au3 from autoit includes. It's separated into regions and opens up very nicely, (all those 4026 lines showing up as mere ~15):#Region Header #Region Global Variables and Constants #Region Core functions #Region Frame Functions #Region Frame Functions etcThe problem is, if I open any region - ALL functions inside are unfolded, and it opens to hundreds of lines. I know about CTRL+click and yes, it helps. The annoying thing about CTRL+click, is that it folds everything, every if, loop, whathaveyou. That drives me crazy Pretty much all of my scripts use same structure as IE.au3 (imho, the easiest and tidiest solution - spliting to includes are kinda more trouble). Perfectly there would be setting to make default folding to level 2, so on open file, toggle and tidy, all regions and only functions/comments inside them would get folded, but everything inside the functions would be left unfolded (ifs/loops/etc). That way, I could forget about CTRL+click altogether.Hope I'm making any sence and you get my meaning.Thanks in advance.
shEiD Posted April 25, 2010 Author Posted April 25, 2010 (edited) There is an option in scite settings: fold.flags.If you set it to 64 it enables showing hexadecimal fold levels in margin:It clearly shows all the folding levels, so the "mechanism" is probably already in place. Maybe someone with Lua knowledge could implement this? Edited April 25, 2010 by shEiD
kalel69 Posted September 8, 2012 Posted September 8, 2012 (edited) 2 year old post, but I have the same issue. Here is my solution...Read the last entry by me. It works to close those functions under the selected region. I've also updated it to fold the function descriptions if they're based on the IE.au3 format as well!Just wish there was a faster/cleaner solution.Thanks, Edited September 8, 2012 by kalel69
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now