Hacker News new | ask | show | jobs
by capote 3723 days ago
Now, all that said, I do have a story about speed with Vim:

When I was in high school, I bragged to my dad about typing something like 110 words per minute. He said… that's nice; I can type 1100 words per minute. Incredulously, I asked him to show me. He fired up his vim setup, opened a few files, started a new one, and sure enough in under 60 seconds he had a ~1100 "word" Sybase stored procedure (or something) written.

Of course he didn't literally type all of it. Of course it was a loooot of copy pasta, and the whole thing was tongue-in-cheek. But it was a good example of what you can do with Vim given the right scenario.

1 comments

With a ctrl-a, ctrl-c, ctrl-v loop you can "type" exponentially fast in any editor, I guess.
It was a little more complex than that because the new stored procedure was indeed new and contained different structure, as far as I remember. ;) but yeah, copy pasting definitely takes a bit of the elegance out of it.

Most of what was demonstrated was Vim's superior capacity for jumping around to the correct place in your file precisely and quickly, which doing with a mouse is a nightmare.

Vim has a lot of key commands to quickly working with blocks of text so it is a bit more nuanced than that.

For example, to copy 3 lines from the cursor position and paste them 5 lines earlier:

3Y :-5 p

(and there are faster ways, some people are wizards)

I also do relative numbering in my vim (I have the current line labelled as 0, the line above it -1, etc) so that I can move around relative to the cursor without having to count lines. You can also do absolute numbering but I find that tedious when you have large files.

I know, I've been using vim pretty exclusively for the last 15 years or so.
Limited of course by cache reads for very large blocks of text.