In ex-mode I can use :g/^$/d
for the whole file. How to do it for a visual selected part of the file?
Select text visually, press : to enter command mode, and use the same command or use the '<
and '>
markers. E.g. :'<,'><your command here>
.
For your particular use case, the final command would be:
:'<,'>g/^$/d
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