From 3721445795727b1883cc99eeb65fbe5573d15a5e Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Fri, 26 Jun 2020 16:27:07 -0700 Subject: [PATCH] Add checks before loading recent vim features My env runs on a couple of systems that are so old, fairly recent vintage vim features are not present. This results in a graceful but annoying warning I'd rather be rid of. So I've flanked the three main issue items in version or feature checks. --- .vimrc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index d3494d0..8a4c57b 100644 --- a/.vimrc +++ b/.vimrc @@ -8,8 +8,12 @@ call vundle#begin() " Plugin execution Plugin 'VundleVim/Vundle.vim' -Plugin 'vim-pandoc/vim-pandoc' -Plugin 'vim-pandoc/vim-pandoc-syntax' + +if v:version >= 704 + Plugin 'vim-pandoc/vim-pandoc' + Plugin 'vim-pandoc/vim-pandoc-syntax' +endif + Plugin 'tpope/vim-surround' Plugin 'mhinz/vim-startify' Plugin 'vim-airline/vim-airline' @@ -26,7 +30,9 @@ filetype plugin indent on let g:ale_python_pylint_executable = "pylint3" " Visual themeing -set termguicolors "Enable 256 colors +if exists('+termguicolors') + set termguicolors "Enable 256 colors +endif set scrolloff=5 "Always display 5 lines below cursor when scrolling colorscheme hemisu set background=dark @@ -42,7 +48,9 @@ set ignorecase set smartcase " Tabs and Whitespace -set breakindent +if exists('+breakindent') + set breakindent +endif set autoindent set smartindent set nowrap