From: Simon Ruderich Date: Sun, 25 Sep 2011 22:07:49 +0000 (+0200) Subject: vimrc: Fix compatibility for older Vim versions. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=51bdb20b6c613f6b29b1e59d6077743b0ce2da6d;p=config%2Fdotfiles.git vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- 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