From: Simon Ruderich Date: Mon, 9 Apr 2012 15:37:57 +0000 (+0200) Subject: vimrc: Fix compatibility for older Vim versions. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4f34459eb6428f842c2fb1c546f571fa6911fd2c;p=config%2Fdotfiles.git vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- 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