Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

171–180 of 218 posts

Re: Vim users: stop using hjkl

#171
post #151

Earlier quoted context omitted.

> You're a professional programmer, you use a keyboard all day, so you touch type right? hjkl sits right on the home row, where your fingers sit. It is just a natural place to put movement keys. Nothing to do with the number of keys on the authors keyboard. And my point is that it does not matter. Use the mouse. Use the arrow keys. Use the function keys. Use a GUI. Use multiple monitors. If we are talking about produ…

> ... the editor is orders of magnitude less significant than a huge list of other things. It does not matter. The first point is true. The second point is false -- it does matter. Saying that X is less important than Y can't be used to argue that X doesn't matter at all. > If I am building a business or a product the last thing on my mind is what text editor we will be using. It is so ridiculously insignificant in t…

I think that the value of your editor was not in efficiency --if we define it as "data entry speed". I think it had a lot more to do with a sensible user interface that was accessible and yes, "efficient", for someone --anyone-- to get into. It used that peripherals and accepted UI norms available at the time and it did so well enough to be successful.

vim is a cult based on metrics that are not significant drivers in the context of building a software product or company.

Re: Vim users: stop using hjkl

#172
I use control keys for a lot of my movement. /, /, /, / (remap your ctrlp plugin to leader p. This is vim.) And yeah, I have caps lock remapped to control. Setting virtualedit=all will also force you to think in terms of text objects by allowing the cursor to move everywhere. No longer can you simply press j/k and have it go to the end of the next shorter line.

Re: Vim users: stop using hjkl

#173

Earlier quoted context omitted.

I agree with the usefulness of Vim on Linux servers. I would say that everyone is different in how they approach their work and in the case of software development, the tools they use. I wouldn't consider it funny that someone would want to optimize a very important tool to make it more functional. The tools we use for software development are both a curse and a blessing. A curse that there is no ONE TRUE WAY of doin…

Yours is an absolutely reasonable non-fanatical position on this topic. No issues whatsoever. My blood pressure goes up when people start to get religious about this stuff. Some go as far as proposing that one can only be a professional programmer if one uses vim, which is utter nonsense.

Well you've come off as quite the extremist shouting to the rooftops that people shouldn't try to be super efficient with vim. People who might not go out on a limb to say everyone should do it too. As for your comment on tabs and trees, sorry, those are heretics. True vim followers use buffers only.

Re: Vim users: stop using hjkl

#174

Earlier quoted context omitted.

I'm now considering extending the seek idea to moving to close-by lines, through mappings that would work like EasyMotion's w, b, e and ge but excluding the current line and working on lines above (b and ge) and below (w and e), by typing the two characters that respectively end and begin the target word.

sounds cool. One thing I couldn't work out with the plugin, was how to skip to the next match. It's rare that two letters match, but some letter combinations are still relatively frequent, things like `if` or `th` ... but perhaps it's just a RTFM issue and I haven't used it extensively yet...

Yes that's on the pipeline, doesn't work yet. I agree it would come in really handy on the few occasions we seek for a more common letter combination.

Re: Vim users: stop using hjkl

#175
post #78
post #61

Earlier quoted context omitted.

> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location. Young programmers should be made aware that there are now programming editors that do away with the need to think of…

Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. The point of using the vi interface is nowadays (and yes I know about the original reasons of the modal workings of vi...) that moving your fingers off the home row takes too much effort, let alone having to move your hand to the mouse. It's easier to drive an automatic,…

I have been working as a professional programmer for twenty years. I have used more text editors than I can remember; I've even written a couple of new ones. My experience has been that the editor makes almost no difference. I spend far more time thinking about code than I ever do writing it.

Vi has a terrible ancient mess of an interface designed for primitive machines in a bygone age. I believe that part of its popularity comes from a sort of stockholm syndrome effect; people who have spent the time required to master it don't want to feel that they have wasted their effort, so they assign some of the credit for their own innate productivity to the editor.

In practice, I have never seen any difference in productivity levels among my teammates based on the text editors they use. All of the professional programmers I know spend far more time thinking about code, discussing code, and reviewing code than they ever do editing code; even if vi were somehow magically able to make people twice as productive at editing code, that would still only be a small single digit percentage of productivity improvement overall. But I have seen nothing which makes me believe that people using vi are more productive even on strictly text-editing-based tasks than people using other text editors.

There are occasional situations where a vi user can do some complex macro thing that rapidly does some transformation to a text file, which someone using a simpler text editor might take longer to perform, but if your project is full of code which needs to be transformed in repetitive, brute force ways, you have bigger problems than your choice of editor.

Re: Vim users: stop using hjkl

#176
post #127

Earlier quoted context omitted.

There's a difference between "more efficient" and "easier to learn". You're advocating the latter. This is not a good thing. For example, moving around by using the search feature (at least a well-designed incremental search like Vim or Emacs) is more efficient for longer distance moves (e.g. more than a couple of lines)--it's faster and, more importantly, takes less thought and context switching. When you have to mo…

