Let’s look at two ways to get rid of blank lines in Notepad++ in Windows 10.
Open Notepad++ file.
Hit Edit at the top.
Hover your mouse over Line Operations, located just above Comment/Uncomment.
Now you can see these two options:
Remove Empty Lines – this will remove blank lines.
Remove Empty Lines (Containing Blank characters) – which will delete blank lines that include blank characters such as “Space.”
Click on the one you prefer.
This method removes spaces from the beginning of the lines as well as blank lines, including blank characters.
To do this, use Replace. Here’s how:
Press Ctrl + H to bring up the Replace popup.
In the Search Mode section, select “Regular expression.”
In the field beside Find what, type this: ^\s
Hit the Replace All button.