I would like to delete every other line from a Vim buffer, starting with the second one, i.e., lines 2, 4, 6, etc. For example, if the buffer’s contents is:
a
You can always pipe though a shell command, which means you can use any scripting language you like:
:%!perl -nle 'print if $. % 2'
(or use "unless" instead of "if", depending on which lines you want)