Jump to content

SciTe folding by functions

Recommended Posts



long time I was struggling with having folded the functions in scite, since I needed a way to have a tidy view of y code.

I use many files to hold functions, variables , forms views , etc. yet when in developing huge applications , I start having too much functions

so I decided to write a program to create the .scite.session file

I still refining it , but  I started the way ....

here is the code . I hope you find it useful

Dim $filesArray[20]
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
$k = $k + 1
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $k = ' & $k & @crlf )

Local $fileSession = FileOpen($sessionFile, 2)

For $i=1 to UBound($filesArray)
    Local $file = FileOpen( $filesArray[$i], 0)

    ; Check if file opened for reading OK
    If $file = -1 Then
        ConsoleWrite("Unable to open file." &  $filesArray[$i])
    While 1
        Local $line = FileReadLine($file)
        If @error = -1 Then ExitLoop
        If (StringInStr($line,"Func ")>0 And StringInStr($line,"EndFunc ")=0) Or StringInStr($line,"Case ")>0 Or StringInStr($line,"#region f-")>0 Or StringInStr($line,"#region f#")>0  Then
    $linea='buffer.'&$i&'.path='& $filesArray[$i]
    $linea='buffer.'&$i&'.folds='& StringTrimLeft($result,1)
    ConsoleWrite('$result = ' & StringTrimLeft($result,1) & @crlf )



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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.