Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

71–80 of 218 posts

Re: Vim users: stop using hjkl

#71
Some may be interested in the EasyMotion plugin.

Using f will display all available options to jump to. This way you don't have to continue to use f over and over if there are many of the same character in the line you are on. It is also a great way to jump to a very specific spot in your code.

Note, it also has other motions besides just f. Here is the link:

https://github.com/Lokaltog/vim-easymotion

Re: Vim users: stop using hjkl

#72

Hard mode, that's great. Does vim have a help-a-fellow-learn-vim mode? Instead of it's normal Mostly-fail-to-give-you-any-visual-feedback-and-just-treat-you-with-smug-indifference-while-you-try-various-keys mode?

There is a vim tutorial baked in that will walk you through some things.

It isn't the first thing one sees upon starting vim for the first time, nor is it obvious in any other way.

Re: Vim users: stop using hjkl

#73

Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM! "hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference?…

A lot of people who don't understand what vim is before criticizing it seem to miss the point that vim doesn't make you faster at writing code. Insert mode is a dumb text entry mode like any other, and Visual Studio and Textmate in fact have out of the box more tools for snippets and auto-completion than most vim users care to even supplement with plugins. Because the power is in editing text, not writing it. And oh, how convenient, programmers spend like 10% or less time writing and a whole lot more reviewing (moving around) and editing code.

Re: Vim users: stop using hjkl

#74
post #41

Linkbait title alert. Please, please stop this crap. Article really says: n00b vim users, consider disabling hjkl while learning other movement commands. What vim user does all their movement with hjkl only anyway? If you're going to deliberately cripple your editing habits like that, or if you're not even bother to learn other movement command at the same time as getting used to hjkl, you might as well stick to note…

>What vim user does all their movement with hjkl only anyway? 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.

This is pretty much my approach also. Some nice vertical "rough cut" moves are H, L, M, also modifiable like 10H, 10L.

Re: Vim users: stop using hjkl

#75

Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM! "hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference?…

So your point is that because you may take breaks during the day, you shouldn't bother taking the time to learn sharp, efficient tools?

There are plenty of legitimate gripes to be made about vim, but you really should consider taking the time to learn a serious programmers editor like Vim or Emacs. That would at least help you avoid looking like a fool by ranting about things you clearly don't understand.

You may even find (god forbid) that you enjoy it.

Re: Vim users: stop using hjkl

#76
post #69
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…

How is using text find to move to where you want "tricking" the program? With Easy Motion that type of cursor movement becomes even easier. Using a mouse just slows a vim/emacs user down.

Exactly, but it isn't just vim and emacs. Using the mouse is terribly inefficient for any typing-oriented endeavor.

Re: Vim users: stop using hjkl

#77
post #24

Earlier quoted context omitted.

> But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous ... And entirely topical. Young programmers who read such posts may not realize how many more efficient options are now available. Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

I would really like to know what options are there that are more efficient than VIM for text editing... And when talking about IDEs and code writing remember to include VIM plugins in comparison.

> I would really like to know what options are there that are more efficient than VIM for text editing...

In answer, I have to say that nearly every other text editor that exists is more efficient than vi/vim. Modern editors are mode-free, meaning (don't faint) you don't have to change modes to insert, delete and navigate. These editors don't need "cheat sheets" to help you figure out how to switch modes and navigate, because you don't have to cheat.

Vi/vim is the oldest editor still commonly available. I used it in the 1970s when I worked for NASA, on a "paper terminal". In that environment, its quirks made sense because they saved paper. Since then, it has been completely superseded by newer, better programs.

Even my now-ancient program Apple Writer (http://en.wikipedia.org/wiki/Apple_Writer) was easier to use, largely because my program addressed and solved some of vi's more annoying problems. There's a reason Apple Writer became a best-seller -- one of them was that fact that, by eliminating modes, it represented a huge improvement over existing editors, including vi.

But that was the early 1980s. If I had been told then that I would still be trying to get people to use more efficient editors over 30 years, later I would have laughed -- impossible!

Re: Vim users: stop using hjkl

#78
post #61

Earlier quoted context omitted.

>What vim user does all their movement with hjkl only anyway? 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.

> 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, why do professional drivers switch gears manually? Because learning the more advanced interface gives them more control over the way the machine behaves, and in their use case, the investment in learning it pays off handsomely in the added power later. Should regular users bother to lean vi? No. Programmers? Yes.

Re: Vim users: stop using hjkl

#79
post #51
post #38

Earlier quoted context omitted.

Oooh. I'd love to hear those many more efficient options!

> I'd love to hear those many more efficient options! This may come as a surprise, but modern programming editors don't require the operator to switch between three mutually exclusive modes -- insert, delete and navigate. That's because modern keyboards have keys dedicated to those purposes, which means the operator doesn't have to either wonder which mode he is in, or switch modes, which saves an enormous amount of…

Please see http://vimgolf.com/ and let me know if you still believe Vim requires and incredible number of unnecessary keystrokes. Some of the editing you can do with so little keystrokes is amazing!

Re: Vim users: stop using hjkl

#80

Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM! "hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference?…

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 move your hand to away. Again. Not necessarily about speed, more about efficiency and convenience.

Post reply on HN