Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 - remove duplicated words in a list of words

Is there anyway to remove duplicates in a list of words like this?

Hey
Hello
Hey
Hey
Jhon
Mark
Salcaz

i'm on macosx and each word is on new line formatted 1 word per line

like image 968
itsme Avatar asked Jan 25 '14 10:01

itsme


2 Answers

I see that I'm too late, but it's worth mentioning that sublime have command "Permute lines - Unique", which deletes duplicates from selected lines. Works like a charm, and there are answer on superuser about shortcuts: hotkey to remove duplicate lines in sublime

like image 167
Victor Suzdalev Avatar answered Sep 29 '22 05:09

Victor Suzdalev


If you want a faster method, just select the whole text or list and go to Edit - Permute Lines - Unique. This will sort lines alphabetically and remove duplicated entries.

Another method is to sort your list alphabetically and search for duplicates manually.


See more details and live examples here:

http://html-tuts.com/remove-duplicate-lines-using-sublime-text/

like image 42
Dan Avatar answered Sep 29 '22 05:09

Dan