0
0000
1111

2222
3333

4444
5555

Such a file, how to remove all null space lines with vim like this:

0000
1111
2222
3333
4444
5555
s_zhang
  • 717
  • 2
  • 6
  • 16

1 Answers1

6

:global will help:

:g/^$/d

The part between // is the regexp to search for (empty line) and d is the command - delete the line.

Zbynek Vyskovsky - kvr000
  • 17,458
  • 2
  • 33
  • 41