I spent some time trying to figure out how to delete all blank lines in Visual Studio Code and I can\'t get it working. Anybody knows how to do it please?
If I search fo
For those who might be interested - what worked for me in version 1.3.1 (and still works in 1.33.1) to delete blank lines I used ctrl+h (find and replace) alt+r (Use regular expression)
In find box then:
\n\n
In replace box:
\n
This should make two consecutive end of line signs into one.
edited:
If you need to replace more empty lines (more than two) at once, you can use following regular expression in find box:
\n+
If you need to replace also empty lines with whitespaces, then you need to use following regular expression in find box:
\n+\s*\n
VS code is using javascript regular expressions