The following methods are used to delete even rows:
It used: Gbobal command, gbobal command format as follows:
: [Range]global/{pattern}/{command}
The global command is actually divided into two steps: First scans all rows in the range specified by [range], marks the rows that match {pattern}, and then, in turn, executes the {command} command on the tagged row, if the tagged row is deleted in the command action for the previously matched row, Move or merge, the tag disappears automatically, but the {command} command is not executed for the row. {command} can be an ex command, or multiple ex commands separated by |, so that we can do many different things with rows that are marked or addressed from a tag line.
A command that deletes even rows, matches all rows, and then deletes each other (of which +1 is positioned on the next line of the current row). Why is it interlaced? Because the second row is deleted when the +1 d command is executed on the first line, and the second row is marked but no longer exists, the command to delete the third row is not executed.
The commands for deleting several lines are as follows:
The role of M is to remove even-numbered lines of markup to prevent even-numbered rows from being deleted.
Delete several rows of even rows, or you can use the normal command (the first command is a few rows):