Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

121–130 of 218 posts

Re: Vim users: stop using hjkl

#121
post #32
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.

Perhaps you'd care to share some of them and their advantages with the younger and older coders who've never come across them? Otherwise - in a slightly less nice way than last time - get lost.

> Otherwise - in a slightly less nice way than last time - get lost.

If that's your argument in favor of vi/vim, then other vi/vim users may ask you not to be on their side.

Re: Vim users: stop using hjkl

#122
post #2

> Moving your Vim cursor around using the arrow keys is a bad habit ... Yes, as is having a keyboard with more than 64 keys, a pointing device, software that allows character insertion, deletion and cursor motion all without changing modes, or any computer designed after 1980. We must all fight against this rising tide of convenience and efficiency by insisting that everyone use vim and its descendants.

I've been a VIM hater for years but I'm really enjoying it recently.

Mouse works, scroll wheel, arrow keys work even in terminal.

It's really about switching files, navigating by class/definition, and 0 latency GUIs. ZERO. No excuse for having to wait for your computer when you are just editing text files.

Sublime Text is pretty fast but still I'm often waiting for it to build a new tab or format search results. Eclipse is unusable.

More importantly, why don't we have eye tracking so we can just look and start typing ? Maybe leap motion can get us there.

Re: Vim users: stop using hjkl

#123
post #88

Earlier quoted context omitted.

I use both vim (over ssh) and modern GUI programming editors on a regular basis with extremely large code bases. I am thoroughly familiar with the the various navigation shortcuts available to me and (at least for me) find that navigating and editing source code in vim is still faster by a large margin compared to modern editors that have the convenience of modeless editing. That's not to say that modern editors don'…

> I think it is a bit of a stretch to argue that modern editors are substantially better at editing text than vim. Yes, well put, except it's true -- modern editors are much more efficient at editing large code bases than vi/vim. None of them require a "cheat sheet" of keyboard arcana, for the simple reason that to use a modern editor, you don't have to cheat. It gives one pause to consider that Pico, the tiny, throw…

I disagree that Pico is easy to use. The only way to move around within a line is to hit the arrow keys sixty times. By default, cut and paste works on whole lines only. If you want to cut just one word you have to figure out the commands for select mode.

Re: Vim users: stop using hjkl

#124
post #102
post #78

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. 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,…

> 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 move to a distinct part of your text file, chances are you know what the content there is. With a command like /, you directly turn that knowledge into efficient movement. With the arrow keys, you have to leave the home row and do a bunch of movements to get where you're going. You have to figure out how to turn the word you want to go to into a bunch of arrow actions. It's even more difficult of your target is off-screen.

Ultimately, a rich set of movement commands you can access without moving your hand is going to be more efficient than using the standard arrow keys. This is particularly true for somewhat semantic commands like moving by block or expression or moving to a word (the command in question here).

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 to use them properly. This really makes the learning curve more than with it.

Re: Vim users: stop using hjkl

#125
Most of the comments in this thread can be summed up with: 1. "Vim sucks/is better than _____ because...." 2. "Finally, somebody's preaching the truth! Who even uses the HJKL keys? Not me..." 3. "I think I will/won't consider adding 'w', 'b', 'f', etc. to my Vim inventory because..."

1. This is not a productive comment, and this thread isn't here for you to start an argument on something rooted in personal taste. Your're entitled to your view, but this post was written as a suggestion for Vim users, for Vim users. Please, refrain from posting if that's all you have to say.

2. That's great that you've found more efficient ways to navigate, but did you read the article? Though it's impossible to tell from the extremely-misleading post title, the article isn't polemicizing - it's trying to suggest tools that a user might not already know/be familiar with.

3. These comments are the only ones discussing the actual article text, and are the minority. Let's discuss the merits of what the post was actually talking about, as the comments are meant to do!

Re: Vim users: stop using hjkl

#126

Earlier quoted context omitted.

Same here, and I type dvorak. The hjkl keys are in a completely different location on a dvorak keyboard as opposed to qwerty, and yet I have seen a reduction in wrist pain.

