Tobias Pflug wrote:
Looks lika a misbehaving sript.
In the problem buffer (if and when the error reappears):
:verbose setlocal cindent? cinoptions? indentexpr?
- 'cinoptions' influences how 'cindent' works
- if 'indentexpr' is nonempty, it overrules 'cindent'.
":verbose" will tell you where each of these options was last set.
It just happened again right now. So here is the result of your
suggested command:
cindent
Last set from /usr/share/vim/vim70/indent/c.vim
cinoptions=
indentexpr=GetTexIndent()
Last set from ~/shared_home/vim/plugin/indent/tex.vim
So I suppose it might be tex.vim screwing things up there ?
Probably. Check the source of that tex.vim indent plugin. I suspect that
'indentexpr' is defined with ":set" (clobbering indent options for all windows
and buffers) instead of with ":setlocal" (setting the option for its own
buffer only).
If that is the case, replace "set" by "setlocal" in a line similar to
set indentexpr=GetTexIndent()
and notify the script's maintainer (whose name and email address ought to be
mentioned in a comment near the start of the script).
Best regards,
Tony.