1

I don't want to have key 'u' bound to undo-tree-undo, as it's too conveniently dangerous to confuse with u for universal argument prefix.

I tried

(global-unset-key "u")

But it didn't have any effect. How can I achieve my goal?

Furthermore, the above code has a disasterous effect of redenring key 'u' not working at all. I could not even input letter 'u'.

Edit: based on Drew's suggestion, here is the likely relevant key map:

undo-tree-map is a variable defined in ‘undo-tree.el’.
Its value is shown below.

  This variable may be risky if used as a file-local variable.

Documentation:
Keymap used in undo-tree-mode.

Value: (keymap
 (24 keymap
     (114 keymap
          (85 . undo-tree-restore-state-from-register)
          (117 . undo-tree-save-state-to-register))
     (117 . undo-tree-visualize))
 (27 keymap
     (95 . undo-tree-redo))
 (67108927 . undo-tree-redo)
 (31 . undo-tree-undo)
 (67108911 . undo-tree-undo)
 (remap keymap
        (redo . undo-tree-redo)
        (undo-only . undo-tree-undo)
        (undo . undo-tree-undo)))

I still need help (an example) on how to manipulate it. Especially, how to translate the numbers to the key name to understand further how to modify.

Yu Shen
  • 451
  • 4
  • 15
  • Unbind it in the local keymap. Look for a keymap used by `undo-tree` - maybe `undo-tree-mode-map` or something. – Drew Aug 30 '17 at 23:42

1 Answers1

0

Following Drew's advice, try this:

(unbind-key (kbd "u") evil-normal-state-map)

Here's how I found out which keymap to unbind it in: How can I find out in which keymap a key is bound?

Croad Langshan
  • 3,192
  • 14
  • 42