Visual Studio Code Duplicate Line



Visual Studio Code Other Duplicate New to Visual Studio Code? Carets are duplicating the whole line before or after their current line. Available Commands. Duplicate After Selection - Duplicates multiple selections and/or lines after their current positions and the selections or carets will stay. Key Bindings for Visual Studio Code. Visual Studio Code lets you perform most tasks directly from the keyboard. This page lists out the default bindings (keyboard shortcuts) and describes how you can update them. Note: If you visit this page on a Mac, you will see the key bindings for the Mac. If you visit using Windows or Linux, you will see.

Visual studio duplicate rowVisual studio code find duplicate linesVisualVisual studio c++ example

Vs Code Find Duplicate Lines

Features

Check duplicate lines in the file content or selection, and remove them if you need to keep the unique lines only.

🆕Since v0.1.0, DupChecker uses cuckoo-filter to speed up checking progress, and be able to handle large files with 100k+ lines.

❗️Note: for huge files with millions of lines, you may get an error like Extension host terminated unexpectedly which is caused by JavaScript heap out of memory exception, you'd better deal with the file outside vscode in this case.

Multiple Check Modes

Commands:

  • Check Duplicates: check duplicate lines immediately.
  • Check Duplicates With Trim Condition: trim customer input characters first (on both start and end).
  • Check Duplicates With Regex Match: capture matched substrings with customer input regex first (DupChecker will use the last match if you have multiple groups in regex).
  • Check Duplicates (For All Files): check duplicate lines for all files in workspace one by one.

Configurations:

In Preferences -> settings:

Or in settings.json:

GlobPattern

Config checkAllFilesInclude and checkAllFilesExclude uses GlobPattern.e.g. * stands for all files under a folder(non-recursive), ** stands for all files under a folder(recursive).

Learn more syntax of GlobPattern.

Use Case

Check Duplicates

Check Duplicates With Trim Condition

Check Duplicates With Regex Match

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.