aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-03-19 00:22:54 +0800
committerGuangxiong Lin <[email protected]>2022-03-19 00:22:54 +0800
commite65a5bb29bf73ab659d6d8d23bb7ba105dea3600 (patch)
treea9dc82f4d2e72dc60a41981e4011da66935914a7
parent311c1036a6cf6f58d22cc82812d499b6eed10f45 (diff)
downloaddotfiles-e65a5bb29bf73ab659d6d8d23bb7ba105dea3600.tar.gz
dotfiles-e65a5bb29bf73ab659d6d8d23bb7ba105dea3600.tar.bz2
dotfiles-e65a5bb29bf73ab659d6d8d23bb7ba105dea3600.zip
Setup undo-tree history (emacs)
-rw-r--r--.emacs.d/.gitignore1
-rw-r--r--.emacs.d/lisp/init-misc.el2
2 files changed, 3 insertions, 0 deletions
diff --git a/.emacs.d/.gitignore b/.emacs.d/.gitignore
index d89c469..69333b2 100644
--- a/.emacs.d/.gitignore
+++ b/.emacs.d/.gitignore
@@ -14,5 +14,6 @@ pyim
.last-package-update-day
lisp/init-local.el
+undo
history
projects \ No newline at end of file
diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el
index f5f8b33..727227a 100644
--- a/.emacs.d/lisp/init-misc.el
+++ b/.emacs.d/lisp/init-misc.el
@@ -61,6 +61,8 @@
(add-hook 'after-init-hook 'global-undo-tree-mode))
(with-eval-after-load 'undo-tree
(gx/diminish 'undo-tree-mode))
+(setq undo-tree-auto-save-history t
+ undo-tree-history-directory-alist `(("." . ,(concat user-emacs-directory "undo"))))
(with-eval-after-load 'eldoc
(gx/diminish 'eldoc-mode))