[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turn off auto-indent
From: |
Arash Esbati |
Subject: |
Re: Turn off auto-indent |
Date: |
Tue, 05 Dec 2023 16:22:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
"Hefferon, Jim S." <jhefferon@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
- Turn off auto-indent, Hefferon, Jim S., 2023/12/05
- Re: Turn off auto-indent,
Arash Esbati <=
- Message not available
- Re: Turn off auto-indent, Arash Esbati, 2023/12/05
- Re: Turn off auto-indent, Hefferon, Jim S., 2023/12/05
- Re: Turn off auto-indent, Arash Esbati, 2023/12/06
- Re: Turn off auto-indent, Mandar Mitra, 2023/12/06
- Re: Turn off auto-indent, Hefferon, Jim S., 2023/12/06
- Re: Turn off auto-indent, Arash Esbati, 2023/12/06
- Re: Turn off auto-indent, Hefferon, Jim S., 2023/12/07
- Re: Turn off auto-indent, Arash Esbati, 2023/12/09