Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

131–140 of 218 posts

Re: Vim users: stop using hjkl

#131

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…

> Vim is making a 5 seconds difference on every edit.

Please. I'm on the floor laughing. Five seconds. I'm not 12 years old any more. I learned to use a stop watch a long time ago. If you want to believe your own folklore that's fine with me.

In any non-trivial software project far more time --ORDERS OF MAGNITUDE MORE TIME-- is spent (or wasted) on planning, executing and, yes, fixing bugs, on software. The speed of your text editor is a rounding error in the balance sheet.

Re: Vim users: stop using hjkl

#132
post #106

Earlier quoted context omitted.

My problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD. I want to make concise changes based on sober reflection. Do I want a convenient browsing mechanism that stays minimal while I internalise the code I'm reading? Yes. I get the _why_ of vim, but the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer atti…

> My problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD. This is the best argument yet in favor of vi/vim -- it keeps you from doing things quickly that you would later regret. > ... the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer attitude. Unfortunately, that's not an argument in favor of increasing…

for the latter, i'm saying i'd rather navigate with a scroll wheel and hyperlinked names a lot more than i want to search multiple buffers. hands away from the keyboard, reading mode rather than typing mode, getting context

Re: Vim users: stop using hjkl

#133
post #117

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

Imagine if there was a way to edit text entirely through just mentally thinking what you wanted changed? No physical overhead whatsoever, but just having the text change as soon as you mentally think, "change this parameter name to ___" and it happens. Being proficient in a good editor, like vim, makes that slightly closer to reality than using traditional, non-modal editors. Even so, this slight difference can have…

> this slight difference can have the major effect of helping the editor "get out of the way" and just let you make the changes a bit more proficiently

I have never, in THIRTY years of designing hardware and writing software, been slowed down by a text editor of nearly any kind (other than the first time I used VI). And, yes, I can use vi and vim. And yes, I think it is total horse-shit. The things that have slowed me and others down, caused projects to fail, caused robots to crash and damage something or caused the success or failure of a business have been orders of magnitude removed from any advantage that could be had via a text editor, even if it was wired into my brain.

It is OK to make oneself believe that this is really useful stuff. Some people believe in all kinds of invisible things. And, in that context, anyone going against those beliefs is a lunatic. I am, on more than one front. I prefer to focus on what is real and what is significant.

Re: Vim users: stop using hjkl

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

SublimeText incremental search equivalent: Ctrl-F

Much easier to use and learn than Vim. Just as fast.

SublimeText also has vim keybindings that I never bothered to use, and never will.

Re: Vim users: stop using hjkl

#135

I was hoping someone would trash the idea of hjkl, which I personally don't like. So first I was disappointed to read yet again about not using the arrows. Then when I read the rest of the post, it definitely makes sense. I do use w, b quite frequently, and I don't use f, but I've found the vim-seek[1] plugin recently, and it seems to make more sense to use. It matches two rather than one character, which makes it mu…

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

Re: Vim users: stop using hjkl

#136
post #112

Earlier quoted context omitted.

> Exactly, but it isn't just vim and emacs. Using the mouse is terribly inefficient for any typing-oriented endeavor. That depends -- how far do you need to move, and how much text do you need to select? For large moves, and for large text selections, using a pointing device is often much easier than using the keyboard. Modern editors auto-scroll to keep the mouse cursor in view, which means I can select an arbitrary…

Shift + page down allows you to select entire pages of text, cut it, and move it to whatever other position. It's also probably faster given that autoscrolling moves at a slower speed than page down.

Put the cursor at the start of the desired selection.

Move the window with the scrollbar (faster than anything else, actually), then shift click at the end of the desired selection.

Bam! Just as fast if not faster.

Re: Vim users: stop using hjkl

#138

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

I'll tell you when and why I use vim and how I can justify its useage: Linux servers. I use vim on my servers to edit everything. Why? Because I know it's there and I don't have to install anything. And, even though I think it's a horrible UI that could only be justified in an era with keyboards that barely had characters and numbers, I use it.

A religious attachment to vim? No friggin way. No editor has ever caused one of my projects to come in late (or early). The factors that affect real projects are so far removed from the software one uses to edit code that it is incredible some people evangelize something like vim to such an extent.

The other really funny thing is to see articles and blog posts describing how to add trees, tabs and all manner of other things to vim and how this makes it even cooler. Really funny.

Re: Vim users: stop using hjkl

#139
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. 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?

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

I can't improve on your explanation as the answer to your own question. Obviously using a mouse to cut/copy and paste, within the same document or between independent documents, is more efficient than what you just described.

Re: Vim users: stop using hjkl

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

> the operation involved there is not one you can do in-stride or with as few keys in any other "modern" editor

SublimeText2: Ctrl-Delete: deletes the rest of the current word.

Post reply on HN