Procházet zdrojové kódy

Add persistent undo history

Olivier Marty před 7 roky
rodič
revize
7a1aca57fb
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  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