Sorting of HTML attributes
See original GitHub issueDescription
Is there anyway to enable sorting of HTML attributes?
Input
<input class="input is-small"
type="text"
v-model="domainFilter"
placeholder="search">
Expected Output
The code should have looked like this after beautification:
<input class="input is-small"
placeholder="search"
type="text"
v-model="domainFilter">
Actual Output
The code actually looked like this after beautification:
<input class="input is-small"
type="text"
v-model="domainFilter"
placeholder="search">
Steps to Reproduce
Just add some attributes
Environment
OS: Windows 10 Vs-Code Latest
Settings
{
"editorconfig": true,
"indent_size": 2,
"wrap_attributes": "force-aligned",
"wrap_attributes_indent_size": 2,
"wrap_line_length": 80
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to sort HTML elements by data-attribute ? - GeeksforGeeks
In this article, we sort the unordered list elements using the data attribute with variable values on which the elements are to be...
Read more >Sort HTML attributes based on Alphabetical order
HTML Tidy's --sort-attributes option will sort attributes alphanumerically.
Read more >Alphabetically sorting of attributes in html and css (inline css)
The best thing to finish reformating of HTML or CSS would be, that the attributes are sorted alphabetically, too. (decided by setting)
Read more >HTML Attributes Sort (A-Z) - Code Beautify
Word sorter is very unique tool to Sort words Ascending as well as Descending. · This tool saves your time and helps to...
Read more >mrmlnc/vscode-attrs-sorter: VS Code plugin for sorting of the ...
Sorting HTML and Pug/Jade attributes ; Install. Press F1 and select Extensions: Install Extensions . Search for and select attrs-sorter . ; Usage....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Html now tokenizes before formatting. This mean it would be much easier to implement this now if any one wants to.
It would be great to see support for this. I like to keep my attributes alphabetically ordered - it helps me finding the attributes faster. (This issue is, at least to me, somewhat related to #1084, which is about re-ordering CSS properties alphabetically.)