1

In my case, I was writing a tex file. After Closing some auto indent settings

set noai noci nosi
filetype indent off
filetype plugin indent off

But vim still gave me 2 tab indent when I type { or [ in a 2 level \begin, like:

\begin{...}
\begin{...}
        {
\end  {...}
\end  {...}

It is also shown in the picture, at line:55, the second \umlcreatecall.

I want no any auto indent, what will create it and how can I close it?

Thanks.

enter image description here

2

1 Answer 1

2

The issue is most likely due to the indentexpr option being set.

This option is typically set by the indent plug-in connected to the filetype.

You're disabling indent plug-ins with :filetype indent off, but you're doing so only after having opened a *.tex file in Vim. The indent plug-ins (together with filetype detection and filetype plug-ins) are applied when the file is opened, so disabling it after the file is opened will not undo these settings.

You can open Vim with no file open, then disable filetype indent plug-ins with :filetype indent off and finally open the *.tex file, in which case the indent plug-in will not be loaded and indentexpr will not be set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.