dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit ac44011388b1119d0ca575b84b259c7028adb8d3
parent 820f58f1b17b097970b7ab2c32a19eb853d03be4
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Tue,  8 Jan 2019 12:15:00 +0100

Vim: Enable options only if they exist

Former-commit-id: 265f6735a7675b9709444a9fb26cf285b49ef4c4
Diffstat:
Mvim/editor.vimrc | 12++++++++----
Mvim/general.vimrc | 6++++--
2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/vim/editor.vimrc b/vim/editor.vimrc @@ -6,7 +6,9 @@ syntax on filetype plugin indent on " In general, don't want anything concealed -set conceallevel=0 +if has('conceallevel') + set conceallevel=0 +endif " Highlight current line set cursorline @@ -19,8 +21,10 @@ set linebreak set textwidth=500 " Continue wrapped line on same indent as previous -set breakindent -set breakindentopt+=shift:3 +if has('breakindent') + set breakindent + set breakindentopt+=shift:3 +endif " Numbered lines set number @@ -54,7 +58,7 @@ set matchtime=2 " Since belloff isn't always an option if exists("&belloff") - set belloff=showmatch " Disable beeping if no match is found + set belloff=showmatch " Disable beeping if no match is found endif " Searching diff --git a/vim/general.vimrc b/vim/general.vimrc @@ -15,8 +15,10 @@ set binary set noswapfile " Persistent undos (useful for plugins too) -set undofile -set undodir=~/.vim/undo +if has('undofile') + set undofile + set undodir=~/.vim/undo +endif " Hide buffers instead of closing set hidden