[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] visual-line-mode long-line-mode indent problem
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX] visual-line-mode long-line-mode indent problem |
Date: |
Mon, 23 Jan 2012 10:41:52 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux) |
Marco Stronati <address@hidden> writes:
Hi Marco,
> I am trying to switch from auto-fill-mode that insert hard line-break
> to either visual-line-mode or long-line-mode that use soft line-break.
> This is convenient because when using a version control system it is
> much easier to spot the actual modification,
I disagree. When every paragraph is in fact just one line, the VCS
diffs are usually huge and it's extremely hard to spot the actual
modification.
> and it make easier to work with other people too.
Yes, when writing docs together with people with inferior editors, I
also use visual-line-mode.
> Unfortunately if I enable one of these two modes with auctex I have no
> indentation inside environments
>
> \begin{definition}
> Bla bla bla bla bla bla bla bla
> bla bla bla bla bla bla
> bla bla bla bla bla bla
> \end{definition}
>
> is there a way to solve this?
If you already use Emacs 24 with it's integrated package manager,
there's the adaptive-wrap package on GNU ELPA. That visually indents
the wrapped around lines according to the indentation of the previous
line. So your example above would be shown as
\begin{definition}
Bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla
bla bla bla bla
\end{definition}
where all the bla-blas are actually on one logical line.
I activate this mode whenever visual-line-mode is enabled:
(add-hook 'visual-line-mode-hook 'adaptive-wrap-prefix-mode)
Bye,
Tassilo