Delete lines by pattern

Delete all lines that start with # (comments)

:g/^#/d

tool
vim10 commands
tags
vimlinux

More vim commands

all 10 vim commands