Alex Rivera | Logout

Are there any emacs key combinations reserved for custom commands?

Asked 2009-07-17T16:38:34.017
16

If I want to create a custom key combination to run a command, are there any keyboard shortcuts reserved for this? I always find it difficult to decide on which shortcut to override because I'm not sure what commands I shouldn't override and which commands plugins I may install in the future will try to set.

Edit
Report

1 Answer

3

Also remember that all of the reserved sequences can trivially be used as prefix bindings, if you want to group related tasks together, or simply want to take maximum advantage of a particular easy-to-type C-c<letter> sequence.

For instance, I use C-cm as a prefix for some of the magit (and related) functionality I want quick access to. e.g.:

(global-set-key (kbd "C-c m m") 'magit-status)
(global-set-key (kbd "C-c m l") 'magit-key-mode-popup-logging
(global-set-key (kbd "C-c m b") 'mo-git-blame-current)

And of course, C-cmC-h then shows me all the bindings I have under that prefix.

answered 2012-05-30T06:38:59.133

Your Answer