Persistant undo, my saviour

This commit is contained in:
Geoffrey Frogeye 2016-01-12 14:05:27 +01:00
parent 426f927b4b
commit a3b9e27e91

14
vimrc
View file

@ -199,6 +199,20 @@ filetype on
filetype plugin on
filetype indent on
" Put plugins and dictionaries in this dir (also on Windows)
let vimDir = '$HOME/.vim'
let &runtimepath.=','.vimDir
" Keep undo history across sessions by storing it in a file
if has('persistent_undo')
let myUndoDir = expand(vimDir . '/undodir')
" Create dirs
call system('mkdir ' . vimDir)
call system('mkdir ' . myUndoDir)
let &undodir = myUndoDir
set undofile
endif
map <up> <nop>
map <down> <nop>
map <left> <nop>