Skip to content

[FR] Add line-operation to remove duplicate lines (consecutive or not) #8965

@sasumner

Description

@sasumner

Description of the Issue

Notepad++ has had the ability for a while now to remove consecutively-occurring duplicate lines via:
Edit menu > Line Operations > Remove Consecutive Duplicate Lines

It would be nice if Notepad++ could also remove non-consecutively occurring duplicate lines.
Currently this can be achieved by using the command mentioned above after sorting, but sorting isn't appropriate for all types of data.

This new feature would retain exactly one copy of any duplicated lines: the occurrence that happens FIRST in a file.

This new feature would be able to act upon a whole file, or just lines touched by a single selection.

This new feature would treat lines with line-endings that are different from the file's line-ending type the same way the Line Operations > Sort ... functions currently do (for more on this, see #7735). It is user's responsibility to make sure all line-endings match the file's line-ending type before running this command.

Debug Information

Current behavior description based upon that in:

Notepad++ v7.9 (32-bit)
Build time : Sep 22 2020 - 03:24:22
Path : C:\.........\npp.7.9.portable\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1457
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProposed enhancements of existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions