diff --git a/vim/.vimrc b/vim/.vimrc index c8fdda224ce1501727d8a181e55546a2a6acfdfd..22fe6d636dddb8701ff5764b65d5946a041afa17 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -84,10 +84,12 @@ set nowrap " no wrapping of long lines set noswapfile set nobackup " because undodir/undofile -set undodir=~/.vim/undodir -set undofile -if !isdirectory(&undodir) - call mkdir(&undodir, "p") +if has('persistent_undo') + set undodir=~/.vim/undodir + set undofile + if !isdirectory(&undodir) + call mkdir(&undodir, "p") + endif endif set hlsearch " highlight search terms @@ -118,9 +120,10 @@ else endif - set cursorline " highlight the line of the cursor -set colorcolumn=80 " highlight column #80 +if exists("&colorcolumn") + set colorcolumn=80 " highlight column #80 +endif highlight CorlorColumn ctermbg=0 guibg=lightgrey " highlight text beyond column 80 highlight OverLength ctermbg=71 ctermfg=white guibg=#592929