From: Simon Ruderich Date: Tue, 17 Feb 2009 13:35:01 +0000 (+0100) Subject: Add first autocmd, for mercurial. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=fc7c97547a236b9b4e5678d1e2742b98293ed957;p=config%2Fdotfiles.git Add first autocmd, for mercurial. They are only used if autocmd is available. --- diff --git a/vimrc b/vimrc index 3d269fa..a3163f8 100644 --- a/vimrc +++ b/vimrc @@ -168,3 +168,18 @@ endif let NERDCreateDefaultMappings = 0 " Map toggle comment. map NERDCommenterToggle + + +" AUTO COMMANDS + +" Use a custom auto group to prevent problems when the vimrc files is sourced +" twice. +if has("autocmd") + augroup vimrc + autocmd! + +" Use diff filetype for mercurial patches in patch queue. + autocmd BufReadPost */.hg/patches/* set filetype=diff + + augroup END +endif