Live data from Hacker News

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

amazon.com

81–90 of 143 posts

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

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

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 obviously they initially didn't have mouse support :-)).

Similar for hjkl, especially if you use single cell motion mixed with whole page motion (Fn-arrow on a macbook), I just don't see hjkl + ^D^U being quicker. It seems more like something that might be useful every once in a while, but not terribly useful 100% or even 50% of the time.

EDIT: And the book says this:

"type the number of characters or lines you want the cursor to move, followed by h, j, k, or l. This technique cannot be used with the arrow keys: left, right, up, and down."

Which is not correct.

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

#82

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.

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

#84
If you'd like to make sure you know all your vi basics, I recommend my presentation "Vi Basics" at http://www.verticalsysadmin.com/vi/class/ -- it is based on Bill Joy's original paper introducting vi and covers the basics of vi according to its author and in the same order that the author covered them.

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

#85

Earlier quoted context omitted.

I used NERDTree for a long time until I saw a simple tutorial to netrw - now I love netrw and don't want to ever go back to NERDTree. It's simple and to the point and just works really well for me.

Hm.. maybe I need to take another look at netrw. Last time I played with it, the big thing that led me to prefer NERDTree was the difficulty in opening a file you navigated to in the pane to the right. It kept replacing the netrw pane.

As always, the answer is in the documentation (:help netrw):

    P

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

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

Don't forget the insert mode.

    inoremap  
    inoremap  
    inoremap  
    inoremap  

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

#87
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 wound up doing the same thing (not with Janus, but with a massive forked .vimrc). One day I was SSH'd into a remote server and vim'd a directory by accident and I discovered Netrw. It wasn't the same as NERDTree, but it was good enough for me to get rid of that plugin. Eventually I just learned to enjoy the defaults with minor tweaks. Today my vimrc[1] is [1]: https://github.com/mgirouard/Dots/blob/master/.vimrc

What is this netrw? http://www.vim.org/scripts/script.php?script_id=1075 seems to imply it's just for vim'ing remote files. Does it do more?

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

#88
post #87

Earlier quoted context omitted.

I wound up doing the same thing (not with Janus, but with a massive forked .vimrc). One day I was SSH'd into a remote server and vim'd a directory by accident and I discovered Netrw. It wasn't the same as NERDTree, but it was good enough for me to get rid of that plugin. Eventually I just learned to enjoy the defaults with minor tweaks. Today my vimrc[1] is [1]: https://github.com/mgirouard/Dots/blob/master/.vimrc

What is this netrw? http://www.vim.org/scripts/script.php?script_id=1075 seems to imply it's just for vim'ing remote files. Does it do more?

Check out http://vimcasts.org/episodes/the-file-explorer/

Also...

:help netrw

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

#89
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!

I did that and it is actually incredibly easy to get used to (within a couple of hours). The bigger thing you have to get used to -- and which I suspect most will struggle with -- is not moving around when in insert mode.

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

#90

On a related note, is there an easy way to find other free or dirt-cheap (US $0.99) E-books on Amazon? The Amazon site likes to group things into "As low as " sections, which means there's a least one item at that price, with most things costing more.

One way is to go to the kindle store, choose the kind of book you want (Amazon calls it a "Department") and sort by price. For instance, here are programming books:

http://www.amazon.com/s/ref=sr_st?bbn=726697011&qid=1345...

It's not perfect but you can find good deals this way.

Post reply on HN