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
  • 847
  • 2
  • 8
  • 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
  • 18,186
  • 3
  • 35
  • 43