.tex file not associated with latexsuite by default

Bug #225943 reported by m.pavanakumar
12
Affects Status Importance Assigned to Milestone
vim-latexsuite (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: vim-latexsuite

For some reason when I install latexsuite, by default .tex files are not recognized but when I open a file with
extension .latex, latexsuite fires up new latex menus and works ....

Revision history for this message
Laurie Savage (savage-laurie) wrote :

Yes, this happens on my machine.

Revision history for this message
adiaz (andres-diaz-soto) wrote :

This happens to me too, not only with the ubuntu package (I'm using gutsy) but also installing latex-suite manually (using .tar.gz downloaded from vim-latex.sf.net) in my ~/.vim directory.

Revision history for this message
Albrecht Mühlenschulte (a7p) wrote :

Apart from #225411 it runs perfectly here.

You need to install vim-latexsuite for every user seperatly by
$ vim-addons install latex-suite

It is questionable if this should not be changed by installing vim-latexsuite into a part which is in vims runtimepath by default, so every user has vim-latex at hand automatically (btw. it would solve #225411, but it would tear us apart from the Debian package - but packaging an own vim-latexsuite is pretty easy).

Revision history for this message
Albrecht Mühlenschulte (a7p) wrote : Could reproduce for newly created .tex-files

I could redproduce this, but only for newly created files. Loading a saved .tex results in a running vim-latexsuite.

Changed in vim-latexsuite:
status: New → Confirmed
Revision history for this message
Albrecht Mühlenschulte (a7p) wrote :

When opening a new Buffer named <somthing>.tex the filetype in vim is set to "plaintex" (viewable via ":set filetype"). This filetype is not connected with the vim-latexsuite, which is totally right, since .tex is also the extension for plain-original-knuth-like TeX-Files (which are not supportet by vimLaTeX-suite).

When opening a file which is named <something>.tex the filetype is set to "plaintex" UNLESS the file begins with "\documentclass..." which is a strong evidence the file is a LaTeX and not a plainTeX-file. In this case vim sets the filetype variable to "tex" (and loads vim-latexplugin).

Files ending to .latex are automatically identified as LaTeX-files.

So it's not a bug, it's a feature ;).

If you want to write a LaTeX file in a newly created buffer, just type ":set filetype=tex" and everything is the way you want it. If you neverever will will write a plaintex-file you may put this into your .vimrc to override the _wise_ defaults:

autocmd BufNewFile,Bufread *.tex set filetype=tex

Changed in vim-latexsuite:
status: Confirmed → Invalid
Revision history for this message
Albrecht Mühlenschulte (a7p) wrote :

The more correct way to use .tex as the default ending for latex-files is pointed out here:
http://ubuntuforums.org/showpost.php?p=4344905&postcount=6

Revision history for this message
Michael Green (hermelinen) wrote : Re: [Bug 225943] Re: .tex file not associated with latexsuite by default

Thanks, that clears a few things up for me. I was under the impression
that tex was considered a proper extension for latex files in the vim
latex suite. Always nice to discover a bug to be a feature. :)

Ciao,
Michael

Albrecht Mühlenschulte wrote:
> When opening a new Buffer named <somthing>.tex the filetype in vim is
> set to "plaintex" (viewable via ":set filetype"). This filetype is not
> connected with the vim-latexsuite, which is totally right, since .tex is
> also the extension for plain-original-knuth-like TeX-Files (which are
> not supportet by vimLaTeX-suite).
>
> When opening a file which is named <something>.tex the filetype is set
> to "plaintex" UNLESS the file begins with "\documentclass..." which is a
> strong evidence the file is a LaTeX and not a plainTeX-file. In this
> case vim sets the filetype variable to "tex" (and loads vim-
> latexplugin).
>
> Files ending to .latex are automatically identified as LaTeX-files.
>
> So it's not a bug, it's a feature ;).
>
> If you want to write a LaTeX file in a newly created buffer, just type
> ":set filetype=tex" and everything is the way you want it. If you
> neverever will will write a plaintex-file you may put this into your
> .vimrc to override the _wise_ defaults:
>
> autocmd BufNewFile,Bufread *.tex set filetype=tex
>
> ** Changed in: vim-latexsuite (Ubuntu)
> Status: Confirmed => Invalid
>
>

--
Michael Green, PhD
Computational Biology & Biological Physics
Department of Theoretical Physics
Lund University
Sölvegatan 14A
SE-223 62 Lund
Sweden

email: <email address hidden>
phone: +46 (0)46 2223494
fax: +46 (0)46 2229686
www: http://cbbp.thep.lu.se/~michael

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.