9

If I can find out which keys I used most, I may create a macro for it; if I can find out which function I used most yet not binded, I can bind it to a key. This may improve efficiency. Is there a way to get these statistics knowledge?

Dan
  • 32,584
  • 6
  • 98
  • 168
Nick
  • 4,423
  • 4
  • 24
  • 41

3 Answers3

6

smex users

If you use smex, the smex-show-unbound-commands command does exactly that; show the commands that you use frequently using M-x (the suggested smex binding) but have yet to be bound to a key binding.

Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179
5

I used to use keyfreq. It was good, but eventually I switched it off and went back to using my intuition.

abo-abo
  • 13,943
  • 1
  • 29
  • 43
4

You can view the last 300 keystrokes with C-h l calling the view-lossage function. Inspect the displayed buffer to see what 300 keys you last hit.

If you call describe-function then view-lossage you will see that you can also use the open-dribble-file function to start writing (record) all characters you type to a file.

Nsukami _
  • 6,341
  • 2
  • 22
  • 35
  • (-1) 1. 300 is **hard-coded** (in function `recent-keys`). It is not just a default value. 2. `C-h l` does **not** tell you anything about "*what keys you hit the most*". It tells you only what the last 300 keys you used were. – Drew Dec 29 '14 at 16:52
  • @Drew Answer edited. – Nsukami _ Dec 29 '14 at 17:39
  • (+1) Looks better. Glad you mentioned `open-dribble-file`. – Drew Dec 29 '14 at 17:41
  • http://stackoverflow.com/questions/9761401/for-emacs-how-to-store-what-view-lossage-collects-into-an-external-file may also be of interest. – phils Dec 31 '14 at 08:04