"Hefferon, Jim S." <jheffe...@smcvt.edu> writes: > Apologies if this is a dopey question and I am missing something > simple. I'd like to turn off auto indent, so that hitting <Enter> no > longer tries to match to the enclosing environments. > > Until recently, this accomplished what I wanted. > > ;; Turn off auto indent in AUC TeX > ;; https://tex.stackexchange.com/q/468047/339 > ;; and https://emacs.stackexchange.com/a/30148 > (defun remove-electric-indent-mode () > (electric-indent-local-mode -1)) > (add-hook 'LaTeX-mode-hook 'remove-electric-indent-mode) > (add-hook 'tex-mode-hook 'remove-electric-indent-mode)
With the setting above, what is the value of the variable `electric-indent-mode' when you open a .tex file, nil or t? > These result in indenting when you are leaving an environment, so if I > indent by hand as here > > xxxx > \begin{itemize} > > \end{itemize}test > > xxxx > > and put the cursor at the start of "test" and hit <Enter> then "test" > lines up with the backslash in \end{itemize}. If I open a .tex file, do 'M-x electric-indent-local-mode RET' in order to turn off the mode locally, I get this with your example: xxxx \begin{itemize} \end{itemize} test xxxx I think this is what you also want, right? Best, Arash