From: Simon Ruderich Date: Sun, 2 Sep 2012 02:27:54 +0000 (+0200) Subject: vimrc: Fix compatibility for older Vim versions. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=72689700fae926c2cfbd652e2b5751e7409fa3b1;p=config%2Fdotfiles.git vimrc: Fix compatibility for older Vim versions. Works fine with Vim 6.4. --- diff --git a/vimrc b/vimrc index 3a48b1e..491979b 100644 --- a/vimrc +++ b/vimrc @@ -353,7 +353,7 @@ if has('statusline') set statusline+=%02n " buffer number set statusline+=%{StatuslineBufferCount()} " highest buffer number set statusline+=: - if has('modify_fname') + if has('modify_fname') && v:version >= 700 " some functions need 7.0 set statusline+=%{StatuslineRelativeFilename()} " path to current file set statusline+=\ " space after path else @@ -754,8 +754,10 @@ if has('eval') " Settings for securemodelines. " Only allow items I need (also includes spl which is not enabled by " default). - let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm', - \ 'sw', 'sts', 'noet'] + if v:version >= 700 " need lists + let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm', + \ 'sw', 'sts', 'noet'] + endif " Settings for the NERD commenter. " Don't create any mappings I don't want to use.