Removing duplicate rows in vi? November 22, 2022 by Tarik If you’re OK with sorting your file, you can use: :sort u