Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#580 Pascal code folding improvement

open
nobody
None
5
2012-01-16
2012-01-16
Anonymous
No

I just found Geany, and i am a very happy user. Programming is nothing more than a hobby of mine, and Geany has everything i have ever needed and does it intuitively.

I am a big fan of code folding, and the implementation of most, or even all editors for pascal code rarely does it to perfection. The thing is, most editors just fold the code by the begin and end-statements. The problem here is that a pascal function definition also has a variable, label and constant-definition part. Here is a piece of code from a small project i a currently writing:

function ParseMessage(input: String) : IrcMessage;
var
product : IrcMessage;
pos : integer; {position in string. used for parsing }
label
err;
begin

In that example, geany shows the code folding marker by the begin statement. If it is feasible to implement a code folding to start by the VAR or LABEL or whatever statements are allowed before the function/procedure body that would be a great addition. It of course depends on how the code folding is implemented in geany whether it is feasible or not, but it doesn't harm asking.

Thank you for a great editor!
/Swedish Hobby coder

Discussion

  • Lex Trotman
    Lex Trotman
    2012-02-02

    Code folding is provided by the Scintilla editor component www.scintilla.org. If the feature is added in Scintilla it would likely become available in Geany.