I spent a lot of time maintaining a .emacs. Then I found Spacemacs and now it's <i>much</i> shorter - the majority is just spacemacs boilerplate:<p><a href="https://github.com/itamarst/dotfiles/blob/master/.spacemacs#L310-L358" rel="nofollow">https://github.com/itamarst/dotfiles/blob/master/.spacemacs#...</a> and <a href="https://github.com/itamarst/dotfiles/blob/master/.spacemacs#L32-L72" rel="nofollow">https://github.com/itamarst/dotfiles/blob/master/.spacemacs#...</a> are most my customizations.
For me it's a simple undotree toggle:<p><pre><code> ;; undotree
(defun undo-tree-visualizer-toggle ()
(interactive)
(if (get-buffer undo-tree-visualizer-buffer-name)
(undo-tree-visualizer-quit)
(undo-tree-visualize)))
;; Represent undo-history as an actual tree (visualize with C-x u)
(setq undo-tree-mode-lighter "")
(require 'undo-tree)
(global-undo-tree-mode)
(global-set-key [f8] 'undo-tree-visualizer-toggle)</code></pre>
I use mine [1] mostly for Org-mode but there are a few other goodies included. Eventually I'd like to wrap it with use-package for portability.<p>To the curious: don't hesitate to ask.<p>To the critical: don't hesitate to point out improvements!<p>[1] <a href="https://github.com/sk8ingdom/.emacs.d" rel="nofollow">https://github.com/sk8ingdom/.emacs.d</a>
<a href="https://gist.github.com/ahoka/aa2a83196ceab44ab400" rel="nofollow">https://gist.github.com/ahoka/aa2a83196ceab44ab400</a><p>It's much better since I have learned about use-package.