Is undo-tree dependency strictly necessary
I was wondering if undo-tree is only there to match Vim behavior, and if I could use Evil without it. I actually find built-in Emacs undo functionality intuitive and I'm used to how it operates. On the other hand, I've run into some cases where undo-tree didn't behave as expected. If there are no ill consequences in using original Emacs undo vs undo-tree, it would be nice if it were configurable. --Leo P.S.: Thanks Frank and Vegard for quick bug-fixing action!
Am Thu, 12 Jan 2012 16:53:10 -0600 schrieb Leo Alekseyev <[email protected]>:
I was wondering if undo-tree is only there to match Vim behavior, and if I could use Evil without it. I actually find built-in Emacs undo functionality intuitive and I'm used to how it operates. On the other hand, I've run into some cases where undo-tree didn't behave as expected. If there are no ill consequences in using original Emacs undo vs undo-tree, it would be nice if it were configurable.
Undo tree is completely optional, but if undo tree is available and already loaded, the undo command "u" is mapped to the undo function of the undo-tree package. If you install evil via el-get undo tree will be loaded automatically. But you can get the old behavior by remapping "u" do the standard undo function: (define-key evil-normal-state-map "u" 'undo) and if you have the redo.el or redo+.el package (define-key evil-normal-state-map (kbd "C-r") 'redo) Frank PS: just grep the sources for "undo-tree" and you will see that evil guards everying with something like (when (fboundp 'undo-tree-undo) ...) overriding the default bindings if the undo-tree equivalents are available. But you can easily "undo" these changes to undo ;)
On Fri, Jan 13, 2012 at 3:02 AM, Frank Fischer <[email protected]> wrote:
Am Thu, 12 Jan 2012 16:53:10 -0600 schrieb Leo Alekseyev <[email protected]>:
I was wondering if undo-tree is only there to match Vim behavior, and if I could use Evil without it. I actually find built-in Emacs undo functionality intuitive and I'm used to how it operates. On the other hand, I've run into some cases where undo-tree didn't behave as expected. If there are no ill consequences in using original Emacs undo vs undo-tree, it would be nice if it were configurable.
Undo tree is completely optional, but if undo tree is available and already loaded, the undo command "u" is mapped to the undo function of the undo-tree package. If you install evil via el-get undo tree will be loaded automatically. But you can get the old behavior by remapping "u" do the standard undo function:
(define-key evil-normal-state-map "u" 'undo)
Actually, that doesn't work, because undo-tree remaps the undo command, not just the undo keys. The solution seems to be simply to move undo-tree.el out of the way so that it doesn't load on (require 'undo-tree).
Leo Alekseyev <dnquark <at> gmail.com> writes:
I was wondering if undo-tree is only there to match Vim behavior, and if I could use Evil without it. I actually find built-in Emacs undo functionality intuitive and I'm used to how it operates. On the other hand, I've run into some cases where undo-tree didn't behave as expected. If there are no ill consequences in using original Emacs undo vs undo-tree, it would be nice if it were configurable.
I agree. Sometimes I stay in insert mode too long, and accidentally hit cmd-x rather than ctrl-x and delete to the last mark. Is there any way to change the granularity of undo-tree so that any sort of deletion is tracked? Thanks, Justin
participants (3)
-
Frank Fischer -
Justin Gordon -
Leo Alekseyev