I use a lit this ed (http://man.openbsd.org/4.4BSD-Lite2/ed.1) commands from vi (not just vim).
For instance:
Delele first 20 lines:
<ESC>:0,20d
Delete lines from current location to end of file:
<ESC>:,$d
Search and replace from regrex:
<ESC>:0,$s/regex/replacement/g