Skip to content

lollotec/sort-lines

Repository files navigation

Sort Lines with Comment IntelliJ Plugin

Build Version Downloads

Introduction

Gif of sort highlighting and quickfix

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.

Features

  • 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

Usage

Check out the Documentation


Plugin based on the IntelliJ Platform Plugin Template and inspired by IntelliJ Plugin: Building Docker Security Analysis Tools

About

IntelliJ plugin for sorting lines

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5