Remove adjacent duplicate lines
:uniq
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2one
one
two
two
threeCursor on line 1, column 1one
one
two
two
threeCursor on line 1, column 1one
two
threeCursor on line 1, column 1Remove adjacent duplicate lines.
Command entered · ready to apply
Removed the adjacent duplicate lines.
Before & after
one
one
two
two
threeCursor on line 1, column 1one
two
threeCursor on line 1, column 1Start in Normal mode.
Details & Vim help
Example replayed in Vim
Run :uniq to remove adjacent duplicate lines in the range. Sort first if duplicate lines are scattered.