Let’s say you have a set of lines and you want to remove all of the duplicated lines.
You can do this in Vim by visually selecting the lines, then using the :sort u command.
:sort is an Ex command used for sorting the line range — the u flag tells it to remove duplicates.
Try it in the editor!