Delete duplicate lines in files with Sublime Text

Lets assume you have a list of numbers and you want to remove the duplicates. My favorite text editor Sublime Text has a very handy function for that. It can sort lines by alphabetical/numeric order and remove duplicate lines.

If you have the values comma separated (e.g. 2,4,5,6,3,4,5,…) copy them into an empty sublime text window and do a find/replace to replace comma with line break. You then should have each number in a new line.

Now click “Edit” > “Sort Lines” to sort the lines by value.

Now click “Edit” > “Permute Lines” > “Unique” to remove duplicate values.