Remove Duplicate Line in Vim?

后端 未结 9 1147
有刺的猬
有刺的猬 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 07:06

    You could select the lines then do a :'<,'>sort u if you don't care about the ordering. It will sort and remove duplicates.

提交回复
热议问题