-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow custom sort function depending on filetype #53201
Comments
(Experimental duplicate detection) |
#48123 is similar (requesting ASCII compare instead of localeCompare) but this would not resolve this specific situation since - (45) comes before : (58) |
This could be implemented from an extension. Specifically, for CSS, a formatter could be written that always sorts properties in a certain order ... |
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines. Happy Coding! |
currently, "sort lines ascending" sorts alphabetically caseinsensitive.
While this makes sense most of the time, there are case where a more specific ordering would be preferable,
Example: Sass/CSS ordering
when sorting in Sass/Css files, the current sorting order is a counter intuitive:
will become
because it orders '-' before ':' but in this specific case, it's preferable to go from generic to specific, i.e. ordering border before border-radius.
with a way to provide a custom sort function (or have some to choose from) would allow to get this way of sorting
The text was updated successfully, but these errors were encountered: