qfhmkg
Last Updated: February 25, 2018
·
30.21K
· kevinsuttle
Kevin suttle

Extract Unique Lines in Sublime Text 2

Here's a handy tip in Sublime Text 2 for removing duplicated lines.
Select the text you have, or suspect you have, duplicates in.

Picture

Then, you can go to Edit > Permute Lines > Unique.

Picture

Bam.

Picture

Say Thanks
Respond

6 Responses
Add your response

10258
0401877394e2f5180a348a921201efa7

And for the shortcut for this is a custom combination to be added to your user keymap:
{ "keys": ["f8"], "command": "permute_lines", "args": {"operation": "unique"} }

over 1 year ago ·
13615
Hector avatar normal

Lots of thanks Kevin! Your tip saved my day!!!

over 1 year ago ·
14907
Livepreview.aspx 1 normal

Hey this is cool, how would we go about removing duplicates if we have columns?

e.g.

id|url
id|url
id|url

over 1 year ago ·
14913
Kevin suttle

@Mycamerafocus: I don't think you can. Focus can only be on one pane at a time.

over 1 year ago ·
20730
2014 06 28 chopada med pesqueiro squared

Thanks God.

over 1 year ago ·
29701

So, somebody asked about finding the duplicates. Don't forget you can use a Unix command, 'uniq -d' to print those out. (Sort the file, first.)

5 months ago ·
Awesome Job

E3f3ffd4 7af3 11e8 8350 27339c1e9f05
Maintenance Release Coordination Engineer
·
Nuremberg, Germany; other SUSE loca
·
Full Time