From fc7c97547a236b9b4e5678d1e2742b98293ed957 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 17 Feb 2009 14:35:01 +0100 Subject: [PATCH] Add first autocmd, for mercurial. They are only used if autocmd is available. --- vimrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.45.2