Delete duplicate lines.
Here's how it works:
To delete duplicate lines, match one line, a newline and the captured line again:
:%s/^\(.*\)\n\1$/\1/