Why wouldn't you remap the keys if you were interested in ergonomics?

I did remap the keys at first but found that the hjkl layout for dvorak is not at all uncomfortable. I frequently jump between disparate *nix systems, and for most part use the canned nvi in preference to vim. I try to do most of my work with as generic a vi keyset as possible. Multiple screens, etc, are handled with tmux (or with screen if its the only thing available). Dvorak is defaulted on my local workstation, and as I connect through a terminal emulator, the host unix box does not know or need to know that I run dvorak or have my terminal set to amber and black, etc. In short, I try to make myself comfortable while avoiding tinkering whenever possible.

Re: Vim users: stop using hjkl

#127
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…

> 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 to use them properly.

Pico is a keyboard-only editor, and it's easier to navigate, and to use in general. So is every other editor that exists, written after about 1980. None of them require the user to switch modes, an idea that died with vi -- I mean, if only vi had died.

As soon as keyboards included arrow keys, the handwriting was on the wall.

Re: Vim users: stop using hjkl

#128

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?…

I can assure you Vim is not making a MILLISECOND difference.

Vim is making a 5 seconds difference on every edit. Each edit can be defined as commenting out blocks of code, insert/delete text, or moving blocks of code. If your IDE provides convenient key combo to do these tasks, then great, you have no reason to use Vim. But as soon as you reach for your mouse, you just wasted 1 seconds. Dragging your mouse to select the text you want to change takes another 5 to 10 seconds.

> Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all.

Documentation lookup is much faster through terminal :) Man page is easier to navigate than JavaDoc because of that no mouse needed.

File management is easier and faster through terminal. Think about the process that you move/copy file in GUI. 1) You open one Window, then navigate through folder tree with mouse double clicks; 2) You issue a copy command to the file you want to copy/move; 3) You mouse click to destination folder then paste it. Terminal based file management is just `cp /source/folder/autocompleted/with/tab/key /destination/folder`

I think the true argument here is not Vim or not Vim. It's about mouse or no mouse.

Re: Vim users: stop using hjkl

#129
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…

How is a mouse more efficient than an ability to move to a phrase with a bit of typing, skip words ahead with a single letter instead of ctrl + shift, move to a new line and a specific place on that line with a couple of button presses, etc?

Re: Vim users: stop using hjkl

#130
post #115

Earlier quoted context omitted.

First, I don't know vi. Well, I am aware that something like this exists, because I see "{not in vi}" everywhere in VIM docs. So maybe you should familiarize yourself with VIM before talking about it - for example I noticed that you wrote that "[in modern editors] there is no need to wonder in what mode you are" as if it was a problem in VIM. It's true for vi, but VIM has a mode indicator on a status bar since times…

> It's true for vi, but VIM has a mode indicator on a status bar since times immemorial. That's a nice improvement -- an indicator to tell you which of the three exclusive modes you're in at the moment. But imagine this -- imagine eliminating both the indicator, and the modes, all in one fell swoop, as modern editors have done. > ... please take a closer look at modern VIM and then come back with a critique that make…

"imagine eliminating both the indicator, and the modes"

I was using modeless editors all my life; I was working with Zend Studio and Komodo IDE which are definitely modern editors. Yet I chose to have modes and switched to VIM. In other words I have no problem with imagining editors you talk about, I just don't like them.

"When I wrote Apple Writer in 1978 ..."

That's a funny thing, because VIM appeared in 1993 and only really became what it is now around 2006. Whatever you did deprecate, it was not VIM.

With all due respect, you seem to know next to nothing about modern VIM. You didn't use it, right? I am using it every day and I can compare it with several other editors and I can assure you that VIM offers nearly everything other editors do inside the insert mode - you can work never leaving it, then it's like it was modeless - and that normal mode is an additional feature that accomplishes things not possible in other editors at all.

Anyway, I'm alright with you convincing people not to use vi. It's archaic and cumbersome, has many missing features and so on. On the other hand, please stop bashing modes - it's ok that you don't like them, but that's your personal choice - and stop including VIM in your rants.

Post reply on HN