Is there any plugin, macro or built-in function that can remove empty or redundant empty lines in Netbeans 7.2 (PHP bundle, Windows 7)? Due to different line-break formats in my upload and download process (Win <> Unix, via FileZilla and Netbeans), many PHP files doubled (even quadrupled) their line breaks.
I could remove them file by file using PSPad - but I am looking for an automatic or batch-capable solution. I can accept an external tool if available.
Edit: I know about the Source > Format
helper, but there are no settings to remove blank lines.
You can do this with a regular expression + and a replacement. Do this in an editor window or in the project (or files) directory tree:
\n\n
\n
If you want to keep a blank line you should:
\n\n\n
\n\n
If you want to replace consecutive lines that are not empty but contain whitespaces only you should:
\n[\t\r]+$\n
\n