Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Arrange SelectionNew to Visual Studio Code? Get it now.

Arrange Selection

Wupb

|
371 installs
| (1) | Free
Sort, shuffle, reverse, or filter selected lines or characters
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Arrange Selection

marketplace last commit issues license

Visual Studio Code extension to sort, shuffle, reverse, or filter selected lines or characters.

Features

Arranging lines

Reversing lines: arrange-selection.reverseLines

Reverse lines.gif

Sorting lines: arrange-selection.sortLines & arrange-selection.sortLinesDescending

Sort lines.gif

Sorting lines by line length: arrange-selection.sortLinesByLength & arrange-selection.sortLinesByLengthDescending

Sort lines by length.gif

Shuffling lines: arrange-selection.shuffleLines

Shuffle lines.gif

Filtering duplicate lines: arrange-selection.filterDuplicateLines

  • Keeps only the first unique line(s)

Filter lines.gif

Arranging characters

A character being a grapheme, so composite characters should be arranged as one.

Reverse characters: arrange-selection.reverseCharacters

Reverse characters.gif

Sorting characters: arrange-selection.sortCharacters & arrange-selection.sortCharactersDescending

Sort characters.gif

Shuffling characters: arrange-selection.shuffleCharacters

Shuffle characters.gif

Filtering duplicate characters: arrange-selection.filterDuplicateCharacters

  • Keeps only the first unique character(s)

Filter characters.gif

Command

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).

Command Palette.gif

Keybinds

Nothing is bind by default, however, they can be added to the corresponding command.

Keyboard shortcuts.png

Extension Settings

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
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft