views:

62

answers:

1

I use Geany as text editor (windows). It shows the functions list sorted alphabetically and I would like to have the actual functions in the source code sorted in that way.

Is there any program to process the source code (php) and output the functions sorted alphabetically my name?

A: 

Knowing what a function looks like in any particular language takes some understanding, by the editor, of the structure of the language. For instance, a Perl or PHP method looks a lot different than a Python method, and a lot different than a Scilab method:

# Perl:
sub add {
    $_[0]+$_[1]
}

# PHP:
<?php
function add ($a, $b) {
    return $a+$b;
}

# Python:
def add(a, b):

    return a+b

// Scilab
function [c]=add(a,b)
    c = a + b;
endfunction

Your editor needs to be able to recognize and account for that.

You should use an IDE like Eclipse, which has support for many different languages. It also has many other features like a source code auto-formatter, based on your personal code style preference.

amphetamachine
Geany DOES show me a sorted list. I want to sort the actual code, so the source is in the same order as the function list. I'm ussing PHP by the way (and hate eclipse)
The Disintegrator