How to Delete Blank Lines in VimPosted by Josh on November 16, 2017To delete all blank lines in a file using Vim (or nvim), you can do this: :g/^\s*$/d Read more here.