Vi Improved

Posted on November 25th, 2009 by | No Comments »

I recently started using vim on my Linux machines for development (actually gvim and I just haven’t gotten around to installing it on my Windows partition). I’d tried to learn it some time ago with the understanding that it’s awesome, but it didn’t catch on. I know a lot of smart people who use it and it was always one of those things that I felt would be really valuable for me to learn, but–it was hard.

Well, now it’s easy. @adambair mentioned this blog post by Derek Wyatt. It’s a collection of videos he made introducing you to the most basic commands in vim. Enough to get your feet under you so that further research on your own has something to stick to. They’re awesome.

However, the reason they’re awesome is not just that he takes you step by step through the most important stuff or that he’s lighthearted and friendly-sounding. The awesome part is that he shows you why it is that vim is so raved about. If you try to learn vim thinking that it’s like TextMate or NotePad or something, you won’t get it. And until you get it, there’s very little impetus to get over the learning hump (or through the dip, depending on which way you chart things in your head).

The key to understanding, for me, was realizing this: You should not be spending most of your time with vim in insert mode. You should not be typing and selecting in the sense that Word teaches. You should be doing finds and replaces and yanks. You should be operating on your code with macros. If you’re writing new code, great. You’ll be in insert mode for a while, but even then, you’ll want to invoke something that’ll set up your class structure with maybe some default methods in it or something. And as soon as you’re done, you’ll want to be jumping around by line number, moving to a specific character in a line, replacing a segment of a line with two keystrokes. Really, just the movement possibilities blew my mind. So, go watch the introduction.

New Roleplaying Blog

Posted on November 17th, 2009 by | No Comments »

For those of you who thought my last post (about role playing) was interesting, I have some news: I won’t be posting about that stuff here. I will, however, be writing on the topic. My friend, Stewart, and I realized the he and I would have a lot of fun writing together on a blog specifically about role playing. So if you are interested in our thoughts on that topic, we’ve called it Maximizing Rockmost. We’ve started off with several posts (some of which are expansions of material from my post here) so you can see what sort of thing we’re likely to be writing about. I’m looking forward to it.

For those of you who wonder why I’m blathering about RPGs and wish I’d get back onto a technical topic, don’t worry. I’m presenting at Austin on Rails this month about git (along with Mike Subelsky of OtherInbox). I plan on blogging about that presentation. I also want to write about vim and about ruby koans and about making my first ruby gem. So there’s technical topics in the pipeline. Never fear.