Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text: Find and remove all duplicates

I have a file with the following:

a
b
b
c

And I need to find all duplicates and remove them, so it should be like this:

a
c

The command "edit > permute lines > unique" wouldn't delete all the occurrences. Any suggestions? Thank you!

like image 632
Diego Fortes Avatar asked Dec 05 '25 19:12

Diego Fortes


2 Answers

Try: "edit -> sort lines" then "edit -> permute lines -> unique"

like image 139
kkodev Avatar answered Dec 08 '25 11:12

kkodev


Select some text and press Ctrl + D to add more instances. Then press delete to remove. Read more feature at Sublime text doc

like image 36
Florent Daligand Avatar answered Dec 08 '25 10:12

Florent Daligand



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!