"Collapsing Editor Nodes" the term you are looking for is "code folding"
What you are looking for (at least the most similar...) is in the Keymap. Tools > Option > Editor > Keymap
And on that page, under "Text folding commands"
"Fold to Level n" by default Alt-Shift-1 to Alt-Shift-9
However that does not only affect "procedures", it will also fold "classes", and "type" sections, etc.
Depends on what you have set up under: Tools > Option > Editor > Code Folding
It depends, if you have disabled folding for "unit", "program", "unit section" (interface, implementation)....
- If you fold (collapse) "implementation" then that hides all the "procedures" inside it => that is called "nested" and makes one nested level.
- unit > implementation > procedure : 3 levels (procedure would be 3rd)
But if you disable them, procedure is on top (1st level)
Alt-Shift-1 => folds all at the 1st level. That could be "procedure" and "class". Or it could be "implementation", or it could be "procedure" and "type"...
Depends on what you allow to be folded.
So you have to try out what is at what level, depending on your config.
And that means, you may fold more that only "procedure".
If you select some text, then a right click, on the "[+]"/"[-]" area, allows you to fold comments, and inactive-IFDEF.
Not tested: You might be able to use the editors macro feature
https://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros (and it has a link to pascal script)
You could record, search for procedure (that is easier to do with the pascal script macro)
begin
ecIncrementalFind;
ecChar('p');
ecChar('r');
ecChar('o');
ecChar('c');
ecChar('e');
ecChar('d');
ecChar('u');
ecChar('r');
ecChar('e');
ecLeft;
ecFoldCurrent;
ecDown;
end.
with pascalscript you can do search for diff keywords, verify if the search found something, and repeat in a loop