Skip to content

Lines plugin

A toolbox of whole-line operations — duplicate, move, sort, deduplicate, split, join and clean up lines, following Notepad++ conventions. Each command records a single undo step.

Scope: what each command acts on

  • Caret-line operations (duplicate, move, insert blank) act on the selected line span, or just the caret's line when nothing is selected.
  • Range transforms (sort, deduplicate, reverse, randomise, remove empty/blank, split) act on the selected lines, or the whole document when nothing is selected.
  • Join Lines needs a multi-line selection and joins those lines with a single space.

Each line keeps its original end-of-line sequence (\n, \r\n, \r), so mixed or non-native line endings survive the operation.

Where to find it — Edit ▸ Lines

Editing & movement

Command What it does
Duplicate Current Line Copies the line span below itself.
Move Up / Move Down Current Line Shifts the line span one row up or down.
Insert Blank Line Above / Below Current Adds an empty line next to the caret line.
Split Lines Hard-wraps lines longer than 80 columns, breaking at the last space before the limit (or hard at 80).
Join Lines Merges the selected lines into one, space-separated.

Removing lines

Command What it does
Remove Duplicate Lines Drops every later duplicate, keeping first occurrences.
Remove Consecutive Duplicate Lines Collapses only adjacent duplicates.
Remove Empty Lines Removes lines with no characters.
Remove Empty Lines (Containing Blank characters) Also removes lines that hold only whitespace.

Reordering

Command What it does
Reverse Line Order Flips the order of the lines.
Randomize Line Order Shuffles the lines.

Sorting

Sort comes in seven keys, each available Ascending and Descending (14 commands). Sorting is stable — equal lines keep their relative order.

Sort key Orders by
Lexicographically Raw byte value.
Lex. … Ignoring Case Byte value, ASCII case-insensitive.
In Locale Order Language-aware collation (accents, locale rules).
As Integers The leading whole number on each line; non-numeric lines sort first.
As Decimals (Dot) The leading number, using . as the decimal separator.
As Decimals (Comma) The leading number, using , as the decimal separator.
By Length Line length in bytes.

Trailing newline is preserved

Reordering keeps the document's overall trailing-newline shape: a file that ended without a final newline still does after a sort, reverse or shuffle.