Highlight Duplicates
Highlight duplicated lines in SublimeText 3
Details
Installs
- Total 4K
- Win 2K
- OS X 1K
- Linux 500
Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 1 | 9 | 6 | 6 | 2 | 1 | 2 | 5 | 5 | 3 | 7 | 3 | 1 | 1 | 2 | 8 | 2 | 5 | 1 | 1 | 5 | 7 | 5 | 5 | 5 | 1 | 2 | 5 | 7 | 5 | 9 | 2 | 2 | 2 | 4 | 3 | 7 | 5 | 6 | 1 | 5 | 5 | 8 | 8 | 3 |
OS X | 0 | 1 | 2 | 2 | 2 | 0 | 1 | 2 | 3 | 3 | 4 | 3 | 0 | 1 | 1 | 5 | 2 | 1 | 1 | 2 | 3 | 2 | 4 | 7 | 0 | 4 | 0 | 1 | 3 | 5 | 6 | 5 | 2 | 1 | 5 | 3 | 2 | 5 | 5 | 3 | 0 | 0 | 1 | 3 | 4 | 5 |
Linux | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 2 | 1 | 0 | 1 | 0 | 5 | 3 | 3 | 1 | 2 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 2 | 1 | 0 | 1 | 2 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 4 | 1 | 0 | 0 | 0 | 4 | 0 |
Readme
- Source
- raw.githubusercontent.com
Highlight Duplicates
Highlight duplicated lines. This is a Sublime Text 3 (and ST2) plugin.
Installation
Using Package Control (installation instructions)
Press ctrl+shift+p (cmd+shift+p for OSX), then use the 'Package Control: Install Package' command.
Search for 'HighlightDuplicates', and press enter to install.
Manually
Go to your Packages
subdirectory under ST3's data directory:
- Windows:
%APPDATA%\Sublime Text 3
- OS X:
~/Library/Application Support/Sublime Text 3/Packages
- Linux:
~/.config/sublime-text-3
- Portable Installation:
Sublime Text 3/Data
Then clone this repository:
git clone git://github.com/lordbrom/HighlightDuplicates.git
That's it!
Commands
Toggle Highlighting
Using 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 Duplicates
Using 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.
Note: By default neither of these commands have a key binding, and can only be used via the Command Palette. You can set a key binding by adding one, or both, of the following lines to the key binding file. (Preferences > Key Bindings)
{ "keys": ["alt+shift+h"], "command": "toggle_highlight_duplicates" }
{ "keys": ["alt+shift+s"], "command": "toggle_select_duplicates" }
Options
Change The Highlighting Color
Default: "invalid"
The highlighting color can be changed by providing a scope name such as “invalid”, “comment”, etc…
If you'd like to use a custom color, it should be defined as a color scope in your theme file.
Trim White Space
Default: true
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 "trim_white_space" : true
the following 2 lines will be counted as duplicates.
“ html
1:
2:
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.
``` html
1: <someTag> </someTag>
2: <someTag></someTag>
Ignore Case
Default: false
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 "ignore_case" : true
the following 2 lines will be counted as duplicates.
” html
1:
2: