Hey thanks I was having the same issue.

On Feb 12, 10:12 am, Ben Fritz <[email protected]> wrote:
> On Feb 11, 3:00 pm, Joyce Tipping <[email protected]> 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

Reply via email to