Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The simplest way I've found to format the keyboard shortcuts is to type "C-h k [your keyboard combination]" (which is C-h for help, k for keybinding), and then when it says e.g. "C-x M-. is undefined", plug the key description into the following:

    (global-set-key (kbd "keybinding") 'function-you-want-it-to-call)
The article goes into the significance of global-set-key vs. local-set-key; until you have more specific intentions, global-set-key is probably what you want.

I've done a couple sessions teaching developers in using Emacs, and one point I always stress is that the Emacs help system is exhaustive, but you have to learn how it's organized. (It uses funny terminology sometimes.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: