On Mon, Jun 21, 2010 at 11:03 AM, Ben Fritz <[email protected]> wrote:

>
> On Jun 20, 6:36 pm, Tony Mechelynck <[email protected]>
> wrote:
> > On 20/06/10 23:10, Jay Heyl wrote:
> >
> > > I use Vim primarily for editing C source files. The feature that
> > > automatically repeats the comment marker, "//", at the start of a new
> > > line in insert mode is great.
> >
> > > Unfortunately, what I suspect is a related characteristic is not so
> > > great. Several times now I've been editing a line that begins with a
> > > multiply symbol, "*", separated by a space from the variable name that
> > > follows. When I press Enter I get a multiply symbol at the start of the
> > > next line. This isn't a major annoyance when I'm entering new code
> > > because it's readily noticeable, but when I'm reformatting existing
> code
> > > it's very easy to overlook and can create some highly unwanted results.
> > > Recently this happened and I didn't catch it. The result was an
> infinite
> > > loop that cost about two man-days to find.
> >
> >
> > I think Vim mistakes your multiply operator for the middle part of a
> > three-piece comment
>
> I think this as well. You can fix this (but lose the automatic
> insertion of these three-piece comments) by tweaking your 'comments'
> option, probably in ~/.vim/after/ftplugin/c.vim, to remove the "s1:/
> *,mb:*,ex:*/" that is included by default.
>

It would seem to be something else. I commented out the whole "setlocal
comments..." line in ftplugin/c.vim to see what would happen and I'm still
seeing the same behavior.

  -- Jay

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to