delete all line match pattern
:g/pattern/d
delete all lines not match pattern
:g!/pattern/d
:v/pattern/d
VIM 中强大的 g 命令
copy all match lines to the end of file
:g/pattern/t$
move all match lines to the end of file
:g/pattern/m$
copy all lines matching pattern to register ‘a’
qaq:g/pattern/y A