Removing duplicated lines - VIM

It is a good way to compare to list and see what you have left to do. First sort your list then, find lines that duplicate and replace with a blank space, strip empty lines and wallah. an clean list of what you have left.
:sort | %s/^\(.*\)$\n\1$// | v/./d

I was inspired by : Uniq - Removing duplicate lines - Vim Tips Wiki: "g/^\(.*\)$\n\1$/d"


Popular posts from this blog

Disease and intelligence: Mens sana in corpore sano | The Economist

Burlington Police Scanners Go Silent – or What are you Phreaking doing