Skip to content

General auto-unindent not working for a minimal install #2332

@abhijit-c

Description

@abhijit-c

Description

Hello,

First off, thank you. I've been using this plugin for many years and it's been fantastic.

That being said, recently I've run into an issue where my environments are refusing to auto-unindent on a \end{env} line. This is present on both of my Fedora workstations, but doesn't seem to happen on my MacOS install. I'm wondering if there were any tweaks to how indentation works that you recall might affect this?

Steps to reproduce

With minimal.vim being

set nocompatible "No vi compatible
call plug#begin('~/.vim/plugged')
Plug 'lervag/vimtex' "latex syntax highlighting, ToC view, synctex, etc.
call plug#end()
filetype plugin indent on "Load plugins + file specific indent
syntax on

and minimal.tex

\documentclass{minimal}
\begin{document}
Hello, work!
\begin{equation}
  \end{equation}
\end{document}

I'm running my test with vim -u minimal.vim minimal.tex.

Expected behavior

When I type \end{equation} on line 5, I expect that the line should auto-unindent to match the indentation of \begin{equation}.

Actual behavior

Upon typing the last } on line 5, the indentation remains one level higher than the \begin{equation} line.

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: Fedora release 35 (Thirty Five)
  Vim version: VIM 8.2 (1-4314)
  Has clientserver: false

VimTeX project: minimal
  base: minimal.tex
  root: /home/trostaft/Documents/vimtex-testing
  tex: /home/trostaft/Documents/vimtex-testing/minimal.tex
  main parser: current file verified
  document class: minimal
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions