Delete line in vi 13 Jan, 2010 • Nicolas Ledez Tags: tips, vim To delete line in vi(m) if line respect a pattern : :g/^#/ d Is delete comment lines :g/^$/ d Is delete empty lines Please enable JavaScript to view the comments powered by Disqus.