journal for 2004-02-04

vim is scary

So, I got more than halfway to my goal of completely understanding how Vim does indenting and tabbing. I use a really simple setup: a tab looks like four spaces but isn’t, copy my indenting from previous lines, that’s it. I know Vim can do all kinds of weird indenting, and lots of the questions in #vim revolve around its indenting, so I thought I should learn how it all works, so as to be able to be more helpful on #vim. Well!

I’ve gotten through everything but indentexpr and cindent, which are admittedly the two most complicated pieces of the puzzle. Still, I have a much better idea of how the whole thing works, and I am scared. I’ve said a few times recently, the more I learn about Vim, the more I’m reminded of writing code for MUSHes. The whole thing is kind of a lumbering monstrosity, but it’s got such charm! I can do everything I need, and I feel like I gain just general “thinking skills” by learning how to solve problems with weird tools.

Of course, some things are just messed up. I don’t understand why options like ‘preserveindent’ exist, and I’m not sure why anyone is concerned that “tabs at the beginning are n spaces wide, but tabs elsewhere are m spaces wide.” If they are, though, I can now help them.

Given the quantity of tech book authors I talk to on IRC, I almost feel like it’d be a gas to write a new Vim book. Fortunately, I am (so far) neither arraogant nor crazy enough to really want to do so. Still, the Oualline book is getting outdated.

When I finish my survey of tabs and indents, I’ll publish my findings, at least.

Written on February 4, 2004