This is a read-only archive!

Emacs pinky?

I worry about my hands. I play with computers for a living, and part of the reason someone would want to hire me is that I get a job done quickly. And being able to type fast is a necessary (not sufficient) ability for that to happen.

When I was in high school I started getting horrible pain on my wrists and hands. I had to wear a wrist brace for weeks at a time. I don't know what caused it, but too much keyboard time and bad posture and good old repetitive strain injury was and is my best guess. (This was before I'd even heard of Vim. Not sure what text editor I used back then. Probably some Notepad clone, ugh.)

But then I trained myself to type more comfortably, and I haven't had any pain for years. I hold my arms at the proper angle, and I don't bend my wrists or stretch or strain my fingers. My hands bounce over the keys nowadays, on and off the home row constantly. I don't use my pinky fingers to type at all, in fact. When I need to type a q or a number or a tilde, I move my whole hand up and hit it with my ring finger. When I'm vimming, I hit ESC with my middle finger. With practice this is just as fast as keeping your hands on the home row, but I find it far more comfortable. I still do it fast enough that people remark that I'm a fast typist (though I know plenty of people who are faster).

Thus we come to Emacs. Emacs is the king of key chords. I'm OK hitting Ctrl. I pick up my hand and hit Ctrl with the side of my pinky like I'm karate-chopping it with a half-closed fist, or use my pinky and ring finger both. The Alt key I can usually reach with my thumb. But anything that requires Ctrl + Shift or to a lesser degree Alt + Shift is a killer on my hands. I don't know a good way to quickly type Ctrl + Shift + another key in a comfortable way. Caps lock remapped to another Ctrl is the solution many websites list, but that doesn't cut it for me either, it's just pinky-stretching in another direction (and what do you do when you have to hit Ctrl with your right hand?).

For some reason I'm highly amused yet slightly horrified that there really is a condition called Emacs pinky. And that Richard Stallman and other Emacs gurus have famously experienced wrist injuries due to years of using Emacs. How many people in the world can say that their favorite text editor has physically crippled them?

Even if you admit that heavy dependence on the modifier keys is necessary, some of Emacs' keybindings seem ill-chosen to me. See this quote from the Emacs tutorial:

You can use the arrow keys,but it's more efficient to keep your hands in the standard position and use the commands C-p, C-b, C-f, and C-n.

I don't know what kind of creature finds those keys more efficient than the arrow keys or pageup / pagedown, but I don't think it's a human being. (But admittedly, same goes for hjkl in Vim.) Sure, you don't have you move your hands from the home row. You just have to contort them into pretzels. Try hitting up up up down left left right quickly, then try to do the same using those keys.

