• Packages
  • Themes
  • Documentation
  • Blog
  • Discussions
Sign in

sorter

Sort all the things!
  • #sort
  • #lines
  • #sorting
  • #natural
  • #natural-sort
FlorianWendelborn
1.3.0 9,479
21
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Installation

apm install sorter

Bindings

By default, the following keyboard shortcuts are assigned:

macOS API Call Linux
⌃⌥E sorter:sort CTRL+ALT+E
⌥⇧E sorter:natural-sort ALT+⇧+E

Supported Sorting Contexts

  • Single-Line-Selections and selections spanning parts of one line

    • sorter will attempt to sort JSON
    • sorter will attempt to sort YAML
    • sorter will attempt to sort HTML
    • sorter will attempt to sort CSS
    • sorter will attempt to sort any =, , or separated values
    • sorter will attempt to restore semicolons and indentation
    • For example:
      • {"b":0,"a":1} → {"a":1,"b":0}
      • id="a" class="example" → class="example" id="a"
      • a, x, c, 2; → 2, a, c, x;
  • Multi-Line-Selections

    • sorter will attempt to sort JSON
    • these will be sorted by line
  • Multiple Selections

    • every selection will be handled separately according to the rules above

Supported Sorting Algorithms

  • Alphabetic Sort

    • default javascript sorting function
    • sorter:sort
  • Natural Sort

    • sorts like a human
    • uses javascript-natural-sort
    • sorter:natural-sort

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by