[Vim-latex-devel] a comment / patch
Brought to you by:
srinathava,
tmaas
From: Alan S. <ala...@po...> - 2003-03-03 16:01:17
|
Hi, I've been using the latex suite for quite a while, but I had not been upgrading for a very long time (more than a year). I decided to upgrade today and I have a comment / patch. I could not find a way to disable the use of a Makefile. I am working on a paper with some other people who use a Makefile that is definitely not tailored for the latex suite (interactive mode, missing targets). In order not to use it, I did the following change: Index: compiler.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v retrieving revision 1.21 diff -u -p -r1.21 compiler.vim --- compiler.vim 17 Jan 2003 18:41:44 -0000 1.21 +++ compiler.vim 3 Mar 2003 15:58:53 -0000 @@ -90,17 +90,11 @@ function! RunLaTeX() " close any preview windows left open. pclose! - " If a *.latexmain file is found, then use that file to - " construct a main file. - if Tex_GetMainFileName() != '' - let mainfname = Tex_GetMainFileName() - else - " otherwise just use this file. + " if a makefile and no *.latexmain exists, just use the make utility + " this also sets mainfname for the rest of the function + let mainfname = Tex_GetMainFileName() + if (glob('makefile') != '' || glob('Makefile') != '') && mainfname == '' let mainfname = expand("%:t:r") - endif - - " if a makefile exists, just use the make utility - if glob('makefile') != '' || glob('Makefile') != '' let _makeprg = &l:makeprg let &l:makeprg = 'make $*' if exists('s:target') @@ -110,6 +104,11 @@ function! RunLaTeX() endif let &l:makeprg = _makeprg else + " otherwise, if a *.latexmain file is found, then use that file to + " construct a main file. + if mainfname == '' + let mainfname = expand("%:t:r") + endif exec 'make '.mainfname endif This change basically short circuits the makefile if latexmain is defined. I have subscribed to the mailing list. I might send some more comments as I write a paper. Alan Schmitt -- The hacker: someone who figured things out and made something cool happen. |