Wednesday, June 1, 2011

Re: Weird auto-comment after 72 lines

Try :help cinoptions (specifically, the *N value for which the help says:

    *N    Vim searches for unclosed comments at most N lines away.  This
          limits the time needed to search for the start of a comment.
          (default 30 lines).

I think that the help may be out of date, because the code (in get_c_indent(), misc1.c) has

    int ind_maxcomment = 70;

which would explain the 72-line behavior (it searches back 70 lines for the start of the comment, so line 71 works as expected, and line 72 doesn't.)

On Tue, May 31, 2011 at 9:44 PM, Gary Johnson <garyjohn@spocom.com> wrote:
On 2011-05-31, Fab wrote:
> Hi,
> I'm reporting a very strange behavior I have only noticed today on
> vim.
> If you open a C file (vim foo.c) and enter this text:
> /*
> then press ENTER
> vim will automatically align the comment and will insert automatically
> a space, star, space: ' * ' before every line.
>
> Unfortunately after 72 lines, this sort of convenient indentation
> capability stop working:
> vim insert only a star (no spaces), and sometimes (if previous text
> has some sort of indentation, it insert several spaces)
>



--
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

No comments:

Post a Comment