Thread: [Vim-latex-devel] First steps with LS (at last)
Brought to you by:
srinathava,
tmaas
From: Luc H. <her...@fr...> - 2004-06-17 01:14:00
|
Hello, I'm doing my first steps with LaXeX-suite (at last) and I have run into a little bug -- if we can call it a bug. It is easy to reproduce on my box: $> gvim foo.tex \ll And then Vim complains about s:target not defined into Tex_RunLaTeX(). Once :TTarget called, and \ll typed again, vim complains about :TCLevel beeing undefined. After investigations, it seems that =AB:compiler tex=BB is not executed -= - when I executed this, I only have one complain about a command redefined and then \ll can be used. It that normal ? Or is there a bug in my installation ? (LS beeing installed into ~/vimfiles/latex-suite which is the last directory of my 'runtimepath'). Regards. PS: I am using the version of yesterday I think. --=20 Luc Hermitte http://hermitte.free.fr/vim/ |
From: Srinath A. <sr...@fa...> - 2004-06-17 02:51:54
|
On Thu, 17 Jun 2004, Luc Hermitte wrote: > I'm doing my first steps with LaXeX-suite (at last) and I have run into > a little bug -- if we can call it a bug. > > It is easy to reproduce on my box: > $> gvim foo.tex > \ll > And then Vim complains about s:target not defined into Tex_RunLaTeX(). > > Once :TTarget called, and \ll typed again, vim complains about :TCLevel > beeing undefined. > > After investigations, it seems that =AB:compiler tex=BB is not executed -= - > when I executed this, I only have one complain about a command redefined > and then \ll can be used. > > It that normal ? Or is there a bug in my installation ? (LS beeing > installed into ~/vimfiles/latex-suite which is the last directory of my > 'runtimepath'). I remember that sourcing the compiler plugin was always a bit of a problem... I remember that it was some subtle bug in vim itself (or lack of documentation)... I see the following lines in main.vim: =09" This line seems to be necessary to source our compiler/tex.vim file. =09" The docs are unclear why this needs to be done even though this file i= s =09" the first compiler plugin in 'runtimepath'. =09runtime compiler/tex.vim So it looks like there was always a problem with getting latex-suite's tex/compiler.vim file to get sourced... Now that you put latex-suite at the end of the 'rtp', then latex-suite's compiler/tex.vim will not be sourced by the above line (:runtimepath only sources the first compiler/tex.vim found which will be vim's standard compiler/tex.vim). Anyway... The standard way of using latex-suite is to unzip it in your ~/vimfiles directory which will create ~/vimfiles/compiler/tex.vim which will in turn get sourced by the above line when you open a .tex file. Don't know exactly what goes wrong in situations like yours... Has to do with how vim sources compiler plugins when a .tex file is opened... Srinath PS: Hope latex-suite is useful :) |
From: Luc H. <her...@fr...> - 2004-06-17 03:56:48
|
* On Wed, Jun 16, 2004 at 07:52:00PM -0700, Srinath Avadhanula <srinath@f= astmail.fm> wrote: > > After investigations, it seems that =AB:compiler tex=BB is not execut= ed > > -- when I executed this, I only have one complain about a command > > redefined and then \ll can be used. > > > > It that normal ? Or is there a bug in my installation ? (LS beeing > > installed into ~/vimfiles/latex-suite which is the last directory of = my > > 'runtimepath'). >=20 > I remember that sourcing the compiler plugin was always a bit of a > problem... I remember that it was some subtle bug in vim itself (or > lack of documentation)... I see the following lines in main.vim: > runtime compiler/tex.vim OK I see, Thanks. Why don't you just execute :compiler tex (which in turns calls =AB:runtime! compiler/tex.vim=BB) ? This modification fixed the problem -- in my configuration at least. Is there any incompatibilities between $VIMRUNTIME/compiler/tex.vim (t63) and the one from LaTeXSuite (tls) that you want to load only LaTeXSuite's one ? If t63 is loaded first, then tls will override the definitions that need to be overriden, and LaTeXSuite will ignore the other ones I guess. If tls is loaded first, then it can set =ABcurrent_compiler=BB which will ab= ort the sourcing of t63. > The standard way of using latex-suite is to unzip it in your > ~/vimfiles directory which will create ~/vimfiles/compiler/tex.vim > which will in turn get sourced by the above line when you open a .tex > file. That would be too easy. ;) As LaTeXSuite and my configuration are quite redundant, I wanted to progressivelly integrate LaTeXSuite. Thus I had to rewrite some plugins of mine (like my context-dependant bracketing system) in order to fix the problems I had, and I didn't wanted the plugin of LaTeXSuite (like imaps.vim) to interact with my plugins the time I was fixing them. > Don't know exactly what goes wrong in situations like yours... Has to > do with how vim sources compiler plugins when a .tex file is opened... It is because you used =AB:runtime=BB and not =AB:runtime!=BB I guess. > PS: Hope latex-suite is useful :) It is, it is. First of all I do not need to maintain things like tex-tools.vim anymore. :) I can focus on my set of C&C++ ftplugins. I will have to search within the archive if haven't missed threads about little customisations I am interrested in (how to disable the preview of the log file (which is not automatically reloaded BTW) , how to integrate HT4Tex, ...), and you will see me again. :) Thanks! --=20 Luc Hermitte http://hermitte.free.fr/vim/ |
From: Srinath A. <sr...@fa...> - 2004-06-17 04:38:31
|
On Thu, 17 Jun 2004, Luc Hermitte wrote: > > I remember that sourcing the compiler plugin was always a bit of a > > problem... I remember that it was some subtle bug in vim itself (or > > lack of documentation)... I see the following lines in main.vim: > > =09runtime compiler/tex.vim > > OK I see, Thanks. > > Why don't you just execute > :compiler tex > (which in turns calls =AB:runtime! compiler/tex.vim=BB) ? > This modification fixed the problem -- in my configuration at least. > Hmm... This does look like it might be a better way of doing things. The thing which confuses me is why vim is not doing :runtime! compiler/tex.vim automatically when you open a tex file even though we have "filetype plugin on". Does vim only do: :runtime! ftplugin/tex.vim when you open a tex file?! (I am surprised I didn't know this already if its true) Its not mentioned anywhere in the docs that you have to manually source the compiler ftplugin IIRC. Latex-suite is not always installed in the same place. The debian distro instals it in /usr/share/vim/ etc. On windows, most people install it in ~/vimfiles... So its not given if latex-suite's compiler/tex.vim or vim's will get sourced first... but... > If t63 is loaded first, then tls will override the definitions that need > to be overriden, and LaTeXSuite will ignore the other ones I guess. If > tls is loaded first, then it can set =ABcurrent_compiler=BB which will ab= ort > the sourcing of t63. > =2E.. I guess that if I have latex-suite's compiler/tex.vim NOT finish even if 'current_compiler' exists and set it to 'latex' when it does get sourced, then it will handle both cases. Have to check this a bit thoroughly. I don't want to make a release where \ll doesn't work! :) > the log file (which is not automatically reloaded BTW) , how to > integrate HT4Tex, ...), and you will see me again. :) > Cool :) Srinath |
From: Luc H. <her...@fr...> - 2004-06-17 13:09:26
|
* On Wed, Jun 16, 2004 at 09:38:38PM -0700, Srinath Avadhanula <srinath@f= astmail.fm> wrote: > Hmm... This does look like it might be a better way of doing things. > The thing which confuses me is why vim is not doing > :runtime! compiler/tex.vim > automatically when you open a tex file even though we have "filetype > plugin on". Does vim only do: > :runtime! ftplugin/tex.vim > when you open a tex file?!=20 More or less yes.=20 (-> :runtime! ftplugin/tex.vim ftplugin/tex_*.vim ftplugin/tex/*.vim) > (I am surprised I didn't know this already if its true) Its not > mentioned anywhere in the docs that you have to manually source the > compiler ftplugin IIRC. They are not compiler ftplugin, but just compiler plugins IIRC. And vim can not know which ones must be sourced. The typical example is with C++ code. Vim can not guess if we are using VC++, BCB, DM C/C++, GCC, Open Watcom, ... Which means we can not have it automatically load any compiler plugin. (La)TeX is a special case as every (La)TeX compilers use the same &efm. Hence we can have only one compiler/tex.vim which is common to (fpTeX\|MiKTeX\|...)::(pdf(La)TeX\|(La)TeX\|...) It is not the same with the other languages. > > If t63 is loaded first, then tls will override the definitions that > > need to be overriden, and LaTeXSuite will ignore the other ones I > > guess. If tls is loaded first, then it can set =ABcurrent_compiler=BB > > which will abort the sourcing of t63. >=20 > ... I guess that if I have latex-suite's compiler/tex.vim NOT finish > even if 'current_compiler' exists and set it to 'latex' when it does > get sourced, then it will handle both cases. Have to check this a bit > thoroughly.=20 I think so. Moreover, this is what is said at the end of :h write-compiler-plugin Otherwise, it seems it is already the case as =AB:compiler tex=BB fixes t= he problem AFAIC -- when LaTeXSuite is at the end of 'runtimepath'. --=20 Luc Hermitte http://hermitte.free.fr/vim/ |