1

Replace undo-tree with vundo and undo-fu-session

This commit is contained in:
Jessie Hildebrandt 2022-12-20 18:26:12 -05:00
parent 41902b340a
commit 921903401e

30
init.el
View File

@ -1291,26 +1291,24 @@ DOCSTRING is an optional form that is discarded upon expansion."
:custom
(solaire-mode-real-buffer-fn (lambda ()
(and (buffer-name (buffer-base-buffer))
(not (string-equal major-mode "neotree-mode"))
(not (derived-mode-p 'neotree-mode))
(not (string-match "\*Echo Area" (buffer-name (buffer-base-buffer)))))))
:hook
(server-after-make-frame-hook . solaire-global-mode)
(emacs-startup-hook . solaire-global-mode))
;; ---------------------------------- ;;
;; undo-tree
;; undo-fu-session
;; ---------------------------------- ;;
(defconst user/undo-tree-directory (locate-user-emacs-file "undo-tree/") "Location of undo-tree backup directory.")
(defconst user/undo-history-directory (locate-user-emacs-file "undo-history/") "Location of undo-fu-session history backups.")
(external-package undo-tree
"Visualizes undo history as a tree in an interactive buffer"
(external-package undo-fu-session
"Saves and recovers undo history of files between editing sessions"
:config
(global-undo-tree-mode)
(global-undo-fu-session-mode)
:custom
(undo-tree-enable-undo-in-region t "Enable undoing changes local to the active region.")
:custom
(undo-tree-history-directory-alist `(("." . ,user/undo-tree-directory))))
(undo-fu-session-directory user/undo-history-directory "Set custom undo history storage location"))
;; ---------------------------------- ;;
;; vertico
@ -1334,6 +1332,20 @@ DOCSTRING is an optional form that is discarded upon expansion."
("\d" . vertico-directory-delete-char)
("\M-\d" . vertico-directory-delete-word)))
;; ---------------------------------- ;;
;; vundo
;; ---------------------------------- ;;
(external-package vundo
"Visualizes undo history as a tree in an interactive buffer"
:custom
(vundo-glyph-alist vundo-unicode-symbols "Visualize undo history with pretty unicode symbols")
:hook
(vundo-mode-hook . (lambda ()
(setq-local global-hl-line-mode nil)))
:bind
("C-x u" . vundo))
;; ---------------------------------- ;;
;; writeroom-mode
;; ---------------------------------- ;;