Sort blocks of lines with a comment.
On the line before the lines to be sorted use one of the following sort patterns:
- Simple
sort: [asc|desc] - Group
sort: { order: [asc|desc], group: /regex/ } - Split
sort: { order: [asc|desc], split: /regex/, key: #}
The plugin will check the order of the following lines until there is a blank line, an indent level change, or another
sort comment. To force a different end to the sort include sort: end on the line where the sort should end.
- Highlights unsorted lines with a warning and provides a quick fix to sort them
- Syntax highlighting and sort order completion for the sort comment
- Action in the tools menu to sort all the lines in the open file
- Option to sort lines on save for all files
- Custom settings for ascending and descending sort orders
- Gutter icons showing sort comment location and sort order
Check out the Documentation
Plugin based on the IntelliJ Platform Plugin Template and inspired by IntelliJ Plugin: Building Docker Security Analysis Tools
