On Tue, Aug 29, 2006 at 09:16:41PM +0200, Stefano Zacchiroli wrote:
> On Tue, Aug 29, 2006 at 03:06:39PM -0400, Benji Fisher wrote:
> >      I do not think there is any reliable way to distinguish between
> > plain TeX and LaTeX.  After my RFC, I decided to treat plain TeX as the
> > default, since it is the more basic, even though I agree that LaTeX is
> > probably far more common now.  I suggest adding
> > 
> > let tex_flavor = "latex"
> > 
> > to your vimrc file.
> 
> Hi Benji, thanks for your feedback.
> 
> In my mail I was more talking as the maintainer of the vim package (and
> of the vim-latexsuite add-on), than as a vim user. Since I've been
> bugged by users asking for more recognition of LaTeX I was wondering if
> you agree to change the vim-wide default, instead of changing it on a
> per-user basis.

     If you maintain a vim package (for Debian, guessing from your
sig?), then you can always define g:tex_flavor in a system vimrc if you
want.  BTW, the documentation for this is under

:help ft-tex-plugin

Having already made the decision one way after a RFC, I am reluctant to
reverse it.  If I then get a rash of complaints from plain TeX and
conTeXt users, would I have to reverse it again?

> Since you agree that LaTeX is more common, what is exactly your argument
> against having it as the default?

     Plain TeX came first, so it has priority.  (Maybe LaTeX 2ε is an
independent format, but I remember when LaTeX first came out that it was
actually a bunch of \def's made on top of plain TeX.)  This is the same
logic that leads to keeping vi-compatible regular expressions, despite
the persistent suggestions that vim adopt PCRE.

     Defaults should cater to users who do simple things, and plain TeX
is simpler than LaTeX.  Writing LaTeX and splitting your document among
multiple files (so that most of them do not have the \begin{document}
line) is complicated, and anyone doing this should be willing to
customize his or her vimrc file appropriately.

     Please read the thread on this list started Mar 2, 2006, with the
subject

        RFC:  filetypes for TeX, LaTeX, ConTeXT (others?)

> Beside that, I agree with the other proposal in this thread of
> recognizing as LaTeX files which starts with a sectioning command (after
> several possible blanks of course), and I'm going to implement it.
> 
> Any comments on that choice?

     Do you mean you plan to implement it as a proposed modification to
$VIMRUNTIME/filetype.vim in the standard distribution, or a change to
your vim package?  I agree with the comment that plain TeX users may
also define such sectioning commands.  Maybe it would be safe if you
check for such definitions, using an include-file search ... but of
course, that is more convenient after ftplugin/plaintex.vim has been
:source'd.

HTH                                     --Benji Fisher

Reply via email to