The problem is that you're starting each autocommand with
As ":help autocmd-remove" says, an autocommand of that form first
removes all autocommands associated with the event and pattern
specified, then adds the command. So, your
au! BufRead,BufNewFile *.txt set diffopt-=iwhite diffopt+=iwhiteeol
removes the preceding
au! BufRead,BufNewFile *.txt setlocal formatprg="fmt -w70 -u"
I see that you appear to have followed the example under ":help
new-filetype". A better example for your purposes is found under
":help 43.2", but in neither place is the significance of the '!'
explained. Also, you're not doing filetype detection, you're simply
setting options depending on the filename suffix.
In any case, just removing the '!' from at least your second
autocommand should fix the problem, i.e.,
au BufRead,BufNewFile *.txt set diffopt-=iwhite diffopt+=iwhiteeol
Whether or not you keep the other '!'s depends on what you're trying
to achieve, so I'll leave that to you to figure out.