From 4f34459eb6428f842c2fb1c546f571fa6911fd2c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 9 Apr 2012 17:37:57 +0200 Subject: [PATCH] vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- vimrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 83ad315..bc126c8 100644 --- a/vimrc +++ b/vimrc @@ -641,8 +641,11 @@ if has('autocmd') " Don't ignore case while in insert mode, but ignore case in all other modes. " This causes / to honor the case and thus only complete matching " capitalization. But while searching (/) 'ignorecase' is used. - autocmd InsertEnter * set noignorecase - autocmd InsertLeave * set ignorecase +" InsertEnter/InsertLeave doesn't exist in older Vims. + if exists('##InsertEnter') && exists('##InsertLeave') + autocmd InsertEnter * set noignorecase + autocmd InsertLeave * set ignorecase + endif " AFTER/FTPLUGIN AUTO COMMANDS -- 2.45.2