vim :global Move/collect lines containing key information


Example

a simple yet very useful command:

:g/ending/m$

moves lines containing ending to the end of the buffer.

m means move
$ means end of buffer, while 0 means beginning of buffer.