1. In your desired file press cmd + f
  2. In the search bar type: ^(.*)(\n\1)+$ then press the little downwards arrow and in the replace input field type: $1

(Make sure you have the regex option selected in the find and replace popup)

3. Press the “Replace all” button

There you go! You should have all duplicates removed now!

--

--

Nicolas Carmont

Nicolas Carmont

26K+ Reads ✍🏼 Ex-Amazon, Ex-Startup Founder, Ex-Nike 👨‍💻 Passionate about ML, Software and giving people genuine value on Medium 👌 Views are all my own.