I have a Vim autocmd that removes trailing whitespace in files before write. I want this almost 100% of the time, but there are a few filetypes that I\'d like it disabled. C
The easiest way would be to set a local variable for the one filetype to true. Then set the automcommand if that variable is false (if set for everything else) or if it exists at all (no need to preset it).
autocmd BufWritePre *.foo let b:foo=true
if !exists("b:foo")
autocmd ...
endif
changed variable prefixes based on comment