Executing au! without a group name will remove all autocmd in current group, which may contain autocmds set by other scripts.
For example, once I run :Pytest file<CR>, :e newfile.py will not trigger syntax highlighting, I have to run :syntax on or :syntax enable manually for each newly created buffer in the same vim session afterwards.
This can be fixed by adding an autogroup.
Executing
au!
without a group name will remove all autocmd in current group, which may contain autocmds set by other scripts. For example, once I run:Pytest file<CR>
,:e newfile.py
will not trigger syntax highlighting, I have to run:syntax on
or:syntax enable
manually for each newly created buffer in the same vim session afterwards. This can be fixed by adding an autogroup.