Sublime Text 2 - remove duplicate words in a word list

Is there a way to remove duplicates in the list of such words?

Hey
Hello
Hey
Hey
Jhon
Mark
Salcaz

I am on macosx and each word on a new line is formatted for 1 word per line

+4
source share
5 answers

Ctrl Gselects all occurrences of the template in the current Mac file in Sublime Text 2. Thus, in your example, you can point the cursor to any instance Hey(without explicitly selecting it), and the call Ctrl Gwill select each instance Heyin your file. You can then delete all of them at a time and re-add one instance.

Ctrl G, . . , F . , .

, Hey Ctrl G, , - , they , Hey.

+2

, , , "Permute lines - Unique", . , :

+11
+6

You can select several areas of text and edit them all at once. On OS X, highlight the desired word and press Cmd+Dto select and go to the next occurrence, or Cmd+K+Dto skip and go to the next occurrence.

The expression of the highest text

+2
source

Simply:

Edit -> Sort Lines (F9)
Edit -> Permute Lines -> Unique
+1
source

Source: https://habr.com/ru/post/1523675/


All Articles