2

I am trying out evil-mode, and it seems promising. Now I would like to get an overview of the keybindings introduced in evil-normal-state-map. If I type C-h v RET evil-normal-state-map I get:

Value: (keymap
 (164 . evil-end-of-line)
 (mouse-2 . mouse-yank-primary)
 (18 . redo)
 (117 . undo)
 (remap keymap
        (yank-pop . evil-paste-pop)
        (cua-paste-pop . evil-paste-pop))
 (escape . evil-force-normal-state)
 (127 . evil-backward-char)
 (90 keymap
     (81 . evil-quit)
     (90 . evil-save-modified-and-close))
 (62 . evil-shift-right)
 (60 . evil-shift-left)
 (61 . evil-indent)
 (126 . evil-invert-char)
 (34 . evil-use-register)
 (64 . evil-execute-macro)
 (46 . evil-repeat)
 (27 keymap
     (46 . evil-repeat-pop-next))
 (67108910 . evil-repeat-pop)
 (20 . pop-tag-mark)
 (16 . evil-paste-pop)
 (14 . evil-paste-pop-next)
 (122 keymap
      (61 . ispell-word)
      (109 . evil-close-folds)
      (114 . evil-open-folds)
      (97 . evil-toggle-fold)
      (99 . evil-close-fold)
      (79 . evil-open-fold-rec)
      (111 . evil-open-fold))
 (103 keymap
      (44 . goto-last-change-reverse)
      (59 . goto-last-change)
      (126 . evil-invert-case)
      (63 . evil-rot13)
      (70 . evil-find-file-at-point-with-line)
      (102 . find-file-at-point)
      (85 . evil-upcase)
      (117 . evil-downcase)
      (119 . evil-fill)
      (113 . evil-fill-and-move)
      (74 . evil-join-whitespace)
      (105 . evil-insert-resume)
      (97 . what-cursor-position)
      (56 . what-cursor-position)
      (38 . evil-ex-repeat-global-substitute))
 (38 . evil-ex-repeat-substitute)
 (89 . evil-yank-line)
 (121 . evil-yank)
 (deletechar . evil-delete-char)
 (88 . evil-delete-backward-char)
 (120 . evil-delete-char)
 (83 . evil-change-whole-line)
 (115 . evil-substitute)
 (82 . evil-replace-state)
 (114 . evil-replace)
 (113 . evil-record-macro)
 (80 . evil-paste-before)
 (112 . evil-paste-after)
 (79 . evil-open-above)
 (111 . evil-open-below)
 (109 . evil-set-marker)
 (74 . evil-join)
 (73 . evil-insert-line)
 (insertchar . evil-insert)
 (insert . evil-insert)
 (105 . evil-insert)
 (68 . evil-delete-line)
 (100 . evil-delete)
 (67 . evil-change-line)
 (99 . evil-change)
 (65 . evil-append-line)
 (97 . evil-append))

How can I transform this into human-readable form? It would be nice if I could have the table in the format given by describe-mode, e.g.:

key             binding
---             -------

C-c             Prefix Command
C-d             elisp-edebug
  (that binding is currently shadowed by another mode)
ESC             Prefix Command
DEL             backward-delete-char-untabify

....
  • You can try C-h b instead, and look for the sections called evil-normal-state-minor-mode, evil-motion-state-minor-mode and (perhaps) their local versions. – VanLaser Jun 22 '16 at 8:50
4

I don't know of any way to do this in vanilla Emacs without effective writing your own code, but the function describe-keymap (C-h M-k) in the help-fns+.el package does exactly this.

describe-keymap (C-h M-k) – Describe the bindings in a keymap. Enter the keymap variable (e.g., ctl-x-map) using completion. (Non-interactively, the argument can be a keymap itself or a keymap variable.)

  • If I try C-h M-k evil-motion-state-map it lists some bindings starting with <remap>. For example: <remap> <avy-goto-char> evil-avy-goto-char. How to print the actual key binding in this case? – Håkon Hægland Jun 22 '16 at 15:43
  • @HåkonHægland: I don't know any pre-existing way to have that for the entire describe-keymap output, but if you just want to check a single remapped keybinding, you could just do the usual C-h f avy-goto-char, and the help output should say something like "Its keys are remapped to '...'. Without this remapping, it would be bound to ...." (replace ... with the appropriate functions). – Arthur Jun 23 '16 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.