Delete line in vi
To delete line in vi(m) if line respect a pattern :
:g/^#/ d
Is delete comment lines
:g/^$/ d
Is delete empty lines
To delete line in vi(m) if line respect a pattern :
:g/^#/ d
Is delete comment lines
:g/^$/ d
Is delete empty lines