From 824b44922f69ff5364d02a967628bf82c4db8aea Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 19 Feb 2012 01:42:16 +0100 Subject: [PATCH] vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- vimrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index 95a5631..7a56542 100644 --- a/vimrc +++ b/vimrc @@ -539,13 +539,17 @@ if has('autocmd') " 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 -- 2.45.2