Oops, I think I sent my last message only to Ben ... Here's a quick summary for those of you who are curious how this played out. :)
Removing smartindent from my vimrc solved the problem. I looked through my files and, indeed, it only happens after a line starting with the word "for". (Pretty subtle - I doubt I would've ever noticed on my own, let alone known why.) I think I introduced the problem when I redid my vimrc a few months ago based on a web tutorial that recommended smartindent; I suspect the tutorial was outdated. Something to check in the future. :) So thanks again! Joyce Ben Fritz wrote: > > > Assuming I understand your problem, this is the cause. I presume the > strange behavior you're referring to, is the lines after the line that > starts with "for a car...". > > The 'smartindent' option is a deprecated option for indenting C code. > The C programming language has a construct called a "for loop" which > is (generally) a line that begins with the word, "for" and is indented > on the next line. > > 'smartindent' is not really meant for plain text editing, and you > generally get better results for C code by turning on filetype > indentation with "filetype indent plugin on" in your .vimrc. > > My recommendation: remove 'smartindent' from your .vimrc and consider > enabling filetype plugins and indentation. > > -- > You received this message from the "vim_use" maillist. > For more information, visit http://www.vim.org/maillist.php > > -- View this message in context: http://old.nabble.com/Text-wrapping-with-%22gq%22-is-doing-something-really-weird-...-tp27554664p27556741.html Sent from the Vim - General mailing list archive at Nabble.com. -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php