Re: [Vim-latex-devel] Completion of Tcommands
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-07-15 01:46:07
|
Hi Luc, I will reply to the other points later (several very helpful hints there...), but I couldn't resist replying to the very last point now... 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 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). How does this sound? Is it sufficient? Or were you thinking of something else entirely? Srinath |