From 0bec13a9d9a5699e5184b6b4c2700adbd622e2db Mon Sep 17 00:00:00 2001 From: ruanyl Date: Sat, 21 Jun 2014 22:36:59 +0300 Subject: [PATCH] change the way of version detect for undo persistence --- vimrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vimrc b/vimrc index 2eca31dbf..81d635ef1 100644 --- a/vimrc +++ b/vimrc @@ -74,11 +74,11 @@ set noswapfile "create undo file -set undolevels=1000 " How many undos -set undoreload=10000 " number of lines to save for undo -if v:version >= 730 -    set undofile " keep a persistent backup file - set undodir=/tmp/vimundo/ +if has('persistent_undo') + set undolevels=1000 " How many undos + set undoreload=10000 " number of lines to save for undo + set undofile " So is persistent undo ... + set undodir=/tmp/vimundo/ endif set wildignore=*.swp,*.bak,*.pyc,*.class,.svn