0

With the minimal vimrc (with vimtex plugin):

set nocp
filetype plugin indent on
syntax on
set st=2
set acd
set wildmenu
set wildmode=longest,list,full
let $USRPLUGD=$HOME.'\vimfiles\myvim\plugged'
let $USRTEMPD=$HOME.'\vimfiles\myvim\vimtemp'
call plug#begin( $USRPLUGD )
" for latex
Plug 'lervag/vimtex'
call plug#end()

let g:tex_flavor = "latex"
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_quickfix_mode = 2
let g:vimtex_view_general_viewer='sumatrapdf'


let g:vimtex_compiler_latexmk = {
            \ 'backend' : 'process',
            \ 'background' : 1,
            \ 'build_dir' : $USRTEMPD,
            \ 'callback' : 1,
            \ 'continuous' : 1,
            \ 'executable' : 'latexmk',
            \ 'options' : [
            \   '-verbose',
            \   '-file-line-error',
            \   '-synctex=1',
            \   '-interaction=nonstopmode',
            \ ],
            \}

I found that the indent of tex source file is not work properly for \iff. Suppose we have a test.tex then after gg=G,

\documentclass{amsart}
\begin{document}
\section{Test}
\[
    a>b
\]
\end{document}

However, this indent scheme seems not work properly for \iff command:

\documentclass{amsart}
\begin{document}
\section{Test}
\[
    a>b \Longleftrightarrow a-b>0.
\]
Not work for \verb|\iff|
    \[
        a>b \iff a-b>0.
        \]
        \end{document}

As I have observed, we can replace \iff by \Longleftrightarrow. Is there any other solution such that the indention works for \iff?

1

The problem you are describing seems to be clearly concerning the vimtex plugin. The proper solution is therefore to raise this issue where it should be raised, i.e. at vimtex's issue tracker.

However, no need, I just fixed the issue, so if you update your plugins, then this indentation issue should be resolved. Please open an issue at the issue tracker if the problem should persist, or if you have other issures relating to vimtex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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