Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 plugin to sort your functions alphabetically

I am building many functions in my application and now I want to alphabetise them. Is there any function in Sublime Text 2 that will do this automatiaclly. It should change these

public function login_1()
{
........
}

public function about()
{
........
}

public function close()
{
........
}

Into these

public function about()
{
........
}

public function close()
{
........
}

public function login_1()
{
........
}
like image 925
Pierce McGeough Avatar asked Nov 12 '22 21:11

Pierce McGeough


1 Answers

I wonder if you are using PHP, from the syntax you provided it seems you do.

Here is a plugin for that task, but it looks like it works with PHP only. It sorts your methods using the scope first and then by method name.

like image 170
Sergey Telshevsky Avatar answered Dec 31 '22 14:12

Sergey Telshevsky