Removing contiguous duplicate lines in vi without sorting
- by Dave Tapley
This question already addresses how to remove duplicate lines, but enforces that the list is sorted first.
I would like to perform the remove contiguous duplicate lines step (i.e. uniq) without first sorting them.
Example before:
Foo
Foo
Bar
Bar
Example after:
Foo
Bar