VS Code Delete Every Other Line

For some reason, after having edited a file in cPanel's online code editor, when I downloaded said file to my local machine it had empty lines added after every existing line. Of course, this was very ugly and made the file double the length in the editor.

Anyway, here's a quick guide on how to remove these extra lines.

  1. Press ALT+H to open the replace box (top right).
  2. Make sure Regex is enable by clicking the dot+star icon. It will add a color border to it.
  3. Enter (.*)\n\1\n in the search box.
  4. Enter $1\n in the replace box.
  5. Hit replace all, and you're good to go!