I want to delete all the comments from a program.  Vim already knows (in some sense) where all the comments are because it is correctly formatting them based on the syntax file the particular language I'm using.  So, I'd like to do something like this::g/[sComments]/dPossible?
Match by syntax highlighting instead of expressions
syntax highlighting;comments
I think that  the SrchRplcHiGrp.vim plugin might be what you're looking for.You can install it with your favorite method. For example with Vundle just put this line in your .vimrc:Plugin 'vim-scripts/SrchRplcHiGrp.vim'You can select the highlighting group you want to work with by placing your cursor on the comment and running :SRChooseHiGrp.Then you can use :SRHiGrp to replace the members of the higlighting group.You'll find the documentation on the page linked at the beggining of my answer.