Switch to undo-fu and vundo, these are nicer

This commit is contained in:
Joseph Ferano 2022-11-12 21:51:26 +03:00
parent 36972ca410
commit b51177bde8

View File

@ -721,14 +721,13 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i
#+begin_src emacs-lisp
(add-hook 'emacs-startup-hook (lambda () (require 'vterm)))
#+end_src
** Undo Tree
** Undo Fu
#+begin_src emacs-lisp
(straight-use-package 'undo-tree)
(add-hook 'after-init-hook (lambda ()
(global-undo-tree-mode)
(setq undo-tree-visualizer-diff t)
(setq undo-tree-history-directory-alist `(("." . ,(expand-file-name "undo" user-emacs-directory))))))
(straight-use-package 'undo-fu)
(straight-use-package 'undo-fu-session)
(straight-use-package 'vundo)
(global-undo-fu-session-mode)
(setq undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" "/git-rebase-todo\\'"))
#+end_src
** Text Editor
@ -774,7 +773,7 @@ Emacs is an great operating system, if only it had a good text editor...
#+begin_src emacs-lisp
(setq evil-want-keybinding nil)
(setq evil-undo-system 'undo-tree)
(setq evil-undo-system 'undo-fu)
(setq evil-want-C-u-scroll t)
(setq evil-want-Y-yank-to-eol t)
(setq evil-disable-insert-state-bindings t)
@ -788,6 +787,7 @@ Emacs is an great operating system, if only it had a good text editor...
;; TODO: We need 3 bindings; 1.) close buffer 2.) close window 3.) close buffer and window
;; To disable a keybinding just bind it to nil
(evil-set-leader 'normal (kbd "SPC"))
(evil-define-key 'normal 'global (kbd "<leader>w") 'save-buffer)
(evil-define-key 'normal 'global (kbd "<leader>q") 'kill-buffer-and-window)
(evil-define-key 'normal 'global (kbd "<leader>k") 'kill-this-buffer)
@ -858,7 +858,6 @@ Emacs is an great operating system, if only it had a good text editor...
(setq evil-goggles-duration 0.075)
(setq evil-goggles-pulse t)
(setq evil-goggles-async-duration 0.55)
#+end_src
** Which Key