Blog Series Tags

Emacs Key Bindings

Emacs is like your average dragon, very cranky before breakfast and set in its ways. Take for instance the key bindings. For you to do anything – and I mean anything at all you need to type in an arcane set of shortcut keys, like for instance the basic Control Meta X, Control Sacrifice Goat, Enter Enter, Control F command which launches the built in dishwasher. You might be tempted to change the key bindings to better suite the feel of your windows environment but that is not a very good idea for the vast majority of cases.

Take for instance the shortcut for opening a file C-x, C-f. (that is press Control and hold down and press the x key and release followed by (while Control is still pressed down) pressing f). Why couldn’t they be sensible about it and just do a C-o like they do in Microsoft Word?

The problem is that Ctrl-o is bound to something else, which is in this case is the open-line command which inserts a line below the current line. (If by the way you wish to know what a certain sequence of keys is bound to you can do that by pressing Ctrl-h, k and then pressing the key sequence your interested in when Emacs prompts you to).

The GNU marketing people will tell you that it’s possible to customize Emacs and it’s key bindings any way you want but that’s not really true. The problem is that rebinding shortcut keys in Emacs almost always results in some kind of strange side effects.

The strange shortcuts may seem a tad too masochistic at first but don’t be a wimp. Take a tip from Rambo, stick with it and you will find them becoming second nature over time. Well, some time.

John Rambo would have loved Emacs…

There is one exception however. The common shortcut keys on windows for Copy, Cut and Paste can be configured on Emacs relatively easily and without too much pain. This is known as CUA mode and works fairly decently but we get ahead of ourselves. Await the next post on Emacs modes in general and configuration files in particular.

This is a post in the Emacs series.