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 use a macro for this. Do the following.
gg
qq
dd
q
10000@q
PS: To go to command mode just press Escape a couple of times.