Skip to content

Instantly share code, notes, and snippets.

@AnasAboreeda
Created October 30, 2017 03:48
Show Gist options
  • Save AnasAboreeda/b9eba91cff214427d424fe6747a77987 to your computer and use it in GitHub Desktop.
Save AnasAboreeda/b9eba91cff214427d424fe6747a77987 to your computer and use it in GitHub Desktop.
How to remove duplicate lines in Visual Studio Code?
  1. Type in the search field: ^(.*)(\r?\n\1)+$
  2. type in the "replace with" field: $1
  3. Click "Replace All".
@tghelere
Copy link

tghelere commented Nov 7, 2019

It is useful, but only finds repeated lines in sequence.
Rows that repeat but are not in sequence are not identified.

Identified
Some text
Some text
Other text
Not identified
Some text
Other text
Some text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment