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

Linetidy

Snehal Pancholi

| (0) | Free
Sort, deduplicate, reverse, shuffle, and clean up selected lines.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Linetidy

Sort, deduplicate, reverse, shuffle, and clean up lines without leaving the editor.

Features

Linetidy adds six line-wrangling commands:

  • Linetidy: Sort Lines (A→Z) — sort the lines alphabetically, ascending.
  • Linetidy: Sort Lines (Z→A) — sort the lines alphabetically, descending.
  • Linetidy: Remove Duplicate Lines — keep the first occurrence of each line and drop the rest, preserving order.
  • Linetidy: Reverse Lines — flip the line order top to bottom.
  • Linetidy: Shuffle Lines — randomly reorder the lines.
  • Linetidy: Remove Blank Lines — delete lines that are empty or whitespace-only.

Sorting and duplicate detection are case-insensitive by default. Set linetidy.caseSensitive to true in your settings to compare lines with case taken into account.

Usage

  1. Open a file and (optionally) select the lines you want to act on. A partial selection is automatically expanded to cover whole lines.
  2. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
  3. Type Linetidy and pick the command you want.

If nothing is selected, the command runs on the entire document. With a selection, it runs only on the selected lines.

Settings

  • linetidy.caseSensitive (boolean, default false) — controls whether sorting and duplicate detection are case-sensitive.

License

Released under the MIT License. See the LICENSE file for details.

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