[Geany] Pascal code folding

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Geany] Pascal code folding

spir ☣
Hello,

In Pascal mode; folding seems to only wrap parts between begin...end. This imo does not match the needs since in Pascal a var section forms a logical block; and in pascal like any other PL a whole function def indeed form a code block, while only a part of it is enclosed in begin...end.
Examples:

// seems unfoldable
var
        number, min, max : Integer;
        sum : Integer;
        average : Real;
        numbers : Array [1..number_count] of Integer = (1,2,3,5);

// only the begin..end parts seem foldable
function getSum(numbers:Array of Integer; count:Integer) : Integer;
        var
                i : Integer;
        begin
        result := 0;
        for i:=1 to count do begin
                result := result + numbers[i];
        end;
end;

Also, is there a way to get func names highlighted? (and class names in object pascal)
Tried to use the keys defname funcname functionname but no way ;-)

Denis
________________________________

vit esse estrany ☣

spir.wikidot.com
_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Pascal code folding

Enrico Tröger
On Mon, 19 Apr 2010 18:00:58 +0200, spir wrote:

Hi,

>In Pascal mode; folding seems to only wrap parts between begin...end.
>This imo does not match the needs since in Pascal a var section forms
>a logical block; and in pascal like any other PL a whole function def
>indeed form a code block, while only a part of it is enclosed in
>begin...end. Examples:

Folding is done completely by Scintilla.
Please file a feature request there [1].


>Also, is there a way to get func names highlighted? (and class names
>in object pascal) Tried to use the keys defname funcname functionname
>but no way ;-)

Don't style keys which are not listed in the default filetype
definition file, this won't work.
You can try the key "identifier" which does modify the style of
function names but also of variables and maybe more.


[1] https://sourceforge.net/tracker/?group_id=2439&atid=352439


Regards,
Enrico

--
Get my GPG key from http://www.uvena.de/pub.asc

_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany

attachment0 (205 bytes) Download Attachment
Loading...