Delete every other line in VIM File

How to delete every other line in a vim file? 

:g/^/+d

This will essentially delete all even numbered lines. If you’d like to delete all odd numbered lines, delete the first line in the file (ggdd) and then run the same command as above.

Comments

Popular posts from this blog

SOX - Sound eXchange - How to use SOX for audio processing tasks in research.

Sox of Silence - Original post - http://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/

How to get video or audio duration of a file using ffmpeg?