Ramblings of a code junkie

February 18, 2007

Optimizing Emacs usage

Written by

After reading Steve Yegge’s blog post ‘Effective Emacs’ I tried several of his tips. I already have my Capslock changed to the CTRL key (In Mac OS X this is done by going to system preferences, Keyboard and Mouse, Keyboard, press the ‘Modifier keys…’ button and change the mapping). But I have always used the Command key (the one with the apple logo) to invoke ‘M-x’ / execute-extended-command. In some terminals that just doesn’t fly. I added a mapping to bind it to ‘C-x C-m’ which is surprisingly easy to utilize! I also started using the ‘C-w’ mapping to replace backspacing a complete word and remapping kill-region to the alternative Steve suggests, most excellent!

The adjusted mappings are these:

(global-set-key "\C-x\C-m" 'execute-extended-command)
(global-set-key "\C-w" 'backward-kill-word)
(global-set-key "\C-x\C-k" 'kill-region)

Like all changes, you should not do everything at once, although Steve has a great deal of tips on streamlining your Emacs usage, just changing too much at once will slow you down. Change 1 or 2 things, get used to it, then change something else that annoys you.


Leave a Comment