I just read Steve Yegge's "Effective Emacs", thanks for the link. It was very enlightening on many levels and told me several things that were written between the lines, namely:
- Initial user experience is (very) secondary to long-term efficiency
- if you aren't in this for the long term don't bother - the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...
- unplug your mouse, the keyboard is faster once you learn how to do it well.
It seems to me that Emacs is a friend for life, but only if you have the patience for a year or two of courting and learning its tweaks and quirks.
Many are a fan of using the Caps Lock key as Control. While better than the insane standard positioning, it's still not optimal: it's not symmetrical between your hands (you're not going to remap Return as another Control) and it still makes for a lot of awkward pinky use. (Imagine playing a piano piece all with your 3rd, 4th and 5th fingers.)
The optimal solution I've come up with is to use the two keys adjacent to the space bar (typically Alt, but actually Command on the Apple keyboard I generally use) as Control, since that's easily the most important modifier key, so it should be the easiest to access. This makes C-w, C-s, C-r, C-a, C-e, C-p, C-o, C-j, C-l and so on very, very comfortable compared to the corner positioning. As far as I know, this is the way many keyboards were before the extended IBM PC keyboard came up with its insane control key positioning. (My comfort with these keys may also be linked to my use of Macs and ubiquitous command-key shortcuts before I switched to Ubuntu. Ironically, Emacs is much more comfortable now in Ubuntu than it ever was on my Mac, because I can use the most readily accessible modifier key as God intended, rather than the third-tier relegated modifier that Control is on the Mac.)
The two keys adjacent to the new Control keys (ie. 2 away from the spacebar) then become the Alt keys. Whatever is left over (the original ctrl keys, plus Caps Lock and any silly Windows keys left over) can be bound to Super, which is useful for window manager shortcuts so that they don't clobber emacs/bash/screen bindings.
These changes are trivially easy to put in a simple .Xmodmap file to load whenever you log in, and copy to all the other computers you have to use regularly. If you're using Windows, I guess you may have to fiddle with the registry, but it would be worth it.
Another solution is to keep the Ctrl keys where they are (note the plural), but hit them with the side of your hands: you just need to roll you hand a little bit to the outside. It takes a little practice to do this reliably, but it cures pinky pain (at least for me).
Use the hand that is not hitting the key: for C-s use your right hand for the Ctrl, and left for s. C-n the other way round. For Meta, make sure that both alt keys work, and use your thumbs: M-x right thumb and left fourth finger.
- You can't do this for C-M combinations, but they are few and far between.
- You have to have a keyboard where the keys "stick out" a little. So it does not work on laptops.
The only real issue I had was that moving around is a little slow and awkward: When going back and forth from C-f/b to C-p/n your hands are moving a lot. So I remapped C-f to C-; and C-b to C-j (and similarly for M-f & M-b) and now I can press Ctrl/Meta with my left hand and move around with my right one: bliss.
My solution is to not stick pedantically to the home row but wherever and however my hands and wrists feel comfortable. When my hands are at rest but on top of the keyboard, that works out to about AEFV N[IK]L'. It's a position not dissimilar to what you get on a split keyboard, but with the advantage that you can actually type this way. The middle columns of keys (TGB and YHN) are typable with both hands. Alt is left thumb only (I use the other Alt as an AltGr key; right thumb only). Control is left pinky only, but pressed with the first knuckle, not the tip of the finger.
this is one of the first things I do when i get on a new machine. It is also the first time i've seen anyone else do it. My thumbs are much stronger than my pinkys and are much easier to be using lots.
Sounds like the best thing to do for a mac (although it wouldn't fix the problem in tty mode). On other operating systems, it's nice to make the change globally, since all other programs seem to use control pretty regularly too.
No kidding. The Caps Lock key should never have existed on PC keyboards and the Tab key should be altered so that it is a "Cmd" key which switches fields in web-browsers, word completes as needed, indents code, and does everything it does now except for inserting an actual ascii tab character.
It isn't as bad as all that. A few weeks will suffice once you have proper guidance.
But there's certainly years of material left after that, if you want it. After eight years off and on I still haven't touched a sizeable number of emacs features.
> But there's certainly years of material left after that, if you want it. After eight years off and on I still haven't touched a sizeable number of emacs features.
Precisely. You can get productive with emacs after a relatively short period of time, but you will have a lifetime of learning afterwards. After 10 years, I'm still discovering new things.
> the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...
I'd argue that this is ergonmically essential for long-term emacs use, otherwise you run the risk of 'emacs claw'.
Took me less than a week to get used to it. If you regularly use other people's machines then it's not a good idea (but then, neither is emacs unless you are carrying around your .emacs file, since you'll miss all your personal keybindings).
I have plenty of nonstandard keybindings (a bad idea, but I didn't know it it 10-11 years ago when I decided upon them, and now I'm too accustomed to them), but what I'd miss more is the various functions I've written that save so manual effort.
- Initial user experience is (very) secondary to long-term efficiency
- if you aren't in this for the long term don't bother - the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs use...
- unplug your mouse, the keyboard is faster once you learn how to do it well.
It seems to me that Emacs is a friend for life, but only if you have the patience for a year or two of courting and learning its tweaks and quirks.
I'll buy O'Reillys book and see how it goes.