Remove Duplicate Line in Vim?

后端 未结 9 1066
有刺的猬
有刺的猬 2021-01-15 06:19

I\'m trying to use VIM to remove a duplicate line in an XML file I created. (I can\'t recreate the file because the ID numbers will change.)

The file looks something

9条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 06:50

    A simple regular expression won't suffice. I've implemented a

    :DeleteDuplicateLinesIgnoring
    

    command (as well as related commands) in my PatternsOnText plugin. You can even supply a {pattern} to exclude certain lines from the de-duplication.

提交回复
热议问题