This problem was recently posted to superuser:
http://superuser.com/questions/230351/vim-format-latex-issues-with-line-breaks/230380#230380

Vim's indent command, =, obeys the 'cinoptions' '+' flag even though
'cindent' is off.

Start vim like this:

    $ vim -N -u NONE

Enter these lines:

    asdf\\
    sdf\\
    dfg

Execute

    gg=G

The result looks like this:

    asdf\\
                    sdf\\
                    dfg

where the second and third lines are indented by two tabs.

Now execute these commands:

    :set cinoptions=+0
    gg=G

The indentation is removed.

Since 'cindent' is not set, nor is any other indent option, it seems
to me that Vim should not indent those lines.  Their indentation
certainly should not be affected by their contents, and should not
be affected by the value of 'cinoptions' when 'cindent' is not set.

It also seems odd that with and empty 'cinoptions' the indentation
is two tabs when the default value of the '+' flag is one
shiftwidth.

The behavior is the same on 7.2.148 on Linux and 7.3.46 on Windows.

Regards,
Gary

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui