From e211f4c6bb9284cddaee8b1f80cc99cc2f517954 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Wed, 12 Oct 2011 20:13:18 +0200 Subject: [PATCH] stop polluting cwd and conserve undo info --- vimrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index fb2d23b..9d53b3a 100644 --- a/vimrc +++ b/vimrc @@ -109,8 +109,9 @@ autocmd FileType make set noexpandtab "makefiles need tabs autocmd FileType ruby set softtabstop=2 shiftwidth=2 autocmd FileType eruby set softtabstop=2 shiftwidth=2 -"swap files -"set directory=/var/tmp,. +"swap/undo files +set dir=~/.vim/tmp/swap//,/var/tmp//,/tmp//,. +set undodir=~/.vim/tmp/undo//,. "buffer management set swb=usetab "make :sb go to tabs too @@ -167,6 +168,8 @@ map! "highlight OverLength ctermbg=red ctermfg=white guibg=#592929 "match OverLength /\%81v.\+/ +" conserve undo info +set undofile " restore last known cursor position function! ResCur()