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 :custom
(solaire-mode-real-buffer-fn (lambda () (solaire-mode-real-buffer-fn (lambda ()
(and (buffer-name (buffer-base-buffer)) (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))))))) (not (string-match "\*Echo Area" (buffer-name (buffer-base-buffer)))))))
:hook :hook
(server-after-make-frame-hook . solaire-global-mode) (server-after-make-frame-hook . solaire-global-mode)
(emacs-startup-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 (external-package undo-fu-session
"Visualizes undo history as a tree in an interactive buffer" "Saves and recovers undo history of files between editing sessions"
:config :config
(global-undo-tree-mode) (global-undo-fu-session-mode)
:custom :custom
(undo-tree-enable-undo-in-region t "Enable undoing changes local to the active region.") (undo-fu-session-directory user/undo-history-directory "Set custom undo history storage location"))
:custom
(undo-tree-history-directory-alist `(("." . ,user/undo-tree-directory))))
;; ---------------------------------- ;; ;; ---------------------------------- ;;
;; vertico ;; vertico
@ -1334,6 +1332,20 @@ DOCSTRING is an optional form that is discarded upon expansion."
("\d" . vertico-directory-delete-char) ("\d" . vertico-directory-delete-char)
("\M-\d" . vertico-directory-delete-word))) ("\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 ;; writeroom-mode
;; ---------------------------------- ;; ;; ---------------------------------- ;;