How do you use a macro to remove consecutive duplicate lines?
qayy:+1\nif getline('.')==@0|d|else|+1|endif\nq
Record a macro that yanks the current line and compares it with the next.
qayy:+1\nif getline('.')==@0|d|else|+1|endif\nq
Record a macro that yanks the current line and compares it with the next.
qayyp:s/old/new/\nq
Record a macro that yanks and pastes the current line, then substitutes text on the new line.