How to delete every other line in Vim?

An elegant (and efficient) way to accomplish the task is to invoke the
:delete command (see :help :d) for the + line range (short for .+1)
addressing the line following the current one (see :help {address}), on
every line (see :help /^) using the :global command (see :help :g):

:g/^/+d

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)