apply changes to lines match a pattern
:g/foo/d
- delete lines with pattern foo in this file,
d
is the abbreviation of
:delete
command
:g/foo/normal Q
- apply macro on lines with pattern foo in this file