POWER OF G!
Add text to the end of a line that begins with a certain string.
:g/^pattern/s/$/mytext
Delete all lines that do not match a pattern. The commands shown are equivalent (v is "inverse"). :g!/pattern/dMove all lines matching a pattern to end of file.
:v/pattern/d
:g/pattern/m$Reverse a file (just to show the power of g).
:g/^/m0