diff --git a/spacemacs/packages.el b/spacemacs/packages.el index fc77e0f13..32706045b 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -2079,8 +2079,11 @@ determine the state to enable when escaping from the insert state.") :idle (global-undo-tree-mode) :defer t :init - (setq undo-tree-history-directory-alist + (setq undo-tree-auto-save-history t + undo-tree-history-directory-alist `(("." . ,(concat spacemacs-cache-directory "undo")))) + (unless (file-exists-p (concat spacemacs-cache-directory "undo")) + (make-directory (concat spacemacs-cache-directory "undo"))) (setq undo-tree-visualizer-timestamps t) (setq undo-tree-visualizer-diff t) :config