Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

181–190 of 218 posts

Re: Vim users: stop using hjkl

#181

Earlier quoted context omitted.

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

I play classical guitar and piano, you don't have to convince me of that. I was being a little (al lot?) sarcastic.

Re: Vim users: stop using hjkl

#182
post #158

Earlier quoted context omitted.

I think he's encouraging people to focus on more pressing problems. I think he's angry because there is a silly and opinionated subculture surrounding a text editor. He exploded likely because this article - while innocent as it may be - broke the camel's back. For a site so focused on the hacker mantra of getting things done, one might think he's right in his anger, as a text editor usually is just about the lowest…

BINGO! Thanks for understanding. I went to a startup pitch event the other day. VC's on the panel were asking the entrepreneurs the usual cadre of tough financial questions. Questions like: "How are you going to spend the time and money once you get funded?". What do you think would happen if someone said something like this? "I am going to take a month or two to learn and get really good at vim because I keep readin…

Awesome strawman you have there, and the same non-argument could apply to any technology: "I am going to take a month to learn Ruby...". In any case, you can relax - no one is trying to take Notepad away from you.

Re: Vim users: stop using hjkl

#183

Earlier quoted context omitted.

What a vicious and sad rant. you've boiled the whole argument down into whether a text editor is the pillar upon which a successful product is built. Well of course not! Nobody is even claiming that. Some people are merely expressing it allows them to put thought onto paper a little quicker, or that they just enjoy it. Others just enjoy being able to tweak their editor, it's a fun meta activity for any programmer. It…

> For all that name dropping of the vast and expansive techs you've worked with, you seem to be extremely close minded on this issue. It's exactly the opposite. All of that has given me perspective that seems lacking on some entering into these religious conversations. I don't even know how many code editors I have used over the years. I probably couldn't list them. I've even had to write some of my own. The point is…

> In the context of starting, launching, growing, evolving and maintaining a tech business

Possibly, but some people are not starting, launching, growing, or evolving anything but software - and a text editor is where 99% of that work happens.

Re: Vim users: stop using hjkl

#184
post #119

Earlier quoted context omitted.

Speaking only to one of your many weak arguments: > 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. I haven't used a cheat sheet with vim in years now. I don't think I used a cheat sheet after a month of using vim. `:w` is as natural to me as ctrl-s. Slightly more natural, because I don't have to think in order to turn a save into a sav…

> `:w` is as natural to me as ctrl-s. Yep. And it is two keystrokes instead of one. Wouldn't it be more efficient to eliminate one of those keystrokes rather than committing them to memory? That's the approach taken by all editors written since about 1980, so it seems to be an idea whose time has come -- and passed. > And if we want to talk cheat sheets, wouldn't you consider menus in non-modal editors to be cheat sh…

> And it is two keystrokes instead of one.

Technically, it's three keystrokes instead of two. And you have to commit ctrl-s (or cmd-s if you're on a mac) to memory just as much as you do :w. Nothing really saved there.

> The "cheat sheets" I refer to are those that map multiple-keystroke sequences to the actions that, in a modern editor, require one keystroke.

Like delete the next four words? How do I do that in a modern editor with a single keystroke? How about "replace everything inside these quotes"? Or repeat the last action I just took again?

I'm glad you like your modern editors (there's lots there to love), but they are not inherently better than vim just because they're non-modal. There is typically a more shallow learning curve than VIM, but the simple virtue of being non-modal doesn't guarantee that (sorry, Emacs).

In the end, two things sealed the deal for VIM for me. 1) it's on every remote server I have to access, and 2) I've put the time into it, so I'm quite efficient in it.

In my last job, since I was only doing local development, I tried out Sublime Text 2 for a good 3 months before giving up on it. I was constantly thinking "I know how to do this in vim - how do I do it here?", and ultimately, I got tired of constantly reaching for the mouse for trivial things like selecting and moving text. I felt that 3 months was sufficient to really give ST2 a fair shake, so I didn't (and still don't) feel bad when I went back to the terminal.

Re: Vim users: stop using hjkl

#185
post #51

Earlier quoted context omitted.

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

> 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 time when programming. You speak as if modal editing…

Modal editing did come first, and universally agreed upon better things did evolve afterwards. I remember "modes are bad" being established UI-design wisdom as long ago as the mid-'80s, after the Macintosh came out and everyone started moving toward graphical interfaces. I'm surprised there is anything about this question which is seen as being open to debate here in 2013.

Re: Vim users: stop using hjkl

#186
post #3

I hate hjkl for the simple reason that I learned to type with my index fingers on F and J keys. I use search a heck of a lot more but I guess I should add w, b and e to my repertoire.

Is there a way of typing which does not involve having one's index fingers on the F and J keys? I thought that home row position was standard (regardless of keyboard layout - I type dvorak but my index fingers still rest on the keys marked F and J).

Re: Vim users: stop using hjkl

#187
post #151

Earlier quoted context omitted.

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

> I think that the value of your editor was not in efficiency --if we define it as "data entry speed".

Oh, I agree -- based on modern standards it was quite primitive and somewhat poky when used by an experienced touch-typist. But I was only comparing it to vi. :)

