# Is there a default / official / standard Vim indentation file for TeX, or just best practices for TeX source indentation?

If you see here, the author mentions an "official version" of an indentation script from Johannes Zellner. The link is broken and while there are traces of Zellner all over the interwebs, I can't find the script.

Maybe there is a more up to date, somehow "official" (e.g. endorsed by TUG or some community, such as this one!) script for TeX indentation in Vim? (Or more particularly, in Vim+Latex-Suite, not that that really should make a difference?)

If not, I'll probably customize Tanzler's script, in which case, my question becomes "what are the best practices for TeX source indentation"?

I'm inclined to do

First sentence of new paragraph
continuation of first sentence.
Second sentence of paragraph
continuation of second sentence.
Third sentence of paragraph
continuation.
\begin{environment}
\item First item
continuation of first item
\item Second item
\end{environment}


etc., but if there are established best practices for TeX source indentation, I will follow them instead.

EDIT: Screenshots illustrating @J.C.Salomon 's explanation.

My original way:

Suggested better way:

-
I wouldn’t indent sentences & phrases that way. Per my answer at <tex.stackexchange.com/a/64538/2966>; though, breaking lines at sentence- and significant phrase-boundaries might well be a good idea, especially if you’re using some sort of VCS to record edits you make. –  J. C. Salomon Aug 6 '12 at 3:51
That said, the way you’ve indented the environment & the \item lines within it are fairly standard. –  J. C. Salomon Aug 6 '12 at 3:52
I do tend to use phrase-boundaries when possible to split sentences across lines, but I find it easier to scan across sentences when they have a bit more indentation. I'm not wedded to any style though. –  Philip Aug 6 '12 at 19:59
Extra indentation means that splitting or joining paragraphs have a larger diff than needed in the version-control system you’re using. –  J. C. Salomon Aug 7 '12 at 3:18
Write a plain text file with a four-sentence paragraph according to your indentation scheme. Split the paragraph after the second sentence. Run diff on the two versions. Then try the experiment without that indentation. Compare the diffs: which has less uninteresting information? –  J. C. Salomon Aug 7 '12 at 21:14

There are no real standards, but here are some tips I’ve found handy:

Don’t indent parts of a paragraph, but do break lines between sentences and after significant phrases within a sentence. As I posted at http://tex.stackexchange.com/a/64538/2966, this makes it easier for small edits to have small diffs. (You are using a VCS, aren’t you?) To exaggerate my own tendency toward long sentences (which benefit even more from this tip), here’s an example:

I tend toward long sentences with many dependent clauses,
and my rewrites often combine or split these,

For readability, indent the content of most environments. The small ones, at least; indenting everything between \begin{document} and \end{document} is rather pointless. Spaces or tabs, or the depth of the indent, are all up to you. Just stay consistent within a document.