Visual Studio Code extension to sort, shuffle, reverse, or filter selected lines or characters.
Sorting lines by line length: arrange-selection.sortLinesByLength
& arrange-selection.sortLinesByLengthDescending
- Keeps only the first unique line(s)
A character being a grapheme, so composite characters should be arranged as one.
- Keeps only the first unique character(s)
All commands are available in both the context menu (visible only if something is selected) and the command palette (⇧+⌘+P, Ctrl+Shift+P, or F1).
Nothing is bind by default, however, they can be added to the corresponding command.
Setting | Description |
---|---|
arrangeSelection.arrangeOnEmptySelection |
When nothing is selected, specifies whether to arrange the entire document |
arrangeSelection.arrangeAcrossMultipleSelection |
When there are multiple selections, specifies whether to arrange them independently or as a whole |
arrangeSelection.selectDuplicates |
When filtering duplicates lines or characters, specifies whether to delete or select the duplicates |
arrangeSelection.lines.ignoreIndent |
When sorting lines, specifies whether to ignore whitespace to the left of each line |
arrangeSelection.lines.useNaturalSortOrder |
When sorting lines, specifies whether to use natural sort order |
arrangeSelection.characters.ignoreLineBreaks |
When arranging characters, specifies whether to skip/ignore newline control characters |