My system has some default vim settings that make no sense to use on programming language files. I'd like to change my formatoptions setting for any buffer with a programming language filetype.
I had been adding an autocmd to my .vimrc for each file extension:
au FileType python,c,cpp,java setlocal formatoptions=crql
But it's getting annoying to maintain this list. How can I configure settings for all programming language filetypes (c, cpp, python, java...) and possibly all structured syntaxes (xml, yaml, cfg, diff...), but not for miscellaneous filetypes like gitcommit and no filetype? Do I need to maintain my own blacklist?
vimwon't support them all, but I bet the list it does support has room for some ambiguity.