From 51bdb20b6c613f6b29b1e59d6077743b0ce2da6d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 26 Sep 2011 00:07:49 +0200 Subject: [PATCH] vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- vimrc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index 83996b3..3fa27cb 100644 --- a/vimrc +++ b/vimrc @@ -345,7 +345,9 @@ if has('syntax') " Don't highlight more than 500 columns as I normally don't have that long " lines and they slow down syntax coloring. Thanks to Derek Wyatt " (http://www.derekwyatt.org/vim/the-vimrc-file/). - set synmaxcol=500 + if exists('+synmaxcol') + set synmaxcol=500 + endif " Highlight lines longer than 78 characters. Thanks to Tony Mechelynck " from the Vim mailing list. It can easily be @@ -377,8 +379,8 @@ endif " Use pathogen which allows one 'runtimepath' entry per plugin. This makes " installing/removing/updating plugins simple. (Used for plugins with more " than one file.) -if has('eval') - call pathogen#runtime_append_all_bundles() +if has('eval') && v:version >= 700 + execute 'call pathogen#runtime_append_all_bundles()' endif " Settings for the NERD commenter. @@ -431,7 +433,9 @@ 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. - autocmd InsertLeave * set nopaste + if exists('#InsertLeave') + autocmd InsertLeave * set nopaste + endif " AFTER/FTPLUGIN AUTO COMMANDS -- 2.44.2