How to delete empty lines from text file using Vim Posted by Admin on December 16, 2015 Posted in: Data processing, Tools. Tagged: regular expression, text processing, vim. This task can be done using regular expression. 1. Open you text file using Vim. 2. Type :%g/^$/ 3. Hit Enter Posts navigation ← HP Microserver N40L as a NAS server How to display line numbers in Vim? →