Skip to content
🔌 VS Code plugin for sorting of the tag attributes in the specified order.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
lib
test
.editorconfig
.gitignore
.travis.yml
.vscodeignore
CHANGELOG.md
LICENSE
README.md
extension.js
icon.png
package.json

README.md

Sorting HTML and Pug/Jade attributes

Sorting of the tag attributes in the specified order.

HTML

2016-03-03_16-23-34

Jade

2016-03-03_16-23-51

Donate

If you want to thank me, or promote your Issue.

Gratipay User

Sorry, but I have work and support for plugins requires some time after work. I will be glad of your support.

Install

  • Press F1 and select Extensions: Install Extensions.
  • Search for and select attrs-sorter.

See the extension installation guide for details.

Usage

  • You can use global keyboard shortcut ALT+SHIFT+F or right-click context menu Format code.
  • Or press F1 and run the command named Sorting of the tag attributes (attrs-sorter).

Supported languages

  • HTML (+ HTML like languages)
  • Jade (+ Pug)

Supported settings

attrsSorter.order

An array of attributes in the correct order. See posthtml-attrs-sorter#order for more details.

For example:

{
  "attrsSorter.order": ["data-.+", "aria-.+", "class"]
}

Keyboard shortcuts

For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts:

{
  "key": "ctrl+shift+c",
  "command": "attrsSorter.execute"
}

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

You can’t perform that action at this time.