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.
- Press ALT+H to open the replace box (top right).
- Make sure Regex is enable by clicking the dot+star icon. It will add a color border to it.
(.*)\n\1\nin the search box.
$1\nin the replace box.
- Hit replace all, and you're good to go!