Delete empty lines
:%g/^$/d
Delete lines matching the pattern
:g/<pattern>/d
Comment out lines 1 through 5
:1,5 s/^/#/
Uncomment lines 1 through 5
:1,5 s/^#//