" Automatically disable 'paste' mode when leaving insert mode. Thanks to
" Raimondi in #vim on Freenode (2010-08-14 23:01 CEST). Very useful as I only
-" want to paste once and then 'paste' gets automatically unset.
+" want to paste once and then 'paste' gets automatically unset. InsertLeave
+" doesn't exist in older Vims.
if exists('##InsertLeave')
autocmd InsertLeave * set nopaste
endif
-" Write file when running :mak[e] before 'makeprg' is called.
- autocmd QuickFixCmdPre * write
+" Write file when running :mak[e] before 'makeprg' is called. QuickFixCmdPre
+" doesn't exist in older Vims.
+ if exists('##QuickFixCmdPre')
+ autocmd QuickFixCmdPre * write
+ endif
" AFTER/FTPLUGIN AUTO COMMANDS