> There's a difference between "more efficient" and "easier to learn". You're advocating the latter. This is not a good thing. You've posed a false dichotomy. Modern editors are both more efficient and easier to learn. > Ideally, you want to move around faster with less context switching. Keyboard-oriented editors like Vim and Emacs are much better at this than any other editor I've seen, as long as you learned how t…

Vi people look at me like I have a mental disability when I say this, but I've written tens of thousands of lines of code in pico; it is a completely serviceable programmer's editor.

Re: Vim users: stop using hjkl

#177
post #78
post #61

Earlier quoted context omitted.

> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location. Young programmers should be made aware that there are now programming editors that do away with the need to think of…

Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. The point of using the vi interface is nowadays (and yes I know about the original reasons of the modal workings of vi...) that moving your fingers off the home row takes too much effort, let alone having to move your hand to the mouse. It's easier to drive an automatic,…

I guess some people has too look where the arrow keys are, in order to move the hand there and start using them. The same with the insert, home, etc. block. In that case, I can understand that it takes too much effort.

In my case it's like I know the keyboard better than my hand, for example hit Shift + Insert so fast that I barely perceive what I do, except because something got inserted. The same for the arrow keys (which I seldom use alone, as they do more when using a modifier key, like Ctrl).

Now to the point: please don't over-generalize, my own case proves that for some people arrow keys are fast enough.

In fact, it's exactly like switching gears in a manual transmission, which I do. After enough practice you just know where each shift is, and do it without thinking. It's a special case of spacial awareness.

However, I concede to the parent that using search (* or Ctrl-F) is much better than jumping around.

Re: Vim users: stop using hjkl

#178

Earlier quoted context omitted.

Seems to be a lot of anger in there. As for myself, I don't really care much about speed while coding, however, I do care much about being efficient at doing things. Why should I have to move my hands up to reach the arrow keys, if I can use the home row instead? I do think it is very tiresome to move my hands around (maybe because I'm lazy?). This of course applies to the mouse/trackpad as well. Again, you need to m…

> Seems to be a lot of anger in there. Today. Sure. Imagine my surprise when I see yet another bullshit vim article on HN, this one now saying "don't use the hjkl" keys. When will the madness stop? Newbie programmers reading HN actually need to hear from someone who clearly sees that the emperor has no clothes. Some look at HN as the reference by which they ought to shape their learning and careers. There's a definit…

Single handed chording is not for speed, it's much quicker to alternate fingers of each hand because you can be moving one into position while pressing another. Chording is also slowed down by having to clearly release all the keys between keypresses, where normal keyboards can have some overlap as long as the sequence is still clear. Also reducing 10 possible inputs down to 5.

If you want to type significantly faster English text, stenography looks like the best approach by a long shot. Not so good for symbols though.

/ off topic.

Re: Vim users: stop using hjkl

#179

Earlier quoted context omitted.

Yours is an absolutely reasonable non-fanatical position on this topic. No issues whatsoever. My blood pressure goes up when people start to get religious about this stuff. Some go as far as proposing that one can only be a professional programmer if one uses vim, which is utter nonsense.

Well you've come off as quite the extremist shouting to the rooftops that people shouldn't try to be super efficient with vim. People who might not go out on a limb to say everyone should do it too. As for your comment on tabs and trees, sorry, those are heretics. True vim followers use buffers only.

> Well you've come off as quite the extremist shouting to the rooftops that people shouldn't try to be super efficient with vim.

That's the point. vim does not make you super-efficient at anything other than being a data entry clerk. That's not where significant value is developed in a technology business.

> True vim followers use buffers only.

Don't forget a Lear Siegler ADM3A terminal over a 300 BAUD modem leased line to the mainframe. Oh, wait, that's the way it was when vi was written.

:-)

I love this quote from Bill Joy: "I think if I were going to go back—I wouldn't go back, but start over again."

http://web.cecs.pdx.edu/~kirkenda/joy84.html

Re: Vim users: stop using hjkl

#180
post #102

Earlier quoted context omitted.

> Not sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. [emphasis added] Guess again -- I wrote Apple Writer in the late 1970s ( http://en.wikipedia.org/wiki/Apple_Writer ). One of my goals was to eliminate the modes that plagued contemporary editors and attract people interested in ease of use and efficiency. Apple Writer b…

There's a difference between "more efficient" and "easier to learn". You're advocating the latter. This is not a good thing. For example, moving around by using the search feature (at least a well-designed incremental search like Vim or Emacs) is more efficient for longer distance moves (e.g. more than a couple of lines)--it's faster and, more importantly, takes less thought and context switching. When you have to mo…

For example, moving around by using the search feature (at least a well-designed incremental search like Vim or Emacs) is more efficient for longer distance moves (e.g. more than a couple of lines)--it's faster and, more importantly, takes less thought and context switching.

I'm no longer sure I agree with any of this.

When I move in Vim and the whole screen jumps, I have to reorient myself, and convince myself that I have jumped to the right place, and not a similar-looking-place by mistake. I have to take mental energy away from thinking about the content to think about the editor and look for a good jump command, where arrow keys are so basic that they aren't a distraction at all.

Post reply on HN