This feels like a dumb question, but I can't find an answer on the Internet (or in VIM help). I'm using VIM 7.2 on Mac OS X. All I want to do is wrap my lines at 72 characters, but doing
:set textwidth=72
has no effect. The textwidth is being set correctly (I can see that when I just query ":set textwidth"), but neither existing lines nor new lines that I type after setting textwidth get wrapped. If I start a new line, still doesn't wrap. Open and close the file, no change. I've also tried :set wrapmargin=72 (with textwidth=0), with no effect.
What am I missing here?
Vim won't do anything unless requested.
textwidthwill have an effect for currently edited lines if you either havet(for non-comments only),c(for comments only) or both informatoptions(ifais not present there, then it will autowrap only when you reach the margin set bytextwidth), or if you usegqto reformat your text. If I am not mistaking, you can set suchformatexprorformatprgso thattextwidthwill be ignored.