Live data from Hacker News

Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

amazon.com

91–100 of 143 posts

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#91
post #8

Awesome. Thanks for sharing. I've been using vim for 6 months, but I still feel like a n00b. Looking forward to checking this out. I started my vim experience using Janus But I didn't understand how anything worked or why any of the plugins were there. That led me to starting from scratch (I forked my cofounder's dotfiles) and now I feel like I know my vim config waaaay better. If you've been using janus, I'd highly…

I'm in the opposite boat: i stuck with Janus and actually dug in the source and played with it to understand exactly what was there. Janus is incredibly awesome and easy to extend, I'd highly recommend you gave it another chance and really read the docs and try to understand why it is what it is. Must have plugins are also https://github.com/tpope/vim-surround and https://github.com/tpope/vim-repeat

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#93
post #8

Awesome. Thanks for sharing. I've been using vim for 6 months, but I still feel like a n00b. Looking forward to checking this out. I started my vim experience using Janus But I didn't understand how anything worked or why any of the plugins were there. That led me to starting from scratch (I forked my cofounder's dotfiles) and now I feel like I know my vim config waaaay better. If you've been using janus, I'd highly…

you always feel like a n00b with vim :)

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#94
post #74
post #71

Earlier quoted context omitted.

I haven't made the jump from arrows to hjkl. My cofounder's keyboard is arrowless, but my HHKB lite still has the arrows. Maybe in another 5 years I'll make the switch.

Using hjkl instead of the arrows is not a small difference. It's huge. Staying on the home-row vs having to move your hand over and back constantly affects your speed and accuracy in a big way. Here's an easy way to switch: never, ever use the arrow keys to move the cursor again. Done!

hjkl may have started because the Joy was working on an ADM3A that had no home row, but the elegant and efficient consequence is that your hands fingers do not move from typing position.

you just have to map your tab key to escape to get the original layout back[1].

[1] http://en.wikipedia.org/wiki/File:KB_Terminal_ADM3A.svg

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#95
post #71

Earlier quoted context omitted.

I haven't made the jump from arrows to hjkl. My cofounder's keyboard is arrowless, but my HHKB lite still has the arrows. Maybe in another 5 years I'll make the switch.

It's vim, so no need for a hardware mod. Here's a trick that several vim writers recommend; add this to your .vimrc: " Disable arrow keys noremap noremap noremap noremap It'll be super annoying for the first day or two, vexing for the rest of the week, then you'll just forget it's even there.

The hardware mod that made the most difference for me, typing-wise, was rearranging the tops of the keys. I'm not sure this is doable on modern laptop keyboards, but on desktop keyboards it's trivial, and I never realized just how much I looked at the keyboard until it would hurt, and the habit died quickly.

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#96

Not free exactly. It's still locked in the kindle cage. You can't just download it as a PDF.

Free as in beer, not free as in freedom.

Free as in beer if you've paid for the glass.

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#97
post #81
post #71

Earlier quoted context omitted.

I haven't made the jump from arrows to hjkl. My cofounder's keyboard is arrowless, but my HHKB lite still has the arrows. Maybe in another 5 years I'll make the switch.

Does this really make that much difference? I kind of view the hjkl vs arrow keys like I view the standard debate about motion commands vs. the mouse. Lots of people say they are faster using motion commands, and I know I use search motions 85% of the time. But if I want to go somewhere that's visible on the screen, the mouse is almost always quicker. And I've used vi and derivatives for 20+ years now (although obvio…

For me the mouse is never quicker. I think that over time your brain kind of memorizes the number of lines (rows) and characters (columns) available in your screen and it certainly gets to a point where you don't really think about the science behind motions and you end up just using motions defined through past experiences. I amaze myself (and my coworkers) when I apply a seemingly random number to a motion and I end up exactly where I wanted to be. Last time a coworker asked me if I'm a math freak and I did the calculations in my head when doing a complex motion in a second, and even though I answer that I am (jokingly), I know that it's actually just a combination of muscle memory and past memories.

In any case, even though I don't agree with the school that says that to learn vi/vim you should forgo arrow keys and non vim (cmd + s to save, command + left arrow to go the left of the line, etc) key combinations, I think that a major point of inflection while learning the editor is choosing a trick/combination/command that you want to learn because it will increase your productivity and keep forcing it, even if it means not using the arrow keys or other combinations you're not used to, until it becomes second nature. And then do the next one and so on.

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#98

Every once in awhile the state of DRM really hammers itself home, to me. Case in point, when someone is literally giving a potentially interesting book away and I can't be arsed to take it because getting it onto my reader of choice is just too much hassle.

Yep. More irony is ironic: there's no Kindle reader for Linux, which is one of the platforms on which vi/vim are most likely to be found. Thanks for nothing, Amazon.

The Kindle Cloud Reader works just fine for me on Linux (Chromium)...

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#99
post #71
post #19

Earlier quoted context omitted.

I've been using it for about 17 years and I too am a noob. hjkl

I haven't made the jump from arrows to hjkl. My cofounder's keyboard is arrowless, but my HHKB lite still has the arrows. Maybe in another 5 years I'll make the switch.

If you want to learn the new way, disable the old way:

    inoremap   
    inoremap  
    inoremap     
    inoremap   

Re: Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only

#100

Earlier quoted context omitted.

Free as in beer, not free as in freedom.

Free as in beer if you've paid for the glass.

Between the Kindle cloud reader, the mobile apps, and the desktop apps, the glass is free. I'm not saying I like DRM - I don't, I find it a huge pain in the ass, and I took care of it as soon as I downloaded the book - but you're misrepresenting the situation for the benefit of your argument.
Post reply on HN