Explorar o código

Add persistent undo history

Olivier Marty %!s(int64=7) %!d(string=hai) anos
pai
achega
7a1aca57fb
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      vimrc

+ 9 - 0
vimrc

@@ -17,3 +17,12 @@ set ruler
 set showcmd
 set background=dark
 set mouse=a
+
+" Keep undo history across sessions by storing it in a file
+if has('persistent_undo')
+    let myUndoDir = expand('$HOME/.vimundodir')
+    " Create dirs
+    call system('mkdir ' . myUndoDir)
+    let &undodir = myUndoDir
+    set undofile
+endif