Same is true of other commands. delete-indentation, which I find myself doing a lot, is M-^. When editing Lisp you may get to experience wonders like C-( and M-J.

Anything multi-chord is also just a little bit torturous for me. How do you execute a command more than once in Emacs? e.g. move down 3 lines? You can either type M-3 C-n, which requires me to hit Alt with my right hand and 3 with my left, then hit Ctrl with my left and n with my right. Or you can do C-u 3 C-n, which actually requires me to alternate hands on the modifier keys three times instead of two. This for something so ridiculously simple as moving the cursor, something I do hundreds of times a day.

This kind of crap leads you to try to hit M-3 or C-u or C-n with one hand instead of two. If I can manage to hit M-3 with my left hand, I can hit the down arrow with my right. M-3 is possible with one hand, but M-8 or M-9 would not be without dislocating a few joints. Down this path leads permanent disability.

Sometimes I toy with the idea of remapping every keybinding or nearly every keybinding in Emacs to something sane. But aside from thoughts such as "Why the heck should it be necessary for me to do this?" or "Why would this possibly be worth my time?", I'm unsure I could come up with anything better. I'd still be limited to using lots and lots of modifier keys. Emacs has had decades of refinement after all, and it's still in this sorry state.

I have tried the Vi and Vim keybindings in Emacs, and they don't work right. They don't work in all buffers, for example a SLIME REPL buffer. Even when Vim mode is working, many of the Vim commands are present, but not all. These huge, massive Emacs-customization hacks always seem to work well maybe 95% of the time for me, but text editor bindings and behaviors are really something you need to work perfectly 100% of the time. Every time Emacs does something ridiculous or one of these third-party scripts mangles my buffer, and I have to kill and reload the file, it completely breaks my stride and throws off my concentration. The text editor needs to get out of your way and let you focus on what you're doing.

June 08, 2008 @ 6:23 AM PDT
Cateogory: Programming
Tags: Emacs, Vim, Pain

16 Comments

rms
Quoth rms on June 08, 2008 @ 7:56 AM PDT

But why do you even need to use Emacs? Just stick to Vim.

Mikael Jansson
Quoth Mikael Jansson on June 08, 2008 @ 2:34 PM PDT

@#1/rms

For Lisp development, Emacs+SLIME is really the best (free) environment available at the moment... Using Vim, there aren't any as feature-complete environments as Slime -- all plugins are essentially glorified copy-and-pasters.

A list containing some of the Vim options available today at http://www.cliki.net/vim - of which I prefer Limp (strict superset of ViLisp and probably fvl.vim) at http://mikael.jansson.be/hacking/limp (but then I'm biased).

TheGZeus
Quoth TheGZeus on June 08, 2008 @ 2:36 PM PDT

I've rebound a few common commands, moving/killing forward/backward words, setting the mark (amazes me that doesn't have a default binding, or at least one that made enough sense for me to even remember it). i'm no programmer. I script things, customise Emacs, my Window Manager (StumpWM) and my browser (Conkeror isn't far from Emacs in JavaScript as opposed to ELisp). I read a review of VIM and Emacs by a person who'd used neither before. His comment was that Emacs was better to write code in, and VIM better to edit code in.

@ 'rms' He's writing Lisp code and using SLIME. It's pretty much Emacs or Eclipse/Cusp and Eclipse is....eclipse.

JS
Quoth JS on June 08, 2008 @ 2:52 PM PDT

Hello Brian,

Take a look at Sublime Text, a newer Windows editor: http://www.sublimetext.com

I looked at this a few months back at home, but got side tracked onto other things before having a chance to go beyond the evaluation. The author is very responsive to questions or to bug reports, and the editor itself is really good and has all the conveniences you would expect in vim or emacs along with all the facilities you would expect from a modern Windows GUI app.

Brian
Quoth Brian on June 08, 2008 @ 3:12 PM PDT

rms: Yep, I use Vim pretty much exclusively. But it's nice to see what else is out there in the world. And Lisp requires Emacs sadly.

Mikael: Good luck with your project. I wish I had free time so I could help out with it. :( SLIME in Vim would be such a great thing to have.

TheGZeus: Yeah, I saw that Eclipse has a SLIME mode too. But I'll take Emacs over Eclipse any day.

JS: $60? Windows-only? Not a chance. :) Vim works great.

Mikael Jansson
Quoth Mikael Jansson on June 08, 2008 @ 3:54 PM PDT

@#5/Brian:

Thanks! Have you tried it out? I'd really like to hear what a Vim user-turned-Slime thinks of Limp -- I'm always open for suggestions!

Robin
Quoth Robin on June 08, 2008 @ 9:40 PM PDT

The reason for the weird bindings to move the cursor, I think is historical and has something to do with the keyboard layout of the computers they used back then. I won't promise it, but I think this holds for both emacs and vim.

Doing a lot of rebinding keys is generally not a very good idea if you are ever going to use someone elses emacs (I do that a lot), you'll make yourself very dependent on your .emacs.

I suffered a bit of pains in my left hand earlier this year. I typed very fast, but I had no technique. The solution for me was to change my layout to dvorak, without remapping my physical keys. I have a very good technique now, and I type at about the same speed as before. Of course, I'm no longer able to use other computers.

