Live data from Hacker News

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

amazon.com

131–140 of 143 posts

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

#131

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.

Very cool, thanks.

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

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

Not using the arrow keys was a no-brainer back in the day of slow dial-up connections. Sending ^[OA over the wire instead of just h was a really big deal and when your connection dropped a byte you ended up with garbage in your files if you used the arrow keys. Having that sort of pain associated with their use has stuck with me ever since.

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

#133

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.

Very cool, thanks.

My pleasure, you're welcome!

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

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

Yeah, I let hjkl discipline slide for a long time, too; it's damn hard to interrupt a reflexive reach for the easier to align cluster whose labels actually correspond to what you want to do. Here's the part that finally pushed me over: arrow keys can supplement/mirror/tweak anything you find overly awkward, slow, or hard to remember in the "native" form. And you can remap them straight (no prefixes/modifiers) or build something arbitrarily deep and be certain you won't interfere with any other bindings.

See? the arrow key scan become four more user keys, and they have easy to remember direction/orientation if you need it. Having trouble navigating, swapping, and resizing, your layout (and accidentally hosing text with ^w in the wrong mode? I did, but 20 minutes after seeing someone else use a similar setup, I was using my own variant more comfortably than any console window management bindings I'd ever tried before.

tl;dr; Remap the arrow keys from movement to anything you struggle with normally, and be amazed how you survived before your four newest "user" keys were liberated!

(Also, if anyone wants me to, I'd be happy to post my re-binding config lines as a template/sample.)

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

#135
post #69

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

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…

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 followed by :e .

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

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

What do you use in insert mode?

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

#137
post #69

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

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…

[deleted]

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

#138
post #74

Earlier quoted context omitted.

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!

What do you use in insert mode?

Escape. Normal mode is for navigation. :)

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

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

I'm late responding but I've been trying the arrow keys more because of your comment and many others who use them. In the older *nix and depending on the shell, it seemed they didn't always work. On Ubuntu though, they work great! I might switch to using them, thanks for the tip.

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

#140
post #69

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

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…

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.
Post reply on HN