Check the 'cindent' option too. Discussed in the topic "strangely increased indentation after a line ending with comma" http://groups.google.com/group/vim_use/browse_thread/thread/71f18d843699dd31?hl=en
Tom On Feb 12, 7:35 am, "sash...@gmail.com" <sash...@gmail.com> wrote: > Hey thanks I was having the same issue. > > On Feb 12, 10:12 am, Ben Fritz <fritzophre...@gmail.com> wrote: > > > > > On Feb 11, 3:00 pm, Joyce Tipping <jo...@spencertipping.com> wrote: > > > > Hi guys, > > > > I've been having an odd problem with my automatic text wrapping in vim. I > > > wrap my text with the "gq" command, sometimes as "gqap" (to wrap a > > > paragraph), sometimes as "gggqG" (to wrap the whole document). I've been > > > using vim for years and I don't recall ever having this issue. > > > > Just recently, it started doing something really weird. I think a picture > > > is > > > worth a thousand words, so here's a blog post I've been working on: > > > >http://old.nabble.com/file/p27554664/vim-problem.png > > > > Here's the contents of my vimrc: > > > > [snip] > > > 7 set smartindent > > > 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.- Hide quoted text - > > > - Show quoted text - -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php