[TxMt] Re: help on folding rules

Piero D'Ancona pierodancona at gmail.com
Sun Jun 10 17:23:32 UTC 2007


Allan Odgaard <throw-away-1 at ...> writes:

> The indent for the fold start and fold stop marker needs to be the same.

So, at least now I understand the mechanism; it was not
clear for me after reading the manual (sorry).
Let me write it down explicitly for reference 
(correct me if I'm wrong):

Folding is determined by the patterns
listed in the language definition. But a startfold
and an endfold markers will be coupled only if
they have the same indentation, otherwise they
will be ignored (well, at least one of them). 
Thus if I write in a tex file

  \begin{equation}
\begin{split}
  \end{split}
\end{equation}

line 1 is coupled with line 3 and line 2 is coupled
with line 4. Moreover, the couple l2-l4 is nesting level
1, while the couple l1-l3 is nesting level 2

I am more and more convinced that an option
to ignore indentation could be useful... 
at least for languages like LaTeX,
where indentation is just a matter of taste.
One might add more precise start/stop markers
in the language definition to ensure proper coupling

Piero





More information about the textmate mailing list