Loading ...
Sorry, an error occurred while loading the content.

44693Re: better recognising of tex vs plaintex filetype

Expand Messages
  • Stefano Zacchiroli
    Aug 30, 2006
      On Wed, Aug 30, 2006 at 08:42:52AM -0400, Benji Fisher wrote:
      > 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

      Yes, sure, I was proposing it to you assuming it could have been an
      improvement for all users. In Debian we try to push "upstream" changes
      we think are useful. Of course if you don't agree on this change it is

      > > 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.

      Ok, got it, I will then decide whether to change the default in Debian
      depending on users willingness.

      > Please read the thread on this list started Mar 2, 2006, with the
      > subject
      > RFC: filetypes for TeX, LaTeX, ConTeXT (others?)

      Thanks for the pointer.

      > > 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?

      In Debian we usually first implement changes as patches to our packages
      and then try to push patches upstream, hoping to improve the life of
      non-Debian users. So yes to both questions: first modifying our package,
      than proposing the modification for the official

      > 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.

      I'm not really fond of plain TeX, but I think it is not really
      widespread to \input slices of plain TeX. So the idea mentioned in this
      thread was to implement the policy: "if a document starts with a lot of
      blanks followed by one of the possible LaTeX sectioning commands, then
      it is (probably) a LaTeX source file". What do you think of this policy?

      Of course the comment about plain TeX coming first still applies, but
      maybe you like this or have a better suggestion :-)


      Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
      zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
      If there's any real truth it's that the entire multidimensional infinity
      of the Universe is almost certainly being run by a bunch of maniacs. -!-
    • Show all 11 messages in this topic