In Emacs, how to remove all empty lines (including tabs and spaces) in file?
Can M-x replace-regexp
do the trick?
I can find the empty lines with regexp: ^[st]*$, but don't know how to replace it by deleting.
M-x flush-lines RET ^[[:space:]]*$ RET
is probably the canonical way to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With