Sublime Text 2 plugin to sort your functions alphabetically

柔情痞子 提交于 2020-01-03 14:13:54

问题


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.



来源:https://stackoverflow.com/questions/19119697/sublime-text-2-plugin-to-sort-your-functions-alphabetically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!