It's also true that functions can be mapped to arbitrary inputs and systems. But I think there's value in learning HJKL rather than remapping them:
1. They're on the home row, giving a slight speed benefit for these commonly used actions.
2. You get used to the movement keys that will be the default in any copy of Vi/m and quite a few other tools. (HJKL, along with WASD and dedicated arrow keys, is probably the most common mapping of left, right, up, and down to keys on a keyboard.)
Arrgh. This is an example of why programmers are different, not of a bad interface for ordinary people. Thanks for considering me so daft as to think non-programmers people use VIM.
I still disagree that HJKL is madness, however. It's not the best possible scheme, but it is reasonable to keep it for its remaining advantages.
I could agree with you and get the anti-vim guys all worked up. I could even back it up with random links and examples from all over the web.
I could also disagree with you and get pro-vim guys all riled-up. Again, suitable links, stats and a photo of some guy with carpal-tunnel would do the trick.
That's great stuff!
To quote one of the most memorable lines in motion picture lore:
"Interesting game. The only way to win is not to play."
I use vim. And I've used everything else. I don't care. All of it pales in magnitude to the efficiency losses elsewhere in the process of developing a software product.
My guess is that on a daily basis I waste more time going for a cup of coffee, shooting the shit, reading/posting on HN, getting pulled in all manner of directions on the internet than any text editor could save me short of a brain-to-code interface.
And, of course, there's the actual work of figuring out how to code something. I've spent days diagraming state machines with, yes, hold-on, paper and pencil. Once there, an hour or two and the bug-free code is written and working. Yes, even if you use Notepad.
You want to be more efficient? Get really good at going from problem to finished, shippable, documented, flexible, reusable and bug-free code. What you use to enter said code probably does not matter.
I'm going back to polishing my keyboard.
Maybe you guys ought to do the same.
For me (and I appreciate the irony) I like vim because it has a lower cognitive load. I can say things like "Change the contents of the quotes to say Goodbye Planet", rather than having to actually execute the instructions --
move left a word, move left a word, start highlight, move right a word, move right a word, move right a word, stop and check to see my cursor is in the right place, press delete, type phrase "Goodbye Planet"
The benefits measured in time are no doubt negligible (or even negative -- as you say, editing time pales in comparison to other work), but the benefits to my concentration are much higher. Tedious, repetitive work makes me frustrated, distracted, or both. If I can keep myself in a good mental space and not be constantly interrupted by having to babysit my source editor, I can be more productive.
PS: And then I spend the time on HN :/
:set incsearch
:set hlsearch
(ObFlameRetardant: I prefer Emacs myself for programming, but vim is a perfectly excellent editor.)Do you have a link to the study about mouse vs cell-based key movement?
I have a couple of questions:
- While I fully believe that navigating by mouse is faster, on a desktop the overhead of switching between typing and mousing is quite high. On my laptop I often use the trackpoint over relevant keyboard shortcuts because it's already right under my fingers, but on my desktop I much prefer using the shortcuts due to the overhead of switching.
- For a movement that's three cells or fewer, I find it hard to imagine that mouse would be faster (unless perhaps it's set to follow the cursor?). I assume the study averages over a variety of distances across the entire screen. I hope that most vim users aren't using hjkl for adjustments of more than three or so cells. A combination of {}wb and especially ?/ will handle the bulk of jumps quickly. hjkl are then useful keys for adjusting just a couple of characters to refine your jump -- and now they're already right under your fingers.
There's a slowdown associated with considering too many different options, too, btw. It's just more invisible.
http://www.engadget.com/2005/03/04/music-thing-the-chromaton...
https://en.wikipedia.org/wiki/Janko_keyboard
I really want one.
(also Enter, ESC, space, delete, backspace, etc etc)