HN user

tyrmored

274 karma
Posts2
Comments95
View on HN

The time you can save with Vim can be significant, depending on the task. However what I think is far more valuable is that Vim doesn't get in the way; it doesn't impede the all-important "flow", and perhaps most importantly it stops you getting bored.

When your muscle memory develops to a certain point, using Vim becomes a subconscious thing. You don't have to think about how to copy all the text in between two quotes and paste it at the end of the document; there are already words in Vim's vocabulary for doing that, so you just do it. You don't need to build mental steps because it becomes completely natural, as easy as typing natural English; and just like in natural language, the more words you know well, the more likely you are to be able to use the right word at the right time, using language effectively.

Equally valuable: Vim takes the repetition out of everything. A technically versed creative mind is wasted on any repetitive task. You should never, ever have to do anything more than twice in development. You should be able to repeat and automate tasks and scarcely think about it. In Vim, this need is met by skilful use of . to repeat actions and q to record macros.

When you edit text optimally, you can concentrate on the task at hand, and the editor stays out of your way and does exactly what you need it to. You don't need to build the "subtask" of making your editor do what you want; you can just do it. I think that people who focus on the time Vim does or doesn't save you are missing the point.

Actually using Ed 14 years ago

That's one of my very favourite pieces of tech-related comedy. I still laugh every time.

Actually using Ed 14 years ago

Awesome stuff! I love your blog, by the way. It gives me a standard to which to aspire.

Actually using Ed 14 years ago

That's the usual attitude, I think. "I'm glad I know how to use it now, but I hope I never have to."

That, and heading off future competition. If Google were planning, for example, on releasing a multi-protocol web chat application of their own in the next few weeks, this would be a well-timed move.

Using Meebo's code base to make their own application might have been preferable to rebranding it in this case.

Using Chrome and Vimium on sites like Reddit and Hacker News almost feels like cheating -- "I shouldn't be able to consume this amount of information without even having to move my wrists."

I'm very pleased it was useful. I'm surprised to see it hit HN; I wrote it back in January and it had a lukewarm reaction on Reddit and not a peep from HN. Then again, I normally don't submit new articles to HN.

Vim only seems hard because it's so profoundly different. If you persist for even one or two evenings, I'm pretty confident most Hacker News readers are easily sharp enough to be back up to their old speed in Notepad-type editors, and from there you only get faster.

You don't have to learn it at work either. I find it's helpful to make Vim the only text editor you ever use with a dark background. The visual cue seems enough to put you in "Vim mode" so you press i before you start writing. When the background is white in your whizbang C# IDE or a Hacker News comment box, you just use your old editing habits.

Just wait until someone names a whizbang plugin "nerdsboggler-jimcrickey.vim" out of sheer spite!

Nowadays I do load a few plugins myself on the machines where I do a lot of coding or writing, but the only one that's useful every single day without fail is Tim Pope's Surround [1]. It's so useful so often that I've often thought Bram should simply ask to make it part of Vim's core to supplement the very cool idea of text objects [2]. Even if you're a crotchety old raw-Vim man, I really would say that you've got to try this out.

There are other very good plugins out there. Fugitive [3], also by Tim Pope, comes to mind if you do a lot of Git work and care about crafting really nice commits.

[1] https://github.com/tpope/vim-surround

[2] http://vimdoc.sourceforge.net/htmldoc/motion.html

[3] https://github.com/tpope/vim-fugitive

Yes, gt and gT are the way to do this.

Admittedly I wouldn't personally recommend those mappings, because both already correspond to commands I use quite frequently. By default Y is synonym for yy, to yank a whole line, and T<char> moves back to the nearest instance of <char> on the current line. The first one I think people could live without, but the latter is kind of important for good vi.

I could definitely do something like that. Probably not in the walkthrough style, which I don't really like, but definitely listing keystrokes and commands to use.

I'll write and post it sometime in the next week or so, if you're still interested by then. Thanks for the suggestion.

Hmm, yes. :set hidden is recommended so often in pretty much every introductory tutorial that in places I've assumed people who have basic familiarity with Vim are already using it.

In retrospect this probably wasn't wise of me; I don't use it myself, and I still run into the occasional Vim guru online who doesn't either.

I've edited the post with a clarifying note and given you a footnote. Thanks.

Author here. That's not quite what I meant; mapping keystrokes to Vim's tab commands is well and good, but it requires some serious kludges to make Vim behave the same way as, say, Notepad++, where one open tab equals one open file, and that's that.

"Window groups" would have been a far more accurate though potentially less familiar name for the feature, in my opinion.

I don't actually use tabs much, personally. I seldom have more than three or four files open at a time.

You're right, it's not aimed at advanced or even intermediate users. To be honest I'm surprised (though flattered as I usually am) that it got onto HN. Hopefully it's useful to at least some people to clarify Vim's behaviour, since it may not be familiar to people raised on GUI editors like myself.