From 9f56049a8a1aa562d6bff2d9a29f64059b2a1b94 Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Tue, 6 Nov 2012 17:06:57 +0100 Subject: [PATCH] vim: enabled undofiles --- vim/vimrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index dc2272d..b861604 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -71,6 +71,17 @@ set pastetoggle= set history=100 set undolevels=150 +set undofile + +if filewritable(expand("~/.vim/tmp/undo")) == 2 + set undodir=$HOME/.vim/tmp/undo +else + if has("unix") || has("win32unix") + call system("mkdir $HOME/.vim/tmp/undo -p") + set undodir=$HOME/.vim/tmp/undo + endif +endif + set backup if filewritable(expand("~/.vim/tmp/backup")) == 2