Open ih4cku opened 8 years ago
When using autocmd, Vim doesn't know if you want to replacing an existing one. So it just append the new operation to the event. This is when to use augroup.
autocmd
augroup
Use autocmd! to clear previous group.
autocmd!
see: LVTHW - Autocommand Groups
Example:
augroup reload_vimrc " { autocmd! autocmd BufWritePost $MYVIMRC source $MYVIMRC augroup END " }
Ref: Auto-Reload Your Vimrc
When using
autocmd
, Vim doesn't know if you want to replacing an existing one. So it just append the new operation to the event. This is when to useaugroup
.Use
autocmd!
to clear previous group.see: LVTHW - Autocommand Groups