A Visual Studio Code extension that sorts functions alphabetically in your code files.
- Multi-language support: PHP, Java, C#, JavaScript, TypeScript
- Smart function detection: Recognizes various function declaration formats
- Preserves formatting: Maintains original indentation and code structure
- Easy to use: Right-click context menu or command palette access
function myFunction() {}
public function publicMethod() {}
private static function staticMethod() {}public void method() {}
private static int calculate() {}
protected abstract String getName();public void Method() {}
private static int Calculate() {}
protected abstract string GetName();function myFunction() {}
const arrow = () => {}
async function asyncFunc() {}- Open a supported file (.php, .java, .cs, .js, .ts)
- Right-click in the editor
- Select "Sort Functions Alphabetically"
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Sort Functions"
- Select "Sort Functions Alphabetically"
- Open Visual Studio Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Function Sorter"
- Click Install
- Visual Studio Code 1.74.0 or higher
- Complex nested functions may not be sorted correctly
- Functions with unusual formatting might not be detected
Initial release of Function Sorter
- Basic function sorting for PHP, Java, C#, JavaScript, TypeScript
- Context menu integration
- Command palette support
Found a bug or want to contribute? Please visit our GitHub repository.
This extension is licensed under the MIT License.
Enjoy sorting your functions! 🚀