Anyway, I completely agree with you on the unsuitability of Ctrl and Alt as modifier keys. The biggest problem is that they are both on the same side of they keyboard on my laptop, so it gets awkward no matter what I do. The productivity gain I have from using emacs is just worth it though.

Mike
Quoth Mike on June 08, 2008 @ 10:38 PM PDT

Robin: You're worried about rebinding keys because it'll make it hard to use other people's machines, but you're OK with switching your keyboard layout completely?

Steve L
Quoth Steve L on June 09, 2008 @ 2:03 AM PDT

Why not invest in a keyboard that will help you alleviate this pain? I can't tell enough people to try the kinesys contoured keyboards. Specifically this one:

http://www.kinesis-ergo.com/advantage.htm

They're expensive (~$300), but in the long run it's a rather trivial investment. The ctrl/cmd/option keys are right under your thumb ... no pinky action at all.

The only thing I did was to remap ctrl-x to ctrl-l. Since I found that ctrl-x is one of the most often used commands for just about everything, I moved it to ctrl-l so that I don't have to contort one hand all the time to trigger this (my ctrl key is under my left thumb) and my hands don't leave the homerow.

Seriously ... try it.

Btw, I don't work for kinesys at all, just a happy consumer.

David Hilton
Quoth David Hilton on June 09, 2008 @ 3:17 AM PDT

As far as working with dvorak, you can still type in qwerty, I just wouldn't recommend doing it for a while after learning. I switch back and forth. When I first sit at a keyboard, I might make a few mistakes until I'm sure which format I'm in, but that's all.

Once you're used to both formats, switching doesn't pose too much of a problem - but it takes some practice. I used to remember chords by feel, now I remember them by name.

TheGZeus
Quoth TheGZeus on June 09, 2008 @ 4:57 AM PDT

@ Steve L

...Want. That is all.

Arkadiy
Quoth Arkadiy on June 10, 2008 @ 6:07 AM PDT

Not sure how much this is worth to you, but I never use "Alt" for M-something. I find "Esc" then "something" working much better. For example, I always type M-^ ("join lines" in my C++ world) as Esc, then shift-6.

jerry
Quoth jerry on July 19, 2008 @ 8:20 AM PDT

brian, I never had an emacs pinky because I swapped caps lock and control key (I use a standard IBM keyboard). I recommend reading this (http://steve.yegge.googlepages.com/effective-emacs) and afterwards give emacs another chance, good luck!

najja
Quoth najja on August 28, 2008 @ 2:44 PM PDT

I am not sure if you have tried vimpulse, an extension to viper-mode. It adds many useful function from vim to the bland vi-like functionality of viper-mode. Can't live without it.

http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el

notacow
Quoth notacow on May 22, 2009 @ 8:52 AM PDT

Ah, text editor holy wars.

I've avoided the emacs-pinky problem by pressing the left control key with the edge of my palm. I find that I can almost type normally with the left hand at the same time as my palm is resting on the control key. Ctrl-f/b/n/p cursor movement feels very comfortable that way -- to my emacs-twisted mind...

Robin: Yes, "the keyboard layout of the computers they used back then" had f and b in convenient reach of one hand, and n and p of the other. Also, they spole an ancient language in which the words for forward and back, next and previous started with those letters :-P

Alison
Quoth Alison on April 25, 2012 @ 11:22 PM PDT

I'm in serious physiotherapy now due to emacs pinky. My left arm is a total mess. I've inhabited emacs for, like, 20 years. I find myself thinking in emacs control sequences (like, when it's time to leave somewhere, I think "C-x C-c" in my head - really fricking spooky). I've tried remapping but it's really hard to remap your brain. Finally ordered a totally split keyboard (cheaper than the Advantage keyboard - and with "Ctrl" in the standard position). http://www.kinesis-ergo.com/freestyle.htm I can't wait ...