Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>C Declaration SorterNew to Visual Studio Code? Get it now.
C Declaration Sorter

C Declaration Sorter

zaciam

|
48 installs
| (1) | Free
Sorts declarations in C according to the order of their definitions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C Declaration Sorter Extension for Visual Studio Code

Overview

This extension provides a convenient way to sort declarations within source code files and header files based on the order of their definitions. It enhances code readability and organization by maintaining consistency between definition and declaration.

Features

  • Sorts declarations in C according to the order of their definitions.

Usage

  1. Open a source or header file in Visual Studio Code.
  2. Use the Command Palette by pressing Ctrl+Shift+P.
  3. Type "Sort Declarations" and select the command from the dropdown.
  4. The extension will sort the declarations in the file according to the order of the definitions.

Requirements

  • Dependency: Language Support for C

Extension Settings

This extension does not have any configurable settings.

Known Issues

Currently, there are no known issues with this extension. If you encounter any problems or have suggestions for improvements, please feel free to submit an issue on GitHub.

Release Notes

Version 1.0.4

Updated extension icon.

Version 1.0.3

Added support for comments before macros like EXTERN_C in the lines directly above the function.

Version 1.0.2

Made sure to only sort function declarations and no other kind of declarations.

Version 1.0.1

Added a check for a semicolon behind the method declaration to ensure it is really one to be sorted.

Version 1.0.0

Initial release of C Declaration Sorter Extension.

License

This extension is licensed under the MIT License.


Thank you for using the C Declaration Sorter Extension! If you find it useful, please consider leaving a review and rating in the Visual Studio Code Marketplace. If you have any feedback or questions, don't hesitate to reach out. Happy coding!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft