Bug#412506: more info

Stefano Zacchiroli zack at debian.org
Fri Jun 22 12:19:38 UTC 2007

On Fri, Jun 22, 2007 at 10:22:54AM +0100, martin f krafft wrote:
> I found the problem, it's because I
>   let tex_flavor = 'latex'

I still can't reproduce it, even with that. Are you trying on a
particular TeX file? An empty one? Anything else you can attach?

Other dumb question: are you sure the file which is mentioned in the
error is the one coming from the latexsuite (you can check the md5sums
or just reinstall...)

> in my .vimrc. Not sure if this is a bug, but I found no other way to
> make vim/latexsuite treat my .tex files as LaTeX instead of TeX.

Here are a couple of hints for dealing with that. The latexsuite is not
responsible for deciding whether a file is tex or latex, it's rather
only invoked in the latter case. Vim itself decides (via filetype.vim)
whether a file is TeX ('filetype' = plaintex) or LaTeX ('filetype' =
tex), in the latter case invokes the latexsuite.

The heuristic do decide that (see around line 1840 of
/usr/share/vim/vimcurrent/filetype.vim) is based on the first command
contained in a file. If for example it is \documentclass then the file
is LaTeX. The default for empty .tex files is (unfortunately, but that
was decided on the vim-dev upstream mailing list) "plaintex".

So you can either manually do "setf tex" to manually set enable LaTeX
features (including the latex suite) when vim wrongly detects a plaintex
file. You can also (not tried though) put "setf tex" inside
~/.vim/after/ftplugin/plaintex.vim to flip-flop from plaintex to tex
when vim detect a TeX file. That would of course inhibit you from
editing properly TeX file, but who edits them nowadays?


Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20070622/7c8653bb/attachment-0001.pgp 

More information about the pkg-vim-maintainers mailing list