Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks, downloaded and read through it and I picked up a couple new tricks, even as a pretty experienced Vim user.

Some comments:

1) The order feels a little artificial. I like that inserting text isn't mentioned until a couple chapters in, but I think that the focus on saving/writing files at the start is misplaced. If I'm a newbie and I don't know how to change or insert text, I don't have the ability to meaningfully practice saving as I read.

2) There are some weird inconsistencies, like teaching :next (:n) for next file, but Ctrl+^ for previous file. :Next (:N) is easier to remember, works in vi and is shorter to type than the less-compatible :prev that I would otherwise suggest. :! is mentioned several times in different contexts, without a hint that it's the same command in each but with a different prefix or argument.

3) There's a focus on memorization of compound commands rather than understanding how motions and operators work. If you know how the cursor works and that "y" means "yank from cursor", you don't have to remember that "yl" means "yank a single character" because you can compose it from "yank from cursor" and "one character to the right". This composition of movement and operators is one of vi's greatest strengths, and I think that exposing new vi users to it as early as practically possible is a great way to get them to appreciate what they're learning.

All in all, it's a worthy read for someone who doesn't know any vi and needs a quick lesson in the basics, somewhat like the foreign language learning products that focus on teaching you enough conversational vocabulary for a vacation or business trip. If you want to immigrate to vi-land permanently, I'd suggest supplementing this with something like Drew Neil's "Practical Vim"[1] to learn the "bigger picture" stuff as well.

[1]: http://pragprog.com/book/dnvim/practical-vim



Pretty nice review and I agree with most of your comments.

I agree that it seems strange to teach Ctrl+^ for previous file. (Not symmetrical, and doesn't really mean previous anyway.) However, particularly for the purpose of teaching newbies, I think :Next would be even more confusing... and I could be wrong about this, but I think the number of people who need to care about learning vi (as opposed to vim) is really small, if it even extends beyond communities of people who think that things created 20 years ago are newfangled.


I agree about the vi vs. vim part, I just suggested :N since the book itself was (as far as I could tell) strictly staying vi-compatible. :Next going backwards compared to :next is a little confusing at first, but it actually fits the same pattern as some other commands that go in two directions (f and F, t and T, gg and G), if you think about the two commands as just :n and :N. Naturally, as you observed, it's probably better to use :prev if you're in a modern vi clone or vim.

If you switch to vim as the baseline, there's a bunch of other easier ways to do things too, like using :sav (:saveas) instead of :w <filename> followed by :e <filename>.


I've been using Vim for almost 2 years, now, and I'm very happy with it. Somehow, I'd like to try vi but I have no idea of where I could find the source.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: