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

Those are the keys a usual Emacs users uses maybe hundreds of times in a day. Every laptop I have owned has its arrow keys and Home-PgUp-PgDown-End block in a rather unique place, so even if it's a minor optimisation (it's not), accumulatively it's a very important one. It'd be like replacing a heap allocation with a stack one in a hot function, if that example works like I think it does.


>so even if it's a minor optimisation (it's not)

Has it been measured?

I mean, if they have actually measured:

1) the speed difference of using those shortcuts vs arrow/page-up and co when merely typing

2) the same speed difference as a percentage of the overall programming process

3) the impact of such speed difference in programmer productivity (speed translated to results faster or better code with fewer bugs).

Or it's just cargo cult?


> Or it's just cargo cult?

Yes, it is. Like much of the rest of programming.

I think it's weird for an IDE to tell me which command keys to use. It should have a set of default keys, and ideally those could be remapped as well.

The biggest benefit of directional keys (up, down, home, end, etc...) is that they are universal across keyboards and languages. Control-F may be great if you're on a VT100 terminal, but maybe I'm on an AZERTY keyboard, or one of those funky square keyboards. Or a Chinese keyboard that's largely input by writing characters on a little pad. Or on a Mac using gestures or Ink. Or a dozen other possibilities.

If I was only programming in Pascal and only on one computer in one environment for the rest of my life, then it would make sense to learn those keystrokes. But like is more complicated than when those were first coded.


> It should have a set of default keys, and ideally those could be remapped as well.

It sounds like you may not be aware that this describes emacs?


I don't know how can I go about measuring this (tho should not be that hard to come up with a scheme), but I'd rather not bother. One fact is that, on the keyboard I'm looking at, which is a laptop keyboard with a numpad, the home-end bunch are above the numpad, and the up arrow aligns with the enter key, the right arrow becoming a part of the numpad block, right under one. I have to move my hands to be able to use them. I can use the arrow keys with my right pinky, but that requires contorting the hand. Moving my hand either to the home-end row or to the arrow keys takes about a second, and if I'm not looking at them, I usually hit the wrong key, (usually PrtSc instead of home, so also some surprise there), whereas C/M-{FBNPAEfbnpae} are about always right under my hand. I write both prose and code in Emacs, each and every day, and I haven't counted, but I use those keys quite a bit when typing stuff in. Assuming I use them a hundred times a day (quite low of an estimate), I save about 200 seconds/day. Yes that's marginal, in numbers, but in effect, it makes it so that typing is way less burdensome. Not having to relocate the home row enables me to type more accurately without having to see where I am on the keyboard, and to delete mistaken characters when I haven't correctly located F and J under my indices, and I count that a gain, adding to that the many other keybindings in Emacs that use the FBNP keys in some ways.




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

Search: