[Vim-latex-devel] (La)TeX compilation
Brought to you by:
srinathava,
tmaas
From: Luc H. <her...@fr...> - 2003-07-15 08:58:46
|
Hello Srinath. * On Mon, Jul 14, 2003 at 06:46:01PM -0700, Srinath Avadhanula <sr...@fa...> wrote: > On Tue, 15 Jul 2003, Luc Hermitte wrote: > > Otherwise, I would have a request (partly implemented in my > > ftplugin). I'd like to have the choice of the way used to define > > the main TeX document between: > > - using a [bg]:dedicated_variable_for_this (whatever the final name > > is) > > - or using mainfile.{theproject} (or another name i don't remember) > > as you originally planned > > - or using a Makefile (if the right conditions are fulfilled) > > - or using the name of the current buffer. > > > > > For a while now, I have been thinking of a way to let the user be able > to very easily specify the main file name in whatever way he > chooses... > Right now, a central function Tex_GetMainFileName() is called whenever > a function needs the main tex file name (there are quite a few > functions which need this info). Right now, Tex_GetMainFileName() > checks for a {fname}.latexmain file and returns {fname} if possible, > otherwise it just returns '' (the calling function is supposed to > handle the case when it returns ''). There are various ways in which > we could make this customizable. > > Let the user define a variable g:Tex_MainFileExpr ('' by default) > which latex-suite will use as: > > if g:Tex_MainFileExpr != '' > exec 'let retval = '.g:Tex_MainFileExpr > return retval > endif If these 4 lines of code are present within Tex_GetMainFileName(), it sounds perfect. > You could then define g:Tex_MainFileExpr to be whatever you like. For > instance, you could use your extended let-modeline function here (if I > remember the nomenclature correctly). Well ... This is the nomenclature I used, but I am not sure it is English-proof. > How does this sound? Is it sufficient? Or were you thinking of > something else entirely? I was thinking of a function that centralizes all this mainfile-determination heuristic. => the functions depending on the project's main-file are easy to write/maintain. -- Luc Hermitte http://hermitte.free.fr/vim/ |