Re: Vim users: stop using hjkl

#188

Earlier quoted context omitted.

BINGO! Thanks for understanding. I went to a startup pitch event the other day. VC's on the panel were asking the entrepreneurs the usual cadre of tough financial questions. Questions like: "How are you going to spend the time and money once you get funded?". What do you think would happen if someone said something like this? "I am going to take a month or two to learn and get really good at vim because I keep readin…

Awesome strawman you have there, and the same non-argument could apply to any technology: "I am going to take a month to learn Ruby...". In any case, you can relax - no one is trying to take Notepad away from you.

Ridiculous. Taking a month to learn Ruby is so vastly different than taking a month to learn vim that it defies comparison. One actually has the potential to give you an order of magnitude productivity gain while the other will do so little for you that you might as well call it nothing.

Let's exaggerate in order to enhance the effect.

Both you and I launch new startups to produce exactly the same web software product.

We both get programmers who have zero experience with vim and Ruby. Let's say they only know PHP and only know how to use Notepad++. No frameworks.

I have my programmers go to Ruby class and learn Ruby on Rails for a month.

You have them learn vim for a month. They get to stay with PHP.

Not fair? One is a framework designed to speed time to market while the other is just a text editor? Exactly!

Who do you think will see the greatest productivity gains in a month?

In six months?

Who will ship product first?

Who will ship product with more features?

Who will ship product with less bugs?

Who will go out of business?

Who will get fired by the board?

Right.

Or, let's take a different route:

Our investors just gave us a million dollars each for these startups.

I go to mine and propose that I want to have the entire team take a month to learn RoR due to the productivity and code quality gains we are going to be able to derive by taking this approach.

You go to yours and tell them that you want your team to spend a month learning vim because it takes too long to go from home row to the arrow keys and you can shave seconds while editing.

Sign-up for YC and tell PG that you are going to have your entire team go learn vim for a month instead of something that delivers real productivity gains that are orders of magnitude greater.

Who gets fired?

Again. Right.

When you measure what really matters just about any argument for vim is as hollow as can be.

Re: Vim users: stop using hjkl

#189

Earlier quoted context omitted.

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

I could swear if you just ran the command "vi" rather than opening a file with vim it would load to a screen that shows you how to run the tutorial. I can't confirm that since I'm on a Windows machine at work right now, so I won't argue it. It does exist, but I'll acknowledge that it's not advertised heavily.

I just freshly installed vi and tried that. Here's what I was greeted with. http://pastebin.com/HxvNP6Tr I've seen the tutorial that you're probably talking about a few years ago when I got curious about vi. It didn't really do it for me at the time.

I'm prepared to believe that people willing to tolerate its ideosyncracies can be very productive in vi or vim. I've seen it first-hand. It also appears to be well suited to potentially reducing rsi-type problems. But it is not intuitive to learn nor is it the least bit friendly. That's a shame too because there is no good reason why it couldn't be so.

Re: Vim users: stop using hjkl

#190
post #141

Earlier quoted context omitted.

> 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. I identified my subject very clearly. Are you really unaware that vim derives from vi, and contains the same core code and strategy? That a discussion of vim is a discussion of vi? But let's allow Google to decide this for us: Search for "vi/vim" : "About 482,000 results"…

VIM is the de facto vi on many platforms, I suppose that this is the reason for your search results. I agree that VIM derives from vi, it's obvious - my point, however, is that the additions and improvements and changes in VIM are many times larger (in terms of code and "user facing surface" like commands) than the core itself; and that essentially creates a new, separate product. Take MS DOS and MS Windows 95 as an…

> and that essentially creates a new, separate product.

New, yes, separate, no. Vim has the same modes, the same handicaps, as its predecessor.

> As for modes - I didn't want to get into this ... (long discussion of modes)

This reminds me of a famous and very funny monologue in "Five Easy Pieces" in which a woman talks endlessly about some truly boring topic, punctuated with "But I don't want to talk about it" over and over again. It's priceless.

> Your argument is that "every other editor is modeless" - and it's false.

It's true. Apart from the occasional editor that ridicules vi by including a vi emulation mode, just as a comic riff for modern programmers who aren't aware how bad things were and how far they've come ...

> The truth is that almost every modern, serious editor includes vi emulation mode

... ah, so that's what you were talking about. Obviously an editor that includes a vi emulator mode can't be accused of requiring what vi requires. Or don't you see that?

> So your argument is simply wrong.

Hospitals are equipped with wheelchairs and crutches -- does this mean that's their goal? No, it means they realize something may go very wrong and they want to be prepared.

The reason for vi emulation mode is to accommodate people who are beyond meaningful retraining. Have you heard that you can't teach a dead dog new tricks?

What I find shocking is that new programmers will start learning vi/vim without realizing how primitive it is by modern standards. This thread can only perpetuate the fantasy that vi/vim is anything but a way to avoid abandoning older programmers and their skill set entirely.

> Would you say that Win95 is the same as DOS?

Does it still require drive letters? There's your answer -- drive letters stand for (but doesn't exhaust) all the things that are wrong with Windows. By the same token, requiring mode switches stands for all the things that are wrong with vi/vim.

Post reply on HN