Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Line Length SorterNew to Visual Studio Code? Get it now.
Line Length Sorter

Line Length Sorter

cqb13

|
421 installs
| (1) | Free
Sorts highlighted lines by their length.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Line Length Sorter

Sorts highlighted lines by their length.

Features

  • Allows you to sort selected lines by their length.
    • Longest to shortest
    • Shortest to longest

Extension Settings

This extension contributes the following settings:

  • line-length-sorter.removeBlank: Removes blank lines from selection during sorting. (default: true)

Usage

Method 1

  1. Select the lines you want to sort.
  2. Press Ctrl+Shift+P to open the command palette.
  3. Type Sort Lines Longest to Shortest or Sort Lines Shortest to Longest and press Enter.

Method 2

  1. Select the lines you want to sort.
  2. Right click the selection.
  3. Click Sort Lines Longest to Shortest or Sort Lines Shortest to Longest.

Contributing

Feel free to open an issue or a pull request. GitHub Repository

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft