Persistant undo, my saviour
This commit is contained in:
parent
426f927b4b
commit
a3b9e27e91
14
vimrc
14
vimrc
|
@ -199,6 +199,20 @@ filetype on
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
filetype indent 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 <up> <nop>
|
||||||
map <down> <nop>
|
map <down> <nop>
|
||||||
map <left> <nop>
|
map <left> <nop>
|
||||||
|
|
Loading…
Reference in a new issue