2

At the moment, I only know one way to determine which Emacs functions are called by any given Evil command (e.g. a sequence of key bindings in the Normal state): read the Evil source code.

Is there a more reliable and efficient way, and if so, what is it? For example, does Evil (or Emacs) have a mechanism that allows the user to tell Emacs:

"When I enter my next command, show me afterwards which Emacs functions it mapped to."

  • How is this different from F1 k? – wasamasa Jan 5 '16 at 18:57
  • I.e. Emacs's describe-key command? Similar idea, only I'd be grateful for something more Evil-aware. In Evil's Normal state, I might type, for example, vip to select the current paragraph. If I type F1kvip, the describe-key command kicks in after the v, and describes only that ("v runs the command evil-visual-char"), which means the succeeding ip results in switching to Insert state and inserting the character 'p' at that point in the buffer. This means that I still do not know which command/function vip calls, and I also have to undo the accidental insertion :) – sampablokuper Jan 5 '16 at 19:10
  • As far as Evil is concerned, v is a standalone command, same goes for ip in its visual state map (ip in normal state map is a different story...). The behaviour of F1 k mirrors this, so nothing unusual going on. – wasamasa Jan 5 '16 at 20:44
  • @wasamasa, good point, thanks. I guess that using describe-key to trace the command components piecemeal is probably the best way to go after all. If you post that as an answer, I will accept and upvote it :) – sampablokuper Jan 6 '16 at 13:44
  • Well, I'm not entirely happy with this as answer because there are actually ways of tracing the last commands (as opposed to keystrokes) which could be more helpful in special cases, such as daw. – wasamasa Jan 6 '16 at 20:51

Your Answer

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

Browse other questions tagged or ask your own question.