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

Simple Line Sorter

welman91

|
2 installs
| (0) | Free
Simple Line sorter to sorting lines by length
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Simple Line Sorter

A lightweight Visual Studio Code extension to quickly sort selected lines based on their length.

Perfect for organizing PHP use statements, import lists, namespaces, routes, configuration values, or any other line-based text.


Features

Current version (v0.0.1) includes:

  • Sort lines from Longest → Shortest
  • Sort lines from Shortest → Longest
  • Works with any selected text, not limited to PHP files
  • Preserves the selected block by replacing only the highlighted lines

Usage

  1. Select multiple lines in the editor.

Example:

use Filament\Schemas\Components\Section;
use Filament\Forms\Components\Select;
use Illuminate\Database\Eloquent\Model;
  1. Right-click the selected text.

  2. Choose:

Simple Line Sorter →
  1. Select one of the available actions:
  • Longest → Shortest
  • Shortest → Longest

The selected lines will be sorted instantly.


Example

Before

use Filament\Schemas\Components\Section;
use Filament\Forms\Components\Select;
use Illuminate\Database\Eloquent\Model;

Longest → Shortest

use Filament\Schemas\Components\Section;
use Illuminate\Database\Eloquent\Model;
use Filament\Forms\Components\Select;

Shortest → Longest

use Filament\Forms\Components\Select;
use Illuminate\Database\Eloquent\Model;
use Filament\Schemas\Components\Section;

Requirements

  • Visual Studio Code 1.125.0 or newer.

Known Limitations

  • Only the selected lines are sorted.
  • Empty lines are included in the sorting process.
  • Sorting is based on line length only.

Roadmap

Planned features for future releases include:

  • Alphabetical sorting (A → Z / Z → A)
  • Remove duplicate lines
  • Remove empty lines
  • Reverse line order
  • Shuffle lines
  • Natural sorting

Release Notes

v0.0.1

Initial release.

Features:

  • Longest → Shortest
  • Shortest → Longest

Feedback

If you encounter a bug or have a feature request, please open an issue on GitHub.

Contributions and suggestions are always welcome.

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