Highlight DuplicatesWith this plugin you are able to have duplicate lines highlighted in the editor. The visibility, and style of the highlighting is customizable in the settings. You are also able to select all duplicate lines in a file, as well as remove duplicate lines leaving only 1 of each in the file. This is a vsCode plugin that is the same as the Sublime Text plugin by the same name. CommandsToggle HighlightingUsing this command will turn the plugin on and off. This allows you to see the highlighted only when you want without having to disable/enable to plugin via the Package Control. Select DuplicatesUsing this command will select the rows that would be highlighted when Highlight Duplicates is toggled on. The duplicate rows do not need to be highlighted in order for this command to work. Remove DuplicatesUsing this command will remove all duplicate lines, after the first instance, from the file. For example...
Would result in
OptionsBorder Width
The thickness of the outline, along with which side it actually shows can be adjusted with this setting. To make the outline just appear as an underline, change this to Border Style
Border Color
Trim White Space
If this setting is true, the leading and trailing white space will be removed before being compared to other lines. This setting also affects which lines are selected when using the 'Select Duplicates' command. For example, if
However, the following lines would not be counted as duplicates. The reason for this is because there is white space in line 1 that is not leading or trailing, which does not appear in line 2.
Ignore Case
If this setting is true, upper and lower case letters will be considered the same. This setting also affects which lines are selected when using the 'Select Duplicates' command. For example, if
Min Line Length
Lines with fewer characters than specified in this setting, will be ignored for all functions. Keeping this to 1 will cause all non empty lines to be possible duplicates. For example, if set to 4, only lines 7 and 8 will be selected when using the "select duplicate" command. If this setting is set to 2, all the lines except lines 1 and 2 will be selected when using the "select duplicate" command.
Min Duplicate Count
The number of matching lines, beyond the first, that need to be found in order to be counted as duplicates. For example, setting this option to
Ignore List
Lines matching entires in this list, will be ignored for all functions. Leading and trailing white space, as well as letter case, will be ignored when checking lines against the ignore list.
Ignore Case for Ignore List
Similar to "Ignore Case" except only applies when matching lines to the "Ignore List" setting. Use Selection
If set to true, the "Select Duplicate" and "Remove Duplicate" commands will only use lines that have selected content. If nothing is selected or the option is set to false, the entire document will be included. |