Sublime Text 2 plugin to sort your functions alpha

2019-06-23 04:17发布

问题:

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()
{
........
}

回答1:

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.